SAP MDG · DATA MODEL UI
How do I extend the MDG-S/MDG-C BP data model with a new entity type using the Flex Option?
Use the Flex Option when the new MDG-S/MDG-C entity should stay entirely in MDG-generated tables. In the guide example, you create `ZINFOREC` and `ZMATNR` in data model `BP`, maintain leading/qualifying relationships, activate and adjust staging, extend `BUPA` GenIL, then copy the Supplier UI and wire a custom List UIBB with `DEFERRED_SENDING = X`.
Use the Flex Option when the new MDG-S/MDG-C entity should stay entirely in MDG-generated tables. In the guide example, you create `ZINFOREC` and `ZMATNR` in data model `BP`, maintain leading/qualifying relationships, activate and adjust staging, extend `BUPA` GenIL, then copy the Supplier UI and wire a custom List UIBB with `DEFERRED_SENDING = X`.
Use the Flex Option when the entity must be governed only in MDG tables and not persisted to external ERP tables after activation. The guide’s example extends data model BP with ZINFOREC (Purchasing Info Record), adds ZMATNR as the qualifying entity, maintains the leading relationship from BP_HEADER, activates the model, adjusts staging, and then connects the new entity to the Supplier UI through BUPA GenIL and a custom List UIBB.
Process flow
- Open transaction `MDGIMG`.
- Navigate to `General Settings → Data Modeling → Edit Data Model`.
- Select data model `BP`.
- Create entity type `ZINFOREC` with storage/use type `Changeable via Other Entity Type` and reuse area `MDG`.
- Create supporting entity type `ZMATNR` with data element `MATNR`.
- Add attribute `ZZPURBLOC` to `ZINFOREC`.
- Create leading relationship `ZZBP2INFR` from `BP_HEADER` to `ZINFOREC` with cardinality `1:N`.
- Create qualifying relationship `ZZMAT2INF` from `ZMATNR` to `ZINFOREC` with cardinality `1:N`.」「Activate the data model and run `Adjust Staging Area`.」「Verify the generated tables using `
USMD_DATA_MODEL` and check generated structures in `S
MDGIMGGeneral Settings → Data Modeling → Edit Data Model
Maintain data model `BP`, create entity types, relationships, and activate the model.
SE38USMD_DATA_MODEL
Inspect the generated MDG data model tables after activation.
SE11Dictionary display
Verify generated structures such as `ZXX_S_BP_PP_ZINFOREC`, `ZXX_S_BP_FP_ZINFOREC`, and `ZINFOREC_KEY`.
SE34VC_MDG_BS_GENIL_C
Map the BUPA GenIL objects and connect external object `ZINFOREC` to MDG entity `ZINFOREC`.
SE80Copy Supplier application configuration and OVP
Create custom Supplier UI configuration and copy `FPM_LIST_UIBB_TEMPLATE` to `ZFPM_LIST_UIBB_PIR`.
Referenced tables
| Object | Purpose |
|---|---|
BP | Business Partner MDG data model extended in the example. |
ZINFOREC | Custom Purchasing Info Record entity stored in MDG-generated tables. |
ZMATNR | Supporting qualifier entity based on material number. |
ZXX_S_BP_PP_ZINFOREC | Generated PP structure for the custom entity. |
ZXX_S_BP_FP_ZINFOREC | Generated field-property structure for the custom entity. |
ZINFOREC_KEY | GenIL key structure for the dependent object. |
The remaining configuration, implementation details, and testing guidance continue from this answer more…
Related questions and keywords
Alternative questions
- What is the Flex Option for an MDG-S/MDG-C entity extension?
- How do I add an entity that exists only in MDG?
- When should I use this new entity type extension guide?」「Can I add Purchasing Info Record data only to MDG?」「What are the main phases of a Flex entity extension?」「Do I need to tune
Possible questions
- Which transaction do I use to create a new MDG entity type?
- Where do I edit the MDG BP data model?
- What entities and relationships are created in the Flex example?
- How do I connect a custom MDG entity to the Supplier UI?
- Why do values disappear after pressing New in the custom List UIBB?