SAP MDG · DATA MODEL UI
How do I extend the Business Partner supplier data model with a new reuse-entity node in SAP MDG?
To extend a supplier/business-partner node with a reuse entity in MDG, you must extend the active structure `VMDS_EI_VMD_COMPANY`, create a custom Z-table for persistence, add the new entity type and relationships in data model `BP`, implement a custom handler class, enhance the genIL model, and add a copied List UIBB to the supplier OVP. The source guide gives the exact objects and wiring for a secret-number example.
To extend a supplier/business-partner node with a reuse entity in MDG, you must extend the active structure `VMDS_EI_VMD_COMPANY`, create a custom Z-table for persistence, add the new entity type and relationships in data model `BP`, implement a custom handler class, enhance the genIL model, and add a copied List UIBB to the supplier OVP. The source guide gives the exact objects and wiring for a secret-number example.
To add a new table-like supplier node in MDG, extend the BP company structure first, then create the reuse-table persistence, model the new entity and relationship in data model `BP`, and finally connect the node through genIL and the MDG-S UI. The example in the guide uses a secret-number node under company code data, with custom persistence in a Z-table after CR activation and staging support during the request.
Process flow
- Extend structure `VMDS_EI_VMD_COMPANY` with append `ZTEST_SECRET_NUMBERS` and component type `ZEI_SECRET_NUMBER_S`.
- Create reuse-area table `ZSECRET_NUMBER` for active persistence after CR activation.
- In `MDGIMG`, extend data model `BP` with entity types `ZSECRET` and `ZSECRET_N`.
- Create relationship `BP_COMPNY -> ZBUKRS_SN -> ZSECRET_N` and qualifying relationship `ZSECRET -> ZSECRET_N`.
- Generate model-specific structures `PP_BP_SECRET`, `ES_BP_SECRET`, and `FP_BP_SECRET`.
- Create custom handler class inheriting from `CL_MDG_BS_ECC_HANDLER` and redefine the listed `IF_MDG_BS_BP_ACCESS_HANDLER` methods.
- Create genIL enhancement `ZBUPA_CUSP_CUST_TABL` under `BUPA_CUSP` and add dependent object `ZSP_SecretNumbers`.
- Maintain `VC_MDG_BS_GENIL_C` to connect `ZSP_SecretNumbers` with entity type `ZSECRET_N`.,
Create enhancement under `BUPA_CUSP`
Add the genIL enhancement, dependent object, and aggregation relation for the custom supplier node.
SM34View Cluster `VC_MDG_BS_GENIL_C` -> Model Customizing / Node Customizing
Map the MDG data model entity to the genIL external object.
SE80Web Dynpro component `FPM_LIST_UIBB` -> copy `FPM_LIST_UIBB_TEMPLATE`
Create the custom List UIBB configuration `ZBS_SP_SECRET_NUMBERS`.
SE80Package `MDG_BS_ECC_SUPPLIER_BOLUI` -> component configuration `BS_SP_OVP`
Enhance the supplier OVP and insert the custom list block with wiring.
Referenced tables
| Object | Purpose |
|---|---|
ZSECRET_NUMBER | Custom reuse-area persistence table for secret numbers and comments after CR activation. |
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 table-like node under Supplier Company Code in MDG-S?
- How do I extend VMDS_EI_VMD_COMPANY for a new supplier subnode?
- How do I add a list UIBB for a custom supplier node in MDG?
Possible questions
- How do I extend a supplier-specific BP node in MDG using the reuse option?
- What DDIC objects, data model settings, genIL settings, and UI steps are needed for a new supplier secret-number node?
- Which handler class methods must be reimplemented for a custom table-like supplier node?
- How do I connect a custom MDG entity to BOL/genIL and a List UIBB?
- What are the exact relationship and configuration steps for a custom supplier node in MDG-S?