Configuring 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.
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:
In transaction SPERS_MAINT
, you have chosen the Edit objects
button.
You have double-clicked the SAP Master Data Governance
row.
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.
In Customizing for Master Data Governance, Central Governance
, go to
In the table, select the row with the following attributes and choose the Copy
button:
Application
:USMD_SEARCH
Application Configuration
:USMD_SEARCH_TEMPLATE
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.
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.
Enter the following parameters:
USMD_MODEL
: The data model
USMD_ENTITY
: The entity type
USMD_OTC
: The business object type
Note
The relevant information is available in either of the following Customizing activities:
(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.
Save the application configuration.
Return to the Manage UI Configurations
screen and click the link for the UI configuration.
Choose the Continue in Change Mode
button.
In the Overview Page Schema
, select the row for the Search Criteria UIBB
. Then choose the Configure UIBB
button.
Enter the following values for the CL_USMD_SEARCH_GUIBB_DQUERY
feeder class:
Parameter | Required | Value |
|---|---|---|
| Yes |
This is the genIL component for single-object processing that was created for your MDG data model. |
| Yes |
For example |
| Yes | The search application. You can find the definition of search applications in use in Customizing for |
| 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 |
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.
(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.
(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.
In the Overview Page Schema
, select the row for the Search Results UIBB
. Then choose the Configure UIBB
button.
Enter the following values for the CL_USMD_SEARCH_GUIBB_RESULT
feeder class:
Parameter | Value |
|---|---|
|
This is the genIL component for single-object processing that was created for your MDG data model. |
|
For example |
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
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.
(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
You can identify whether an edition-based entity type uses dates or periods in Customizing for Master Data Governance
under. The Validity of Entity
field can have a value of Date-Specific
or Period-Specific
.
Edition-related validity
To display validity in terms of editions, add attributes From Edition
(USMD_EDITION
) and To Edition
(USMD_EDITION_TO
).
In the Toolbar Schema
, add required toolbar elements (or buttons) and save the configuration.
Note
This is only valid if you are configuring a search that allows the user to specify a hierarchy type and a hierarchy,
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.
Return to the Manage UI Configurations
screen and refresh the screen.
Open the UI Configuration you just created, by clicking the relevant link under the UI configuration column. Choose the Copy
icon.
Enter a new Configuration
and Description
.
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 |
|---|---|
|
For example, |
|
For example, |
Business Object Type (requires scrolling to end of popup) |
For example, |
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 |
|---|---|
|
|
Only selectable if the hierarchy type is edition-dependent |
|
Only selectable if the hierarchy type is version-dependent |
|
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.
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.
Note
This is only valid if you are configuring a search that allows the user to specify a hierarchy type and a hierarchy,
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.
Return to the Manage UI Configurations
screen and refresh the screen.
Open the UI Configuration
you just created, by clicking the relevant link under the UI configuration column. Choose the Copy
icon.
Enter a new Configuration
and Description
.
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 |
|---|---|
|
Example: |
|
Example: |
| Enter the technical name of the business object type being searched. Example: |
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)
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
.
Note
This is only valid if you are configuring a search that allows the user to specify a hierarchy type and a hierarchy,
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.
Open the Manage UI Configurations
user interface and click the link for the UI configuration.
Choose the Continue in Change Mode
button and under General Settings
choose the Feeder Class Parameters
button.
Enter the following values in the Morph Entry with UIBB Terminus
table
Spot Name | Spot Value | Entry Key | Parent Key | Configuration ID | Meaning |
|---|---|---|---|---|---|
|
|
|
| A standard search UIBB for a hierarchy search | |
|
|
|
| Standard search criteria shown if hierarchy type is not entered. | |
|
|
|
|
| Hierarchy search parameter added to search criteria if a hierarchy type is specified. This requires a different user interface building block. |
Return to the Manage UI Configurations
screen.
Click the Details
link in the Communicator Status
column to create the necessary component configuration for the MDG Communicator.
(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.
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
.
Save the configuration and click the Refresh
link. The Communicator Status
field is set to Configuration available
.
To test the application you created, open the copied application configuration and choose the Test
button.