You are on page 1of 300

SAP

How-To Guide








Extending Content in Master Data
Governance, Material Data















Version 1.0
May 2010



Copyright 2013 SAP AG. All rights reserved.
No part of this publication may be reproduced or
transmitted in any form or for any purpose without the
express permission of SAP AG. The information contained
herein may be changed without prior notice.
Some software products marketed by SAP AG and its
distributors contain proprietary software components of
other software vendors.
Microsoft, Windows, Outlook, and PowerPoint are
registered trademarks of Microsoft Corporation.
IBM, DB2, DB2 Universal Database, OS/2, Parallel
Sysplex, MVS/ESA, AIX, S/390, AS/400, OS/390,
OS/400, iSeries, pSeries, xSeries, zSeries, z/OS, AFP,
Intelligent Miner, WebSphere, Netfinity, Tivoli, Informix,
i5/OS, POWER, POWER5, OpenPower and PowerPC are
trademarks or registered trademarks of IBM Corporation.
Adobe, the Adobe logo, Acrobat, PostScript, and Reader
are either trademarks or registered trademarks of Adobe
Systems Incorporated in the United States and/or other
countries.
Oracle is a registered trademark of Oracle Corporation.
UNIX, X/Open, OSF/1, and Motif are registered
trademarks of the Open Group.
Citrix, ICA, Program Neighborhood, MetaFrame,
WinFrame, VideoFrame, and MultiWin are trademarks or
registered trademarks of Citrix Systems, Inc.
HTML, XML, XHTML and W3C are trademarks or
registered trademarks of W3C, World Wide Web
Consortium, Massachusetts Institute of Technology.
Java is a registered trademark of Sun Microsystems, Inc.
JavaScript is a registered trademark of Sun Microsystems,
Inc., used under license for technology invented and
implemented by Netscape.
MaxDB is a trademark of MySQL AB, Sweden.
SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP
NetWeaver, and other SAP products and services
mentioned herein as well as their respective logos are
trademarks or registered trademarks of SAP AG in
Germany and in several other countries all over the world.
All other product and service names mentioned are the
trademarks of their respective companies. Data contained
in this document serves informational purposes only.
National product specifications may vary.
These materials are subject to change without notice.
These materials are provided by SAP AG and its affiliated
companies (SAP Group) for informational purposes only,
without representation or warranty of any kind, and SAP
Group shall not be liable for errors or omissions with
respect to the materials. The only warranties for SAP
Group products and services are those that are set forth in
the express warranty statements accompanying such
products and services, if any. Nothing herein should be
construed as constituting an additional warranty.
These materials are provided as is without a warranty of
any kind, either express or implied, including but not
limited to, the implied warranties of merchantability,
fitness for a particular purpose, or non-infringement.
SAP shall not be liable for damages of any kind including
without limitation direct, special, indirect, or consequential
damages that may result from the use of these materials.
SAP does not warrant the accuracy or completeness of the
information, text, graphics, links or other items contained
within these materials. SAP has no control over the
information that you may access through the use of hot
links contained in these materials and does not endorse
your use of third party web pages nor provide any warranty
whatsoever relating to third party web pages.
SAP NetWeaver How-to Guides are intended to simplify
the product implementation. While specific product
features and procedures typically are explained in a
practical business context, it is not implied that those
features and procedures are the only approach in solving a
specific business problem using SAP NetWeaver. Should
you wish to receive additional information, clarification or
support, refer to SAP Consulting.
Any software coding and/or code lines / strings (Code)
included in this documentation are only examples and are
not intended to be used in a productive system
environment. The Code is only intended better explain and
visualize the syntax and phrasing rules of certain coding.
SAP does not warrant the correctness and completeness of
the Code given herein, and SAP shall not be liable for
errors or damages caused by the usage of the Code, except
if such damages were caused by SAP intentionally or
grossly negligent.
Disclaimer
Some components of this product are based on Java. Any
code change in these components may cause unpredictable
and severe malfunctions and is therefore expressively
prohibited, as is any decompilation of these components.
Any Java Source Code delivered with this product is only
to be used by SAPs Support Services and may not be
modified or altered in any way.


Document History
Document Version Description
1.00 First official release of this guide




Typographic Conventions
Type Style Description
Example Text Words or characters quoted
from the screen. These
include field names, screen
titles, pushbuttons labels,
menu names, menu paths,
and menu options.
Cross-references to other
documentation
Example text Emphasized words or
phrases in body text, graphic
titles, and table titles
Example text File and directory names and
their paths, messages,
names of variables and
parameters, source text, and
names of installation,
upgrade and database tools.
Example text User entry texts. These are
words or characters that you
enter in the system exactly as
they appear in the
documentation.
<Example
text>
Variable user entry. Angle
brackets indicate that you
replace these words and
characters with appropriate
entries to make entries in the
system.
EXAMPLE TEXT Keys on the keyboard, for
example, F2 or ENTER.
Icons
Icon Description

Caution

Note or Important

Example

Recommendation or Tip







Table of Contents

1. Business Scenario............................................................................................................... 5
2. Background Information ..................................................................................................... 6
2.1 Prerequisites for Using Master Data Governance ........................................................ 6
2.2 Data Model ................................................................................................................... 6
2.3 Reuse Area versus the Flexible Option / Access class ................................................ 6
2.4 Entity Relationship Model ............................................................................................. 8
2.5 UI Creation .................................................................................................................. 15
2.5.1 UI Configuration ............................................................................................. 16
2.5.2 UI BAdI ........................................................................................................... 18
2.6 UI Entry Point .............................................................................................................. 19
2.6.1 Portal .............................................................................................................. 19
2.6.2 SAP GUI......................................................................................................... 20
2.6.3 NetWeaver Business Client ........................................................................... 22
3. Extend by existing field .................................................................................................... 25
3.1 Data Model Requirements (Active Area) .................................................................... 26
3.1.1 Table Extensions ........................................................................................... 26
3.1.2 Structure Extensions ...................................................................................... 26
3.2 Data Model Requirements (Staging Area) ................................................................. 27
3.2.1 Data Model Extensions .................................................................................. 27
3.2.2 Generated Tables .......................................................................................... 31
3.2.3 Structure Extensions ...................................................................................... 33
3.3 SMT Mapping ............................................................................................................. 40
3.3.1 SMT Mapping ................................................................................................. 40
3.3.2 Mapping Customizing .................................................................................... 45
3.4 UI Model ..................................................................................................................... 47
3.4.1 Field Control ................................................................................................... 47
3.4.2 Field Control and Data Model ........................................................................ 51
3.4.3 UI Configuration ............................................................................................. 51
3.4.4 UI BAdI Implementation ................................................................................. 60
3.5 Print Forms ................................................................................................................. 68
3.6 Search ........................................................................................................................ 68
3.7 Data Quality ................................................................................................................ 69
3.7.1 Validation and Derivation ............................................................................... 69
3.7.2 BAdI Implementation ...................................................................................... 84
3.8 Process Model ............................................................................................................ 85
3.8.1 Workflow ........................................................................................................ 85
3.8.2 Workflow - BAdI Implementation ................................................................. 100
3.8.3 Adjustments to Change Request Customizing ............................................ 101
3.8.4 Process Model - BAdI Implementation ........................................................ 104
3.9 Initial Load ................................................................................................................ 105



3.10 Data Replication ....................................................................................................... 105
3.10.1 Replication of Material ................................................................................. 105
3.10.2 Replication of Supplier or Business Partner ................................................ 105
3.10.3 BAdI Implementation .................................................................................... 105
3.11 Key/ Value Mapping ................................................................................................. 106
3.12 Test Run ................................................................................................................... 107
4. Extend by existing table ................................................................................................. 112
4.1 Data Model Requirements (Primary Persistence) .................................................... 114
4.1.1 Table Extensions ......................................................................................... 114
4.1.2 Structure Extensions .................................................................................... 114
4.2 Data Model Requirements (Staging) ........................................................................ 115
4.2.1 Data Model Extensions ................................................................................ 115
4.2.2 Generated Tables ........................................................................................ 123
4.2.3 Structure Extensions .................................................................................... 125
4.3 SMT Mapping ........................................................................................................... 130
4.3.1 SMT Mapping ............................................................................................... 130
4.3.2 Mapping Customizing .................................................................................. 137
4.4 UI Model ................................................................................................................... 141
4.4.1 Field Control ................................................................................................. 141
4.4.2 Field Control and Data Model ...................................................................... 142
4.4.3 UI configuration ............................................................................................ 145
4.4.4 UI BAdI Implementation ............................................................................... 153
4.5 Print Forms ............................................................................................................... 155
4.6 Search ...................................................................................................................... 155
4.7 Data Quality .............................................................................................................. 156
4.7.1 Validation and Derivation ............................................................................. 156
4.7.2 BAdI Implementation .................................................................................... 156
4.8 Process Model .......................................................................................................... 157
4.8.1 Workflow ...................................................................................................... 157
4.8.2 Workflow - BAdI Implementation ................................................................. 157
4.8.3 Change Request/ Customizing Adjustments ............................................... 157
4.8.4 Process Model - BAdI Implementation ........................................................ 157
4.9 Initial Load ................................................................................................................ 158
4.10 Data Replication ....................................................................................................... 158
4.10.1 Replication of Material Master Data ............................................................. 158
4.10.2 Replication of Supplier or Business Partner Master Data ........................... 158
4.10.3 BAdI Implementation .................................................................................... 158
4.11 Key/ Value Mapping ................................................................................................. 159
4.12 Test Run ................................................................................................................... 160
5. Extend by customer field of existing tables ................................................................. 170
5.1 Data Model Requirements (Primary Persistence) .................................................... 171
5.1.1 Table Extensions ......................................................................................... 171
5.1.2 Structure Extensions .................................................................................... 172
5.2 Data Model Requirements (Staging) ........................................................................ 175
5.2.1 Data Model Extensions ................................................................................ 175



