SAP MDG · DATA MODEL UI

How do I extend SAP MDG Business Partner with a custom sub-node using the Reuse Option?

Extend the BP data model in MDG with a custom entity under BP_VENGEN, generate the staging structures, map the custom fields into SAP API DATA/DATAX structures, expose the entity through BUPA GenIL, and persist approved data to the active Z-table in update task.

Extend the BP data model in MDG with a custom entity under BP_VENGEN, generate the staging structures, map the custom fields into SAP API DATA/DATAX structures, expose the entity through BUPA GenIL, and persist approved data to the active Z-table in update task.

From the Reuse Option blueprint, the end-to-end flow is FPM UI → BOL/GenIL BUPA → MDG staging (/1MD/) → custom access handler → standard API DATA/DATAX structures → update task → custom active table. The example uses custom entity `ZBP_SUPPL` under `BP_VENGEN`, active table `ZLFA1_EXT`, GenIL object `ZBP_SUPPL_EXT`, handler class `CL_MDG_BS_ECC_HANDLER`-based custom logic, and FPM feeder class `CL_BS_BP_GUIBB_FORM`.

Process flow

  1. Create the active transparent table in SE11.
  2. Extend the BP data model in MDGIMG with custom entity ZBP_SUPPL.
  3. Define the BP_VENGEN -> ZBP_SUPPL relationship with SU and 1:1 cardinality.
  4. Regenerate and activate the BP model so MDG creates staging artifacts.
  5. Extend VMDS_EI_CENTRAL_DATA with custom DATA/DATAX append structures.
  6. Create GenIL dependent object ZBP_SUPPL_EXT in component BUPA.
  7. Maintain VC_MDG_BS_GENIL_C node customizing for BUPA to map ZBP_SUPPL_EXT to ZBP_SUPPL.
  8. Implement the custom access handler methods in a CL_MDG_BS_ECC_HANDLER-based class and call the update-task FM from SAVE_ADDITIONAL_OBJECT_DATA in activation logic only once approved data is finalized.
SE11

Dictionary -> Transparent Table

Create the active-area table ZLFA1_EXT and the API append structures ZVMDS_EI_VMD_EXT_DATA / ZVMDS_EI_VMD_EXT_DATAX.

MDGIMG

General Settings -> Data Modelling -> Edit Data Model

Create entity type ZBP_SUPPL, set Storage and Use Type 4, Key Assignment 3, maintain attributes, define the BP_VENGEN relationship, then validate and activate the model.

Structure
MDGIMG
Master Data Governance
Classic Mode in SAP MDG
Central Governance
General Settings
Data Modeling
Edit Data Model
GENIL_MODEL_BROWSER

Component BUPA -> Enhance -> Dependent Objects / Relations

Create the GenIL dependent object ZBP_SUPPL_EXT and relate it to BP_Root.

SM34

View Cluster VC_MDG_BS_GENIL_C -> Component Name BUPA -> Comp - GenIL - Node Customizing

Assign external object ZBP_SUPPL_EXT to entity type ZBP_SUPPL.

SE80

Web Dynpro Components/Interfaces -> FPM_FORM_UIBB_GL2

Copy and configure the custom FPM UIBB ZMDG_BP_SUPPL_EXT_UIBB with feeder class CL_BS_BP_GUIBB_FORM.

Referenced tables

ObjectPurpose
ZLFA1_EXTCustom active-area database table for approved supplier extension data.
VMDS_EI_CENTRAL_DATAStandard SAP API structure extended by the custom append structure carrying DATA/DATAX.
ZVMDS_EI_VMD_EXT_DATACustom plain-data append structure for the API layer.
ZVMDS_EI_VMD_EXT_DATAXCustom change-indicator append structure for the API layer.
ZMDGBP_S_BP_PP_ZBP_SUPPLGenerated staging structure for the custom MDG entity.
VC_MDG_BS_GENIL_CView cluster used to maintain GenIL node customizing for the BUPA component.

ILLUSTRATIVE ABAP SAMPLE

