SAP How-To Guide - Extend The Search Result List For MDG For Business Partner
SAP How-To Guide - Extend The Search Result List For MDG For Business Partner
Applicable Releases:
All
Version 2.0
January 2022
Document History
3
1. BUSINESS SCENARIO
SAP Master Data Governance for Material (MDG-M) 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 explains the extension of the MDG Business Partner / Customer / Supplier solution for the search
result list.
This given scenario is primarily an UI extension. It requires general knowledge about the SAP Floor Plan Manager
(FPM) and SAP Web Dynpro for ABAP.
In the search result list, only data related to the Business Partner will be displayed, for example, Partner ID, address
data and category.
Since there is not only the BP object, but also the customer and/or supplier in your company, you are probably
interested in further information such as
Fetching all of the potential data stated above simultaneously would have a negative effect on system performance.
Another challenge of providing this data is creating an overview to display the detailed data.
If your MDG system is running on HANA, the requirement stated above can be met by the HANA Drilldown Search,
which can be easily configured.
This How-To Guide provides an alternative approach for the implementation of a simple Drilldown Search. To keep this
guide simple, only related customer data will be displayed when selecting a record in the search result list.
4
2. STEP BY STEP EXPLANATION
The following explanation shows you how to :
· Customizing of the UI configuration BS_BP_QUERY_RESULT
· Development of a Web Dynpro component to query and display detailed data
· Integration of the developed Web Dynpro component into the initial screen BS_BP_DQUERY via UI customizing
The standard feeder class of the search result list is CL_BS_BP_QUERY_RESULT. It has to be re-implemented.
The new feeder class is called YY_CL_BS_BP_QUERY_RESULT. The next step is the re-definition of the method
IF_FPM_GUIBB_LIST~PROCESS_EVENT. The detailed implementation is shown in “Implementation 1” below.
Once the implementation is active, the standard feeder class of the search result list UIBB BS_BP_QUERY_RESULT
must be replaced by the new one.
5
METHOD if_fpm_guibb_list~process_event.
CHECK sy-subrc = 0
AND <lv_partner> IS NOT INITIAL.
lr_event->mo_event_data->set_value(
EXPORTING
iv_key = 'PARTNER'
iv_value = <lv_partner> ).
ENDMETHOD.
Implementation 1: Method IF_FPM_GUIBB_LIST~PROCESS_EVENT
6
2.2. CREATION OF WEB DYNPRO COMPONENT FOR DETAILED DATA DISPLAY
KNA1
· Customer Number
· Customer Account Group
· Central Order Block
· Central Deletion Flag
KNB1
· Company Code
· Reconciliation Account in General Ledger
· Deletion Flag for Master Record (Company Code Level)
Figure 3: YSTR_RESULT_DETAILS_CUS_CC
7
2.2.3. CREATION OF COMPONENT CONTROLLER CONTEXT
Detailed data will be displayed in a table. Therefore, the following context nodes (acting as data source for Web Dynpro
table element) are required:
8
2.2.4. METHOD PROCESS_EVENT
When a record in the search result list is selected, the event “BP_SELECTED” is raised. Within the method
PROCESS_EVENT, this event is caught and processed. This means that all assigned customers will be queried and
mapped to the context node CUST.
Note: the selected BP-ID is stored in the component controller attribute SEELCTED_BP
METHOD process_event.
wd_context->invalidate( ).
io_event->mo_event_data->get_value(
EXPORTING
iv_key = 'PARTNER'
IMPORTING
ev_value = wd_this->selected_bp ).
SELECT knd~kunnr
knd~ktokd
knd~aufsd
knd~loevm
INTO CORRESPONDING FIELDS OF TABLE lt_cust
FROM mdg_mlt_assgmnt AS mtl INNER JOIN kna1 AS knd
ON mtl~object_id = knd~kunnr
WHERE mtl~assignment_cat = 'CUST'
AND mtl~object_id = wd_this->selected_bp.
ENDMETHOD.
9
2.2.5. View MAIN
The following elements must be placed:
Context Nodes
· Node CUST: maps to the related node of the component controller - mapping path
ZMDG_SEARCH_RSLT_DET_CUS.COMPONENTCONTROLLER.CUST
· Node CUST_CC: maps to the related node of the component controller – mapping path
ZMDG_SEARCH_RSLT_DET_CUS.COMPONENTCONTROLLER.CUST_CC
UI Element Tables
Two tables are needed to display the data:
10
METHOD onactionselect_cc.
DATA lo_nd_cust TYPE REF TO if_wd_context_node.
DATA lo_el_cust TYPE REF TO if_wd_context_element.
DATA ls_cust TYPE wd_this->element_cust.
DATA lo_nd_cust_cc TYPE REF TO if_wd_context_node.
DATA lt_cust_cc TYPE wd_this->elements_cust_cc.
SELECT *
INTO CORRESPONDING FIELDS OF TABLE lt_cust_cc
FROM knb1
WHERE kunnr = ls_cust-kunnr.
ENDIF.
ENDMETHOD.
Implementation 3: ONACTIONSELECT_CC
· Component: ZMDG_SEARCH_RSLT_DET_CUS
· Window Name: W_DETAILS
11
Figure 6: UI Configuration YY_SEARCH_RESULT_DETAILS - Detailed Parameters
12
3. RESULT OF THE ENHANCEMENT
Once all steps above have been successfully implemented, the result can look like this:
Note: If several business partners are selected, only the detailed data of the first selected one will be listed.
13
www.sap.com/contactsap
The information contained herein may be changed without prior notice. Some software products marketed by SAP SE and its distributors contain proprietary software components of other software vendors. National
product specifications may vary.
These materials are provided by SAP SE or an SAP affiliate company for informational purposes only, without representation or warranty of any kind, and SAP or its affiliated companies shall not be liable for errors or
omissions with respect to the materials. The only warranties for SAP or SAP affiliate company products and services are those that are set forth in the express warranty statements accompanying such products and
services, if any. Nothing herein should be construed as constituting an additional warranty.
In particular, SAP SE or its affiliated companies have no obligation to pursue any course of business outlined in this document or any related presentation, or to develop or release any functionality mentioned therein.
This document, or any related presentation, and SAP SE’s or its affiliated companies’ strategy and possible future developments, products, and/or platform directions and functionality are all subject to change and may
be changed by SAP SE or its affiliated companies at any time for any reason without notice. The information in this document is not a commitment, promise, or legal obligation to deliver any material, code, or
functionality. All forward-looking statements are subject to various risks and uncertainties that could cause actual results to differ materially from expectations. Readers are cautioned not to place undue reliance on
these forward-looking statements, and they should not be relied upon in making purchasing decisions.
SAP and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP SE (or an SAP affiliate company) in Germany and other countries. All
other product and service names mentioned are the trademarks of their respective companies. See www.sap.com/trademark for additional trademark information and notices.