5.2.2 Generated Tables ........................................................................................ 178
5.2.3 Structure Extensions .................................................................................... 180
5.3 SMT Mapping ........................................................................................................... 188
5.3.1 SMT Mapping ............................................................................................... 188
5.3.2 Mapping Customizing .................................................................................. 192
5.4 UI Model ................................................................................................................... 193
5.4.1 Field Control ................................................................................................. 193
5.4.2 Field control and Data Model ....................................................................... 196
5.4.3 UI configuration ............................................................................................ 196
5.4.4 UI BAdI Implementation ............................................................................... 198
5.5 Print Forms ............................................................................................................... 199
5.6 Search ...................................................................................................................... 199
5.7 Data Quality .............................................................................................................. 200
5.7.1 Validation and Derivation ............................................................................. 200
5.7.2 BAdI Implementation .................................................................................... 200
5.8 Process Model .......................................................................................................... 201
5.8.1 Workflow ...................................................................................................... 201
5.8.2 Workflow - BAdI Implementation ................................................................. 201
5.8.3 Change Request/ Customizing Adjustments ............................................... 201
5.8.4 Process Model - BAdI Implementation ........................................................ 201
5.9 Initial Load ................................................................................................................ 202
5.10 Data Replication ....................................................................................................... 202
5.10.1 Replication of Material ................................................................................. 202
5.10.2 Replication of Supplier or Business Partner- ............................................... 202
5.10.3 BAdI Implementation .................................................................................... 202
5.11 Key Mapping and Value Mapping............................................................................. 203
6. Extend by customer table or entity type ....................................................................... 204
6.1 Data Model Requirements (Primary Persistence) .................................................... 205
6.1.1 Table Extensions ......................................................................................... 205
6.1.2 Structure Extensions .................................................................................... 205
6.2 Data Model Requirements (Staging) ........................................................................ 205
6.2.1 Data Model Extensions ................................................................................ 205
7. Create own data model with customer object Airline Partner .................................... 214
7.1 Data Model ............................................................................................................... 215
7.1.1 MDG Data Model - Details ........................................................................... 215
7.1.2 Example 1: Airline and Flights ..................................................................... 215
7.1.3 Example 2: Flight customers ....................................................................... 222
7.2 Data Modeling ........................................................................................................... 224
7.2.1 Create Data Model ....................................................................................... 224
7.2.2 Create Entity Types ..................................................................................... 224
7.2.3 Create relationships ..................................................................................... 227
7.2.4 Activate data model ..................................................................................... 229
7.2.5 Generate data model specific structures ..................................................... 230
7.3 Primary Persistence (PP) Access Class .................................................................. 231
7.3.1 Implementing the PP Access Class ............................................................. 231



7.3.2 Create and assign a reuse area .................................................................. 232
7.4 UI configuration......................................................................................................... 234
7.4.1 Change request ........................................................................................... 234
7.4.2 Portal content ............................................................................................... 242
7.4.3 UI Business Add In ...................................................................................... 242
7.5 Process Modeling ..................................................................................................... 246
7.5.1 Process Modeling - Change Request .......................................................... 246
7.5.2 Process Modeling- Workflow ....................................................................... 247
7.6 Data Quality and Search: Validation and derivations based on BRFplus ................ 249
7.6.1 Check for Flights With a Customer Discount of 4% or Less ........................ 249
8. Appendix .......................................................................................................................... 261
8.1 PP Access for custom objects .................................................................................. 261
8.2 UI BAdI implementation ............................................................................................ 261
8.3 IDOC Enhancement ................................................................................................. 262
8.4 Useful links ............................................................................................................... 296






1. Business Scenario

The main focus of this process is the governance of material master data in a Master Data
Governance (MDG) hub and the replication of the golden record to connected operational systems,
Business Intelligence (BI) systems, or both. You can use this business process to find, create, change,
and delete material master data.
The subprocesses are workflow-driven. The workflow enables collaboration between users who have
different roles in maintaining master data. It can include several approval and revision phases.
All changes to master data are documented in the system based on change requests. The system
documents changes to master data in the system. This makes governance more effective;
transparency is improved, quality master data is ready in time, and the costly creation of duplicate
records is avoided.
Preconfigured Data Models, UI configurations and workflows enable you to easily set up a governance
process involving several users.
This guide describes how to extend the preconfigured content of the Master Data Governance for
Material, using the model MM. The MDGM model MM is preconfigured with one reuse area called
MATERIAL. This reuse area points to the access class CL_MDG_BS_MAT_ACCESS, which can
handle most fields of the predelivered SAP ERP Material Master.

Note
You can use the described procedure for extending the MM data model as a general
guideline for extending the Business Partner Model BP.





2. Background Information

For all the described use cases, consider the following technical background of the solution proposed.
Prerequisites for Using Master Data Governance

2.1 Prerequisites for Using Master Data Governance

ERP 6.0 EhP5 (SAP_APPL 605)


2.2 Data Model
The preconfigured data model for the business object type Material is MM. You can define new
attributes for existing SAP entity types in the Model definition in Customizing for Master Data
Governance under General Settings > Data Modeling > Edit Data Model (view cluster VC_USMD001).
1. Navigate to the MM data model.
2. Drill down to the entity type for which you would like to add attributes.
3. Drill down to the attributes.
You can add attributes in customer namespaces YY* and ZZ*, in the same way as you do for
ABAP Dictionary enhancements.
4. Assign appropriate data elements as the data element controls default field labels in the UI as
well as value helps and documentation.
Do not duplicate the same data element.
5. Activate the data model.



2.3 Reuse Area versus the Flexible Option / Access
class
You can assign a reuse active area to a data model or to individual entity types within a data model. In
both cases, the master data is actively saved in the database tables specified in the reuse active area.






You can define the reuse area on data model level or on entity type level.

To define the reuse area on data model level, complete the following steps:
1. Open Customizing for Master Data Governance under General Settings -> Data Modeling ->
Edit Data Model.
2. Open the Reuse Active Area sub view.


To define a reuse area for an entity type, complete the following steps:
1. Open Customizing for Master Data Governance under General Settings -> Data Modeling ->
Edit Data Model.
2. Open the Entity Type sub view.
3. Choose a Reuse Active Area in the Reuse Area field. Use entry help if necessary.






Important
To ensure records are kept in generated tables, select the reuse area MDG the records
are kept in the generated tables.

2.4 Entity Relationship Model

The Data Model is based on an entity relationship model. The screenshot below shows the available
storage /use types:







The entity Types are linked using relationships.

Field Name
If the relationship type is Leading or Qualifying, the syntax used to derive a field name is as follows:
/1MD/<Data Model><Entity Type>.


Entity type:


Relationships:



Generated Table:






Field Name
If the relationship type is Referencing, the syntax used to derive a field name is as follows:
/1MD/<Data Model><Relationship Name>.

Entity type:











Relationships



Generated Table:














Relationships:




Generated Table:






After you define an entity type and its corresponding data element, and define a relationship involving
that entity type, you can generate a data model. The data element name for each field is derived from
the to-entity type.








Relationship Type
Relationship Types are defined in the table below.

Relationship Type Definition
Referencing Specifies the From-Entity type as an attribute of the To-Entity type.
Leading Specifies the From-Entity type on a higher level than the To-Entity type.
The From-Entity type is automatically taken as the key in the generated
tables. A Leading relationship type is identical to a Qualifying relationship
type, except when the To-Entity type has a Storage and Use Type of 4.
Master data for To-Entity types in Leading relationships is processed in the
context of the entity type that is assigned using the leading relationship.
Qualifying Specifies the From-Entity type on a higher level than the To-Entity type.
The From-Entity type is automatically taken as the key in the generated
tables.
Cardinality
The following options are possible for the relationship between two entity types:
1:N
This cardinality represents a mandatory relationship in which one or more To-Entity Types can
be assigned to a From-Entity Type.
This cardinality is valid for relationships with the relationship types Leading, Qualifying, and
Referencing. In relationships with the relationship type Referencing, the From-Entity Type is a
required attribute of the To-Entity Type.
0:N
This cardinality represents an optional relationship in which any number To-Entity Types can be
assigned to a From-Entity Type.
This cardinality is valid only for relationships with the relationship type Referencing. The From-
Entity Type is an optional attribute of the To-Entity Type.







Important
The general design assumption is that there is a 1:N relationship between a database
table and its entity types. This means one entity type does not bundle several database
tables.
Example:
- The MARA database table can be replicated on several entity types
- Database tables MARC and MPOP must not be bundled in one entity type

2.5 UI Creation
The UI is be configured with the Floorplan Manager. The Floorplan Manager (FPM) is a Web Dynpro
ABAP application that provides a framework for developing new Web Dynpro ABAP application
interfaces consistent with SAP UI guidelines.

An FPM application is composed of a number of different Web Dynpro components (most of which are
instantiated dynamically at runtime). However, the following two components are always present:
A floorplan-specific component (FPM_GAF_COMPONENT or FPM_OIF_COMPONENT)
A component for the Header Area (FPM_IDR_COMPONENT)
In simple terms, the configuration of an FPM application is the configuration of these two components.






The following graphics show the schematic structure of a Floorplan Manager application:


2.5.1 UI Configuration
You can either extend the SAP configuration with &SAP_CONFIG or copy the SAP configuration and
choose Edit Configuration.
Note: It is client specific to extend the existing UI configuration using &SAP_CONFIG. The advantage
of this method is that no new UI BAdI implementation is necessary.
In this Customizing activity, you manage UI configurations, which the system uses for the following
purposes:
Definition of the Web user interface for individual processing of an entity type (Web Dynpro application
USMD_ENTITY TYPE_VALUE2)
Use in the Web user interface for creating and processing a change request.
You can create and edit different UI configurations for each data model.



Note
Currently, it is not possible in Customizing to edit the MDG_MM_APP_BS_MAT_GEN UI
configuration.

Follow these steps:
Run transaction SE80 and select package MDG_BS_MAT_MODEL_GEN

Double-click Application Configuration MDG_MM_APP_BS_MAT_GEN.


Click

Add the following parameter to the end of the URL: SAP-CONFIG-MODE=X:



&sap-wd-configId=MDG_MM_APP_BS_MAT_GEN&SAP-CONFIG-MODE=X



Click the Adapt Configuration link.



2.5.2 UI BAdI

2.5.2.1 Provide completely new BAdI implementation
2.5.2.2 Copy existing MDGM UI BAdI implementation class
2.5.2.3 New UI BAdI implementation, inheriting from existing MDGM UI BAdI implementation class
You can also use the UI BAdI and inherit from the class CL_MDG_BS_MAT_UI_BADI.
Note: If you only want to extend the UI BAdI implementation of a method (instead of replacing
the UI BAdI), you should always call the corresponding super method IF_EX_USMD_UI_EVENT2:
MODIFY_DEFINITION.
When using this UI BAdI provided by SAP you own less coding and SAP corrections are applied
automatically. Advisable if you just want to extend the behavior of the UI BAdI implementation, not
completely replace it.




2.6 UI Entry Point
The following UI options exist for accessing preconfigured content in MDG:
Portal
SAP GUI
NetWeaver business client

2.6.1 Portal
To extend preconfigured content in Master Data Governance for material, you must assign the
following portal roles to your user:
Senior Master Data Manager
Material Master Data Manager



The assigned portal roles contain the following preconfigured iViews.



