SAP MDG · DATA MODEL UI
How do I extend SAP MDG for Material (MM) with a new entity type using the ERP table / reuse active area option?
Extend data model MM in MDGIMG with a Type 4 reuse entity such as YMARC1 under MATERIAL, generate the model-specific structures, create bidirectional SMT mappings to MARC, adjust linked change requests, then add the new fields to the Material OVP with a custom List UIBB.
Extend data model MM in MDGIMG with a Type 4 reuse entity such as YMARC1 under MATERIAL, generate the model-specific structures, create bidirectional SMT mappings to MARC, adjust linked change requests, then add the new fields to the Material OVP with a custom List UIBB.
This SAP MDG for Material scenario uses the ERP table / reuse active area option to add a new entity type to data model MM and persist the data into existing MARC material storage after activation. The example entity is YMARC1, a Type 4 child of MATERIAL with a leading 1:N relationship, and it carries MARC-related attributes such as LVORM, XCHAR, DISMM, DISPO, and DISLS.
The implementation has two major parts: extend the data model and persistence mapping in MDGIMG and SMT, then extend the Material UI with a custom FPM List UIBB. After activation, the transferred plant data is verified in the active material master with MM02.
Process flow
- Start transaction
MDGIMG. - Go to General Settings -> Configuration Workbench.
- Select data model MM and choose Edit.
- Create entity type YMARC1 as Storage and Use Type 4.
- Leave reuse area blank to inherit MATERIAL.
- Add attributes LVORM, XCHAR, DISMM, DISPO, DISLS.
- Create supporting Type 3 entities YT438A, YT024D, and YT001W.
- Define the required leading relationship and cardinality 1:N under MATERIAL, then activate the model and save generated structures.
MDGIMGGeneral Settings -> Configuration Workbench
Extend data model MM, create entity type YMARC1, define relationships, activate the model, and generate model-specific structures.
MDGIMGGeneral Settings -> Data Modeling -> Generate Data Model Specific Structures
Create and assign SMT mappings for entity YMARC1 in both directions.
MDGIMGGeneral Settings -> Data Modeling -> Edit Data Model
Adjust linked change requests after the model extension.
SE80Web Dynpro Components / FPM list UIBB template copy
Copy FPM_LIST_UIBB_TEMPLATE for the custom list UIBB implementation.
PFCGRole SAP_MDGM_MENU -> Menu -> Material Governance -> Material Processing -> Create Material
Launch Material Processing for end-to-end testing.
Referenced tables
| Object | Purpose |
|---|---|
MARC | Active ERP material plant data persistence targeted by the reuse-active-area mapping. |
TRNSPACET | Check existing namespaces for generated structures. |
TRNSPACEL | Check existing namespaces for generated structures. |
ILLUSTRATIVE ABAP SAMPLE
Source ABAP example: Extend_MDG_M_New_Reuse_Entity_Type.abap
Exact relevant implementation excerpt from the knowledge document set.
1*---------------------------------------------------------------------*
2* <SOURCE_DOCUMENT>
3* Extend MDG-M by a New Reuse Entity Type
4* Version 9.1 - July 2026
5* </SOURCE_DOCUMENT>
6*---------------------------------------------------------------------*
7
8*---------------------------------------------------------------------*
9* <BADI_IMPLEMENTATION>
10* <INTERFACE>IF_MDG_BS_MAT_API_SEGMENTS_EXT</INTERFACE>
11* <METHOD>READ</METHOD>
12*---------------------------------------------------------------------*
13METHOD if_mdg_bs_mat_api_segments_ext~read.
14 DATA: lt_mdgm_bupa TYPE ymdgm_bupa01_t.
15
16 CLEAR: et_data, et_message.
17
18 SELECT *
19 FROM ymdgm_bupa00
20 INTO CORRESPONDING FIELDS OF TABLE lt_mdgm_bupa
21 WHERE matnr IN is_selection-matnr_range
22 AND bupa_id IN is_selection-bupa_id_range.
23
24 INSERT LINES OF lt_mdgm_bupa INTO TABLE et_data.
25ENDMETHOD.
26* </BADI_IMPLEMENTATION>
27
28*---------------------------------------------------------------------*
29* <BADI_IMPLEMENTATION>
30* <INTERFACE>IF_MDG_BS_MAT_API_SEGMENTS_EXT</INTERFACE>
31* <METHOD>CHECK_AND_SAVE</METHOD>
32*---------------------------------------------------------------------*
33METHOD if_mdg_bs_mat_api_segments_ext~check_and_save.
34
35 DATA: ls_data TYPE ymdgm_bupa01_s.
36 DATA: ls_data_x TYPE ymdgm_bupa01_s_x.
37 DATA: ls_message TYPE mdg_bs_mat_s_mat_msg.
38 DATA: lt_modify TYPE STANDARD TABLE OF ymdgm_bupa00.
39 DATA: ls_modify TYPE ymdgm_bupa00.
40 DATA: lt_delete TYPE STANDARD TABLE OF ymdgm_bupa00.
41 DATA: ls_delete TYPE ymdgm_bupa00.
42
43 CLEAR et_message.
44
45 " First some checks
46 LOOP AT is_data-ymdgm_bupa00_tab INTO ls_data.
47 " All fields must be filled, otherwise
48 " MESSAGE e000(00) WITH ls_data-matnr
49 " ls_data-bupa_id
50 " ls_data-nickname.
51 IF ls_data-matnr IS INITIAL
52 OR ls_data-bupa_id IS INITIAL
53 OR ls_data-nickname IS INITIAL.
54
55 ls_message-msgid = '00'.
56 ls_message-msgno = '000'.
57 ls_message-msgty = 'E'.
58
59 ls_message-msgv1 = 'Empty value detected in:'.
60 ls_message-msgv2 = ls_data-matnr.
61 ls_message-msgv3 = ls_data-bupa_id.
62 ls_message-msgv4 = ls_data-nickname.
63
64 INSERT ls_message INTO TABLE et_message.
65 ENDIF.
66
67 " BuPa must exist
68 " ...
69 ENDLOOP.
70
71 " In test mode, we're finished now
72 CHECK iv_test_mode = abap_false.
73
74 " Determine which records to delete or to insert/update
75 LOOP AT is_data-ymdgm_bupa00_x_tab INTO ls_data_x.
76 IF ls_data_x-delete_row = abap_true.
77 " Keep key fields for deletion
78 ls_delete-matnr = ls_data_x-matnr.
79 ls_delete-bupa_id = ls_data_x-bupa_id.
80 INSERT ls_delete INTO TABLE lt_delete.
81 ELSE.
82 READ TABLE is_data-ymdgm_bupa00_tab INTO ls_data
83 WITH TABLE KEY matnr =
84* <SOURCE_TRUNCATED_AT_THIS_POINT />The remaining configuration, implementation details, and testing guidance continue from this answer more…
Related questions and keywords
Alternative questions
- How do I add a new entity type to MDG-M data model MM and map it to MARC?
- What are the steps to implement a reuse-active-area extension in SAP MDG for Material?
- How do I configure MDGIMG, SMT mappings, and the material UI for a new entity type?
Possible questions
- What business requirement does the new Plant Data for Material entity type address?
- Which material attributes are included in the example entity type?
- Why is Storage and Use Type 4 selected for YMARC1?
- What is the relationship between MATERIAL and YMARC1?
- What is the difference between flex mode and reuse mode in MDG?
- Which reuse area is delivered for the MM data model?
- Which access class is assigned to reuse area MATERIAL?
- What happens when the reuse-area field is left blank on a new entity type?
- Which storage and use types are available in MDG?
- What tables are generated for Storage and Use Type 1?
- Why are no text tables generated for Storage and Use Type 4?
- What is the difference between leading, qualifying, and referencing relationships?
- What does cardinality 1:N mean in the MDG data model?
- Why should one entity type not bundle multiple database tables?
- What is the precedence order for F4 help in an MDG extension?
- Why is a foreign-key relationship important for F4 help?
- How are code lists derived for validation?
- When should separate entity types be created for multiple list UIBBs?
- When can multiple list UIBBs share the same entity type?
- What is the role of Floorplan Manager in the MDG Material UI?