EDUCAÇÃO E TECNOLOGIA

SAP Fiori for SAP S/4HANA – Resolving duplicate search objects

The use case:

You activated all search objects in SAP Fiori for SAP S/4HANA, for example using task list SAP_ESH_INITIAL_SETUP_WRK_CLIENT and software component SAPAPPLH.

Hint: SAPAPPLH is the standard software component for all the delivered search models for SAP S/4HANA.

The problem:

When you go to use thee Search in the SAP Fiori launchpad, you notice there are some searches  in the dropdown lists of  Search Objects that are marked as duplicates. This looks ugly, as the duplicates also show the technical search connector ID to distinguish between the duplicates.  And it’s very confusing for your business users. How do you stop this?

Duplicate%20search%20objects%20appearing%20in%20the%20search%20objects%20dropdown%20of%20SAP%20Fiori%20launchpad%20search%20feature

Duplicate search objects appearing in the search objects dropdown of SAP Fiori launchpad search feature

The solution:

Don’t worry it’s easy to fix!

In this blog post you will learn:

  • Why you might see duplicate search objects
  • How to remove (deactivate) unwanted search objects
  • List of Known Duplicate Search Objects
  • Why Enterprise Search is moving to CDS View based searches
  • Further resources for Enterprise Search

Enterprise Search is moving to CDS View powered searches over time.  This is a gradual process  that started with SAP S/4HANA 1809 and continues across higher SAP S/4HANA releases. So where you see “duplicate” searches it’s usually where a new CDS View search model has been introduced to replace the older classic search option.

What are Search Models? A search model contains the technical details for a search object, such as the data source,  which fields are used to filter the search, which fields are shown in search results, what semantic object is used to derive the app links shown with the search results, etc.

What are Search Connectors? When activating a search model, a search connector is created. A connector is the runtime object corresponding to the search model. It is system-specific and client-specific.

Classic search connectors have a technical name that starts with the system and client followed by the search model name, for example: S4H100~VENDOR_H~ where the System ID = S4H and the client = 100, and the search model is VENDOR_H.

CDS View-based search connectors have a technical name that starts with CD$ALL  followed by the search model name, for example: CD$ALL~ESH_U_SUPPLIERSM~ where the search model is ESH_U_SUPPLIERSM.

Occasionally when upgrading, even the new CDS View search may have been replaced by a revised and improved CDS View search model in your release.

For example, for Activity Types the newer search connector CD$ALL~ESH_U_ACTYTYPEV2~  supersedes the older  CD$ALL~ESH_U_ACTIVITY_T~. Similarly for cost centers the newer search connector  CD$ALL~ESH_S_CSTCNTRV2~ supersedes the older search connector CD$ALL~ESH_U_COST_CENTE~.

It is this technical search connector ID you see in the search dropdown list when there are duplicates.  For example in the screenshot below you can see the rows  Cost  Center duplicate CD$ALL~ESH_S_CSTCNTRV2~ and Cost Center duplicate CD$ALL~ESH_U_COST_CENTE~.

CDS%20View%20search%20models%20for%20Cost%20Center

There are multiple CDS View search models for Cost Center

So you need to know how to deactivate both classic search objects and CDS View search models, or more precisely their search connectors.

What are Search Connectors? When activating a search model, a search connector is created. A connector is the runtime object corresponding to the search model. It is system-specific and client-specific.

There are 2 main options for deactivating search objects, or to be precise, to deactivate the matching Search Connector for your system and client.

  1. For both classic search objects and CDS View-based search objects, you can deactivate the matching search connector in transaction ESH_COCKPIT
  2. For CDS View searches only, you can deactivate the matching search connector in SAP Fiori app F3036 Manage Search Models

There is also a 3rd fallback technical option in case of unexpected issues (or if your SAP S/4HANA release does not include SAP Fiori app F3036 Manage Search Models). This fallback option uses transaction ESH_DASHBOARD.

You will find a summary of the procedure for each approach below.

Deactivating search connectors in the Enterprise Search Cockpit (transaction ESH_COCKPIT)

Launching transaction ESH_COCKPIT will take you to a ABAP Web Dynpro application for managing enterprise search models titled “Connector Administration Cockpit”. You can review all available search models and deactivate unwanted search models using the cockpit.

Transaction%20ESH_COCKPIT%20launches%20the%20Connector%20Administration%20Cockpit

Transaction ESH_COCKPIT launches the Connector Administration Cockpit and shows the Active or Inactive status of searches

For example, you might have 2 search duplicates called Object Link. These are searches relevant to Plant Maintenance. In the search object dropdown list in the SAP Fiori launchpad you can see these listed as:

  • Object Link duplicate S4H100~OBJECT_LINK_H~
  • Object Link duplicate CD$ALL~ESH_U_OBJECTLINK~