The control parameters required to extend preconfigured content in Master Data Governance for
Material are as follows:

Application Parameters
The PROCESS parameter equals the Business Activity maintained in the Customizing.






The System parameter represents the system used in your environment.


The Change Material screen is shown below.




2.6.2 SAP GUI




You assign the following roles to the business client:
SAP_MDGM
SAP_MDGS











2.6.3 NetWeaver Business Client

You assign the following roles to the NetWeaver business client:
SAP_MDGM
SAP_MDGS


















3. Extend by existing field



In this example, the MM data model is extended by the following attributes belonging to the existing
entity type MATERIAL:
ZZFORMT
ZZMSTAE
These attributes correspond to the fields FORMT and MSTAE of data base table MARA and also display
in the UI.
The model is extended by the new attributes, all structures are generated, and the (old) application
configuration is available (together with its dependent objects).




3.1 Data Model Requirements (Active Area)
3.1.1 Table Extensions
The two attributes already correspond to the fields FORMT and MSTAE of data base table MARA.





3.1.2 Structure Extensions
The Service Mapping Tool is a program that it is used in ABAP to fill a target structure with a set of
source structures. The target structures that fill the MARA database table are as follows:
MDG_BS_MAT_S_MARA
MDG_BS_MAT_S_MARA_UI
MDG_BS_MAT_S_MARA_X

Note
Several source structures that used in the Service Mapping Tool (SMT) are already
delivered. These have to be extended depending on the use case.






3.2 Data Model Requirements (Staging Area)
3.2.1 Data Model Extensions
In the Edit Data Model Customizing activity, you define and activate a data model to map master data
in the system, along with its properties and relationships. The system uses this data model to generate
database tables in which the master data can be stored.








3.2.1.1 Entity Types


Note
The maintenance of the Data Model is cross client.

1. Select the MM data model and navigate to the entity type for which you would like to add
attributes, in this case Material.





2. Double click Attributes in the dialog structure



3. Add new attributes corresponding to the MARA fields.




Ensure that the customer extension fields consider the customer namespace for DDIC fields. The
customer namespace for fields is YY and ZZ.

3.2.1.2 Relationships
The relationships do not have to be changed for this scenario.
3.2.2 Generated Tables
Activate the extended data model. After the activation the new fields are added to the generated
tables.

Note
If you use your own ABAP Dictionary objects (data elements, domains, check tables) in
your data model and you changed their properties after the data model was activated
refer to Note 1552474.





You can optionally check the generated tables using the USMD_DATA_MODEL report.





The tables of the MM data model display as follows before activation.






The tables of the MM data model display as follows after activation.


3.2.3 Structure Extensions
In the Generate Data Model Specific Structures Customizing activity, for each data model and entity
type you generate the following technical structures in the ABAP Dictionary.
Structures for PDF-based Forms
Structures for the Service Mapping tool (SMT)
Structures for mapping between active area and staging area
Structures for Enterprise Search
Structures for Field Control
The system uses these structures internally for implementing the reuse active area.
Note
In general if you change a data model (for example, if you change attributes of entity
types or relationships), you need to regenerate the structures.
Important
The data model MM delivered by SAP already includes the corresponding structures.
Their namespace is the SAP namespace /MDGMM/. These structures contain a
Customizing include. If you change the data model at a later date, you might need to
adjust the structures by means of these customer includes. The reason for the manual



adjustment is that delivered structures in namespace /MDG* are not generated as these
structures are already delivered by SAP as fixed.










3.2.3.1 Maintain Customer Includes (Structures in Namespace /MDG*)

Call Transaction SE11 and create the customer include for the following structures.
The structures are arranged by application usage.


The customer includes are as follows:
CI_MDG_S_PMM_MATERIAL



CI_MDG_S_MM_MATERIAL
CI_MDG_SD_MM_MATERIAL
CI_MDG_S_EMM_MATERIAL

Add the components in each include and activate.

Note
With SAP note 1460857 the customer includes are updated automatically.


























3.2.3.2 Generate structures (structures in customer namespace)
Not applicable to this scenario.





3.3 SMT Mapping
3.3.1 SMT Mapping
You extend mappings by creating new transformations (complex transformations, field mappings) and
field checks for them or by editing them. Here you work cross-client.
Important
When the maps are saved the system generates the corresponding coding. You must
ensure all relevant structures are already maintained.
Create the package Z_MATERIAL_EXTENSION.




Extend the mapping step MDG_BS_MAT_MATERIAL in the following Mappings:
MDG_BS_MAT_MAP_2PP
MDG_BS_MAT_MAP_2FC
MDG_BS_MAT_MAP_2STA


Open MDG_BS_MAT_MAP_2PP, select Mapping Step MDG_BS_MAT_MATERIAL and click Details.






Select your package


In the Transformations tab page, add a new Transformation of Type Field Mapping.













Note


Map the two new attributes.









Extend the corresponding Mapping Steps in the Mappings MDG_BS_MAT_MAP_2FC and
MDG_BS_MAT_MAP_2STA.


You can define the maintenance status in Customizing. The control fields are VPSTA and PSTAT.



If you define a field as mandatory in Customizing for Material Master under Field Selection -> Maintain
Field Selection for Data Sources you must perform one of the following actions:
Define the field as mandatory in the data model
Set a fixed value for the field using a Transformation Type of Field Mapping
Implement a Transformation Type of Complex Transformation for the field
This allows you to implement your own logic.






After you have created the mapping in SMT you should return to the IMG and perform the IMG activity
Check Customizing to ensure consistency of the changes.





3.3.2 Mapping Customizing
For each Entity Type you must assign an appropriate Where Used setting and an SMT mapping from
active area setting.
In this use case, you can keep the standard settings because neither the Mapping ID nor the Entity
Type was changed.










3.4 UI Model
The new attributes should also be considered in the UI.
3.4.1 Field Control
By default, the UI uses a BAdI implementation to evaluate the field control settings made in the
Customizing.


In the Field Selection section of Customizing for Material Master, you define whether a field is hidden
or displayed, or whether an entry is mandatory or optional. This involves assigning the field to a field
selection group and then maintaining field selections for data screens.
Important
The definition has to exist for all fields that are used in the data model. Otherwise the field is
hidden from the UI by default.



















3.4.2 Field Control and Data Model
Not applicable to this scenario.

3.4.3 UI Configuration
For demo purposes we copy the standard UI configuration and extend it. Select the Customizing
activity Edit UI Configuration.


Select the existing UI Configuration MDG_MM_APP_BS_MAT_GEN for Data Model MM and create a
copy.











Enter new values for the Target Configuration IDs.




Click Start Deep Copy.




In the Manage UI Configuration screen, click Edit and make the required changes.









The attribute we want to add belongs to the entity type Material and the attributes of this entity type
are shown in the General Data tab.






Click Configure UIBB.


In this example, you want to show the new attributes in an extra group of the General Data tab page
called Extensions.
To create the extra group, click Add Group. A new group displays in the hierarchy (Group (4)).

Note
To display the field in an already existing group, skip this step and click the existing
group.






Click the Group you created. At the bottom of the right screen you can see the attributes of the group.
In the Text field, type Extension.






The new group is marked (otherwise mark it again).
Click Add Melting Group.
Click Configure Melting Group.




In the Configure Melting Group dialog box, move the new fields from Available Fields to Displayed
Fields and click OK.





A new screen opens. At the bottom of this screen, the attributes of the newly added elements of the
melting group display.
Assign the action USMD_ENTER (Event for Entry Key) to the newly added attributes.
This action triggers a roundtrip. The information is transported to the staging area, checks are
performed, and events can be triggered.







Click save. The UI configuration is complete.





3.4.4 UI BAdI Implementation
The UI BAdI contains already logic that is implemented for the user interface for individual processing
of an entity type. It is used for example to control the visibility of fields on the user interface and to set
the property that determines if fields are required or display-only.

3.4.4.1 Field Control
As mentioned before, the UI is copied for demonstration purposes. Consequently, the UI BAdI has to
be copied as well. Then the filter has to be changed to the new UI configuration ID.

We now create the UI BAdI implementation ZMDG_BS_MAT_GEN by copying the old one
MDG_BS_MAT_GEN:
Run transaction SE80, and in package MDG_BS_MAT_MODEL_GEN and copy the implementation.
Select enhancement implementation MDG_BS_MAT_GEN, right-click it, and click Copy.





Maintain the name of the new implementation and the package (if not exists) and save.

We also create a new Class for our UI- implementation by copying the old one
CL_MDG_BS_MAT_UI_BADI:
In package MDG_BS_MAT_MODEL_GEN select class CL_MDG_BS_MAT_UI_BADI, right-click it,
and click Copy.






Maintain the name of the new class and the package (if not exists) and click Save.

Switch to your package.





Now we have to make some changes in the BAdI implementation and its implementing class:
1. Double click the enhancement implementation ZMDG_BS_MAT_GEN,
2. In the right part of the screen, select the implemented class and switch to change mode.
3. In the field Implementing Class, change the value from CL_MDG_BS_MAT_UI_BADI to
Z_CL_MDG_BS_MAT_UI_BADI.






Click , and update the value as shown in the screenshot:



Double click the newly generated implementing class. In the Attributes tab page, update the value of
the attribute GC_USUAL_UI_CONFIG from MDG_MM_APP_BS_MAT_GEN to
Z_MDG_MM_APP_BS_MAT_GEN_CP_1. Then activate the class.



3.4.4.2 UI Adjustment
In addition to using delivered UI logic, you can use Business Add Ins (BAdIs) to change your user
interface for individual processing of an entity type. You have options for making changes in the
following areas:
Adjust the definition of attributes or add new attributes



Initialize the displayed data (when creating a new entity type, for example)
Restrict the values displayed in a dropdown list field or selection field group
Restrict the values displayed in the input help
Dynamically control the visibility of fields on the user interface and of the property that
determines if fields are required or display-only
Define navigation destinations of UI elements of the type hyperlink (or pushbutton)
Check if the lead selection of a table may be changed




Note
To apply the following examples, you must implement a user interface BAdI.
If you want to use fields or set default values that do not exist in the data model but that are instead
calculated, derived, or defaulted on the UI, you must implement a User Interface BAdI (Business Add
In).
One use case is adding a derived field to the screen below that shows the difference between gross
weight and net weight.
Note
The screenshot does not show any new field.


Another use case is setting default values for EAN (International Article Number).





In the General Data tab page, you can implement a new column (for example, BaseUOM)



In the Units of Measure tab page, you can implement behavior for new buttons. For example, you can
implement the Delete Row(s) button to ensure the first row cannot be deleted.