Source ABAP example: SAP_S4HANA_Customer_Vendor_Integration_Cookbook.abap

Exact relevant implementation excerpt from the knowledge document set.

1*---------------------------------------------------------------------* 2* Title : SAP S4HANA Customer Vendore Integration Cookbook 3*---------------------------------------------------------------------* 4* TAGS 5* SAP S/4HANA 6* CVI 7* CUSTOMER VENDOR INTEGRATION 8* BUSINESS PARTNER 9* HCM EMPLOYEE 10* EMPLOYEE VENDOR 11* CVI_MAP_TITLE 12* CVI_MAP_BP_CATEGORY 13* CVI_CUSTOM_MAPPER 14* MAP_VENDOR_TO_BP 15* BP CATEGORY PERSON 16* BP NUMBER ASSIGNMENT 17* EXTERNAL NUMBER RANGE 18* ACCOUNT GROUP ZEMP 19* BP GROUPING BPAB 20* LFA1 21* LFB1-PERNR 22* VMDS_EI_COMPANY_T 23* VMDS_EI_COMPANY 24*---------------------------------------------------------------------* 25 26*---------------------------------------------------------------------* 27* SOURCE EXAMPLE 1 28* BAdI: CVI_MAP_TITLE 29* Purpose: Set employee Vendor Business Partner category to Person 30*---------------------------------------------------------------------* 31data: lv_ktokk type ktokk. 32 33select single ktokk into lv_ktokk 34 from lfa1 35 where lifnr = i_vendor_id. 36if sy-subrc = 0 and lv_ktokk = ‘ZEMP’. 37 c_partner_category = bp_as_person. 38endif. 39 40*---------------------------------------------------------------------* 41* SOURCE EXAMPLE 2 42* BAdI: CVI_CUSTOM_MAPPER 43* Method: MAP_VENDOR_TO_BP 44* Purpose: Derive BP number from employee personnel number 45*---------------------------------------------------------------------* 46MAP_VENDOR_TO_BP 47 48 data: lt_company type VMDS_EI_COMPANY_T, 49 ls_company type VMDS_EI_COMPANY. 50 51 if I_VENDOR-CENTRAL_DATA-CENTRAL-DATA-KTOKK = 'ZEMP'. 52 lt_company = I_VENDOR-COMPANY_DATA-COMPANY. 53 loop at lt_company into ls_company where data- 54pernr ne space. "What if more than one Company Code? 55 concatenate 'EN' ls_company-data-pernr into C_PARTNER-HEADER- 56OBJECT_INSTANCE-BPARTNER. "What BP already exists? 57 C_PARTNER-CENTRAL_DATA-COMMON-DATA-BP_CONTROL-GROUPING = 'BPAB'. 58 exit. 59 endloop. 60 endif.

The remaining configuration, implementation details, and testing guidance continue from this answer more…

Related questions and keywords

Alternative questions

  • How do I add a custom supplier entity to the MDG BP data model?
  • How do I persist a custom BP sub-node from MDG staging to a Z-table?
  • What are the MDG IMG, GenIL, handler class, and FPM steps for a BP reuse extension?

Possible questions

  • How do I create a custom MDG BP entity and persist it to a Z-table?
  • What are the configuration steps for a BP reuse-option extension in MDG?
  • Which classes and methods are used for MDG BP custom entity mapping?
  • How do I connect a custom GenIL object to an FPM UIBB in MDG BP?
  • How do I save MDG BP custom data in update task after activation?

Keywords

SAP MDGBusiness PartnerBPReuse Optioncustom entityZBP_SUPPLBP_VENGENZLFA1_EXTMDGIMGSE11GENIL_MODEL_BROWSERVC_MDG_BS_GENIL_CCL_MDG_BS_ECC_HANDLERMAP_DATA_2APIMAP_DATA_2STAREAD_OBJECT_DATASAVE_ADDITIONAL_OBJECT_DATACL_BS_BP_GUIBB_FORMCL_BS_BP_CONNECTOR_BOL_REL/1MD/IN UPDATE TASK