CRM and CX Blogs by SAP
Stay up-to-date on the latest developments and product news about intelligent customer experience and CRM technologies through blog posts from SAP experts.
cancel
Showing results for 
Search instead for 
Did you mean: 
susanne_zeller2
Employee
Employee

1 Overview

This document is intended for technical consultants and provides information about integrating a new search attribute into the agent inbox (inbox), which is currently not included in the set of the available search attributes.

The new search attribute can only be supported by one inbox item type or by all inbox item types.

This guide is valid for releases SAP Enhancement Package 1 for SAP CRM 7.0 (CRM701) and higher.

2 Prerequisites

This document focuses on how to make the new search attribute available in the inbox. The BOL query implementation of the relevant inbox item type(s) must support this search attribute.

3 UI Integration

Following this step, the new search attribute is available in the inbox search views on the WebClient UI.

The following inbox search views are available:

  • Standard search: ICCMP_INBOX/InboxSearch
  • Advanced search: ICCMP_INBOX/InboxAdvancedSearch.

Your setup defines whether you want to make the new search attribute available in one or in both search views. The following steps indicate which steps are required for which search view.

3.1 Enhancement of Structure CRMST_AUINBOX_SEARCH

For the standard search the search is assigned to the query object BTQueryAUI, using the structure CRMST_AUINBOX_SEARCH.

For the advanced search the search is assigned to the dynamic query object BTAdvQueryAUI, using the structure CRMST_AUINBOX_ADVSEARCH. The structure CRMST_AUINBOX_ADVSEARCH includes the structure CRMST_AUINBOX_SEARCH.

This means that the same structure must be enhanced for both search views.

For the structure CRMST_AUINBOX_ADVSEARCH, create an append structure, such as ZADD_SEARCH_ATTR. Add the new search attribute to the append structure.

3.2 Make Search Attribute Available in Standard Search

The new field is available in the UI configuration as soon as it was added to the structure above.

If you do not require any input help or search help for this field, continue with the step Add the New Attribute to the UI Configuration. In this case, no UI enhancement of view ICCMP_INBOX/InboxSearch is required.

3.3 Make Search Attribute Available in Advanced Search

The new field is not automatically available in the UI configuration.

To make the new field available in the UI configuration, the design layer object must be adapted as follows:

  • Go to Customizing for Customer Relationship Management under UI Framework – UI Framework Definition – Design Layer – Copy SAP Design Objects.
  • Select the Object Type IC_INBOX
  • Select the Design Object BTADVQUERYAUI
  • Create a copy using the ‘Copy from SAP’ button. By copying the design object, the user-defined design object is automatically assigned to the views to which the SAP design object is assigned to.
  • Use the ‘Go to Copies’ buttons to edit the user-defined design object.
  • Adapt the user-defined design object: Add the new field to the list.

For more information about the design layer see SAP Help Portal at help.sap.com/crm -> <Choose release> -> Application Help-> WebClient UI Framework -> Design Layer.

3.4 Adding Input Help to the Search Attribute

If you want to provide an input help or a dropdown list for the new search attribute, more changes to the UI components are required, and the UI component must be enhanced.

For more information on framework enhancement see SAP Help Portal at help.sap.com/crm -> <Choose release> -> Application Help -> WebClient UI Framework -> Framework Enhancement.

The required implementation depends on the new search attribute and cannot be explained in this document. For more information on how to implement an input help and a dropdown list, see these documents: http://scn.sap.com/docs/DOC-5201 & http://scn.sap.com/docs/DOC-5197

3.5 Add New Attribute to UI Configuration

To change the delivered UI configuration, a configuration must be created in the customer namespace. For more information see SAP Help Portal at help.sap.com/crm -> <Choose release> -> Application Help -> WebClient UI Framework -> UI Configuration Tool.

After completing the steps described above for the standard and the advanced search, the new field is available under Available Search Criteria and can be moved to Selected Search Criteria to make it available on the UI.

4 Search Integration 

After completing this step, the new search attribute is handled in the inbox search.

The search for different item types is triggered by the method GET_QUERY_RESULT (CL_CRM_AUI_QUERY_SERVICE).

During the search for an inbox item type, the system performs the following steps:

  • Checks if the selected main category matches the inbox item type (generic)
  • Performs the attribute validity check
  • Maps the search attributes
  • Calls the inbox BAdI method BEFORE_SEARCH (IF_EX_CRM_IC_INBOX_BADI)
  • Performs checks (for example, valid object ID)
  • Triggers the inbox item type BOL query
  • Calls the inbox BAdI method AFTER_SEARCH ( IF_EX_CRM_IC_INBOX_BADI)
  • Creates result entities (AUI entity or AUI result entity)
  • Fills the sort table