You can perform the following actions related to field control:
Implement your own field control settings



Adjust settings made in Customizing for field control. For more information, see the chapter on
Field Control.
Implement BAdI_MAT_F_SPEC_SEL from the backend.

You can also implement your own UI configuration.





3.5 Print Forms
Not covered in this version of the guide.
3.6 Search
Not covered in this version of the guide.




3.7 Data Quality
3.7.1 Validation and Derivation
In this Customizing activity you define the validations and derivations for a data model. Validations
ensure that the master data is consistent. You use derivations to calculate values for resolved
attributes from other resolved attributes, thereby simplifying data entry.



4. Select the data model.





3.7.1.1 Derivation

We now create a derivation for the new attribute ZZMSTAE. The system sets a default value of 02.

1. In the Catalog view of the Catalog Browser, right-click the Derivation node and choose Create
Object Node -> Create Function as shown in the screenshot below.







2. In the Node DERIVE_MATERIAL_ZZMS dialog box, name the node using the following
notation: DERIVE_<ENTITY TYPE>





3. In the Properties tab page, under Mode, select Event Mode.



4. In the Signature tab page, choose Add Existing Data Object to add the data object you want to
create the derivation for, in this case, MATERIAL.










5. In the Assigned Rulesets tab page, click Create Ruleset. You can assign several rules to a
ruleset.







6. To insert a rule to the ruleset, under Rules choose Insert Rule -> Create.











7. Enable the rule and the ruleset.





The result is shown in the screenshot below.





3.7.1.2 Check
We now create a check function for the new attribute ZZFORMT. If the Material Type is not initial, you
must maintain the ZZFORMT attribute. A warning message should make the user aware of this.

1. In transaction SE91, create a new message class and a new message.



2. Switch to the Customizing of derivations, go to check entity type, and select create function.






3. In the Node CHECK_MATERIAL dialog box, give the node a Name, making sure you use the
following notation: CHECK_<ENTITY TYPE>



4. In the Properties tab page, under Mode, select Event Mode..





5. In the Signature tab page, add the data object you want to create the check function for.



6. In the Assigned Rulesets tab page, create a ruleset. Several rules can be assigned to one
ruleset.






7. Click Create. Insert a rule to the ruleset called CHECK_FORMT.



8. To create the message, choose Perform Action -> Create.








9. Click Use Predefined Message and follow the steps shown in the screenshots below.










10. The following predefined message shows when a user attempts to create a material that is
configured to have a Material Type, and no Page Format is maintained.





3.7.2 BAdI Implementation
You can use this BAdI to create customer-specific checks on entities, change requests, and editions.
You also can use this BAdI to define that certain field values are to be derived from the values of other
fields in the master data:







3.8 Process Model
3.8.1 Workflow
The standard workflow template used by Master Data Governance for material is WS60800086, which
is delivered and activated. MDG for material uses advanced workflow capabilities by combining the
SAP Business Workflow with the SAP Business Rule Framework plus (BRFplus).



In the following Customizing activity you define the rules for the rule-based workflow.





For each change request type, you can provide separate settings.



SAP delivers Business Rule Framework plus (BRFplus) decision tables as example content for each
change request type. As a customer, this SAP-proposed content is imported into client 000 of your
system. To use the content, you export the decision tables from client 000 to an Excel and in your



system, you import the content from this excel. The decision tables in your system are then filled with
this example content. It is also still possible to define the decision tables manually.



The values with white background color are conditions, and with green background color are results.
This decision table is evaluated line by line from top to bottom. The CR Previous Step and the
Previous Action determine the next step, the new status and other attributes. In the case of a complex
workflow scenario, for example, if there are special functions required in the workflow, you must also
have defined the service names for the BAdI implementations that are to be used.
The first result column Condition Alias is the link from this table to the other two decision tables to find
the agents.


The only condition is Condition Alias. For a condition alias, you can define one or more user agent
groups.








Example
An example of a workflow is shown in the graphic below.



Example decision tables are shown in the graphic below.




3.8.1.1 Extend Rules Based Workflow

You can find details regarding extending the Rule Based Workflow.

How to-Master Data Governance for Material: BADI
USMD_SSW_DYNAMIC_AGENT_SELECT for More Flexible User Determination
How to-Master Data Governance for Material: Set up Parallel Workflow Tasks with BRF+
Note
To ensure the master data object is activated at the end of a workflow the change
request status must be set to status 05 or 06.

3.8.1.2 Extend Simple Workflow
For demo purposes a new simple workflow WS90900008 with several steps was created without using
the Business Rule Framework plus (BRFplus) decision tables. The agent determination is handled
differently.




3.8.1.2.1 Create Simple Workflow


You introduce a dedicated step to check the new attributes.













You create a new status Extension Fields to be evaluated as shown in the screenshots below:






In this activity you define which statuses the change requests can have and which processing options
are enabled for each of those statuses.
The standard delivery contains the following statuses:
To be evaluated
To be considered and approved
Changes to be executed
To be revised
Final check to be performed
Final check approved
Final check rejected






Note
You must adjust the APPStep numbers in your workflow accordingly.








Note
You can analyze a workflow in transaction SWI6.





3.8.1.2.1 Define Workflow Step Numbers
In the Define Workflow Step Numbers Customizing activity you create the workflow step numbers for
your workflow and enter a short description for them.
For example, to be able to assign different workflow processors at different places to a workflow task
that occurs several times in the workflow, you need your own workflow step number for each of these
dialog steps (of the workflow tasks). The workflow step numbers you created are then available when
you assign the workflow step number and processor.











Before you can start the workflow, you must activate the type linkage.








Add an entry for business object type BUS2250 and set the Type linkage active indicator.






3.8.1.2.1 Assign Processor to Workflow Step Number (Simple
Workflow)
In the Assign Processor to Workflow Step Number Customizing activity, you assign processors to the
individual workflow step numbers for each type of change request. This determines which tasks the
processors need to perform.



3.8.2 Workflow - BAdI Implementation
You can implement the BAdIs in the screenshot below for the rule-based workflow.



BAdI: Rule Context Preparation for Rule-Based Workflow
You can use this BAdI to implement preparation of the Business Rule Framework plus (BRF+) rule
context in the rule-based workflow.

BAdI: Calling of System Method for Rule-Based Workflow
You can use this BAdI to implement the calling of a system method in the rule-based workflow.

BAdI: Dynamic Selection of Agent in Rule-Based Workflow
You can use this BAdI to implement dynamic agent selection in the rule-based workflow. Therefore in
addition to rules that have been predefined, with this BAdI you can change agent values in the
workflow by creating your own programs.

BAdI: Handling of Parallel Results in Rule-Based Workflow
You can use this BAdI to implement the result of a parallel workflow merge in the rule-based workflow.






BAdI: Assign Processor to Workflow Step
You can use this BAdI to define rules according to which a processor is allocated to the individual
workflow steps for the processing of a change request

3.8.3 Adjustments to Change Request Customizing
In this Customizing activity you define the following properties, which are valid for all change requests
with the same type:
The data model in which a change request is to be valid
When creating the change request, whether the user needs to specify which entities should be
processed with the change request (first-time definition of the object list)
Note
The status of the change request controls which workflow steps can be used for
processing the object list.
Whether only a single entity type can be changed with the change request (single object) and
which entity type is the main entity type of the change request in that case
Which workflow template should be used when editing the change request
Which entity types can be changed with the change request
If you set the Single Object indicator, then entity types that you enter in addition to the main
entity type are changed with the change request of the main entity type.













These settings have to be adjusted for the following reasons:
A new workflow is used
A new UI configuration is used






Note
If a change request for a change request type already exists, the UI configuration field is
grayed out.




3.8.4 Process Model - BAdI Implementation
For the process modeling there is one BAdI available:

BAdI: Customize User Interface for Change Requests
You can use this BAdI to change the user interface of applications for creating and editing a change
request. You can customize the user interface as follows:






3.9 Initial Load
The initial load of records to MDG considering an extended Data Model is not covered in this guide.
3.10 Data Replication
3.10.1 Replication of Material
For MDG for material, ALE communication is used exclusively to replicate data from the MDG hub to
target systems and clients. This minimizes the effort for the customers in upgrading the connected
systems.
For more information on the replication of Material (especially in target systems) using ALE, see
Customizing under Application Server IDoc Interface / Application Link Enabling (ALE) SAP
Business Workflow.

3.10.2 Replication of Supplier or Business Partner
Not covered in this version of the guide.
3.10.3 BAdI Implementation
The following BAdIs are used in the Data Replication Framework (CA-MDP-DRF) component.



BAdI: Definition of Language-Dependent Texts
You use this BAdI to change the default system behavior for transferring texts in various languages.
For example, you can use the BAdI to include a text in the messages for non-optional elements. The
text can be written in another available language or it can function as a replacement text. This text
ensures that the system is able to send the message.

BAdI: Prepare Data for Download File
You can use this BAdI to prepare the file for downloading data from the Master Data Governance hub.

BAdI: Prepare Upload Data
This Business Add-In (BAdI) is used for uploading master data, language-dependent texts, and
hierarchies to the Master Data Governance hub.

BAdI: Creation of MDG Change Pointers from ALE Change Pointer
You can use this BAdI to create Master Data Governance change pointers from ALE change pointers
for selected message types.





3.11 Key/ Value Mapping
If required, mapping can be defined for elements for example, UoM, industry sector, material type and
others. The elements for possible value mapping are predelivered.

If you are working with multiple connected systems and did not consolidate the material keys during
the initial load phase, key mapping may be required.

Not applicable to this scenario.




3.12 Test Run









































4. Extend by existing table



Note
The node extensibility (entity type), which is introduced in the following sections covers
all segments and fields that are contained in data dictionary structure
MDG_BS_MAT_S_MAT_DATA. It does not, however, address additionally accessible
tables of the Material Master such as the Production Versions of Material (MKAL), the
Inspection Type (QMAT), MRP Area for Material (MDMA) or Production Resource Tool
Fields in the Material Master (MFHM).

In this example, we extend the (Type1) entity type MATERIAL to include the entity type ZZMARC.
ZZMARC includes the following attributes:
LVORM
XCHAR
DISMM
DISPO
DISLS






The entity type and the attributes correspond to fields of table MARC. They should also be displayed in
the UI.




4.1 Data Model Requirements (Primary Persistence)
4.1.1 Table Extensions
The new attributes already correspond to the fields of data base table MARC.



4.1.2 Structure Extensions
The Service Mapping Tool is a program that it is used in ABAP to fill a target structure with a set of
source structures. The structures that are relevant for the target structure of the primary persistence
(MARC) are:
MDG_BS_MAT_S_MARC
MDG_BS_MAT_S_MARC_UI
MDG_BS_MAT_S_MARC_X

