Additional Blogs by SAP
cancel
Showing results for 
Search instead for 
Did you mean: 
LarsSAP
Advisor
Advisor

Applies to:

ERP 6 EhP5 – Master Data Governance for Supplier

Summary

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.

Author(s): 

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.

Content

  • Part 1: Data Model
    • Overview
    • Extending active area data model
    • Extending staging area data model
    • Defining mapping between Active and Staging area data models
    • Implement Enhancement Spot CVI_CUSTOM_MAPPER
    • Testing data model changes
  • Part 2: UI Modeling
  • Part 3: Process Modeling
  • Part 4: Validation and Derivation
  • Part 5: Data Replication
  • Part 6: Enterprise Search (ES)
  • Part 7: Print Output

This article covers part 1.

Overview

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.

Extending active area data model

Extending BUT000

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

Extending LFA1

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

Extending staging area data model

Extending MDG BP data model

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

Generating MDG tables

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

  • In Customizing for Master Data Governance, choose General Settings -> Data Modeling -> Generate Data Model-specific structure
  • Select the row with Data Model BP
  • Double-click Structures in the left hand panel
  • Click Generate Structures
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

  • Start the ABAP Editor with transaction SE38
  • In the Program input field enter USMD_DATA_MODEL
  • Execute the program
  • In the Data Model input field enter BP
  • Click on Execute
  • In the column Included Entity Type double-click on BP_CENTRL
  • On the Fields tab in the Field column verify that your custom field is listed here

Defining mapping between Active and Staging area data models

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

Defining mapping from Staging- to Active area

In this activity you will use the Service Mapping Tool to map your custom field from Staging- to the Active area.

ACTIVITY

  • In Customizing for Master Data Governance, choose General Settings -> Data Modeling -> Create and Edit mappings -> Create and Edit mappings
  • From the drop-down select Mapping -> Open
  • In the name input field enter (or use F4 to select) BP_BP_CENTRL _2API, Central Data -> API
  • The following two mapping steps are relevant
    • Central Business Partner Data
    • X Structure for Central Business Partner Data
  • Select mapping step Central Business Partner Data
  • Press Details
  • Select Transformations tab
  • Select row (00001, Field Mapping)
  • Add field
    Field Mapping Table

    Field  |Source Structure |Source Field
    ZSDN_CI |MDG_BS_BP_BP_CENTRL |ZSDN_CI
  • Save changes

ACTIVITY

  • In Customizing for Master Data Governance, choose General Settings -> Data Modeling -> Create and Edit mappings -> Create and Edit mappings
  • From the drop-down select Mapping -> Open
  • In the name input field enter (or use F4 to select) BP_BP_CENTRL _2API, Central Data -> API
  • The following two mapping steps are relevant
    • Central Business Partner Data
    • X Structure for Central Business Partner Data
  • Select mapping step X Structure for Central Business Partner Data
  • Press Details
  • Select Transformations tab
  • Select row (00001, Field Mapping)
  • Add field
    Field Mapping Table

    Field  |Source Structure |Source Field
    ZSDN_CI |MDG_BS_BP_BP_CENTRL_X     |ZSDN_CI
  • Save changes

Defining mapping from Active- to Staging area

ACTIVITY

  • In Customizing for Master Data Governance, choose General Settings -> Data Modeling -> Create and Edit mappings -> Create and Edit mappings
  • From the drop-down select Mapping -> Open
  • In the name input field enter (or use F4 to select) BP_BP_CENTRAL _2STA, Central Data -> Staging
  • The following mapping step is relevant
    • Central Data
  • Select mapping step Central Data
  • Press Details
  • Select Transformations tab
  • Select row (00001, Field Mapping)
  • Add field
    Field Mapping Table

    Field  |Source Structure | Source Field
    ZSDN_CI |BUS_EI_EXTERN |CENTRAL_DATA-COMMON_DATA_ ZSDN_CI
  • Save changes

    ACTIVITY
  • In Customizing for Master Data Governance, choose General Settings -> Data Modeling -> Create and Edit mappings -> Create and Edit mappings
  • From the drop-down select Mapping -> Open
  • In the name input field enter (or use F4 to select) MDG_BS_BP_MAP_2STA, Mapping Business Partner general data to MDG staging
  • The following mapping step is relevant
    • Central Data
  • Select mapping step Central Data
  • Press Details
  • Select Transformations tab
  • Select row (00001, Field Mapping)
  • Add field
    Field Mapping Table

    Field  |Source Structure |Source Field
    ZSDN_CI |BUS_EI_EXTERN |CENTRAL_DATA-COMMON_DATA_ ZSDN_CI
  • Save changes

Implement Enhancement Spot CVI_CUSTOM_MAPPER

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

IF_EX_CVI_CUSTOM_MAPPER~MAP_BP_TO_VENDOR
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.

IF_EX_CVI_CUSTOM_MAPPER~MAP_VENDOR_TO_BP
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.

Testing data model changes

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.

Outlook

The flowing parts will be made available in the future.

Related Content

6 Comments