ERP 6 EhP5 – Master Data Governance for Supplier
SAP Master Data Governance provides an out-of-the box solution for the central management of various master data objects such as financial objects, supplier and material. But SAP Master Data Governance also provides the flexibility to customize the solution, in cases where the predelivered content does not fully match customer requirements. The article series will provide an introduction to extensibility for SAP Master Data Governance for Supplier. In this first article the focus will be on extending the data model. The following articles will build on the extended data model and explain enhancements to the SAP Master Data Governance UIs, processes, validations and derivations, data replication, Enterprise Search and print output.
Lars Rueter
Company : SAP AG, Germany
Created on: 4. March 2011
Author(s) Bio
Mr. Rüter works at SAP in the area of Master Data Management. In the past 11 years at SAP he has held different positions in Asia Pacific and EMEA. He has extensive experience in SAP's Master Data Management product portfolio, Java Development and SAP NetWeaver Portal. As a Consultant and Solution Architect Mr Rüter has been involved in a large number of SAP implementations worldwide.
This article covers part 1.
In SAP Master Data Governance data can be stored in a staging- or active area. The location used for the temporary storage of the working version of master data that is undergoing change within a change request process is called staging area. The location used for the permanent storage of the active instances of master data after changes have been approved by a change request process is called active area.
Extending the data model in SAP Master Data Governance with custom attributes or tables involves changes to the data structures in both the active and staging areas and defining a mapping between these data structures.
The extension of standard entity types is a common and straight forward task. Let’s say you want to extend SAP Master Data Governance for Supplier by a custom field called ZSDN_CI. You start by extending the append structures for supplier (BUT000). You add the field to structures CI_EEW_BUT000 and CI_EEW_BUT000_X.
Figure 1: Extending structure INCL_EEW_BUT000
Figure 2: Extending structure INCL_EEW_BUT000_X
Next you extend the append structures for vendor (LFA1). You add the field to structures VMDS_EI_VMD_CENTRAL_DATA and VMDS_EI_VMD_CENTRAL_DATA_XFLAG .
Figure 3: Extending structure VMDS_EI_VMD_CENTRAL_DATA
Figure 4: Extending structure VMDS_EI_VMD_CENTRAL_DATA_XFLAG
Finally you extend the data model in SAP Master Data Governance. Using the IMG activity Edit Data Model as an entry point you add our field ZSDN_CI to the Entity Type BP_CENTRAL of data model BP.
Figure 5: List of Entity Types for data model BP
Figure 6: List of attributes for Entity Type BP_CENTRL
Since the MDG data model was changed you need to regenerate the tables. In this customizing activity, for each data model and entity type you generate technical structures and tables in the ABAP Dictionary. The system uses these structures internally for implementing the staging area. To generate these Data Model-specific structures follow the steps below:
ACTIVITY
Note In general if you change a data model (for example, if you change attributes of entity types or relationships), you need to regenerate the structures. |
To verify that your custom fields have been added to the MDG-generated tables follow the steps below
ACTIVITY
The Service Mapping Tool (SMT) is a program that enables you to fill target structures by using sets of source structures (in ABAP). It supports simple mappings, mappings with field transformations, complex transformations and field checks.
Information: The SMT mapping-steps below lead to a modification. Consider using a modification free extension of the SMT mapping as described here: http://help.sap.com/saphelp_tm80/helpdata/en/eb/f6e013951540d9abed8a64157ac984/frameset.htm
In this activity you will use the Service Mapping Tool to map your custom field from Staging- to the Active area.
ACTIVITY
Field |Source Structure |Source Field
ZSDN_CI |MDG_BS_BP_BP_CENTRL |ZSDN_CI
ACTIVITY
Field |Source Structure |Source Field
ZSDN_CI |MDG_BS_BP_BP_CENTRL_X |ZSDN_CI
ACTIVITY
Field |Source Structure | Source Field
ZSDN_CI |BUS_EI_EXTERN |CENTRAL_DATA-COMMON_DATA_ ZSDN_CI
Field |Source Structure |Source Field
ZSDN_CI |BUS_EI_EXTERN |CENTRAL_DATA-COMMON_DATA_ ZSDN_CI
To map our custom field from business partner to vendor and back you must implement interface IF_EX_CVI_CUSTOM_MAPPER of enhancement spot CVI_CUSTOM_MAPPER. You should at least implement the methods highlighted in the figure below.
Figure 7: BAdI class with relevant mapping methods highlighted
method IF_EX_CVI_CUSTOM_MAPPER~MAP_BP_TO_VENDOR.
c_vendor-central_data-central-data-zsdn_ci = i_partner-central_data-common-data-zsdn_ci .
c_vendor-central_data-central-datax-zsdn_ci = i_partner-central_data-common-datax-zsdn_ci .
endmethod.
method IF_EX_CVI_CUSTOM_MAPPER~MAP_VENDOR_TO_BP.
c_partner-central_data-common-data-zsdn_ci = i_vendor-central_data-central-data-zsdn_ci .
c_partner-central_data-common-datax-zsdn_ci = i_vendor-central_data-central-datax-zsdn_ci .
endmethod.
To test if our data model changes really work we need to extend the UI by our custom field ZSDN_CI first. This step will be shown in the next part of this blog.
The flowing parts will be made available in the future.