The new attributes shown above already correspond to the fields of these structures.

Note
There several structures that are relevant for mapping of the primary persistence and are
already delivered. These have to be extended depended on the use case.






4.2 Data Model Requirements (Staging)
4.2.1 Data Model Extensions
In this Customizing activity, you define and activate a data model to map master data in the system,
along with its properties and relationships. The system uses this data model to generate database
tables in which the master data can be stored.








4.2.1.1 Entity types


Note
The maintenance of the Data Model is cross client.

Select the MM data model and add the new entities and attributes as shown in the screenshots.
The details of Entity Type ZZMARC are shown in the screenshot below.





Attributes of Entity Type ZZMARC are shown in the screenshot below.



We recommend you only assign a Search Help to a Data Element in exceptional circumstances. If you
do this, the input help executes the search help instead of reading the data in the check table or the
fixed values of data elements domain.

The following entities are needed to define the key fields via creating relationships.
Details for Entity Type ZZT438A are shown in the screenshot below.






Details for Entity Type ZZT024D are shown in the screenshot below.






Details for Entity Type ZZT001W are shown in the screenshot below.





Ensure that the customer extension fields consider the customer namespace for DDIC fields. The
customer namespace for fields is YY and ZZ.
Ensure that the customer extensions entities consider the customer namespace for DDIC structures.
The customer namespace for structures is Y and Z.

4.2.1.2 Relationships
Create the relationships as shown in the screenshot below.












4.2.2 Generated Tables
Activate the extended data model.

Note
If you use your own ABAP Dictionary objects (data elements, domains, check tables) in
your data model and you changed their properties after the data model was activated
refer to Note 1552474.



After the activation, the system creates a new table for the entity type ZZMARC.




The screenshot below shows the generated tables before activation.



The screenshot below shows the generated tables after activation.







Note that the system created the following fields only (ZBATCH, ZLVORM, and ZZDISLS) because
they are maintained as attributes of entity type ZZMARC.


The system creates the other fields based on the defined relationships.

4.2.3 Structure Extensions
In this Customizing activity, for each data model and entity type you generate the following technical
structures in the ABAP Dictionary.





Structures for PDF-based Forms
Structures for the Service Mapping tool (SMT)
Structures for mapping between active area and staging area
Structures for Enterprise Search
Structures for Field Control
The system uses these structures internally for implementing the reuse active area.
Note
In general if you change a data model (for example, if you change attributes of entity
types or relationships), you need to regenerate the structures.



4.2.3.1 Maintain customer includes (structures in namespace /MDG*)
Not applicable to this scenario.
4.2.3.2 Generate structures (structures in customer namespace)

Create new structures for entity type ZZMARC.


When you save your work, the structures are generated automatically and assigned a status of New.










Return to the screen in which you created the structures. Click Generate Structures. This activates the
structure.













4.3 SMT Mapping
4.3.1 SMT Mapping
You extend mappings by creating new transformations (complex transformations, field mappings) and
field checks for them or by editing them. Here you work cross-client.
Important
When the mappings are saved the corresponding coding is generated. Make sure that all
relevant structures are ready before you start.




Create three new mapping steps similar to the mappings for the Material entity type as shown
below. Note that PP represents Primary Persistence and FC represents Field Control.


The mapping step MAP MM Model from PP to FC is shown below.





The mapping step MAP MM Model from Staging Area to PP is shown below.



The mapping step MM Model from PP to Staging Area is shown below


MAP MM Model from Staging Area to PP

1. In the Display Mapping screen, choose Mapping -> New









2. Define a mapping step. Its source structure is the generated data-model-specific structure. Its
target structure is the API structure.

3. For the Mapping from staging area to active area you have to define a change structure. This is
technically relevant for handling initial values. For the mapping step, insert the name of the
Change Structure (X-Structure) from the Material API



4. Define the change structure keys. Select the mapping step and choose Change Structure Keys.
When the dialog box is displayed, choose Add.







5. Enter the key fields of the change structure.





6. Choose Close to leave the dialog box. The Change structure Keys Exist setting is selected for
this step.



7. Continue to define the details of the mapping step. Save the mapping


MAP MM Model from PP to Staging Area
1. Assign a source structure and a target structure. The source structure is the API structure (and-
if applicable- additional input structures from the API). The target structure is the generated
data-model-specific structure for usage Primary Persistence Mapping.
For the mapping from the active area to the staging area, you do not have to enter a change
structure (this is only required for mapping from the staging area to the active area).








2. In this example, you define a 1:1 mapping between the fields of the API structure (source) and
the fields of the generated data-model-specific structure (target).









After you have created the mapping in SMT you should return to the IMG and perform the IMG activity
Check Customizing to ensure consistency of the changes.







MAP MM Model from PP to FC
Assign a source structure and a target structure. The source structure is the API structure, and, if
applicable, additional input structures from the API. The target structure is the generated data-model-
specific structure.

The result is the following three mappings.


4.3.2 Mapping Customizing
In the backend, you must ensure the Where Used value for the SMT mapping from active area is
correct for the Entity Type.
For each Entity Type you must assign an appropriate Where Used setting and an SMT mapping from
active area setting.

























4.4 UI Model
The new attributes should also be considered in the UI.
4.4.1 Field Control
By default, the UI uses a BAdI implementation to evaluate the field control settings made in
Customizing.


In this section, you define whether a field is hidden or displayed, or whether an entry is mandatory or
optional in material master maintenance by assigning the field to a field selection group.
Important
The definition has to exist for all fields that are used in the data model. Otherwise the field is
hidden from the UI by default.







4.4.2 Field Control and Data Model
In MDG, you created a new entity type for the ERP table MARC. When you create a record in the
MARC table in MDG, the system checks the corresponding ERP Customizing table to verify if the
relevant fields are required or optional.
This is controlled using the field control described above.
This means you could run into a situation that a field is not used in the data model but it is set to
required in the field control table. The creation process would be blocked as the fields is now required
but cannot be maintained.
In such a situation, you have to consider the following options:
Adjust the field control
Add the required fields to your Data Model
Use fixed valued in SMT mapping





In our use case, you enhance the SMT mapping using fixed values, as shown in the screenshot
below.













4.4.3 UI configuration
For demo purposes the standard UI configuration was copied and extended. Now we want to extend
our previous generated UI-configuration by creating a new tab page corresponding to the new entity
type ZZMARC.







1. Create a new tab.







2. Expand the Main View node to navigate to the newly created Subview and start editing the
Attributes..






3. Navigate to the UIBB (subscreen).





4. Apply attribute settings as shown in the screenshot below.


5. Click the . And click Yes in the dialog box.







6. Select a Contained Entity Type of ZZMARC.













7. Add the columns you would like to show up in the UI.







8. Maintain the following attributes:

For input fields select

For description fields select:








9. Click . Mark the last 3 entries of the Chosen Feeder Actions section of the
dialog box and click OK.


10. Check the UIBB (subscreen) preview.



4.4.4 UI BAdI Implementation
4.4.4.1 Field Control
Since the UI is copied for demonstration purposes, the UI BAdI has to be copied and the Filter has to
be changed to the new UI configuration ID.

This is already covered in a previous use case.
4.4.4.2 Field Adjustment
See the previous use case for an explanation.








4.5 Print Forms
Not covered in this version of the guide.
4.6 Search
Not covered in this version of the guide.




4.7 Data Quality
4.7.1 Validation and Derivation
see previous use case for an example.
4.7.2 BAdI Implementation
See the previous use case for an explanation.




4.8 Process Model
4.8.1 Workflow
See the previous use case for an explanation.
4.8.2 Workflow - BAdI Implementation
See the previous use case for an explanation.
4.8.3 Change Request/ Customizing Adjustments
See the previous use case for an explanation.
4.8.4 Process Model - BAdI Implementation
See the previous use case for an explanation.





4.9 Initial Load
The initial load of records to MDG considering an extended Data Model is not covered in this guide.
4.10 Data Replication
4.10.1 Replication of Material Master Data
See the previous use case for an explanation.
4.10.2 Replication of Supplier or Business Partner Master
Data
Not covered in this version of the guide.
4.10.3 BAdI Implementation
See the previous use case for an explanation.




4.11 Key/ Value Mapping
If required, mapping can be defined for elements for example, UoM, industry sector, material type and
others. The elements for possible value mapping are predelivered.

If you are working with multiple connected systems and did not consolidate the material keys during
the initial load phase, key mapping may be required.

Not applicable to this scenario.




4.12 Test Run























































5. Extend by customer field of existing tables
...
Add entit y t ype ZZMARC t hat repr esents t abl e MARC by an existi ng MARC fi elds
Add entit y t ype ZZMARC t hat repr esents t abl e MARC by an existi ng MARC fi elds



Table MARA is extended with the customer specific field ZZLOB (Line of Business).
Table MARC is extended with the customer specific field ZCONTROL.
The Data Model MM is extended by these attributes. The attributes also display in the UI.




5.1 Data Model Requirements (Primary Persistence)
5.1.1 Table Extensions

Append MARA by using append structure to add fields to table MARA, here field ZZLOB
If you want to create an append structure and include your customer owned Z field into table T130F,
see SAP note 44410.
SAP strongly recommends to consider using the customer namespace YY/ZZ for the append fields.



Append MARC by using append structure to add fields to table MARC, here field ZCONTROL





5.1.2 Structure Extensions
The Service Mapping Tool is a program that it is used in ABAP to fill a target structure with a set of
source structures.

The structures that are relevant for the target structure of the primary persistence (MARA) are:
MDG_BS_MAT_S_MARA
MDG_BS_MAT_S_MARA_UI
MDG_BS_MAT_S_MARA_X

The structures that are relevant for the target structure of the primary persistence (MARC) are:
MDG_BS_MAT_S_MARC
MDG_BS_MAT_S_MARC_UI
MDG_BS_MAT_S_MARC_X

The new fields are automatically included in structures MDG_BS_MAT_S_MARA and
MDG_BS_MAT_S_MARC.








Append the field ZZLOB to the following structures:
MDG_BS_MAT_S_MARA_UI
MDG_BS_MAT_S_MARA_X








Append the field ZCONTROL to the following structures:
MDG_BS_MAT_S_MARC_UI
MDG_BS_MAT_S_MARC_X







Note the following information concerning the structures MDG_BS_MAT_S_MARA_X and
MDG_BS_MAT_S_MARC_X:
If the X-field-structure of the MDGM-API is extended after the creation of an SMT mapping, the SMT
mapping needs to be regenerated. Therefore enter the SMT maintenance and save.

