Show TOC

Procedure documentationConfiguring the Generic Search for a Particular Business Object

 

You can configure the user interface of the Generic Search (USMD_SEARCH) Web Dynpro application so that only business objects for a particular entity type and data model can be searched. With this configuration, users do not have to select data models or entity types from dropdown lists in the search control area. You can also configure which fields display in which order in the search results.

You can create this example configuration using the Manage UI Configurations Web Dynpro application in Customizing. For more information, see Managing of UI Configurations

If the searched-for business object can belong to a hierarchy, you can configure a search that is capable of showing results in the context of the hierarchy.

Prerequisites

You have set the standard data model to the data model for the entity type for which you are configuring the generic search by completing the following steps:

  1. In transaction SPERS_MAINT, you have chosen the Edit objects button.

  2. You have double-clicked the SAP Master Data Governance row.

  3. In the popup, you have entered the standard data model and you have saved your changes.

The data model for the entity type for which you are configuring the generic search is in the customer namespace. If this is not the case, see Creating genIL Components and Transaction Handler Manually.

Procedure

Copy UI Configuration
  1. In Customizing for Master Data Governance, Central Governance, go to Start of the navigation path General Settings Next navigation step UI Modeling Next navigation step Manage UI Configurations End of the navigation path

  2. In the table, select the row with the following attributes and choose the Copy button:

    • Application:USMD_SEARCH

    • Application Configuration:USMD_SEARCH_TEMPLATE

  3. In the Floorplan Manager: Application Hierarchy screen, enter target configuration IDs for the application configuration, the UI configuration (also known as the OVP configuration), and the UIBB configurations. Then choose the Start Deep Copy button.

Application Configuration: Specify Parameters
  1. Return to the Manage UI Configurations screen and choose the Refresh link. An extra row displays in the table for the copied configuration. Click the link for the application configuration.

  2. Enter the following parameters:

    • USMD_MODEL: The data model

    • USMD_ENTITY: The entity type

    • USMD_OTC: The business object type

    Note Note

    The relevant information is available in either of the following Customizing activities:

    • Start of the navigation path General Settings Next navigation step Data Modeling Next navigation step Edit Data Model End of the navigation path

    • Start of the navigation path General Settings Next navigation step Configuration Workbench End of the navigation path

    End of the note.
  3. (Optional Step) To make the most commonly used search application appear as the default search application in the dropdown list, enter the search application in the USMD_SEARCH_MODE parameter. If appropriate, enter the search help in the USMD_SEARCH_HELP parameter.

  4. Save the application configuration.

UI Configuration: Configure Search Criteria
  1. Return to the Manage UI Configurations screen and click the link for the UI configuration.

  2. Choose the Continue in Change Mode button.

  3. In the Overview Page Schema, select the row for the Search Criteria UIBB. Then choose the Configure UIBB button.

  4. Enter the following values for the CL_USMD_SEARCH_GUIBB_DQUERY feeder class:

    Parameter

    Required

    Value

    Component

    Yes

    ZSP_<data model>.

    This is the genIL component for single-object processing that was created for your MDG data model. <data model> represents the ID of your MDG data model.

    Dyn Query Name

    Yes

    GenSearchQuery<entity type>

    For example GenSearchQueryCARR for the Airline entity type

    Search Mode

    Yes

    The search application. You can find the definition of search applications in use in Customizing for Master Data Governance, Central Governance under Start of the navigation path General Settings Next navigation step Data Quality and Search Next navigation step Search and Duplicate Check Next navigation step Define Search Applications End of the navigation path

    Incl SearchHelp

    No

    (Optional) The search help for the search application. You can find the definition of search helps allocated to the search application in Customizing for Master Data Governance, Central Governance under Start of the navigation path General Settings Next navigation step Data Quality and Search Next navigation step Search and Duplicate Check Next navigation step Define Search Applications End of the navigation path.

  5. In the Search UIBB Schema, add search attributes by using the Search Criteria button. Use the Up and Down buttons to change the order of the search attributes. You can change the number of search attributes that display in General Settings, by selecting a value for Number of Search Rows on Open. It might be necessary to restart the application before the search attributes of the entity type specified by the Dyn Query Name are made available.

  6. (Conditional Step) If the entity type is edition-based, add a search attribute so that the user can select the validity timeframe for the returned instances of the business objects. If you add search attribute Valid On (USMD_VALID_AT), the user can select the validity timeframe directly. If you add search attribute Edition (USMD_EDITION), the user can select an edition that determines the validity timeframe. In the latter case, set parameter USMD_SEARCH_EDITION_MODE to X in the copied application configuration.

    Save the Search UIBB Schema configuration and return to the UI configuration.

  7. (Optional Step) If you want to allow the end users to personalize the Search Criteria block of the search application, go to the General Settings section and, from the Personalization dropdown list, select Enabled. Save the component configuration and return to the UI configuration.

