SAP MDG · DATA MODEL UI
How do I extend MDG-S / MDG-C data model BP with a new custom-defined field using the Reuse Option?
Use the Reuse Option when the custom attribute already exists as a backend field in BP, Vendor, or Customer structures. First extend the ERP active-area structure, then extend MDG data model BP, generate/regenerate the model-specific structures, maintain the required SMT mappings, and if the field exists in both BP and Vendor/Customer also implement CVI mapping.
Use the Reuse Option when the custom attribute already exists as a backend field in BP, Vendor, or Customer structures. First extend the ERP active-area structure, then extend MDG data model BP, generate/regenerate the model-specific structures, maintain the required SMT mappings, and if the field exists in both BP and Vendor/Customer also implement CVI mapping.
This guide covers the MDG-S / MDG-C Reuse Option for custom fields that already exist in backend BP, Vendor, or Customer structures. The core flow is: identify where the field exists, extend the ERP model, extend MDG data model BP, generate the MDG structures, and set up the correct SMT mapping. For fields shared by BP and Vendor/Customer, an additional CVI mapping step is required.
Process flow
- Identify whether the field exists in BP only, Vendor/Customer only, or both.
- Extend the backend active-area table using the appropriate customer include, for example `INCL_EEW_BUT000` and `INCL_EEW_BUT000_X`.
- Extend data model `BP` in `MDGIMG` and add the field to the correct entity type such as `BP_CENTRL` or `BP_VENGEN`.
- Generate or regenerate the model-specific structures for data model `BP`.
- Maintain the required SMT mappings such as `BP_BP_CENTRL_2API`, `MDG_BS_BP_MAP_2STA`, `SUPPL_BP_VENGEN_2API`, or `SUPPL_BP_VENGEN_2STA`.
- Run the customizing check for the mappings in `MDGIMG`.
- Adjust the staging area of linked change requests after model changes.
- If the field exists in both BP and Vendor/Customer, implement `CVI_CUSTOM_MAPPER` with `IF_EX_CVI_CUSTOM_MAPPER`. Verify `MAP_BP_TO_VENDOR` and `MAP_VENDOR_TO_BP`.
MDGIMGGeneral Settings → Data Modeling → Edit Data Model
Add the custom field to the MDG data model entity such as `BP_CENTRL`.
MDGIMGGeneral Settings → Data Modeling → Generate Data Model-Specific Structures
Regenerate the data-model-specific structures after extending the model.
MDGIMGGeneral Settings → Data Modeling → Extend Mappings → Extend Mappings
Maintain SMT mappings such as `BP_BP_CENTRL_2API`, `MDG_BS_BP_MAP_2STA`, `SUPPL_BP_VENGEN_2API`, and `SUPPL_BP_VENGEN_2STA`.
MDGIMGGeneral Settings → Data Modeling → Create and Edit Mappings → Check Customizing
Validate mapping customizing and resolve transformation errors.
MDGIMGGeneral Settings → UI Modeling → Define Field Properties for UI
Register the custom field for UI usage.
MDGIMGGeneral Settings → Data Quality and Search → Search and Duplicate Check → Define Joins, Field Mapping, and Authorizations for Reuse Tables
Maintain field mapping for SAP HANA-based search.
Referenced tables
| Object | Purpose |
|---|---|
BUT000 | Business Partner active-area table used in the BP-only example. |
LFA1 | Vendor active-area table for Vendor-only scenarios. |
KNA1 | Customer active-area table for Customer-only scenarios. |
USMD_DATA_MODEL | Program used to inspect the generated MDG model-specific structures. |
The remaining configuration, implementation details, and testing guidance continue from this answer more…
Related questions and keywords
Alternative questions
- What is the MDG reuse option for custom fields?
- How do I extend MDG-S or MDG-C with an existing database field?
- What areas are affected when adding a custom attribute to MDG BP?
Possible questions
- Which implementation path should I use for my custom field?
- What is different when a field exists in BP versus Vendor/Customer?
- When is CVI mapping required?
- Which SMT mapping is required for each scenario?
- What example fields are used for the BP-only extension?
- Must the MDG and backend data elements match?