5.2 Data Model Requirements (Staging)
5.2.1 Data Model Extensions
In this Customizing activity, you define and activate a data model to map master data in the system,
along with its properties and relationships. The system uses this data model to generate database
tables in which the master data can be stored.








5.2.1.1 Entity types


Note
The maintenance of the Data Model is cross client.

Select the MM data model and add the new entities and attributes as shown in the screenshots.

The details of the MATERIAL Entity Type are shown in the screenshot below.



The details of the ZZMARC Entity Type are shown in the screenshot below.





Ensure that the customer extension fields consider the customer namespace for DDIC fields. The
customer namespace for fields is YY and ZZ.
Ensure that the customer extensions entities consider the customer namespace for DDIC structures.
The customer namespace for structures is Y and Z.

5.2.1.2 Relationships
This is already covered in a previous use case.

5.2.2 Generated Tables
Activate the extended data model.

Note
If you use your own ABAP Dictionary objects (data elements, domains, check tables) in
your data model and you changed their properties after the data model was activated
refer to Note 1552474.




After the activation the new fields are added to the generated table, as shown in the screenshot below.










5.2.3 Structure Extensions
In this Customizing activity, for each data model and entity type you generate the following technical
structures in the ABAP Dictionary.
Structures for PDF-based Forms
Structures for the Service Mapping tool (SMT)
Structures for mapping between active area and staging area
Structures for Enterprise Search
Structures for Field Control






The system uses these structures internally for implementing the reuse active area.
Note
In general if you change a data model (for example, if you change attributes of entity
types or relationships), you need to regenerate the structures.
5.2.3.1 Maintain Customer Includes For Structures in the /MDG*
Namespace
Call transaction SE11 and create the customer include for the following structures:




The names of the customer includes are as follows:
CI_MDG_S_PMM_MATERIAL
CI_MDG_S_MM_MATERIAL
CI_MDG_SD_MM_MATERIAL
CI_MDG_S_EMM_MATERIAL


















Add the field in each include and activate


5.2.3.2 Generate Structures (Structures in Customer Namespace)
Regenerate the structures, as described in the previous use case.:






The structures are extended automatically.













5.3 SMT Mapping
5.3.1 SMT Mapping
You extend mappings by creating new transformations (complex transformations, field mappings) and
field checks for them or by editing them. Here you work cross-client.
Important
When the maps are saved the corresponding coding is generated. Make sure that all
relevant structures have been maintained before.




As described in the previous use case, extend the Mapping step MDG_BS_MAT_MATERIAL for the
following Mappings:
MDG_BS_MAT_MAP_2PP
MDG_BS_MAT_MAP_2FC
MDG_BS_MAT_MAP_2STA















As described in the previous use case extend for the MARC extension in the Mappings:















After you have created the mapping in SMT you should return to the IMG and perform the IMG activity
Check Customizing to ensure consistency of the changes.







5.3.2 Mapping Customizing
See the previous use case for an explanation.





5.4 UI Model
The new attributes should also be considered in the UI.
5.4.1 Field Control
By default, the UI uses a BAdI implementation to evaluate the field control settings made in
Customizing.


In this section, you define whether a field is hidden or displayed, or whether an entry is mandatory or
optional in material master maintenance by assigning the field to a field selection group.
Important
The definition has to exist for all attributes that are used in the data model. Otherwise the attribute is
hidden in the UI by default.

Enhance central field table T130F.If you want these fields to be subject to standard field selection, you
must add new entries for them to the central field table for material master maintenance (T130F)

















5.4.2 Field control and Data Model
See the previous use case for an explanation.
5.4.3 UI configuration
In this Customizing activity, you manage UI configurations, which the system uses for the following
purposes:
Definition of the Web user interface for individual processing of an entity type (Web Dynpro application
USMD_ENTITY_VALUE2)
Use in the Web user interface for creating and processing a change request.
You can create an edit different UI configurations for each data model.

For demo purposes the standard UI configuration was copied and extended. As described in the
previous use case extend the General Data tab with the ZZLOB field and the Material Plant Data tab
with the field ZCONTROL.











5.4.4 UI BAdI Implementation
5.4.4.1 Field Control
Since the UI is copied for demonstration purposes, the UI BAdI has to be copied and the Filter has to
be changed to the new UI config ID.

This is already covered in a previous use case.
5.4.4.2 Field Adjustment
See the previous use case for an explanation.





5.5 Print Forms
Not covered in this version of the guide.
5.6 Search
Not covered in this version of the guide.




5.7 Data Quality
5.7.1 Validation and Derivation
see previous use case for an example.
5.7.2 BAdI Implementation
See the previous use case for an explanation.




5.8 Process Model
5.8.1 Workflow
See the previous use case for an explanation.
5.8.2 Workflow - BAdI Implementation
See the previous use case for an explanation.
5.8.3 Change Request/ Customizing Adjustments
See the previous use case for an explanation.
5.8.4 Process Model - BAdI Implementation
See the previous use case for an explanation.





5.9 Initial Load
The initial load of records to MDG considering an extended Data Model is not covered in this guide.
5.10 Data Replication
5.10.1 Replication of Material
See the previous use case for an explanation.
5.10.2 Replication of Supplier or Business Partner-
Not covered in this version of the guide.
5.10.3 BAdI Implementation
See the previous use case for an explanation.




5.11 Key Mapping and Value Mapping
If required, mapping can be defined for elements for example, UoM, industry sector, material type and
others. The elements for possible value mapping are predelivered.

If you are working with multiple connected systems and did not consolidate the material keys during
the initial load phase, key mapping may be required.

Not applicable to this scenario.





6. Extend by customer table or entity type





A customer table ZZCOUNTRYDETAILS was created in the Data Dictionary.
The MM data model is extended by this entity type.

Caution
To create customer-specific reuse area, you currently require the support of SAP
consulting and development. see note 1444616.




6.1 Data Model Requirements (Primary Persistence)
6.1.1 Table Extensions
Create a new data base table ZZCOUNTRYDETAILS


6.1.2 Structure Extensions
Not relevant as a customer access class has to be implemented as the delivered API cannot handle
this.
6.2 Data Model Requirements (Staging)
6.2.1 Data Model Extensions
In this Customizing activity, you define and activate a data model to map master data in the system,
along with its properties and relationships. The system uses this data model to generate database
tables in which the master data can be stored.








6.2.1.1 Entity types


Note
The maintenance of the Data Model is cross client.

Select the MM data model and add the new entities and attributes as shown in the screenshots.

The details of Entity Type YYCNTRINF are shown in the screenshot below.








The details of Entity Type YYCOUNTRY are shown in the screenshot below.






6.2.1.2 Relationships

1. Choose a Relationship Type of P Leading for a relationship with a From-Entity Type of
MATERIAL and a To-Entity Type of YYCNTRINF
2. Choose a Relationship Type of Q Qualifying for a relationship with a From-Entity Type of
YYCOUNTRY and a To-Entity Type of YYCNTRINF





6.2.1.3 Reuse Area

The Reuse Active Area specifies the reuse active area for active data. This is done by establishing the
communication between Master Data Governance (MDG) and the tables that should be reused for the
active data, using an ABAP class and the ABAP interface IF_USMD_PP_ACCESS.

6.2.1.3.1 Customer Build Reuse area


To update database table ZZCOUNTRYDETAILS which is then the active area you would need to
implement a new access class.
Create a new reuse area called ZExtension and assign the ZCL_MDG_BS_MAT_ACCESS access
class to it.






Assign the new Reuse Area to the new entity type






Caution
To create a customer-specific reuse area, you currently require the support of SAP
consulting and development. See note 1444616.

6.2.1.3.1 Reuse Area MDG

You can assign the MDG reuse area to the new entity type



In this case, the generated table stores the active data. The status field USMD_ACTIVE handles
storage.
The original database table ZZCOUNTRYDETAILS is not updated anymore.






Note
Since the flexoption is used for the new entity type, records stay in the generated tables
and the creation of mapping structures for SMT is not needed







7. Create own data model with customer object
Airline Partner



Caution
To create a customer-specific reuse area, you currently require the support of SAP
consulting and development. See note 1444616.






7.1 Data Model
The first step to define a Master Data Governance Custom Object is to define the data model. The
following chapter describes how one can derive from an Entity relationship model the required MDG
entities and relationships. We use the example of some parts of the SAP Flight model that is often
used for training. The modeling part here has two examples that reflect necessary types of entities and
relationships. The first example is not modeled in full detail but gives you and overview what you need
to consider if you want to transfer an existing model into a MDG model. The second example shows
the basic steps in the Customizing and is the prerequisite of all subsequent steps, for example, the UI
modeling.

7.1.1 MDG Data Model - Details
Make sure you read the related Customizing Documentation and the respective help.sap.com material
before you proceed. In the following we briefly refer to entity types and relationship types of the MDG
framework.


7.1.2 Example 1: Airline and Flights




The Airline and Flights data model is shown in the graphic below.



The Entity relationship model (ERP) consists of the following entities:
SCARR- Airline
SPFLI -- Flight schedule
SPFLIGHT- Flight




The table below shows the entity types in more detail.

SCARR Data element
MANDT S_MANDT
CARRID S_CARR_ID
CARRNAME S_CARRNAME
CURRCODE S_CURRCODE
URL S_CARRURL
SPFLI
Data
element
MANDT S_MANDT
CARRID S_CARR_ID
CONNID S_CONN_ID
COUNTRYFR LAND1
CITYFROM S_FROM_CIT
AIRPFROM S_FROMAIRP
COUNTRYTO LAND1
CITYTO S_TO_CITY
AIRPTO S_TOAIRP
FLTIME S_FLTIME
DEPTIME S_DEP_TIME
ARRTIME S_ARR_TIME
DISTANCE S_DISTANCE
DISTID S_DISTID
FLTYPE S_FLTYPE
PERIOD S_PERIOD

SFLIGHT
Data
element
MANDT S_MANDT
CARRID S_CARR_ID
CONNID S_CONN_ID
FLDATE S_DATE
PRICE S_PRICE
CURRENCY S_CURRCODE
PLANETYPE S_PLANETYE
SEATSMAX S_SEATSMAX
SEATSOCC S_SEATSOCC
PAYMENTSUM S_SUM
SEATSMAXB S_SMAX_B
SEATSOCCB S_SOCC_B
SEATSMAXF S_SMAX_F
SEATSOCCF S_SOCC_F

7.1.2.1 Derive Entities and Relationships to MDG
You can scan through the mode from the top down first identifying the leading entity types and
relationships, then the qualifying entity types and then the referencing entity types.
In our model the object root is the SCARR entity type, which is the leading entity type for entity type
SPFLI and SFLIGHT.