In other words  you have 2 search connectors active that provide much  the same data:

  • Object Link S4H100~OBJECT_LINK_H~
  • Object Link CD$ALL~ESH_U_OBJECTLINK~

The CD$ALL search is the newer CDS View based search, so you want to deactivate the classic search S4H100~OBJECT_LINK_H~.

Procedure:

  1. Launch the cockpit. You can use transaction ESH_COCKPIT or go to the URL below with your using your host, port, client, and language code where indicated:
https://<host>:<port>/sap/bc/webdynpro/sap/esh_admin_ui_component?sap-client=<client>&sap-language=<language> u

For example in a CAL SAP S/4HANA Fully Activated Appliance Trial the URL is:

 https://vhcals4hcs.dummy.nodomain:44301/sap/bc/webdynpro/sap/esh_admin_ui_component?sap-client=100&sap-language=EN
  1. Search for the connector – you can use the technical name or search object name with the menu button option Find > Find Connector. Hint: If you are using the search object name, press the Find Connector option again to find the next matching value.

Transaction%20ESH_COCKPIT%20searching%20for%20the%20connector%20by%20name%20object%20link

Transaction ESH_COCKPIT searching for the connector by name object link

  1. Select the top row of the search model (e.g.S4H100~OBJECT_LINK_H~) you want to deactivate.  Then select Actions > Deactivate. Hint: The Deactivate option is only available if the search model is currently active.

Showing%20the%20Deactivate%20option%20of%20the%20menu%20button%20Actions%20in%20the%20Connector%20Administration%20Cockpit%20-%20notice%20that%20the%20search%20connector%20to%20be%20deactivated%20is%20selected%20via%20the%20checkbox%20at%20the%20start%20of%20the%20row

Showing the Deactivate option of the menu button Actions in the Connector Administration Cockpit – notice that the search connector to be deactivated is selected via the checkbox at the start of the row

  1. Check that the status of the search model is now Inactive

Deactivated%20search%20connector%20has%20the%20status%20Inactive

Deactivated search connector has the status Inactive

Deactivating search models using SAP Fiori app F3036 Manage Search Models

Typically, you would use this approach when you want to deactivate a superseded search model, or you want to deactivate a CDS view based search you do not need. For example, Allergens might be relevant if you are in the Pharmaceuticals or Agriculture industries, but not relevant if you are in Professional Services.

Prerequisites:

You must be assigned the app via your business role. For example, using the SAP Business Role: Administrator (SAP_BR_ADMINISTRATOR).

Procedure:

  1. Launch the SAP Fiori app F3036 Manage Search Models to see all available CDS View-based search models and their activation status.

Both%20Cost%20Center%20models%20are%20active%20as%20shown%20in%20F3306%20Manage%20Search%20Models

Both Cost Center models are active as shown in F3306 Manage Search Models

  1. Expand the search model you want to deactivate

Expanded%20search%20model%20showing%20details

Expanded search model for search view ESH_S_COST_CENTER showing details including the Enabled Yes/No toggle button in the header and the status for the search model and the search view

  1. Switch the Enabled toggle button from Yes to No. Confirm you want to disable the search.

Confirmation%20dialog%20showing%20Disable%20and%20Cancel%20buttons

Confirmation dialog showing Disable and Cancel buttons

  1. Confirm your search model is now listed in status Inactive.

Unwanted%20search%20is%20now%20shown%20in%20Inactive%20status%20in%20F3306%20Manage%20Search%20Models

Unwanted search is now shown in Inactive status in F3306 Manage Search Models

  1. Refresh your web browser and check the unwanted search is no longer shown in the search objects list.

Search%20object%20list%20now%20has%20only%20one%20search%20for%20Cost%20Centers

Search object list now has only one search for Cost Center

Deactivating search models using transaction ESH_DASHBOARD

This is a very technical approach that is useful in older releases or when you come across unexpected errors during deactivation.  For instructions, refer to SAP Note 2896358 – How to deactivate CDS connectors in Enterprise Search

You can also use the dashboard to confirm how many classic and CDS view-basd searches you are using

This list is based on experience and has been gathered from SAP S/4HANA 2020 and SAP S/4HANA  2021 systems.

The list may not be complete.

Please let us know in the comments of any others you find.

Business Object Application Area Classic Search Connector Replaced by CDS Search Connector
Activity Type CO <system><client>~ACTIVITY_TYPE_H~ CD$ALL~ESH_U_ACTYTYPEV2~
Allergen PLM <system><client>~ALLERGEN_H~ CD$ALL~ESH_U_ALLERGEN1~
Bank FI <system><client>~BANK_H~ CD$ALL~ESH_U_BANK~
Batch LO <system><client>~BATCH_H~ CD$ALL~ESH_U_BATCH~
Bill of Material / Material BOM Header LO <system><client>~MBOM_APPL_MODEL_H~ CD$ALL~ESH_U_MBOMHEADER~
Change Record PLM <system><client>~CHANGE_RECORD_H~ CD$ALL~ESH_U_CHGRCDH~
Cost Center CO <system><client>~COST_CENTER_H~

