Enhance the Material Enterprise Search
PUBLIC
How-To: Enhance the Material Enterprise Search
Applicable Releases:
All
Version 3.0
October 2024
How-To: Enhance the Material Enterprise Search
Applicable Releases:
All
Version 3.0
October 2024
© 2024 SAP SE or an SAP affiliate company. All rights reserved. See Legal Notice on www.sap.com/legal-notice for use terms, disclaimers, disclosures, or restrictions related to this material. 2 / 61
Document History
Document Version Description
1.2 First official release of this guide
1.3 Chapter 8, 9 and 10
1.4 Small corrections
1.5 New chapter 9.3
1.6 Small corrections, new chapter 9.2.1 Change Search Criteria from
MDG7.0 on
1.7 New chapters 4 and 10.4; Updates to chapters 5.5.2.3 and 8
1.8 New chapter 8.7.1 and 8.7.2
1.9 Small corrections
2.0 Update layout (September 2022)
3.0 Layout update (October 2024)
Document History
Document Version Description
1.2 First official release of this guide
1.3 Chapter 8, 9 and 10
1.4 Small corrections
1.5 New chapter 9.3
1.6 Small corrections, new chapter 9.2.1 Change Search Criteria from
MDG7.0 on
1.7 New chapters 4 and 10.4; Updates to chapters 5.5.2.3 and 8
1.8 New chapter 8.7.1 and 8.7.2
1.9 Small corrections
2.0 Update layout (September 2022)
3.0 Layout update (October 2024)
How-To: Enhance the Material Enterprise Search
3
1. BUSINESS SCENARIO ............................................................................................................................................ 5
2. BACKGROUND INFORMATION ............................................................................................................................. 6
3. MORE INFORMATION ON ENTERPRISE SEARCH ...................................................................................................6
4. STEP BY STEP EXPLANATION ................................................................................................................................ 7
4.1 E XTEND M ODEL MM: E NTITY M ATERIAL ..................................................................................................................... 7
4.2 E XTEND STRUCTURES FOR DATA M ODEL MM ............................................................................................................... 7
4.3 SMT M APPING ....................................................................................................................................................... 8
4.4 ACTIVE AREA : CONNECTOR FOR MATERIAL ................................................................................................................ 9
4.4.1 Template Modeler for active area .............................................................................................................. 9
4.4.1.1 Create new Software Component ............................................................................................................................ 9
4.4.1.2 Create Connector for Material ................................................................................................................................ 11
4.4.2 Administration Cockpit.............................................................................................................................. 12
4.4.2.1 Update Connector Material (optional) ................................................................................................................... 12
4.4.2.2 Schedule Indexing ................................................................................................................................................... 12
4.4.3 Test Connector Material ........................................................................................................................... 13
4.5 STAGING AREA : CONNECTOR FOR MDG .................................................................................................................... 14
4.5.1 Template Modeler..................................................................................................................................... 14
4.5.1.1 Software component .............................................................................................................................................. 14
4.5.1.2 Create new search connector template for MDG ................................................................................................... 14
4.5.2 Administration Cockpit.............................................................................................................................. 15
4.5.2.1 Re-create the associations, authorizations, request and response attributes (optional) ....................................... 15
4.5.2.2 Add the new attributes to ZMDG_MATERIAL template request fields ................................................................... 20
4.5.2.3 Add the new attributes to the ZMDG_MATERIAL template response fields .......................................................... 20
4.5.2.4 Schedule Indexing ................................................................................................................................................... 21
4.5.3 Test Connector: ZMDG_MATERIAL ........................................................................................................... 21
4.6 CUSTOMIZING ....................................................................................................................................................... 21
5. STEP-BY-STEP PROCEDURE: EXTEND BY CUSTOM ATTRIBUTES (FROM REUSE) .................................................. 23
5.1 E XTEND BACKEND: MARA WITH APPEND .................................................................................................................. 23
5.2 E XTEND ES STRUCTURE FOR M ATERIAL: ESO_S_MARA_MAW1................................................................................. 23
5.3 E XTEND M ODEL MM: E NTITY M ATERIAL ................................................................................................................... 24
5.4 E XTEND STRUCTURES FOR M ODEL MM ..................................................................................................................... 25
5.5 SMT M APPING ..................................................................................................................................................... 25
5.6 ACTIVE AREA : CONNECTOR FOR MATERIAL .............................................................................................................. 25
5.6.1 Template Modeler..................................................................................................................................... 25
5.6.1.1 Enhance Template MATERIAL ................................................................................................................................. 25
5.6.1.2 Add attributes to the Request Fields ...................................................................................................................... 28
5.6.1.3 Add attributes to the Response Fields .................................................................................................................... 28
5.6.1.4 Create Connector for Material ................................................................................................................................ 30
5.6.2 Administration Cockpit.............................................................................................................................. 31
5.6.2.1 Update Connector Material .................................................................................................................................... 31
5.6.2.2 Schedule Indexing ................................................................................................................................................... 31
5.6.3 Test Connector Material ........................................................................................................................... 33
5.7 STAGING AREA : CONNECTOR FOR MDG .................................................................................................................... 33
5.8 CUSTOMIZING ....................................................................................................................................................... 33
6. STEP-BY-STEP PROCEDURE: EXTEND WITH EXISTING ENTITY (REUSE) ................................................................ 34
6.1 E XTEND M ODEL: E NTITY P LANT (YMARC) ................................................................................................................. 34
6.2 E XTEND STRUCTURES FOR M ODEL ............................................................................................................................. 34
6.3 SMT M APPING ..................................................................................................................................................... 34
6.4 ACTIVE AREA : CONNECTOR FOR MATERIAL .............................................................................................................. 34
6.5 STAGING AREA : CONNECTOR FOR MDG .................................................................................................................... 34
6.6 CUSTOMIZING ....................................................................................................................................................... 34
7. STEP-BY-STEP PROCEDURE: EXTEND WITH CUSTOM ENTITY (REUSE)................................................................. 35
7.1 BACKEND: NEW TABLE ZMDGM_BUPA01 .............................................................................................................. 35
7.2 CREATE ES STRUCTURE FOR ZMDGM_BUPA01: ZESO_S_ZMDGM_BUPA01 ........................................................... 35
3
1. BUSINESS SCENARIO ............................................................................................................................................ 5
2. BACKGROUND INFORMATION ............................................................................................................................. 6
3. MORE INFORMATION ON ENTERPRISE SEARCH ...................................................................................................6
4. STEP BY STEP EXPLANATION ................................................................................................................................ 7
4.1 E XTEND M ODEL MM: E NTITY M ATERIAL ..................................................................................................................... 7
4.2 E XTEND STRUCTURES FOR DATA M ODEL MM ............................................................................................................... 7
4.3 SMT M APPING ....................................................................................................................................................... 8
4.4 ACTIVE AREA : CONNECTOR FOR MATERIAL ................................................................................................................ 9
4.4.1 Template Modeler for active area .............................................................................................................. 9
4.4.1.1 Create new Software Component ............................................................................................................................ 9
4.4.1.2 Create Connector for Material ................................................................................................................................ 11
4.4.2 Administration Cockpit.............................................................................................................................. 12
4.4.2.1 Update Connector Material (optional) ................................................................................................................... 12
4.4.2.2 Schedule Indexing ................................................................................................................................................... 12
4.4.3 Test Connector Material ........................................................................................................................... 13
4.5 STAGING AREA : CONNECTOR FOR MDG .................................................................................................................... 14
4.5.1 Template Modeler..................................................................................................................................... 14
4.5.1.1 Software component .............................................................................................................................................. 14
4.5.1.2 Create new search connector template for MDG ................................................................................................... 14
4.5.2 Administration Cockpit.............................................................................................................................. 15
4.5.2.1 Re-create the associations, authorizations, request and response attributes (optional) ....................................... 15
4.5.2.2 Add the new attributes to ZMDG_MATERIAL template request fields ................................................................... 20
4.5.2.3 Add the new attributes to the ZMDG_MATERIAL template response fields .......................................................... 20
4.5.2.4 Schedule Indexing ................................................................................................................................................... 21
4.5.3 Test Connector: ZMDG_MATERIAL ........................................................................................................... 21
4.6 CUSTOMIZING ....................................................................................................................................................... 21
5. STEP-BY-STEP PROCEDURE: EXTEND BY CUSTOM ATTRIBUTES (FROM REUSE) .................................................. 23
5.1 E XTEND BACKEND: MARA WITH APPEND .................................................................................................................. 23
5.2 E XTEND ES STRUCTURE FOR M ATERIAL: ESO_S_MARA_MAW1................................................................................. 23
5.3 E XTEND M ODEL MM: E NTITY M ATERIAL ................................................................................................................... 24
5.4 E XTEND STRUCTURES FOR M ODEL MM ..................................................................................................................... 25
5.5 SMT M APPING ..................................................................................................................................................... 25
5.6 ACTIVE AREA : CONNECTOR FOR MATERIAL .............................................................................................................. 25
5.6.1 Template Modeler..................................................................................................................................... 25
5.6.1.1 Enhance Template MATERIAL ................................................................................................................................. 25
5.6.1.2 Add attributes to the Request Fields ...................................................................................................................... 28
5.6.1.3 Add attributes to the Response Fields .................................................................................................................... 28
5.6.1.4 Create Connector for Material ................................................................................................................................ 30
5.6.2 Administration Cockpit.............................................................................................................................. 31
5.6.2.1 Update Connector Material .................................................................................................................................... 31
5.6.2.2 Schedule Indexing ................................................................................................................................................... 31
5.6.3 Test Connector Material ........................................................................................................................... 33
5.7 STAGING AREA : CONNECTOR FOR MDG .................................................................................................................... 33
5.8 CUSTOMIZING ....................................................................................................................................................... 33
6. STEP-BY-STEP PROCEDURE: EXTEND WITH EXISTING ENTITY (REUSE) ................................................................ 34
6.1 E XTEND M ODEL: E NTITY P LANT (YMARC) ................................................................................................................. 34
6.2 E XTEND STRUCTURES FOR M ODEL ............................................................................................................................. 34
6.3 SMT M APPING ..................................................................................................................................................... 34
6.4 ACTIVE AREA : CONNECTOR FOR MATERIAL .............................................................................................................. 34
6.5 STAGING AREA : CONNECTOR FOR MDG .................................................................................................................... 34
6.6 CUSTOMIZING ....................................................................................................................................................... 34
7. STEP-BY-STEP PROCEDURE: EXTEND WITH CUSTOM ENTITY (REUSE)................................................................. 35
7.1 BACKEND: NEW TABLE ZMDGM_BUPA01 .............................................................................................................. 35
7.2 CREATE ES STRUCTURE FOR ZMDGM_BUPA01: ZESO_S_ZMDGM_BUPA01 ........................................................... 35
How-To: Enhance the Material Enterprise Search
4
7.3 E XTEND THE EXTRACTION L OGIC FOR THE NEW ES NODE ............................................................................................... 35
7.4 E XTEND M ODEL MM: E NTITY ZBUPA ...................................................................................................................... 39
7.5 E XTEND STRUCTURES FOR M ODEL MM ..................................................................................................................... 39
7.6 SMT M APPING ..................................................................................................................................................... 39
7.7 ACTIVE AREA : CONNECTOR FOR MATERIAL .............................................................................................................. 39
7.7.1 BAdI Implementation: GET_ES_NODEINFO Method ................................................................................. 43
7.7.2 BADI Implementation for handling Change Pointers ................................................................................ 43
7.8 STAGING AREA : CONNECTOR FOR MDG .................................................................................................................... 43
7.9 CUSTOMIZING ....................................................................................................................................................... 43
8. STEP-BY-STEP PROCEDURE: EXTEND WITH EXISTING ENTITY (FLEX) ................................................................... 44
8.1 E XTEND M ODEL: E NTITY YMARC3 ........................................................................................................................... 44
8.2 E XTEND STRUCTURES FOR M ODEL ............................................................................................................................. 45
8.3 SMT M APPING ..................................................................................................................................................... 45
8.4 ACTIVE AREA : CONNECTOR FOR MATERIAL .............................................................................................................. 45
8.4.1 Enhance Template Material for the Flex Node ......................................................................................... 45
8.4.2 BADI Implementation for Indexing Flex node data ................................................................................... 48
8.4.3 BADI Implementation for handling Change Pointers for Flex node data .................................................. 51
8.5 STAGING AREA : CONNECTOR FOR MDG .................................................................................................................... 51
8.5.1 Create new search connector template for MDG ..................................................................................... 51
8.5.2 Add the request fields to Z1MDG_MATERIAL template ............................................................................ 52
8.5.3 Schedule Indexing ..................................................................................................................................... 52
8.5.4 Test Connector: Z1MDG_MATERIAL ......................................................................................................... 52
8.6 CUSTOMIZING ....................................................................................................................................................... 52
9. STEP-BY-STEP PROCEDURE: EXTEND SEARCH UI ................................................................................................. 53
9.1 E NHANCE UIBB MDG_BS_MAT_SEARCH_RESULT_LIST ....................................................................................... 53
9.2 CHANGE SEARCH CRITERIA VALUES ........................................................................................................................... 53
9.2.1 Change Search Criteria from MDG7.0 on .................................................................................................. 54
9.3 DEFAULT FOR CLASS TYPE ........................................................................................................................................ 55
9.4 ADD FIELD DESCRIPTIONS TO THE RESULT LIST .............................................................................................................. 55
9.4.1 POST-EXIT for method CL_MDG_BS_MAT_BO_SEARCH-> GET_SEARCHABLE_ATTRIBUTES .................... 55
9.4.2 POST-EXIT for method CL_MDG_BS_MAT_SP_SEARCH->COMPLETE_DATA ............................................ 58
10. MULTIPLE LANGUAGES .................................................................................................................................. 59
11. ADDITIONAL INFORMATION .......................................................................................................................... 60
11.1.1 Information on SAP MDG on SAP S/4HANA .............................................................................................. 60
11.1.2 SAP Roadmap Explorer.............................................................................................................................. 60
11.1.3 Related Information .................................................................................................................................. 60
11.2 SAP N OTES .......................................................................................................................................................... 60
4
7.3 E XTEND THE EXTRACTION L OGIC FOR THE NEW ES NODE ............................................................................................... 35
7.4 E XTEND M ODEL MM: E NTITY ZBUPA ...................................................................................................................... 39
7.5 E XTEND STRUCTURES FOR M ODEL MM ..................................................................................................................... 39
7.6 SMT M APPING ..................................................................................................................................................... 39
7.7 ACTIVE AREA : CONNECTOR FOR MATERIAL .............................................................................................................. 39
7.7.1 BAdI Implementation: GET_ES_NODEINFO Method ................................................................................. 43
7.7.2 BADI Implementation for handling Change Pointers ................................................................................ 43
7.8 STAGING AREA : CONNECTOR FOR MDG .................................................................................................................... 43
7.9 CUSTOMIZING ....................................................................................................................................................... 43
8. STEP-BY-STEP PROCEDURE: EXTEND WITH EXISTING ENTITY (FLEX) ................................................................... 44
8.1 E XTEND M ODEL: E NTITY YMARC3 ........................................................................................................................... 44
8.2 E XTEND STRUCTURES FOR M ODEL ............................................................................................................................. 45
8.3 SMT M APPING ..................................................................................................................................................... 45
8.4 ACTIVE AREA : CONNECTOR FOR MATERIAL .............................................................................................................. 45
8.4.1 Enhance Template Material for the Flex Node ......................................................................................... 45
8.4.2 BADI Implementation for Indexing Flex node data ................................................................................... 48
8.4.3 BADI Implementation for handling Change Pointers for Flex node data .................................................. 51
8.5 STAGING AREA : CONNECTOR FOR MDG .................................................................................................................... 51
8.5.1 Create new search connector template for MDG ..................................................................................... 51
8.5.2 Add the request fields to Z1MDG_MATERIAL template ............................................................................ 52
8.5.3 Schedule Indexing ..................................................................................................................................... 52
8.5.4 Test Connector: Z1MDG_MATERIAL ......................................................................................................... 52
8.6 CUSTOMIZING ....................................................................................................................................................... 52
9. STEP-BY-STEP PROCEDURE: EXTEND SEARCH UI ................................................................................................. 53
9.1 E NHANCE UIBB MDG_BS_MAT_SEARCH_RESULT_LIST ....................................................................................... 53
9.2 CHANGE SEARCH CRITERIA VALUES ........................................................................................................................... 53
9.2.1 Change Search Criteria from MDG7.0 on .................................................................................................. 54
9.3 DEFAULT FOR CLASS TYPE ........................................................................................................................................ 55
9.4 ADD FIELD DESCRIPTIONS TO THE RESULT LIST .............................................................................................................. 55
9.4.1 POST-EXIT for method CL_MDG_BS_MAT_BO_SEARCH-> GET_SEARCHABLE_ATTRIBUTES .................... 55
9.4.2 POST-EXIT for method CL_MDG_BS_MAT_SP_SEARCH->COMPLETE_DATA ............................................ 58
10. MULTIPLE LANGUAGES .................................................................................................................................. 59
11. ADDITIONAL INFORMATION .......................................................................................................................... 60
11.1.1 Information on SAP MDG on SAP S/4HANA .............................................................................................. 60
11.1.2 SAP Roadmap Explorer.............................................................................................................................. 60
11.1.3 Related Information .................................................................................................................................. 60
11.2 SAP N OTES .......................................................................................................................................................... 60
How-To: Enhance the Material Enterprise Search
5
1. BUSINESS SCENARIO
SAP Master Data Governance provides business processes to find, create, change, and mark master data
for deletion. It supports the governance of master data in a central hub and the distribution to connected
operational and business intelligence systems.
The processes are workflow-driven and can include several approval and revision phases, and the
collaboration of all users participating in the master data maintenance.
This How To Guide describes the solution to extend the enterprise search with custom fields. With MDG for
material master data domain it is possible to extend the data model. If you want to search with these new
fields you must also extend the search.
5
1. BUSINESS SCENARIO
SAP Master Data Governance provides business processes to find, create, change, and mark master data
for deletion. It supports the governance of master data in a central hub and the distribution to connected
operational and business intelligence systems.
The processes are workflow-driven and can include several approval and revision phases, and the
collaboration of all users participating in the master data maintenance.
This How To Guide describes the solution to extend the enterprise search with custom fields. With MDG for
material master data domain it is possible to extend the data model. If you want to search with these new
fields you must also extend the search.