1. Entities of type 1 and 4 / Leading Relationships

1
0..n
1
0..n



The Leading relationship models the key attributes SCARR_SPFLI and SCARR_SPFLIGHT into the
respective entity type.

Entity Type Key Entity type

SCARR S_CARR_ID 1

SPFLI

4

SFLIGHT

4


Relationship Relationship Type From To
SCARR_SPFLI Leading SCARR SPFLI
SCARR_SPFLIGHT Leading SCARR SPFLIGHT

Note
The Relationship name becomes the key attribute name in the respective generated
table.

2. Qualifying Relationships
The SPFLI entity type has one additional key attribute; the field ConnID is qualifying the entity type.









In this case we need to model an entity type of type 3 and a respective relationship type qualifying.



Note

For demonstration purposes, we create a new data element ZS_CONN_ID that has the
same data type and other attributes as S_CONNID. We do not specify a check table for
ZS_CONN_ID.




As well as the qualifying key CONNID, the entity type SFLIGHT has another key; flight date: FLDATE.

Important
The MDG Framework has a limitation that entity types with a data element referring to a
date or time data type cannot be taken into account.



As a workaround, you can model a field. For example, you can use a CHAR field for the
qualifying entity type with a length of 8. Keep the proper date field as a normal attribute in
the entity type. Later you can make use of BRF+ and UI modeling to hide the character
field and derive a date using the normal attribute.

Taking all this into consideration we model the following:
Entity Type Key Entity type

CONNID S_CONN_ID 3

FLDATE Z_SFLIGHT_DATE 3



Relationship Relationship Type From To
CONNID_SPFLI Qualifying CONNID SPFLI
CONNID_SFLIGHT Qualifying CONNID SFLIGHT
FLDATE_SFLIGT Qualifying FLDATE SFLIGHT

3. Referencing Attributes

The referencing attributes can be derived using the following logic:
If the attribute that references another entity type uses just one key, you can either model a
relationship or you can create a new entry in a table for the entity type
If an attribute that references another entity type uses two keys, you must create two
relationships, a leading relationship and a qualifying relationship

Let us have a look on our example:












SGEOCITY
MANDT S_MANDT
CITY S_CITY
COUNTRY LAND1
LATITUDE S_LATI
LONGITUDE S_LONG
The attribute CITYFROM refers to the table SGEOCITY via the domain value table.

For the reference it is necessary to take city and country into account.

Entity Type Key Entity type

CITY_FROM S_FROM_CIT 3

COUNT_FRM LAND1 3






Relationship Relationship Type From To
CITYFROM Referencing CITY_FROM SPFLI
CO_FR_2_C Leading COUNT_FRM CITY_FROM






7.1.3 Example 2: Flight customers

The following Enterprise Relationship Model (ERM), which is represented using ABAP Dictionary
tables, is used to build up an MDG application for maintaining flight customers. The tables in this
model are in the SAP namespace but the steps and requirements to bring them into governance are
the same as they would be in the customer namespace.


SCUSTOM Flight customers
MANDT S_MANDT
ID S_CUSTOMER
NAME S_CUSTNAME
FORM S_FORM
STREET S_STREET
POSTBOX S_POSTBOX
POSTCODE POSTCODE
CITY CITY
COUNTRY S_COUNTRY
REGION S_REGION
TELEPHONE S_PHONENO
CUSTTYPE S_CUSTTYPE
DISCOUNT S_DISCOUNT
LANGU SPRAS
EMAIL S_EMAIL
WEBUSER S_WEBNAME
SBUSPART Airline Partner
MANDANT S_MANDT
BUSPARTNUM S_BUSPANUM
CONTACT S_CONTACT
CONTPHONO S_CPHONENO
BUSPATYP S_BUSPATYP


STRAVELAG Travel agency
MANDT S_MANDT
AGENCYNUM S_AGNCYNUM
NAME S_AGNCYNAM
STREET S_STREET
POSTBOX S_POSTBOX
POSTCODE POSTCODE
CITY CITY
COUNTRY S_COUNTRY
REGION S_REGION
TELEPHONE S_PHONENO
URL S_URL
LANGU SPRAS
CURRENCY S_CURR_AG

1
1
1
1



The goal is to have a MDG application that uses a simple standard workflow for governance. we want
to demonstrate how to adapt the reuse mechanism and show how easy it is to implement basic
derivations and validity checks.

Noteor usage of the reuse option that requires deep programming
and application knowledge see note 1444616. Customer
implementations may become obsolete as the interface (see respective
chapter) changes. This document shows which steps are required to
bring an existing application into governance.





7.2 Data Modeling
According to the ERM in chapter 5.1.3 we have a one type 1 and two type 2 entities. They have a
leading relationship to each other. The Master Data Governance Framework handles all other
references such as CURRENCY using the domain value table. Furthermore the fields CITY,
COUNTRY, REGION are considered as free text and dont have domain values.

The following entity types and relationships need to be modeled:

Entity Type Key Entity type

SBUSPART S_BUSPANUM 1

SCUSTOM

4

STRAVELAG

4


Relationship Relationship Type From To Cardinality
IS_FCUST Leading SBUSPART SCUSTOM 1:1
IS_TRAVEL Leading SBUSPART STRAVELAG 1:1

7.2.1 Create Data Model
Open Customizing for Master Data Governance under General Settings -> Data Modeling -> Edit Data
Model

Note
As an alternative you can directly open the view cluster VC_USMD001S with transaction
SM34. You have to specify directly the data model you want to edit.

Click new entries and specify a new data model as shown below.

Figure 1 Create Data Model

7.2.2 Create Entity Types
Select the node Entity types and click New Entries.




Figure 2 Create entity type

Specify the entities as shown below.


Figure 3 Entity Type details
For further explanation of the single
attributes one can specify here, refer
to the Customizing Help, to the F1
help and to help.sap.com.

When you add the other entities, use the following values.

Entity type Storage/Use Type Data Element Key Assignment Description
SBUSPART 1 Changeable via Change Request S_BUSPANUM Key cannot be Airline Customers
SCUSTOM 4 Changeable via other Entity type

Key cannot be Flight customers
STRAVELAG 4 Changeable via other Entity type

Key cannot be Travel agencies

Specify the attributes for the entities. Highlight the entity type you want to maintain and navigate to the
node attributes.





Figure 4 Attribute Overview

Repeat the previous step for the other entities.

Entity Type: SBUSPART
Attribute Data element
BUSPATYP S_BUSPATYP
CONTACT S_CONTACT
CONTPHONO S_CPHONENO

Entity Type: STRAVELAG
Attribute Data element
CITY CITY
COUNTRY S_COUNTRY
CURRENCY S_CURR_AG
NAME S_AGNCYNAM
POSTBOX S_POSTBOX
POSTCODE POSTCODE
REGION S_REGION
STREET S_STREET
TELEPHONE S_PHONENO
URL S_URL
ZLANGU SPRAST




Note
The ABAP Dictionary table STRAVELAG (which you can check using transaction SE11)
includes the LANGU attribute for the SPRAS data element. The MDG data model cannot
implement this attribute. The attribute names MANDT, LANGU, SID, TXTLG, TXTMI, and
TXTSH are forbidden. The data element SPRAS is also forbidden but it can be replaced
by SPRAST.

Entity Type: SCUSTOM
Attribute Data element
SCITY CITY
SCOUNTRY S_COUNTRY
SCUSTTYPE S_CUSTTYPE
SDISCOUNT S_DISCOUNT
SEMAIL S_EMAIL
SFORM S_FORM
SLANGU SPRAST
SNAME S_CUSTNAME
SPOSTBOX S_POSTBOX
SPOSTCODE POSTCODE
SREGION S_REGION
SSTREET S_STREET
STELEPHON S_PHONENO
SWEBUSER S_WEBNAME

Note
Since an attribute (for example city) can only be assigned to an entity type with a Storage
and Use Type of 1 once, we have to rename the attributes of entity type SCUSTOM. To
overcome the restriction we put an S as a prefix. This is also true for indirect
assignments inherited from leading entity types with a Storage and Use Type of 4.

7.2.3 Create relationships
As we saw in the beginning of this chapter we need to model 2 relationships:
Relationship Relationship Type From To Cardinality
IS_FCUST Leading SBUSPART SCUSTOM 1:1
IS_TRAVEL Leading SBUSPART STRAVELAG 1:1

Highlight the node relationships and press New Entries.




Figure 5 Entering new relationships

Specify the relationship details

Figure 6 Relationship details

Note
Cardinality S = 1:1 Translation





7.2.4 Activate data model
Now the MDG data model is finished and can be activated

Note
If you use your own ABAP Dictionary objects (data elements, domains, check tables) in
your data model and you changed their properties after the data model was activated
refer to Note 1552474.



Figure 7 Activate the data model

Note
The generated tables for your data model one can see with report USMD_DATAMODEL
using transaction SE38.


Figure 8 Launch Report USMD_DATA_MODEL with Transaction SE38

The report is showing all generated tables for a particular data model.


Figure 9 Generated MDG tables




7.2.5 Generate data model specific structures

Full Path: Cross-Application Components -> Master Data Governance -> General Settings -> Data
Modeling -> Generate Data Model-specific Structures

Choose your data model and highlight the node Structures

Figure 10 Data model structures

Specify the details of the structures.

Figure 11 Structure details




Note
If you specify the Entity Type and the Where Used Area, the Prefix Namespace and the
Name of Structure are populated automatically.

7.3 Primary Persistence (PP) Access Class
By now we modeled a Flexibility Option. Here the active area and the staging area are identical and
generated by the MDG. Since we want connect the data to the tables listed below, we need to take
care that the active area (primary persistence) of our application is being represented by these tables
and the inactive (staging) area still contains the generated tables.

Note
To create customer-specific reuse area, you currently require the support of SAP
consulting and development. See note 1444616.
That means for customer projects implementing a custom objects, changes may occur
with coming releases. Inside this guide we will nevertheless show how to implement the
connection.

7.3.1 Implementing the PP Access Class
A Reuse Area has to be defined and an access class has to be implemented and assigned; this
usually means considerable effort. Existing APIs may be invoked in the implementation. The
implementation rules have to be obeyed, i.e. the returned data must not depend on the users
authorization and involved objects must be lockable in the separate methods. Note that these are very
strong restrictions that are not easy to meet.
You need to create a class that implements the IF_USMD_PP_ACCESS interface (Access to Active
Area). See the appendix for coding.

Note
Use the generated structure for the mapping in VC_USMD006





