Creation of Custom Objects with the Application Framework

The figure illustrates some screens used in the Application Framework.
Business value of the Application Framework:
- Preconfigured data models, user interface configurations, workflows, and data distribution are adjustable.
- You can extend the existing models with your own master data attributes, change the UI configuration to your users' needs, and customize the workflow and distribution to define your specific governance processes.
- Tools allow you to define new objects and related processes in order to govern your own master data domains.
Data Modeling and Custom Objects
Use Cases and Examples for Data Modeling and Custom Objects in the Application Framework:
- Adding entity types in delivered standard data models*:
Additional objects in the context of the standard MDG domains (Financials, Supplier, Customer, Material).
Examples:
- New entity types for new financial objects not available in data model 0G.
- Subordinate entity types of material that are not delivered with the data model MM.
- Include fields from customer enhancements into MDG data model, for example, Z-tables and Fields.
*These extensions are part of the licensed SAP Master Data Governance domains.
- Creating Custom Objects**:
Governance of object types are not part of the predelivered MDG data model.
Examples:
* Reference data, for example: Plants, Storage Locations, or Payment Terms
** Additional objects from finance like: Activity Type, Bank Code, or Work Breakdown Structures (WBS)
*** Object closely related to master data, for example: Pricing Conditions (PCond)
* RDM: an Add-On exists ** WBS: a guide exists How To Create a Custom Data Model for WBS *** PCond: An SAP Consulting Solution Exists These extensions might require an MDG Custom Object and/or additional licenses.
Data Models

For more information, see http://help.sap.com and search for SAP Master Data Governance→Configuration of Master Data Governance→General Settings→Creation of New Content for Master Data Governance.
Data Models, Definition:
A data model in Master Data Governance consists of different elements such as entity types, attributes, and relationships, allowing you to model complex master data structures in the system.
The data model is used to create database tables to store the data you enter when managing master data. The structure of your data model determines the key and non key fields found in these database tables.
You can assign a reuse active area to a data model or individual entity types. Inactive master data is stored in MDG tables, while active data is stored in existing back end database tables.
MDG data models without a reuse active area store all inactive and active data in the MDG tables, known as Flexibility Mode or Flex mode.
Define and edit data models either in the MDG Implementation Guide or using the WebDynpro-based Configuration Workbench.
The system shows all available data models for processing, indicating if an active version exists and if it differs from the displayed version.
Handling of Active and Inactive Data:
- The Active area contains data that is available for use by applications.
- The Staging area contains unapproved data that is currently part of a change request.
- For optimized integration and flexibility MDG allows two modes for the Active Area:
- Reuse mode utilizes existing application structures, such as database tables, and is used for all MDG domains in SAP S/4HANA, as well as custom objects, besides SAP Master Data Governance, Financials. It requires a reuse class for accessing backend content.
- Generated active area tables in flex mode are used to store active data defined in the MDG data model. These tables are used for SAP Master Data Governance, Financials (Data Model 0G) and are the default for Custom Objects, with automatic access enabled without additional coding.

The figure illustrates the difference between the Reuse mode and the Flex mode.
Data Model
Facts about the data model:
- MDG uses four usage types for entities:
Main Data (Example: Supplier, Material) (governance and persistence in MDG).
Check table (no governance, no persistence in MDG - but in Business Suite tables).
Check table (no governance, persistence in MDG).
Dependent Data (like 1, but can only be maintained together with an entity of type 1).
- Attributes are linked to entities:
- Existing data elements can be used to reuse F1 or F4.
- Search help can be assigned.
- Can be set as mandatory.
- Hierarchies can be defined on the entity level:
- Name dependent, version dependent, or both.
- Hierarchy attributes (edge attributes) to be defined.
- Allowed hierarchy entity types can be defined (for mixed hierarchies).
- Intervals as leafs are possible.
Entity Types - Overview: Storage and Usage Types

