Sap MDG
Sap MDG
User interfaces
UI appl helps us connect with the backend server.
2 kinds of UI appl available in MDG to perform the operations of Master Data.
1. NWBC (NetWeaver Business Client)
a. UI appl are developed using web Dynpro, ABAP, FPM.
2. SAP Fiori
a. Two types of appl:
i. Same as NWBC - called as NWBC/WebDynpro integrated appl – developed in
web Dynpro, ABAP, FPM and integrated to Fiori launchpad – contains all the key
info or UI components to create any master data.
ii. Native Fiori Appl – called as Lean Appl – completely developed using UI5 & Fiori
- contains only the key information to create any master data.
Environments
SAP ECC (MDG software components are not pre-installed).
S/4 HANA (MDG software components are pre-installed [in-built] but you need to configure it first).
Storage area
Example: hard disk or a container.
Everything in SAP will be stored in SAP database table.
Purpose: to save the data into the relevant underlying database tables.
In MDG, other than standard table (KNA1, LFA1, CSKS, MARA, etc), we’ll have other tables as well.
Example: /1MD/MD____001 🡪 MM check table material. System generated table.
USMD_ACTIVE field in the above table 🡪 0 (Active, active data) or 1 (Inactive, being processed in a CR).
When CR is being processed, the data is stored into these generated table in the form of inactive data.
These MDG generated tables are called Staging Areas/Tables.
● Active data.
● Inactive data.
Core master data table (KNA1, LFA1, etc) = Active area tables.
● Basis data.
● Organization data.
● Master data.
● Transactional data.
Deployment Option
A deployment option tells you how we are installing and implementing MDG in SAP environment of the
client.
Different deployment options in MDG:
● Hub
● Co-deployment
Creation:
Behavior for MM:
Staging table 🡪 /1MD/MD____001
Active area table 🡪 MARA
When Requester creates a CR for material, the material number is prefixed with $ sign and it is stored in
the staging table with USMD_ACTIVE field value as 0 (inactive). Once the CR is approved (Final Check
Approved), the material number is generated. The entry from the staging table is removed and the
actual material number is updated in MARA table (active area table).
When CR is created for Company, unlike for material object no temporary number assignment is done
for FI objects. After the CR is approved, the data remains in staging table with USMD_ACTIVE field value
as 1 (active) and data is not yet updated in the active area table.
Change:
Behavior for MM/BP:
Sources of search by the Framework: Staging area and active area.
Once the change request is initiated, staging area gets updated with two records:
USMD_ACTIVE 0: inactive data which is in governance process.
USMD_ACTIVE 1: active data (before changing CR).
This is because, if the CR is rejected then the framework has to rollback all the changes to the original
version (active version). Once the CR is approved, the data from staging area is removed and active table
data is updated.
Staging tables are not manually created but auto generated based on the design of the above data
segments in the system.
Data model design 🡪 build the data model 🡪 build UI 🡪 users can access the application to govern the
materials.
● Storage / Use (SU) Type 2 Entity – changeable w/o change request; generated check/text tables.
● Storage / Use (SU) Type 3 Entity – not changeable via MDG; no generated tables.
● Storage / Use (SU) Type 4 Entity – changeable via other entity type; generated database tables.
Staging tables are generated tables by the framework for an entity of a data model.
Types of staging tables:
● Check table
● Mapping table
● Text table
● Attachments
● Qualifying relationship
● Referencing relationship
● Foreign relationship
Types of Attributes
● Key attributes
● Non-key attributes
MARC
MARA
MATNR
MATNR
WERKS
LVORM
PSTAT
MTART
LVORM
MBRSH
BWTTY
MAABC
EKGRP
MATKL
BISMT
WRKST
MARD
MATNR
WERKS
LGORT
PSTAT
LFMON
LABST
UMLME
Here, MARA is the parent of MARC and MARC is the parent of MARD.
Hence, MARA leading MARC and MARC leading MARD.
Key attributes of parent entity will become key attributes of child entity.
For Type 3:
Not allowed. That’s because attributes can be assigned only to type 1 and type 4 entities.
Relationship must be between two entities. Source entity is FROM-ENTITY TYPE and target entity is TO-
ENTITY TYPE.
Cardinalities – no. of instances of FROM and TO entities in a relationship.
Possible cardinalities are: - 0: N, 1: N and 1:1.
Always create custom active area for your custom data model.
Step 2: Select your data model and click on Reuse Active Area.
Step 3: New Entries 🡪 enter the name of your active area and give a description 🡪 Save.
Error “Model ZM, reuse active ZM_ACT: ABAP class cannot be used”.
Long Text: The ABAP class for accessing the database tables in the reuse active area must meet the
following prerequisites:
● The class must be activated.
Step 4: Enter the access class name in access class field and save.
Step 5: Enter the active area you’ve created just now to the ActiveArea column in Inactive Data Model.
This is assignment of active area to your custom data model.
Step 6: Active Version 🡪 indicates whether data model is activated or not. All new data models will be in
state “none”. The other values in this are “different” and “same”.
None means data model wasn’t activated even once.
Different means you are making changes on already activated data model. Latest active version and
current version are different.
Same means activated no new changes. Latest active version and current version are same.
● Validity/Entity
● Data Element
● Is Hierarchy Type
● Validity/hierarchy
● Key assignment
● Attachments
● Sets
● Search help
● Temporary Keys
● Active area
● Deletion
Step 3: choose the type 1 from the drop-down menu.
Step 4: Choosing Validity/Entity. Options available in the drop-down menu are Edition and No Edition.
Edition is applicable only for finance data model.
Step 5: Enter Data Element.
When you define a data element, a key attribute for this entity will be generated with the entity name
itself. (Eg., for data model MM, entity type MATERIAL, data element is MATNR. So, MATNR becomes the
key attribute for MATERIAL entity). Next the framework checks whether there is any temporary key
assignment. If temporary key is assigned, then temporary key will be generated and stored in this key
attribute.
When you enter temporary key assignment w/o giving any data element, the following error will be
generated “Number range assignments are not supported”.
Internal key assignment or changeable keys are permitted only for type 1 entity with data element.
Data element for type 1 entity is mandatory if temporary keys assignment is done.
Not enough leading relationships.
Entity types with SU type 1 w/o a data element must be used as to-entity types in at least two
relationships with the relationship type Leading when the cardinality 1:N is used.
Which entities can have data element assignment?
● Type 1, type 2, and type 3.
What are the scenarios in which data element assignment is mandatory for type 1 entity?
● When there is a temporary key assignment.
Step 6: Select the Key Assignment as Key can be Changed; internal key assignment possible.
Consider the below scenario:
Material creation 3 step process flow.
Change Request – 1000
Extra note: LVORM means deletion flag. It is present in both MARA table with data element LVOMA
(description: deletion flag at client level) and in MARC table with data element LVOWK (description:
deletion flag at plant level). As mentioned above, if you choose to use LVORM in both of your custom
data model ZMARA and ZMARC then the data element must be same. If you want to use different data
element, then you have to change the name of the attribute.
For example:
Data model MM
Entity type MATERIAL 🡪 Attribute LVORM_MAT 🡪 data element LVOMA.
Entity type MARCBASIC 🡪 Attribute MARCLVORM 🡪 data element LVOWK.
While creating ZMARD entity type 4, you will get the below additional errors:
Entity type ZMARD, attr. LABST; Attribute missing for currency/unit.
Data type of LABST (stock) is QUAN (quantity). Whenever you create fields using QUAN data type, you
need to link this quantity field to the unit field (as quantity should refer to the unit also). To do so,
define unit field in any of the entities of Data Model’s Type 1 hierarchy. Then go to your quantity
attributes. You can see a column “Curr./UoM Field”. Give the unit field name there and save it.
Entity type ZMARD, attr. RETME; Attribute missing for currency/unit.
Entity type ZMARD, attr. SPEME; Attribute missing for currency/unit.
Entity type ZMARD, attr. UMLME; Attribute missing for currency/unit.
USMD_DATA_MODEL 🡪 execute this report to see the generated staging stables for each data model.
Entity Type column will always have type 1 and type 2 entities.
Included Entity Type column will have the type 4 entity (dependent on type 1 entities).
Subtype column:
Check table – for type 1 entities.
Text table – will be generated if the type 1 entity is language dependent.
Table with Further Attributes – always generated for type 4.
Mapping table – for type 1 entities.
Logical Name column 🡪 template: <type><subtype>_<data_model>_<entity_name>. Example:
TCK_ZM_ZMARA, TXT_ZM_ZMARA, TOA_ZM_ZMARA_ZMARC, TMX_ZM_ZMARA.
Physical Name column 🡪 These staging tables are not transportable (meaning saved in local package; not
present in QA or prod systems). Hence, we need to generate these staging tables in every environment
i.e., we need to activate the data model manually in every environment (cut over activity). These are
transparent tables in the system.
How is check table generated?
Structure of the staging table 🡪 what are the fields available in the staging table.
Double click on any of the staging table. The fields are the attributes maintained for that data model.
The fields are prefixed with a specific format.
/1MD/<data-model-name><attribute>.
Additional fields which are not in the data model but present in the staging tables are:
USMDK<data-model><entity-type> 🡪 data element USMD_TECH_KEY 🡪 Technical key 🡪 key field used to
uniquely identify a record.
Instead of maintaining the key fields in all the dependent entities, maintain 1 key field for all the key
fields. Maintain 1 key field for ZMARA entity. That key field is known as technical key. The value is
generated randomly by the framework.
key1+key2+key3 = technical key
This is done only for the type 1 entity.
What will happen to the staging table data during system refresh?
Staging table name is different across the landscape but the structure is same.
Production refresh 🡪 everything will be loaded from the scratch. Entire system will be cleaned and then
re-storing the backed-up data.
Options:
⮚ This production data can be backed up in a clone production system and once refresh is done,
load this data back to production system.
⮚ Or you can create a dummy client and back up the production data in this client. Once refresh is
done, load this data back to the main client.
Staging structures:
Prefix and package assignment while creating data model is mandatory for generating staging
structures.
Staging structures are generated in 2 ways:
- automatic generation (recommended) 🡪 when prefix and package are assigned at data model
level.
- Manual generation (not recommended) 🡪 when no prefix and package are assigned at data
model level. MDGIMG 🡪 General Settings 🡪 Data modelling 🡪 Generate data modelling specific
structures. Enter the structures manually there.
Select the data model and double click on “Data Model Specific Structures”. These are the structures
generated by the framework for that data model.
Where-used column 🡪 type of the structure.
Types of structure:
1. PDF based Forms
a. PDF_<entity-name>
b. SAP has a feature of allowing users to download the entire data present in the CR.
c. Relevant for type 1 and 4.
2. SMT mapping for replication
a. <entity-name>
b. Used for replication.
c. Relevant for type 1 and 3.
3. Mapping of reuse active area
a. PP_<entity-name> (PP stands for primary persistence)
b. Used for both type 1 and type 4.
c. Used very frequently.
d. Reflects exactly your entity as such.
e. Sometimes we write logic to read entity data or update entity data. In the code logic,
the internal tables used will be declared using this structure.
4. Data replication framework
a. DRF_<entity-name>
b. Contains the keys from the main entity type.
c. Relevant for type 1 and 3.
5. Search application
a. ES_<entity-name>
b. For the search results.
c. Relevant for type 1 and 4.
6. Field control for attributes
a. FC_<entity-name>
b. The data type (component type) for all the components (attributes) is
USMD_UICTRL_PROP except for MATERIAL. For MATERIAL it is MATNR.
c. Relevant for type 1 and 4.
7. Field properties for attributes and key fields
a. FP_<entity-name>
b. The data type (component type) for all the components (attributes) including MATERIAL
is USMD_UICTRL_PROP.
c. Relevant for type 1 and 4.
8. Key fields on an entity type
a. KF_<entity-name>
b. Only fields of that entity type.
c. Relevant for type 1 and 4.
9. Hierarchy attributes
10. Data extraction
a. EX_<entity-name>
b. Used to export the data from MDG system to files.
c. Relevant for type 1 and 4.
Type 1 entity will have all the above structures except 9 hierarchy attributes.
● 0G – MDG Finance
● MM – Material Master
● BP – Business Partner
● U2 – SM (Service Master)
● AR – Article Master
Activities to be done by MDG functional consultant to enable the data models in the system:
1. Activate the Business Function (transaction SFW5, done by BASIS team). This needs to be
activated in each environment.
2. Once business function is activated, data model will get imported into the system with active
version “NONE”.
3. We should manually activate the data model in each environment (cut over activity).
Process Modelling
Modelling the governance process for MDG Business scenarios.
In MDG, we don’t create master data directly and get that available to the end users. The master data
process should undergo certain levels of validations/approvals. In process modelling, we will be defining
the entire governance process flow for the master data operations.
Process modelling is about setting up end-to-end master data maintenance process in SAP MDG from a
central master data governance point of view. A key aspect of central master data governance is setting
up end-to-end process to maintain, create, read, update, delete (CRUD) operations of master data
objects and how workflows are configured to support the end-to-end processes.
Example:
Create material 🡪 create CR 100 🡪 choose CR type 🡪 configured for 3 steps approval process 🡪 defined in
workflow.
Agenda:
What is Change Request?
Types of Change Requests
Pre-requisites to use MDG Governance Process (workflows in MDG) – baseline configuration
Types of workflows in MDG
Static workflows vs rule-based workflows
Static workflow CR type configuration
Rule based workflow (RBWF) CR type configuration
Simple RBWF)
Dynamic agent selection
Dynamic rule context
Email notification 🡪 using system caller BADI / using sub-workflows
Parallel workflows
Parallel CR
Successor/follow-up CR
Workflow troubleshooting
Governance Scope
once you activate your data model, it will be present in this section. The column governed for each
entity type checks whether that entity type is governed or not. If YES is chosen, then you can edit
governed fields in change requests. You can never edit ungoverned fields. This field remains disabled
i.e., the user can see the field but cannot change it.
In Customizing, you cannot access or remove the following fields from the governance scope:
● Key fields
● Required fields
You can also not remove entity types with a storage and use type of 1 from the governance scope. You
can, however, remove their attributes and referencing relationships from the governance scope.
Any changes made to the governance scope will affect how the fields are handled during the change
request process and during data loads. Following is a summary of the impact:
● Single record processing - attributes removed from governance automatically changes to read-
only mode in the UI, and all related checks are disabled.
● Mass Change - ungoverned fields cannot be updated using the mass change process.
● File download - ungoverned fields are included in the download file. However, the comments
section the download file indicates that fields weren’t part of the governance process.
● Data export – ungoverned fields are included in the exported file.
● Data import – if the data is imported directly into the active area, then governed as well as the
ungoverned fields are updated. However, if the governance option is selected, and the imported
data goes through a change request process, the ungoverned fields are ignored.
CR Processing
What is change request?
It is a container of changes made to a master data object that contains additional details on the relevant
process. A CR supports day-to-day CRUD operations by associating a pre-defined process, data
enrichment and data quality rules.
Types of CRs
Linear CR – you cannot have multiple CRs at a time for the same business object.
Parallel CR – having multiple CRs at a time for the same business object.
Requester (person who initiates the CRUD operation) 🡪 once the requester submits, it goes to the next
team called Master Data experts who maintain, enrich & validate the data 🡪 once data is validated,
then next team is Master Data Steward who approves the data 🡪 once approved, data gets replicated
to the target system.
Purpose of CR Type
To define a step-by-step governance process flow to carry out business operations on master data.
How to framework knows which process flow must be executed when we choose a CR type during
master data operation?
We assign Workflow Template for each CR Type in the backend.
Workflow Template
SAP delivered two types of workflow template for MDG.
1. static workflow template
t-code for Workflow Builder SWDD.
Workflow template with pre-defined and consistent governance process flow.
2. rule-based workflow template
Workflow template without pre-defined and consistent governance process flow (purely
dynamic). (Example: WS60800086. This is the only rule-based workflow template)
Every status in a workflow will have a different task ID and method assigned to it.
Rule-Based Workflow
Used for customized governance process flow.
Step 1: Requester ---submit/resubmit
Submit withdraw ---> stop and roll back changes
Step 2: Reviewer---approve?
If yes --->approver
if no goes back to requestor step
Step 3: Approver---approve?
If yes --->Activate
If no goes back to requestor step
Step 4: Activate---successful?
If yes--->Complete
If no ---> stop and roll back change
If it is a dialog task, we need to assign user agents. For that, we will go to the next table under decision
tables which is User Agent Decision Table and if it’s a background task, we will go to Non-User Agent
Decision Table.
ii. User Agent Decision Table
System generates with the name DT_USER_AGT_GRP_<CR Type>.
*Condition Alias *User Agt Grp No. *Step Type *User Agent Type *User Agent Value
iii. Non-User Agent Decision Table.
System generates with the name DT_NON_USER_AGT_GRP_<CR Type>.
*Condition Alias *Agent Group *Process Pattern Service Name
The first step is always 00 (requester). If you don’t assign any action to this step, the framework
understands that 00 is the requester and the action performed in Submit.
For RBWF based CR type, we can give custom CR Step. Example, for Reviewer we can give RV.
These steps are defined under General Settings 🡪 Process Modelling 🡪 Change Requests 🡪 Configure
Properties of Change Request Steps.
You can display the description for the CR step in Decision Table.
General Settings 🡪 Process Modelling 🡪 Workflow 🡪 Define Change Request Step for Rule-based
Workflow.
Click on New Entries. Enter your CR type. Enter CR step. Enter Description and Next Step.
Do the same for all the steps.
What’s Next button in CR 🡪 You can see the previous step, current step and next step.
Warning messages:
No golden path found.
This is the positive flow of the governance process for informative purpose.
No or invalid next steps defined.
Define the next steps for every step.
General Settings 🡪 Process Modelling 🡪 Workflow 🡪 Define Change Request Step for Rule-based
Workflow.
Parallel Workflows
In parallel workflows, a workflow is sent to multiple departments at the same time, each department
takes an action, and when the action is finished, the result is merged to determine the next flow.
Usually, when approver1 rejects the CR, it still goes to other approvers which is not needed. We need to
modify this workflow to handle instant rejection.
Get all the workitems which are pending in the current work item ID (at approval level) and close them
and then the merge BAdI gets triggered. Every work item will have a parent work item known as top
work item. To get the top work item of a CR, execute class
CL_USMD_WF_CREQUEST_MAPPER=>GET_TOP_WI_BY_CREQUEST_SINGLE.
To get sub work items for the top WI, execute the function module SAP_WAPI_GET_DEPENDENT_WIS.
Get the workitems which are in Dialog step (W) and status in ‘ready’.
- as of MDG 7.0 and SAP S/4HANA 1511, MDG also supports the creation of more than one CR in parallel
for a single BO.
Advantage/use:
Suppose there are multiple teams for material processing like MDM team (responsible for basic data,
dimensions), Planning team (plant mgmt.), Quality team (quality view, classifications), Sales team (sales
views).
Suppose there is a material 123 🡪 initiating Change Process MAT02 🡪 CR# created 300.
If MDM team is editing the basic data, then other teams can’t edit the basic data but they can edit other
entity data like plant, sales etc. Hence, locking is enabled at entity level whereas, in case of linear CR
process, locking is enabled at BO level (all entities are locked in one CR).
Limitations:
Not recommended for create process. Only applicable for change process.
Not applicable for finance object.
Configuration:
Can be configured using either static WF template or RBWF template.
E-mail Notification
No standard configuration for e-mail notifications. Have to go and see manually.
NWBC 🡪 Change Requests 🡪 Change Requests and Documents 🡪 Workflow Inbox.
This the place where the user can see all the CRs waiting for your action or already taken action.
Another place: NWBC 🡪 Change Requests 🡪 Change Requests and Documents 🡪 My Change Requests.
Here, if any CR is wrongly assigned under your name, then you can “forward” it to other user.
You can “create substitution rule” for assigning the tasks that comes to your bucket to other user in case
you go on planned leave.
What is an API?
Application Programming Interface or API is an interface provided by an application for interacting with
other applications.
One of the frequent uses of API calls is create Change Request (supplier registration is initiated
elsewhere and in comes to MDG system through some interface like BAPI, SOA, IDoc etc. and a CR is
created in MDG).
In MDG, SAP has delivered APIs in the form of classes and interfaces.
IF_USMD_MODEL_EXT
Governance API
IF_USMD_CREQUEST_API~CHECK_CREQUEST Checks CR
IF_USMD_CREQUEST_API~CREATE_CREQUEST Generates CR
IF_USMD_CREQUEST_API~READ_CREQUEST Reads CR
IF_USMD_CREQUEST_API~SAVE_CREQUEST Saves CR
We can process only single object at a time. We can process multiple objects at a time.
When we are using instance of convenience API, When we are using instance of governance API,
should not use governance API. should not use convenience API.
UI Modelling
Evaluation of User Interfaces in SAP – SAP GUI
● In 1970s, SAP came into market as an ERP product with its own user interface SAP GUI.
● In 1970s, there was no Browser Revolution. Browser Revolution started in 1990s. SAP had the
following big challenge to move from GUI to Browser based technologies.
● Interaction between SAP GUI and Application server is through DIAG (Dynamic Information and
Action Gateway) protocol. But browser don’t understand DIAG protocol. It can understand only
HTTP protocol.
● Hence SAP started with ITS (Internet Transaction Services) Applications, which enable the users
to access SAP Transaction through Web.
● ITS Applications converts HTTP protocol to DIAG protocol and vice versa.
● The drawback with ITS is that externally we need to have an additional server (web server).
● To overcome this drawback, SAP replaced ITS with ICM (Internet Communication Manager)
which contains ICF (internet communication framework) to convert HTTP protocol to DIAG
protocol and vice versa. BSP/webdynpro/Fiori applications use ICF.
● Technically, SICF transaction leverages to activate/deactivate all the services related to
BSP/webdynpro applications.
Webdynpro ABAP is SAP Standard UI Technology used to develop Web Applications in ABAP
environment.
Advantages:
● It supports stateful applications i.e., even if the page changes, the data in the previous page still
remains.
Architecture used by webdynpro applications is MVC (Model View Controller) Architecture. Fiori also
uses this architecture.
MVC Architecture
MVC Design pattern contains a clear distinction between Processing Control, Data Model and displaying
the data in UI.
View – User Interaction Layer – Generates the application data without caring how it will be
generated.
Controller – Binding Layer – Binds the user and business interaction layers together. All intermediate
processing in performed here.
Model – Business Interaction Layer – Generates the application data without caring how it will be
displayed.
Types of controllers:
Designing Layout
Layout can be designed at view level.
Double click on the View. Go to Layout tab. You will find various elements there like text, captions, label
etc.
Mandatory properties for any UI element (button, text, icon, link, etc) are highlighted in red color.
For BUTTON element type, events must be created. Events/actions are nothing but the method.
To generate URL, right click on the component name -> create -> Web Dynpro Application. Enter
application name and description and continue. Save. Application is created. Double click on the
component name, go to Properties tab. You will find the URL under Administrative Data.
Once URL is generated, service gets created with the application name and gets added in SICF.
Introduction to FPM
⮚ FPM is based on the web Dynpro technology paradigm, and it helps developers build UIs on the
ABAP application layer with a standardized layout/look and feel.
⮚ FPM is a UI framework, that is, a set of tools, templates and classes, which ensures a more
consistent look and feel to the user interfaces of SAP applications. Applications built using FPM
conform to the latest SAP UI and accessibility guidelines.
⮚ It also provides more flexibility in various configuration options.
⮚ FPM framework provides the ability to create or adapt the UI configurations in less time.
⮚ The key components include SAP pre-defined floorplans, UI building blocks, and the Floorplan
Manager Configuration Editor (flexible user interface designer FLUID).
⮚ A floorplan can consist of numerous UIBBs. The UIBBs provide a standardized look and feel for
form layout, list layout, search etc.
⮚ A section consists of a number of UIBBs.
⮚ Overview Page Floor Plan (OVP) – one after the other. Most widely used.
⮚ Object Instance Floor Plan (OIF)/ Quick Activity Floor Plan (QAF) – mostly consists of tabs.
⮚ OVP 🡪 FPM_OVP_COMPONENT
⮚ OIF 🡪 FPM_OIF_COMPONENT
⮚ GAF 🡪 FPM_GAF_COMPONENT
Classification of UIBBs:
Alternate way to launch FPM Workbench is execute the t-code SICF 🡪 Enter the service FPM_WB 🡪 Apply
🡪 Test the service.
Click on Wizard for Creating Empty FPM Applications. Enter name and description of your webdynpro
application. Then choose the floor plan and enter configuration name for Application and Floorplan
Configuration. Save it.
Feeder Class 🡪 provides a link between the application and the generic UIBB. It contains the business
logic behind an application. Main purpose is to feed the presentation logic to the UIBB.
Go to FPM Workbench and click on Configure Application. Enter your application name and
configuration ID and Enter.
An application has application configuration associated with it. This application configuration has floor
plan configuration associated with it. This floor plan configuration has FPM pages and each page has the
relevant UIBB configuration.
Standard UI Application
The links present in NWBC are called as roles. Roles are assigned to user ID.
Business Rules
Types of business rules in MDG:
1. Validation Rules – validating the data – code based (BADI implementation, BRF+).
a. Single/Same Entity Validation Rules (BAdI used is USMD_RULE_SERVICE)
b. Cross Entity Validation Rules (BAdI used is USMD_RULE_SERVICE_CROSS_ET)
2. Derivation Rules – deriving data based on data entered by user – code based (BADI
implementation, BRF+).
a. Single/Same Entity Derivation Rules (BAdI used is USMD_RULE_SERVICE)
b. Cross Entity Derivation Rules (BAdI used is USMD_RULE_SERVICE_CROSS_ET)
3. UI handling Rules – handling/controlling the UI handling properties – code based (BADI
implementation, configuration).
a. Single/Same Entity UI handling Rules (BAdI used is
USMD_ACC_FLD_PROP_CUST_DEP_SET)
b. Cross Entity UI handling Rules (BAdI used is USMD_ACC_FLD_PROP_CUST_DEP_SET)
c. Generic Entity UI handling Rules (BAdI used is USMD_ACC_FLD_PROP_CUST_DEP_SET)
4. Key Mapping Rules – mapping key fields of type 1 entity. Applicable only for hub
implementation – configuration based (BAdI implementation, mostly configuration).
5. Value Mapping Rules – only for non-key fields (plants, company codes, etc.). Applicable only for
hub implementation - configuration based (BAdI implementation, mostly configuration).
6. Replication Rules - Applicable only for hub implementation - configuration based (BAdI
implementation, mostly configuration).
For validation and derivation rules, MDGIMG 🡪 General Settings 🡪 Data Quality and Search 🡪 BAdI :
Define Validations/Derivations.
For UI handling rules, MDGIMG 🡪 General Settings 🡪 Process Modelling 🡪 Change Requests 🡪 Business
Add-Ins 🡪BAdI : Access to Customer-dependent field property settings.
Requirement: for a specific CR type, at requestor level (00 step number), client wants to make
notes/attachments mandatory at CR header level.
BAdI used for this purpose is USMD_RULE_SERVICE (this is the definition).
MDGIMG 🡪 General Settings 🡪 Data Quality and Search 🡪 BAdI : Define Validations/Derivations 🡪 create
new. Enter the enhancement implementation name starting with Z.
Next, enter BAdI implementation name and implementation class. Continue.
Now, BAdI implementation screen opens. Double click on Filter Values 🡪 Combination. Since the
validation is required at CR header level, we can choose filter as entity type = 1. The other one is Model.
Save it. Next double click on the Implementation Class and provide empty implementation as those are
the interfaces (double click on each method and save it).
If you want to implement single entity validation or cross entity validation, then CHECK_ENTITY method
will be implemented. Double click on it.
Parameters in CHECK_ENTITY:
IO_MODEL 🡪 TYPE REF TO IF_USMD_MODEL_EXT 🡪 Model extension API used to read the staging data.
ID_EDITION 🡪 TYPE USMD_EDITION 🡪 specific to finance only.
ID_CREQUEST 🡪 TYPE USMD_CREQUEST OPTIONAL 🡪 Current change request.
ID_ENTITYTYPE 🡪 TYPE USMD_ENTITY 🡪 current entity type.
IF_ONLINE_CHECK
IT_DATA 🡪 TYPE ANY TABLE 🡪 Current entity’s data will be stored.
ET_MESSAGE 🡪 TYPE USMD_T_MESSAGE.
Double click on this CHECK_ENTITY method and write the logic for the above requirement.
This class does not have change request type. There are different ways to get the CR type. One of the
ways is by using context API (class CL_USMD_APP_CONTEXT).
Next, you need to read the CR header data (notes and attachments mainly). For this you can use CR API
which is CL_USMD_CREQUEST_API method READ_CREQUEST. This method is instance method so you
need to call the GET_INSTANCE method first.
ENDIF.
ENDIF.
ENDMETHOD.
To debug this, put external breakpoint on your ID and execute the CR.
E.g., we have two structures staging structure and active area. In staging structure there is a field
ZMARA-MATERIAL. When the CR is finalized, we want this field to be updated in active area MARA-
MATNR.
In SAP Master Data Governance (MDG), entity types represent the core building blocks of the data
model. They define the master data objects that can be managed within the MDG system. There are
four main types of entity types in SAP MDG, each with distinct characteristics:
1. Type-1 Entity Type: Represents the root objects that are subject to governance in MDG. Can be
created, changed, and deleted through change requests. Examples of type-1 entity types include
customers, materials, and vendors. Storage and Use Type: 1 Changeable: Via change request Generated
Tables: Database tables
2. Type-2 Entity Type: Used to qualify type-1 and type-4 entity types by adding additional key attributes.
Cannot be maintained directly in MDG, but their attributes can be used to filter and search for type-1
and type-4 entities. Examples of type-2 entity types include plant and sales organization for a material.
Storage and Use Type: 2 Changeable: Not directly in MDG Generated Tables: Check/Text tables
3. Type-3 Entity Type: Similar to type-2 entity types, used to qualify type-1 and type-4 entity types.
However, type-3 entity types can be maintained indirectly in MDG through their relationships with type-
1 entities. An example of a type-3 entity type is a country code for a customer Storage and Use Type: 3
Changeable: Indirectly through type-1 entities Generated Tables: No generated tables
4. Type-4 Entity Type: Represents dependent objects that are associated with type-1 entities. Cannot be
processed directly in MDG, but their data can be maintained indirectly through the related type-1 entity.
Examples of type-4 entity types include bill-of-materials (BOM) components for a material and contact
persons for a customer. Storage and Use Type: 4 Changeable: Via other entity type Generated Tables:
Database tables.