7.3.2 Create and assign a reuse area
In Customizing for Master Data Governance choose General Settings -> Data Modeling -> Edit Data
Model.

3. Navigate to the Reuse Active Areas node for your data model
4. Click new entries

Figure 12 Reuse Areas

5. Enter SCUSTOM in the Reuse Area column, and Z_PP_SCUSTOM in the Access Class column,

Figure 13 Reuse Area Definition

6. Go back to the Data Model node and enter the Reuse Area.

Figure 14 Data model --> Reuse Area

7. Navigate to the Entity Types and specify the Reuse Area.




Figure 15 Entity Types - Reuse Area

8. Save and activate your data model.

Note
As already mentioned to activate the data model, you need to consult note 1444616.




7.4 UI configuration
To make the model we just created visible we need to create a UI configuration and we need to build
some portal content to make publish the application in the portal environment.

7.4.1 Change request
1. In Customizing for Master Data Governance, choose General Settings -> UI Modeling ->Edit UI
Configuration.


2. Click Create to create a new UI configuration.

Figure 16 UI Config Tool

3. Check the deep copy mode, rename the targets, and click Start Deep Copy

Figure 17 Deep Copy

4. Specify a package and a transport if the system asks you. After the copy is complete you will get
the following notification

Figure 18 Copy successful

5. Close the Floorplan Manager browser window and go to the UI Configuration window. Click
Refresh.




Figure 19 New Appl. Config created

6. Now you should be able to see your copy. Click Edit.

Figure 20 Edit new Appl. Config

7. The UI Configuration needs to be linked to the data model. Click Change

Figure 21 Change the UI Config

8. Navigate to the Application Parameters tab strip and specify the Data Model ZO

Figure 22 Application Parameters







9. Click Save and go back to the Structure tab strip. Click Go to Component Configuration

Figure 23 Component Configuration

10. Familiarize yourself with the modeling environment.

Figure 24 Component Configuration Screen

11. Decide what your next steps should be:
You need to model 3 tab strips, one for each entity type
So you need to model 3 main views. Each main view has a subview, requiring a UI
Building Block (UIBB)



You need to delete the automatically assigned dummy entity type.

12. Create the first tab strip for the entity type SBUSPART. First assign the entity type SBUSPART to
the configuration and then delete the dummy entity type that is assigned automatically

Figure 25 Add new entity type

13. Choose Entity Type SBUSPART as the first entity type and click Add


14. Delete the entity type Must be deleted.





15. Choose Delete.


16. In the Main View, edit the Main view Name. Do not change the subview.

Figure 26 Main View

17. Go to the UIBB node and type the Component, View, and Configuration Name.

Figure 27 FPM Details

18. Click Configure UIBB



19. On the dialog box that displays specify the description, package and transport



20. As we created the first UIBB for the entity type of storage and use type 1 we can click OK. This
is because leading entity type is mandatory and so it is hidden and does not need to be selected



21. To add a Group that puts the respective fields on the UI, choose Add Group.

Figure 28 Component Configuration

22. Specify a name for the group.



23. Click Configure Group







24. Move the fields you want to display from the Available Fields table to the Displayed Fields table.


Note
Note: As always the leading entity type is displayed with its dependent type 4 entities you see
here all attributes of the data model.

25. Change the Display Type of the description fields to Text View and save. Then navigate back
to the Object Instance Floorplan.


Note
Repeat this step for all description fields.

26. Add the other entities (SCUSTOM and STRAVELAG) in a similar way to the UI.
27. At the end you should see the following result.





Figure 29 Airline Business Partner


Figure 30 Flight Customers





Figure 31 Travel Agencies

7.4.2 Portal content
As described in the previous use cases the standard portal can be copied and the application
parameters have to be adjusted.

7.4.3 UI Business Add In
If the airline partner type is Flight Customer, you must implement BAdI: Adjust User Interface for
Single Processing if you want to ensure either of the following conditions are true:
The carrier fields are read only
The flight customer fields are read only.










Package information and transport requests


Result:





1. Set a filter for UI configuration.


2. Under Value 1, type the UI configuration ID and press Enter.



The result is shown below.





3. Implement the method MODIFY_VIEW + private message ADD_LINE_TO_MESSAGE using
the class modeler


Note
For the relevant coding, refer to the appendix.



7.5 Process Modeling
To put a domain such as our custom data model under governance, you must also model the process.
This involves creating a Change Requests Type and attaching a workflow attached to it. The Change
Request Type describes whether a change request deals with single objects only, which entity types
are allowed and so on. The workflow describes the steps within a workflow, for example, approval
steps and data enrichment steps.

7.5.1 Process Modeling - Change Request

1. In Customizing for Master Data Governance choose General Settings -> Process Modeling ->
Create Change Request Type.

2. Click New Entries and specify the new change request

Figure 32 Change Request Overview

3. Specify the change request header data

You use a standard workflow template WS75700027. For details, see the next chapter.





7.5.2 Process Modeling- Workflow

To keep it simple here we will use a standard workflow template WS75700027 (USMD_CREQUEST).
Check the definition in the Workflow Builder and get familiarized with definition itself.

1. In Customizing for Master Data Governance, choose General Settings -> Process Modeling ->
Other MDG Workflows -> Assign Processor to Workflow Step Number (Simple Workflow)


2. Click New Entries and create the assignments.

Figure 33 Workflow Step Assignment

3. To test your objects easily, assign your user name to each step.








7.6 Data Quality and Search: Validation and
derivations based on BRFplus
7.6.1 Check for Flights With a Customer Discount of 4% or
Less

1. In Customizing for Master Data Governance, choose General Settings -> Data Quality and
Search -> Define Validation and Derivation Rules.


2. Choose in the following screen the data model and choose Start.


3. Specify workbench requests and. and you will see the following




4. Expand the Trigger Function tree. Right-click the Check Entity Type node and select Create
Object Node -> Create Function.


5. Specify the function name ensuring that the naming convention <CHECK_><entity
typetype name> is followed, and choose Create and Navigate to Object.



6. In the Signature,tab page, click Add Existing Data Object.





7. Select the structure SCUSTOM.


8. In the Assigned Rulesets tab page, click Create Ruleset







9. Specify the details for the ruleset.



10. Click Enable Ruleset


The screenshot below shows the result.


11. Click Insert Rule -> Create





The screenshot below shows the result.


12. Choose No condition Assigned -> Use Value Range From -> Context Parameter.


Choose an Object with the name SDISCOUNT





13. Specify the condition as shown in the screenshot below.


14. To create an action that is associated with meeting the condition, choose Perform Action ->
Create.


15. To specify a message that is created when the condition is met, press Create and navigate To
Object..






16. Decide whether to select a predefined message (Refer to a message you created before) or just
enter a text

17. Choose Activate and then choose Back.





18. Activate the ruleset and select all subobjects in the following popup.


19. Activate the function,


20. Create a new function called CHECK_TRAVELAG





21. Specify the condition for example Country is equal to DE, FR or SP.






22. Now specify the derivation. In then part of the If statement choose Add -> Assign Value to
Context -> More Context Parameters.


23. Choose the context parameter.





24. Set the Currency value to EUR



25. Enable the rule, activate the ruleset, and activate the function,





...



8. Appendix
8.1 PP Access for custom objects
To access the relevant code sample, open the zip file Extending Content in SAP Master Data
Governance, Material Data - Code Samples.
8.2 UI BAdI implementation
To access the relevant code sample, open the zip file Extending Content in SAP Master Data
Governance, Material Data - Code Samples.




8.3 IDOC Enhancement
You want to integrate customer-specific fields in material master governance.
To add customer-specific fields to an existing material master table such as MARA or MARC,we
recommend you complete the following actions:
Follow the instructions outlined here
Refer to SAP note 44410.

Note
The field control settings are described in the previous use cases.

You want to enhance Idoc and ALE settings for ZZLOB
1. Create a customer segment, in this case segment Z1LOB, using transaction WE31.














2. Create an extension, in this case ZXLOB, using transaction WE30.




























3. In transaction WE82, link the extension to a logical message







4. In transaction WE30, check the extension.







5. In transaction CMOD, activate the MGV00001 SAP enhancement.

















6. Maintain user exit EXIT_SAPLMV01_002 (ALE outbound)












data: H_Z1LOB like Z1LOB.

if SEGMENT_NAME eq 'E1MARA1'.
move F_MARA-ZZLOB to H_Z1LOB-ZZLOB.
clear IDOC_DATA.
IDOC_DATA-SEGNAM = 'Z1LOB'.
IDOC_DATA-SDATA = H_Z1LOB.
append IDOC_DATA.
endif.

7. Maintain user exit EXIT_SAPLMV02_002 for ALE inbound communications.












data: H_Z1LOB like Z1LOB.

if F_CUST_SEGMENT-SEGNAM eq 'Z1LOB'.
H_Z1LOB = F_CUST_SEGMENT-SDATA.
if H_Z1LOB-ZZLOB = C_NODATA.
clear H_Z1LOB-ZZLOB.
else.
if H_Z1LOB-ZZLOB is initial.
RES_FIELDS-FELDNAME = 'MARA-ZZLOB'.
append RES_FIELDS.
endif.
endif.
F_MARA_UEB-ZZLOB = H_Z1LOB-ZZLOB.
endif.





Maintain table TBD62 (Tx bd52)






8. In transaction SE11 set indicator change document for the required object, in this case, ZZLOB





9. Configure the ALE Distribution
10. In transaction BD64, configure a Distribution Model.




11. In transaction BD82, generate a partner profile.







12. In transaction WE20 check and adjust the Partner Profile.













13. Test the replication of data.
14. In transacation BD10 send material.


15. In transaction WE05, access the Idoc list.





16. In transactions MM01, MM02, and MM03 enhance the online maintenance of material master.
17. Copy function group MGD1








18. Copy the subscreens. In this case there is no 2001 basic data: instead there is only general data






19. Edit the new subscreen Call screen painter, and modify the screen layout.





20. Add a field statement, and optionally add a custom module to carry out checks. In this example,
no such custom module is added.





Modify screen sequence (note: Customizing is client dependent)








21. Replace the standard subscreen with the modified subscreen.







22. Test your changes in transaction MM02.













23. Run transaction SE16 for the MARA table.







Authority required

















8.4 Useful links
BRFplus KW
How to-Enhance the Material Search EhP5
How to-Master Data Governance for Material: Set up Parallel Workflow Tasks with BRF+
How to-Master Data Governance for Material: BADI
USMD_SSW_DYNAMIC_AGENT_SELECT for More Flexible User Determination
How to-Master Data Governance for Material: BADI
USMD_SSW_RULE_CONTEXT_PREPARE to Enhance User Determination