The figure explains the four different storage types. The following are further details:
- TYPE 1
- For "Main table(s)" and/or any table to be maintained in MDG.
- No Qualifying relationships (Only Leading and Referencing).
- TYPE 2
For look-up data to be maintained in MDG but without attributes.
- TYPE 3
For look-up data to be maintained outside of MDG without attributes.
- TYPE 4
- No Key Fields.
- Used for type 1 extension or qualification.
- For qualified table data, text data extensions for type 1.
- Only one leading relation can be created, and one qualifying is required. Others must be qualifying or referencing.
Further differences are:
The storage type 1 entity types are the ones that are linked to the change requests types as the main entity type and for which the governance processes take place.
Storage type 2 and 3 are both used for check tables. The difference is that type 2 is basically a flex check table and type 3 is a reuse check table. At the time these things were invented, something like a reuse option did not exist but basically it is exactly the same thing. There is a generic access class that is able to evaluate the domain values of a type 3 entity.
So, instead of using a type 2 entity you could also create a check table manually in the DDIC and assign it to a data element. If you use a type 2 entity, then you can stay within the MDG modeling environment (except that you still need the data element).
Storage type 4 is also included in the change request maintenance process, but can only be maintained together with an entity of type 1.
Custom Object Use Case 1 - Additional Entity Types in the Standard Data Model:
Use Cases for Adding Entity Types in Delivered Standard Data Models
Reuse of ERP data definitions is possible:
- Usage type 3 (Not changeable in MDG) can reuse existing data base tables in ERP.
- Usage type 1 (Changeable by Change Request with Generated database tables) can reuse a standard delivered reuse area (Example: reuse area MATERIAL in data model MM).
Additional entity types can be maintained together with standard entity types in one change request (depending on configuration of change request type).

For example, we extend the (type 1) entity MATERIAL with the following entity ZZMARC and attributes:
- LVORM: Flag Material for Deletion at Plant Level
- XCHAR: Batch management indicator (internal)
- DISMM: MRP Type
- DISPO: MRP controller
- DISLS: MRP Lot Size
Custom Object Use Case 2 - New Data Model, Details:
- Use Case: Processing Custom Objects independent from standard objects.
- Example: Reference Data:
- Customers want to maintain certain reference data with a governance process.
- The reference data will be replicated to several other systems (ERP or non ERP).
- They may also be used as check tables in one or more MDG domain.
- Organizational Units (for example, Activity Type) will be maintained in a governance process.
- Custom objects are defined in a new data model.

The data model in MDG can contain:
- Exactly the same attributes as the corresponding customizing table.
- Only ID, description, and perhaps other selected attributes of the corresponding customizing table.
- Additional attributes that are not part of the corresponding customizing table.
The attributes that are defined in the data model are maintained in MDG.
Data is sent out by the DRF. The outbound implementation can be generated using RIF.
The RFC for the inbound implementation in target systems is generated by RIF in the MDG system. It can then be copied into the target system.
There are additional functions of the inbound RFC:
- Updates only those attributes that are maintained in MDG. Other attributes must not be overwritten.
- Create (or select) a transport request for transport to other operational systems.
The view cluster maintenance for the corresponding customizing tables is enhanced with the following functions:
- Creation of new objects or deletion of objects is no longer possible, as creation and deletion is only triggered from MDG.
- The attributes maintained in MDG can no longer be changed any more (unless values from MDG are only regarded as default values).
Data Modeling Relationships
The difference between the relationship types Leading and Qualifying is only relevant for to-entity types with storage and use type 4. The master data of these to-entity types is processed in the context of the entity type that is assigned using the leading relationship.
- Attributes can be added only for type 1 and type 4.
- Type 1 has only Leading and Referencing relationship.
- Type 1 does not have Qualifying relationship.
- Type 4 must have on Leading Relationship.
- Type 4 must have one Qualifying Relationship and can have more.
- Type 4 can have any type of relationship - Leading, Qualifying, Referencing.
- Type 2 Leading relationship allowed.
- Type 2 does not have Qualifying relationship.
- If E2 has a key of E1 as a Primary Key, then use Leading relationship.
- If E2 has a key of E1 as a Primary Key and E2 is type 4, then use Qualifying relationship.
Data Model Analysis

The entity and the attributes correspond to the fields of table MARC and are also displayed in the UI.
The types of entities are indicated in the numbered circles.
The keys of the MARC table are material number and plant number, so you find:
- A leading relationship (type 1) from Material to Plant Data, which means you will be able to maintain plant data within a material master. This relationship also defines one of both keys for Plant Data.
- A qualifying relationship (type 4) from Plant to Plant Data. This relationship defines the other key of Plant Data.
The rest of the relationships here are of type Referencing (type 3). They can be considered equivalence to the customizing tables in the ERP system.
Facts about the Data Model for Custom Objects:
SAP offers a sample data model, SF (SFLIGHT).
This data model corresponds to the data dictionary definitions used in ABAP workbench training.
It can be used for:
Testing generic MDG functionality
Simple template for training
- To activate the SFLIGHT data model using BC Sets, follow the instructions found at http://help.sap.com/mdg (Configuring Master Data Governance for Custom Objects→Configuration Examples→Enabling the Configuration Examples).
SFLIGHT also includes full PFCG roles, an entry page for a work center, authorization, change request types, and other basic configuration.