UI Configuration: Configure Search Results
  1. In the Overview Page Schema, select the row for the Search Results UIBB. Then choose the Configure UIBB button.

  2. Enter the following values for the CL_USMD_SEARCH_GUIBB_RESULT feeder class:

    Parameter

    Value

    Component

    ZSP_<data model>.

    This is the genIL component for single-object processing that was created for your MDG data model. <data model> represents the ID of your MDG data model.

    Object Name

    QRes<entity type>

    For example QResCARR for the Airline entity type

  3. In the List UIBB Schema, add search result attributes by using the Column button. Use the Up and Down buttons to change the order of the result attributes.

    Note Note

    To enable navigation from the search results to the inactive data of a business object, add column CREQUEST_PENDING and set its display type to Image. To enable navigation from the search results to the active data of a business object, set the display type of the column representing the object key to Link To Action.

    End of the note.
  4. (Conditional step) If the entity type is edition-based, add the required result attributes that describe the validity of the displayed instances of business objects. You can display result attributes for time-related validity and for edition-related validity.

    • Time-related validity

      • For a date-specific edition type, add attributes Valid From (USMD_VDATE_FROM) and Valid To (USMD_VDATE_TO).

      • For a period-specific edition type, add attributes Period/Fiscal Year From (USMD_VPER_FROM) and Period/Fiscal Year To (USMD_VPER_TO).

      Note Note

      You can identify whether an edition-based entity type uses dates or periods in Customizing for Master Data Governance underStart of the navigation path General Settings Next navigation step Process Modelling Next navigation step Create Edition Type End of the navigation path. The Validity of Entity field can have a value of Date-Specific or Period-Specific.

      End of the note.
    • Edition-related validity

      To display validity in terms of editions, add attributes From Edition (USMD_EDITION) and To Edition (USMD_EDITION_TO).

  5. In the Toolbar Schema, add required toolbar elements (or buttons) and save the configuration.

(Optional) UI Configuration: Configure Search Result Tree for Hierarchy Search

Note Note

This is only valid if you are configuring a search that allows the user to specify a hierarchy type and a hierarchy,

End of the note.

If the user specifies a hierarchy type in the search, a different user interface building block (UIBB) is required for the Search Criteria section of the Search screen. This UIBB is configured to include a Hierarchy dropdown list.

  1. Return to the Manage UI Configurations screen and refresh the screen.

  2. Open the UI Configuration you just created, by clicking the relevant link under the UI configuration column. Choose the Copy icon.

  3. Enter a new Configuration and Description.

  4. Choose the Continue in Change Mode button. In the General Settings section, choose the Feeder Class Parameters button. Enter the following Feeder Class Parameters:

    Parameter

    Value

    Component

    ZHP_<Data Model>

    For example, ZHP_CARR

    Dyn Query Name

    HryQry<Data Model>_<Entity Type>

    For example, GenSearchQueryCARR_CARR.

    Business Object Type (requires scrolling to end of popup)

    Business Object Type

    For example, MDG_CARR.

  5. In the Search UIBB Schema section, add search attributes by using the Search Criteria button.

    By default, the configuration includes no search criteria. The following attributes are mandatory if selectable:

    Parameter

    Label

    USMD_HIERARCHY_NAME

    Hierarchy Name

    USMD_EDITION

    Only selectable if the hierarchy type is edition-dependent

    Edition

    USMD_HIERARCHY_VERSION

    Only selectable if the hierarchy type is version-dependent

    Version

  6. Use the Up and Down buttons to change the order of the search attributes. You can change the number of search attributes that display in General Settings, by selecting a value for Number of Search Rows on Open.

    It might be necessary to restart the application before the search attributes of the entity type specified by the Dyn Query Name are made available.

  7. In the General Settings panel, you can specify settings applicable to the result list. To enable selection of multiple rows in the result list, apply the following settings:

    • Selection Mode: Multiple Selection

    • Multiple Selection: Enable Event on All Selections

    • Under Selection Raises an FPM Event: select the Display Mode checkbox.