To include a new search attribute in the existing inbox search, the following steps must be performed:

  1. Enable the attribute validity check for new search attribute.
  2. Optional: map the search attribute.
  3. Extend the search structure that is specific to the inbox item type and extend the BOL query implementation.

4.1 Enable the Attribute Validity Check

This section is only relevant if the business function IC Inbox Extensions (CRM_IC_INBOX) has been activated. For more information about the business function IC Inbox Extensions, see SAP Help Portal at help.sap.com/crm -> <Choose release> -> Application Help -> Business Functions for SAP Customer Relationship Management -> Interaction Center -> IC Inbox Extensions.

The attribute validity check is a generic functionality that checks if the search attributes used are supported by the selected main categories. If a search attribute is not supported by a certain main category, the search for this main category is not performed. A corresponding error message is displayed in the search processing log. For more information about the search attribute validity check, see SAP Help Portal at help.sap.com/crm -> <Choose release> -> Application Help -> Interaction Center -> Interaction Center WebClient -> Agent Inbox in the Interaction Center WebClient -> Inbox Search.

If you do not enable the attribute validity check for the new search attribute, the system tries to process all searches for this search attribute even if the combination of search attribute and main category is not supported. This means that the searches could return unclear search results.

The attribute validity check is based on the system table CRMC_AUI_SEARCH. When adding a new search attribute, entries in table CRMC_AUI_SEARCH have to be made as follows:

  • If the new search attribute is only introduced for specific inbox item types, an entry is required for the new search attribute and for all inbox item types that support the search attribute.
  • If the new search attribute is introduced for all inbox item types, no entry in this table is required.

Since the table CRMC_AUI_SEARCH is a system table, making table entries is a modification.

4.2 Map the Search Attribute

For each inbox item type, method MAP_PARAM_<item_type> is available. In this method the search attributes from the UI (variable QUERY_PARAMS) are mapped to the corresponding search parameters of the BOL query. If the name of the new search attribute in the UI structure is different from the name in the BOL search structure, you must do the mapping. The parameters returned by this method are handed over to the BOL query in the respective methods GET_<item_type>_QUERY_RESULT.

Changing the logic in the method MAP_PARAM_<item_type> (CL_CRM_AUI_QUERY_SERVICE) is a modification.

If the business function IC Inbox Extensions (CRM_IC_INBOX) is not activated and the attribute validity check is not enabled, it can happen that the new search attribute is handed over to a BOL query that does not support the new search attribute. This has to be handled either in the method MAP_PARAM_<item_type> or in the respective BOL query implementation.

4.3 Extend the Search Structure that Is Specific to the Inbox Item Type and Extend the BOL Query Implementation

Each inbox item type uses its own BOL query that is called from GET_<item_type>_QUERY_RESULT (CL_CRM_AUI_QUERY_SERVICE).

The respective BOL query must be extended for each inbox item type that is to support the new search attribute. The new search attribute from the inbox UI must be passed to the relevant search API. Since this is specific to the inbox item type and to the search attribute, no more details are provided in this document.

The following table provides an overview of the different inbox item types and their BOL implementation:

Inbox Item TypeBOL Query ObjectSearch StructureSearch Implementation Class
ONEORDERBTQueryAUICRMST_AUINBOX_SEARCHCL_CRM_QUERYAUI_RUN_BTIL
ONEORDER
(lean search)
BTQueryLeanAUICRMST_AUINBOX_SEARCHCL_CRM_QUERYLEANAUI_RUN_BTIL
CASECmgCaseStandardCRMT_CMG_SELPARACL_CRM_CMG_IL
WORKITEMAUI_WI_SOQueryCRMST_QUERY_AUI_WICL_CRM_IC_AUI_WI
WFWORKITEMAUI_WF_WIQueryCRMST_BSP_WFM_SEARCHCL_CRM_IC_AUI_WF_WI
ERPORDERERPQueryInboxCRMST_QUERYINBOX_ERPILCL_CRM_QUERYINBOX_RUN_ERPIL
ERPORDER
(lean seach)
ERPQueryInbLeanCRMST_QUERYINBOX_ERPILCL_CRM_QUERYINBLEAN_RUN_ERPIL

 

Note that the lean search is only relevant if the business function IC and Communication-Enabled Business Processes (CRM_IC_CEBP) has been activated. For more information about the business function IC and Communication-Enabled Business Processes, see SAP Help Portal at help.sap.com/crm -> <Choose release> -> Application Help -> Business Functions for SAP Customer Relationship Management -> Interaction Center -> IC and Communication-Enabled Business Processes

5 Integration into Accelerated Search Based on SAP HANA