CD$ALL~ESH_U_CSTCNTRV2~

(which replaced CD$ALL-ESH_U_COST_CENTE~)

Customer LO <system><client>~CUSTOMER_H~ CD$ALL~ESH_U_CUSTOMERST~
Customer Material SD <system><client>~CUSTOMER_MAT_INFO_H~ CD$ALL~ESH_U_CUSTMAT~
Equipment PM <system><client>~EQUIPMENT_H~ CD$ALL~ESH_U_EQUIPMENT~
Evaluation Questionnaire SLC <system><client>~SUPLR_QNAIRE_H~ CD$ALL~ESH_U_SUPLR_QNR~
Evaluation Response SLC <system><client>~SUPLR_SRS_H~ CD$ALL~ESH_U_SUPLR_SRS~
Evaluation Scorecard SLC <system><client>~SUPLR_EVAL_SCCARD_H~ CD$ALL~ESH_U_SUPEVLSCRD~
Functional Location PM <system><client>~FUNCT_LOCATION_H~ CD$ALL~ESH_U_FUNCTLOCTN~
House Banks FI <system><client>~HOUSEBANK_H~ CD$ALL~ESH_U_HOUSEBANK~
House Bank Accounts FI <system><client>~HOUSEBANKACCT_BAM_H~ CD$ALL~ESH_U_HOUSEBANKB~
Inbound Delivery LE <system><client>~INBOUND_DELIVERY_H~ CD$ALL~ESH_U_INBDELIV~
Invoice List SD <system><client>~INVOICE_LIST_H~ CD$ALL~ESH_U_INVLIST~
Legal Context LCM <system><client>~LCM_CTX~ CD$ALL~ESH_U_LGL_CTX~
Legal Document LCM <system><client>~LCM_DOCUMENT~ CD$ALL~ESH_U_LEGALDOC~
Legal Transaction LCM <system><client>~LCM_LT~ CD$ALL~ESH_U_LEGALTR~
Maintenance Notification PM <system><client>~MAINT_NOTIFIC_H~ CD$ALL~ESH_U_MAINTNOTIF~
Maintenance Order PM <system><client>~MAINTENANCE_ORDER_H~ CD$ALL~ESH_U_MAINTORDER~
Material Document MM <system><client>~MATERIAL_DOCUMENT_H~ CD$ALL~ESH_U_MATLDOC~
Measurement Document PM <system><client>~MEASUREMENT_DOC_H~ CD$ALL~ESH_U_MEASDOC~
Object Link PM <system><client>~OBJECT_LINK_H~ CD$ALL~ESH_U_OBJECTLINK~
Outbound Delivery SD <system><client>~INBOUND_DELIVERY_H~ CD$ALL~ESH_U_OUTBDELIV~
Planned Order PP <system><client>~PLANNED_ORDER_H~ CD$ALL~ESH_U_PLANEDORDR~s
Process Order PP <system><client>~PROCESS_ORDER_H~ CD$ALL~ESH_U_PROCORDER~
Production Order PP <system><client>~PRODUCTION_ORDER_H~ CD$ALL~ESH_U_PRODNORDR~
Production Routing PP <system><client>~ROUTING_H~ CD$ALL~ESH_U_PRODNRTG~
Profit Center FI <system><client>~PROFIT_CENTER_H~ CD$ALL~ESH_U_PROFIT_CEN~
Purchase Contract MM <system><client>~PURCHASE_CONTRACT_H~ CD$ALL~ESH_U_PURCTR~
Purchasing Category MM <system><client>~PURG_CAT_H~ CD$ALL~ESH_U_PURG_CAT~
Purchasing Info Record MM <system><client>~PURCHASE_INFO_REC_H~ CD$ALL~ESH_U_INFORECORD~
Service Entry Sheet MM <system><client>~SERVICEENTRYSHEET_H~ CD$ALL~ESH_U_SRVENTRSHT~
Statistical Key Figure CO <system><client>~STAT_KEY_FIGURE_H~ CD$ALL~ESH_U_STAT_KEY_F~
Supplier LO <system><client>~VENDOR_H~ CD$ALL~ESH_U_SUPPLIERSM~
Supplier Invoice MM <system><client>~INCOMING_INVOICE_H~ CD$ALL~ESH_U_INCINVOICE~
Work Center PP <system><client>~WORK_CENTER_H~ CD$ALL~ESH_U_WORKCENTER~

Hint:

Batch also has a duplicate Batch at Plant level (search connector ID <system><client>~BATCH_PLANT_H~). If you want to have both Batch and Batch  Plant  searches then use the Edit option in transaction ESH_COCKPIT to adjust the  search name to, e.g. Batch (Plant)

Providing new and easier capabilities to review and adjust CDS View based searches through SAP Fiori apps such as:

In early releases the capabilities are primarily to review the information. The roadmap is to build more capability over time.

You can find the App Documentation for these apps in the Enterprise Search guide for your SAP S/4HANA release in the SAP Help Portal. For example:

which includes a helpful video Insights into Enterprise Search

In F3036 Manage Search Models you can already:

  • View active and inactive searches and their details, such as which fields are  used by the search, filters and ranking, default navigation behaviour, etc.
  • You can test search responses
  • You can enable/disable search models

You can see how the fields are used in the search model.

Manage%20Search%20Models%20...tab

Manage Search Models – Fields tab showing which Response fields are shown in the Search Results

Navigation tab shows the Semantic Object used to provide links to apps in the Search Results.

Manage%20Search%20Models%20...%20tab

Manage Search Models – Navigation tab shows the Semantic Object and parameters that can be passed

The Relations tab shows the CDS View hierarchy used.

Manage%20Search%20models%20-%20Relations%20tab%20showing%20the%20expanded%20CDS%20View%20hierarchy

Manage Search models – Relations tab showing the expanded CDS View hierarchy

One of the more interesting options for security experts is the Technical Details tab, where you can see the Roles assigned to this search connector.

Manage%20Search%20Models%20...%20tab

Manage Search Models – Technical Details tab shows Assigned Roles

You can use the Test Responses tab to see what results will be returned.

Hint: If your search is  inactive, this tab will show “Search error”.

Manage%20Search%20Models%20...%20tab

Manage Search Models … tab

Ok so you changed your mind, someone made a mistake, or you now have a business need for a new search. It’s important to know that there are 2 steps to renabling the search:

  1. Activate the search connector
  2. Reindex the search connector to update the search results

The quickest way to do this is to run the task list SAP_ESH_CREATE_INDEX_SC in transaction STC01.

Task%20List%20Search%20Connector%20in%20transaction%20STC01

Task List Create and Index Search Connectors in transaction STC01

In the task “Select Models to Create Connectors” you specify only the Search Models you want to reindex.

For example

  • Software component SAPAPPLH
  • Select models manually is selected
  • Search model name is entered, for example ALLERGEN_H
    • You can select the name from the dropdown or type it in.
    • Do not specify the system/client or CD$ALL prefix.

Example%20parameters%20for%20task%20Select%20Model%20to%20Create%20Connectors%20showing%20software%20component%20SAPAPPLH%20and%20search%20model%20ALLERGEN_H

Example parameters for task Select Model to Create Connectors showing software component SAPAPPLH and search model ALLERGEN_H

Save your parameters and execute the task list. Since indexing can take some time, it’s usually a good idea to execute in background. You can then walk away and come back to check the result later in transaction STC02 (Task List Run Monitor).

When you upgrade SAP S/4HANA releases – e.g. from SAP S/4HANA 1809 to SAP S/4HANA 2021 –  usually the system will not override the searches you are already using.

So you can continue to use them as-is or review the newly available search models and decide whether you want to:

  • Replace classic searches with CDS View searches
  • Introduce new search objects available CDS View searches

You can quickly review all of the available Active and Inactive searches in GUI transaction ESH_DASHBOARD, both classic (traditional) or CDS view based. Selecting the Inactive number will take you to a simple list of searches available but not active.

Hint: You can use SAP Fiori app F3036 Manage Search Models to  review the details of the new CDS View search objects before you enable them.

Transaction%20ESH_DASHBOARD%20shows%20the%20inactive%20searches%20available

Transaction ESH_DASHBOARD shows the inactive searches available

In the dashboard you can also see an upgrade icon that tells you if upgrade of your classic searches is pending. To update your search models post upgrade or you will need to run the task list SAP_ESH_UPDATE_SC in transaction STC01. Since the update can take some time, you should use the option to start the task list background. You can check the result later in transaction STC02 (Task List Run Monitor).

Transaction%20ESH_DASHBOARD%20shows%20the%20upgrade%20icon%20in%20the%20row%20marked%20Traditional%20searches%20row

Transaction ESH_DASHBOARD shows the upgrade icon in the row marked Traditional searches row

You can find more in the Enterprise Search guide for your SAP S/4HANA release on the SAP Help Portal, and in SAP Notes.

General help documentation for Enterprise Search in the SAP Help Portal:

Some useful options for optimizing Enterprise Search behaviour:

Further information for CDS-based View Searches:

Further information for Classic Searches:

You’ll find much more on our SAP Fiori for SAP S/4HANA wiki

Other helpful links in the SAP Community:

Brought to you by the SAP S/4HANA RIG.