(Optional) UI Configuration: Configure Search Criteria for Hierarchy Search

Note Note

This is only valid if you are configuring a search that allows the user to specify a hierarchy type and a hierarchy,

End of the note.
  1. If the user specifies a hierarchy type in the search, a different user interface building block (UIBB) is required for the Search Criteria section of the Search screen. This UIBB is configured to include a Hierarchy dropdown list.

  2. Return to the Manage UI Configurations screen and refresh the screen.

  3. Open the UI Configuration you just created, by clicking the relevant link under the UI configuration column. Choose the Copy icon.

  4. Enter a new Configuration and Description.

  5. Choose the Continue in Change Mode button. In the General Settings section, choose the Feeder Class Parameters button. Enter the following Feeder Class Parameters.

    Parameter

    Value

    Component

    ZHP_<data model>

    Example: ZHP_T1

    Dynamic Query Name

    HryQuery<Hierarchy Type>_<Entity Type>

    Example: HryQueryCARR_CARR

    Business Object Type (requires scrolling to end of popup)

    Enter the technical name of the business object type being searched.

    Example: MDG_CARR.

  6. In the Search UIBB Schema, add search attributes by using the Search Criteria button. By default, the list is empty. The following attributes are mandatory if selectable:

    • USMD_HIERARCHY_NAME: Hierarchy Name

    • USMD_EDITION: Edition (only selectable if the hierarchy type is edition-dependent)

    • USMD_HIERARCHY_VERSION: Version (only selectable if the hierarchy type is version-dependent)

  7. Use the Up and Down buttons to change the order of the search attributes. You can change the number of search attributes that display in General Settings, by selecting a value for Number of Search Rows on Open.

(Optional) UI Configuration for Hierarchy Search: Set Rules for Selecting Which Search Criteria UIBB to Display

Note Note

This is only valid if you are configuring a search that allows the user to specify a hierarchy type and a hierarchy,

End of the note.

Depending on your configuration, you can switch between a search criteria building block on the user interface that specifies a hierarchy type (UIBB for Hierarchy Search Criteria) and a search criteria building block that does not specify a hierarchy type.

  1. Open the Manage UI Configurations user interface and click the link for the UI configuration.

  2. Choose the Continue in Change Mode button and under General Settings choose the Feeder Class Parameters button.

  3. Enter the following values in the Morph Entry with UIBB Terminus table

    Spot Name

    Spot Value

    Entry Key

    Parent Key

    Configuration ID

    Meaning

    MDG USMD Search Entity Type

    ENTITY_TYPE

    MAIN

    <Hierarchy ID for Standard Search UIBB>

    A standard search UIBB for a hierarchy search

    MDG USMD Search Hierarchy Type

    HIER_NO

    MAIN

    <Hierarchy ID for Standard Search UIBB>

    Standard search criteria shown if hierarchy type is not entered.

    MDG USMD Search Hierarchy Type

    ENTITY_TYPE

    HIER_YES

    MAIN

    <Hierarchy ID for Hierarchy Search UIBB>

    Hierarchy search parameter added to search criteria if a hierarchy type is specified. This requires a different user interface building block.

MDG Communicator: Configure MDG Communicator
  1. Return to the Manage UI Configurations screen.

  2. Click the Details link in the Communicator Status column to create the necessary component configuration for the MDG Communicator.

  3. (Mandatory for Hierarchy Search, otherwise optional) To provide the search screen with a Search Method dropdown list that offers all available search applications and search helps instead of just the search applications and search help specified in the application configuration, select the includeSearchControl checkbox of the settings context element.

  4. To select the Hierarchy Type and to enable switching between standard search with result list and hierarchy search with result tree, enter MDG_BS_SEARCH_CONTROL_HRY in the field Cfg. Name SCtrl.

  5. Save the configuration and click the Refresh link. The Communicator Status field is set to Configuration available.

Result

To test the application you created, open the copied application configuration and choose the Test button.