This section is only relevant if the business function IC Inbox Extensions and Acceleration (CRM_IC_INBOX_ACC) has been activated. For more information about business function IC Inbox Extensions and Acceleration, see SAP Help Portal at help.sap.com/crm -> <Choose release> -> Application Help -> Business Functions for SAP Customer Relationship Management -> Interaction Center -> IC Inbox Extensions and Acceleration.

After completing this step, the new search attribute is available in the SAP HANA content for the accelerated inbox search and can be used in the accelerated inbox search. If this step is not completed and other steps in this document have been completed, the non-accelerated search is always performed if the new search attribute is used.

Please note, if a new search attribute is added to the HANA Content, the attribute is also available as result attribute. To enable the attribute as result attribute in the inbox UI, see the document “How to Integrate New Result List Attributes to the Agent Inbox”.

5.1 Enhancing the SAP HANA Content for the Accelerated Inbox Search

The SAP HANA content for the accelerated inbox search is found in the package sap.crm.ic-aui. Each inbox item type provides an attribute view that contains the required search and result attributes. The calculation view CA_IC_INBOX combines all attribute views by mapping the attributes to a single set of attributes.

The following steps have to be performed to include a new search attribute in the SAP HANA content for the accelerated inbox search:

  1. Copy the attribute view for the item type that you want to enable for the new search attribute.
  2. Enhance the copy of the attribute view by adding the new search attribute to the output of the attribute view.
    If the new result list attribute is already part of the tables used in the attribute view, it must be added to the attribute view output. If not, the relevant table must first be replicated to SAP HANA and included in the attribute view.
  3. Copy the calculation view CA_IC_INBOX. After copying the calculation view still contains a union of the standard attribute views. To replace one attribute view with your own view, you have to first add that view to the union and map all attributes of the new attribute view to the attributes of the calculation view must be done. After this task has been complete, you can delete the standard attribute view that was replaced by the new attribute view from the union.
    We recommend using the same name for the attribute in the attribute view and the calculation view as that used in the extended ABAP search structure. (See chapter 1.2.1). If the name in the calculation view has to be different from the name in the ABAP structure, provide the mapping using CL_CRM_AUI_SERVICE_EXT-> IF_CRM_AUI_HANA_UTIL~ADD_HANA_FIELD_MAPPING().
  4. Activate the changed objects and test the new attribute in the calculation view using the SQL Editor.

For more information, see the following documentation:

  • SAP Help Portal at help.sap.com/crm -> <Choose release> -> Application Help -> Interaction Center -> Interaction Center WebClient -> Accelerated Inbox Search -> SAP HANA Content for Accelerated Search and Setting Up the Accelerated Inbox Search
  • SAP Help Portal at http://help.sap.com/hana_appliance#section5

5.2 Integrating the New SAP HANA Content into the Inbox Search

When you changed the name of the path or the calculation view in the previous step, you have to adapt the inbox acceleration profile for your business role.

Go to Customizing for Customer Relationship Management under Interaction Center WebClient – Agent Inbox – Define Inbox Acceleration Profiles.

In package enter the name of the path, in Calc. View enter the name of your calculation view.

Assign this profile to your business role.

5.3 Enhancing Business Transaction Table (Optional)

The SAP HANA Content for business transactions (attribute view AT_ORDER) is based on the business transaction table for accelerated search. For more information, see SAP Help Portal at help.sap.com/crm -> <Choose release> -> Application Help -> Interaction Center -> Interaction Center WebClient -> Agent Inbox -> Accelerated Inbox Search -> Business Transaction Table for Accelerated Search.

You can enhance the business transaction table with a new attribute and then include this attribute in the attribute view AT_ORDER instead of joining a different table inside the attribute view. The performance of the search might be better when using this option.

To enhance the business transaction table, the database table CRMD_AUI_BTIDX, the load report and the delta update of the table have to be enhanced:

  1. Enhance table CRMD_AUI_BTIDX
    For the table CRMD_AUI_BTIDX, create an append structure, such as ZADD_SEARCH_ATTR_BTIDX. Add the new search attribute to the append structure.
  2. To fill the new attribute in table CRMD_AUI_BTIDX, the initial load report and delta update logic has to be enhanced. This is done in method READ_HEADER (CL_CRM_AUI_BTIDX). We recommend to insert the coding for filling the new attribute at the very end of the method right before the APPEND statement. This is a modification.
    After doing this change, the initial load report CRM_AUI_BT_INDEX_INITIAL_LOAD can be run to fill the table including the new attribute.

6 Appendix

6.1 Relevant Business Functions

  • Business function IC and Communication-Enabled Business Processes (CRM_IC_CEBP) for lean and asynchronous search
  • Business function IC Inbox Extensions (CRM_IC_INBOX) for attribute validity check
  • Business function IC Inbox Extensions and Acceleration (CRM_IC_INBOX_ACC) for accelerated search and dashboard
2 Comments