main_extending content in mdgm new

304
SAP How-To Guide Extending Content in Master Data Governance Version 1.0 May 2010

Upload: noopur-rai

Post on 17-Nov-2015

28 views

Category:

Documents


5 download

DESCRIPTION

mdg

TRANSCRIPT

  • SAP

    How-To Guide

    Extending Content in Master Data

    Governance

    Version 1.0

    May 2010

  • Copyright 2011 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.

    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

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 1

    Table of Contents

    Contents

    1. Business Scenario............................................................................................................... 4

    2. Background Information ..................................................................................................... 5

    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.6 UI Entry Point .............................................................................................................. 19

    2.6.1 Portal .............................................................................................................. 19

    2.6.2 SAP GUI......................................................................................................... 21

    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 ..................................................................................................................... 48

    3.4.1 Field Control ................................................................................................... 48

    3.4.2 Field Control and Data Model ........................................................................ 52

    3.4.3 UI Configuration ............................................................................................. 52

    3.4.4 UI BAdI Implementation ................................................................................. 61

    3.5 Print Forms ................................................................................................................. 69

    3.6 Search ........................................................................................................................ 69

    3.7 Data Quality ................................................................................................................ 70

    3.7.1 Validation and Derivation ............................................................................... 70

    3.7.2 BAdI Implementation ...................................................................................... 85

    3.8 Process Model ............................................................................................................ 86

    3.8.1 Workflow ........................................................................................................ 86

    3.8.2 Workflow - BAdI Implementation ................................................................. 101

    3.8.3 Adjustments to Change Request Customizing ............................................ 102

    3.8.4 Process Model - BAdI Implementation ........................................................ 105

    3.9 Initial Load ................................................................................................................ 106

    3.10 Data Replication ....................................................................................................... 106

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 2

    3.10.1 Replication of Material ................................................................................. 106

    3.10.2 Replication of Supplier or Business Partner ................................................ 106

    3.10.3 BAdI Implementation .................................................................................... 106

    3.11 Key/ Value Mapping ................................................................................................. 107

    3.12 Test Run ................................................................................................................... 108

    4. Extend by existing table ................................................................................................. 114

    4.1 Data Model Requirements (Primary Persistence) .................................................... 116

    4.1.1 Table Extensions ......................................................................................... 116

    4.1.2 Structure Extensions .................................................................................... 116

    4.2 Data Model Requirements (Staging) ........................................................................ 117

    4.2.1 Data Model Extensions ................................................................................ 117

    4.2.2 Generated Tables ........................................................................................ 125

    4.2.3 Structure Extensions .................................................................................... 127

    4.3 SMT Mapping ........................................................................................................... 132

    4.3.1 SMT Mapping ............................................................................................... 132

    4.3.2 Mapping Customizing .................................................................................. 140

    4.4 UI Model ................................................................................................................... 144

    4.4.1 Field Control ................................................................................................. 144

    4.4.2 Field Control and Data Model ...................................................................... 145

    4.4.3 UI configuration ............................................................................................ 148

    4.4.4 UI BAdI Implementation ............................................................................... 157

    4.5 Print Forms ............................................................................................................... 158

    4.6 Search ...................................................................................................................... 158

    4.7 Data Quality .............................................................................................................. 159

    4.7.1 Validation and Derivation ............................................................................. 159

    4.7.2 BAdI Implementation .................................................................................... 159

    4.8 Process Model .......................................................................................................... 160

    4.8.1 Workflow ...................................................................................................... 160

    4.8.2 Workflow - BAdI Implementation ................................................................. 160

    4.8.3 Change Request/ Customizing Adjustments ............................................... 160

    4.8.4 Process Model - BAdI Implementation ........................................................ 160

    4.9 Initial Load ................................................................................................................ 161

    4.10 Data Replication ....................................................................................................... 161

    4.10.1 Replication of Material Master Data ............................................................. 161

    4.10.2 Replication of Supplier or Business Partner Master Data ........................... 161

    4.10.3 BAdI Implementation .................................................................................... 161

    4.11 Key/ Value Mapping ................................................................................................. 162

    4.12 Test Run ................................................................................................................... 163

    5. Extend by customer field of existing tables ................................................................. 173

    5.1 Data Model Requirements (Primary Persistence) .................................................... 174

    5.1.1 Table Extensions ......................................................................................... 174

    5.1.2 Structure Extensions .................................................................................... 175

    5.2 Data Model Requirements (Staging) ........................................................................ 178

    5.2.1 Data Model Extensions ................................................................................ 178

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 3

    5.2.2 Generated Tables ........................................................................................ 181

    5.2.3 Structure Extensions .................................................................................... 183

    5.3 SMT Mapping ........................................................................................................... 191

    5.3.1 SMT Mapping ............................................................................................... 191

    5.3.2 Mapping Customizing .................................................................................. 195

    5.4 UI Model ................................................................................................................... 196

    5.4.1 Field Control ................................................................................................. 196

    5.4.2 Field control and Data Model ....................................................................... 199

    5.4.3 UI configuration ............................................................................................ 199

    5.4.4 UI BAdI Implementation ............................................................................... 201

    5.5 Print Forms ............................................................................................................... 202

    5.6 Search ...................................................................................................................... 202

    5.7 Data Quality .............................................................................................................. 203

    5.7.1 Validation and Derivation ............................................................................. 203

    5.7.2 BAdI Implementation .................................................................................... 203

    5.8 Process Model .......................................................................................................... 204

    5.8.1 Workflow ...................................................................................................... 204

    5.8.2 Workflow - BAdI Implementation ................................................................. 204

    5.8.3 Change Request/ Customizing Adjustments ............................................... 204

    5.8.4 Process Model - BAdI Implementation ........................................................ 204

    5.9 Initial Load ................................................................................................................ 205

    5.10 Data Replication ....................................................................................................... 205

    5.10.1 Replication of Material ................................................................................. 205

    5.10.2 Replication of Supplier or Business Partner- ............................................... 205

    5.10.3 BAdI Implementation .................................................................................... 205

    5.11 Key Mapping and Value Mapping............................................................................. 206

    6. Extend by customer table or entity type ....................................................................... 207

    6.1 Data Model Requirements (Primary Persistence) .................................................... 208

    6.1.1 Table Extensions ......................................................................................... 208

    6.1.2 Structure Extensions .................................................................................... 208

    6.2 Data Model Requirements (Staging) ........................................................................ 208

    6.2.1 Data Model Extensions ................................................................................ 208

    7. Create own data model with customer object Airline Partner .................................... 217

    7.1 Data Model ............................................................................................................... 218

    7.1.1 MDG Data Model - Details ........................................................................... 218

    7.1.2 Example 1: Airline and Flights ..................................................................... 219

    7.1.3 Example 2: Flight customers ....................................................................... 225

    7.2 Data Modeling ........................................................................................................... 227

    7.2.1 Create Data Model ....................................................................................... 227

    7.2.2 Create Entity Types ..................................................................................... 227

    7.2.3 Create relationships ..................................................................................... 230

    7.2.4 Activate data model ..................................................................................... 232

    7.2.5 Generate data model specific structures ..................................................... 233

    7.3 Primary Persistence (PP) Access Class .................................................................. 234

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 4

    7.3.1 Implementing the PP Access Class ............................................................. 234

    7.3.2 Create and assign a reuse area .................................................................. 235

    7.4 UI configuration......................................................................................................... 237

    7.4.1 Change request ........................................................................................... 237

    7.4.2 Portal content ............................................................................................... 245

    7.4.3 UI Business Add In ...................................................................................... 245

    7.5 Process Modeling ..................................................................................................... 249

    7.5.1 Process Modeling - Change Request .......................................................... 249

    7.5.2 Process Modeling- Workflow ....................................................................... 250

    7.6 Data Quality and Search: Validation and derivations based on BRFplus ................ 252

    7.6.1 Check for Flights With a Customer Discount of 4% or Less ........................ 252

    8. Appendix .......................................................................................................................... 264

    8.1 PP Access for custom objects .................................................................................. 264

    8.2 UI BAdI implementation ............................................................................................ 264

    8.3 IDOC Enhancement ................................................................................................. 265

    8.4 Useful links ............................................................................................................... 299

    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.

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 5

    2. Background Information

    For all the described use cases, consider the following technical background of the solution proposed.

    Prerequisites for Using Master Data Governance

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 6

    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.

    SAPEVENT:DOCU_LINK/DS:DE.USMD_PP_DOMAIN

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 7

    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 ->

    Define Data Models

    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 ->

    Define Data Models

    2. Open the Entity Type sub view.

    3. Choose a Reuse Active Area in the Reuse Area field. Use entry help if necessary.

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 8

    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:

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 9

    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/.

    Entity type:

    Relationships:

    Generated Table:

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 10

    Field Name

    If the relationship type is Referencing, the syntax used to derive a field name is as follows:

    /1MD/.

    Entity type:

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 11

    Relationships

    Generated Table:

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 12

    Relationships:

    Generated Table:

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 13

    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.

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 14

    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.

    SAPEVENT:DOCU_LINK/DS:DE.USMD_USAGE_TYPESAPEVENT:DOCU_LINK/DS:DE.USMD_RELTYPE

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 15

    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.

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 16

    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.

    SAPEVENT:DOCU_LINK/DS:GLOS.89B12943341FA04591FCEFD81ABB2791

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 17

    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:

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 18

    &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.

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 19

    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.

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 20

    The System parameter represents the system used in your environment.

    The Change Material screen is shown below.

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 21

    2.6.2 SAP GUI

    You assign the following roles to the business client:

    SAP_MDGM

    SAP_MDGS

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 22

    2.6.3 NetWeaver Business Client

    You assign the following roles to the NetWeaver business client:

    SAP_MDGM

    SAP_MDGS

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 23

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 24

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 25

    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).

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 26

    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.

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 27

    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.

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 28

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 29

    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.

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 30

    2. Double click Attributes in the dialog structure

    3. Add new attributes corresponding to the MARA fields.

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 31

    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.

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 32

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

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 33

    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

    SAPEVENT:DOCU_LINK/DS:GLOS.43FD33517B2E0B4FE10000000A114B08SAPEVENT:DOCU_LINK/DS:GLOS.47B96C904A74353DE10000000A421391

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 34

    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.

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 35

    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

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 36

    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.

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 37

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 38

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 39

    3.2.3.2 Generate structures (structures in customer namespace)

    Not applicable to this scenario.

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 40

    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.

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 41

    Select your package

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

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 42

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 43

    Note

    Map the two new attributes.

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 44

    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.

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 45

    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.

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 46

    In this use case, you can keep the standard settings because neither the Mapping ID nor the Entity

    Type was changed.

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 47

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 48

    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.

    SAPEVENT:DOCU_LINK/DS:DE.FGRUPSAPEVENT:DOCU_LINK/DS:DE.FGRUP

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 49

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 50

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 51

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 52

    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.

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 53

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 54

    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.

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 55

    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.

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 56

    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.

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 57

    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.

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 58

    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.

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 59

    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.

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 60

    Click save. The UI configuration is complete.

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 61

    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.

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 62

    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.

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 63

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

    Switch to your package.

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 64

    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.

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 65

    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:

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 66

    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.

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 67

    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.

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 68

    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.

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 69

    3.5 Print Forms

    Not covered in this version of the guide.

    3.6 Search

    Not covered in this version of the guide.

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 70

    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.

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 71

    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.

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 72

    2. In the Node DERIVE_MATERIAL_ZZMS dialog box, name the node using the following

    notation: DERIVE_

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 73

    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.

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 74

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 75

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

    ruleset.

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 76

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

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 77

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 78

    7. Enable the rule and the ruleset.

    The result is shown in the screenshot below.

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 79

    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.

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 80

    3. In the Node CHECK_MATERIAL dialog box, give the node a Name, making sure you use the

    following notation: CHECK_

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

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 81

    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.

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 82

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

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

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 83

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

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 84

    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.

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 85

    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:

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 86

    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.

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 87

    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

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 88

    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: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 89

    Example

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

    Example decision tables are shown in the graphic below.

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 90

    3.8.1.1 Extend Rules Based Workflow

    You can find details regarding extending the Rule Based Workflow in separate documents stored in

    the BSO Suite Core - Sydney Project collaboration room. Please use the path below or select the links

    to directly access the folders.

    Path for additional content

    BSO Suite Core - Sydney Project > 20 Architecture > 60 Extensibility > 10 Results >

    Additional Content > Material

    Here you can find information regarding Dynamic Agents:

    https://portal.wdf.sap.corp/irj/go/km/docs/guid/f016ef88-3d10-2e10-6b9c-ae0354798292

    Detailed instructions on how to use the Parallel Workflow:

    https://portal.wdf.sap.corp/irj/go/km/docs/guid/d0fdfa88-3d10-2e10-71a0-c3d373642dff

    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.

    https://portal.wdf.sap.corp/irj/go/km/docs/guid/f016ef88-3d10-2e10-6b9c-ae0354798292https://portal.wdf.sap.corp/irj/go/km/docs/guid/d0fdfa88-3d10-2e10-71a0-c3d373642dff

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 91

    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

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 92

    You introduce a dedicated step to check the new attributes.

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 93

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

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 94

    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

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 95

    Note

    You must adjust the APPStep numbers in your workflow accordingly.

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 96

    Note

    You can analyze a workflow in transaction SWI6.

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 97

    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.

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 98

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 99

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

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 100

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

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 101

    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

    SAPEVENT:DOCU_LINK/DS:DE.USMD_CREQUEST_APPSTEP

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 102

    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.

    SAPEVENT:DOCU_LINK/DS:SIMG.FMDM_USMD130CSAPEVENT:DOCU_LINK/DS:DE.USMD_SINGLE_OBJSAPEVENT:DOCU_LINK/DS:DE.USMD_ENTITY_MAIN

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 103

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 104

    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.

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 105

    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:

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 106

    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.

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 107

    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.

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 108

    3.12 Test Run

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 109

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 110

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 111

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 112

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 113

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 114

    4. Extend by existing table

    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

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 115

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

    the UI.

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 116

    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.

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 117

    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.

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 118

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 119

    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.

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 120

    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.

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 121

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

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 122

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

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 123

    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.

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 124

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 125

    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.

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 126

    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.

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 127

    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.

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 128

    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.

    SAPEVENT:DOCU_LINK/DS:GLOS.43FD33517B2E0B4FE10000000A114B08

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 129

    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.

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 130

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

    structure.

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 131

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 132

    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.

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 133

    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

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 134

    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

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 135

    4. Define the change structure keys. Select the mapping step and choose Change Structure Keys.

    When the dialog box is displayed, choose Add.

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 136

    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

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 137

    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).

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 138

    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).

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 139

    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.

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 140

    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.

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 141

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 142

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 143

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 144

    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.

    SAPEVENT:DOCU_LINK/DS:DE.FGRUP

  • Example: Extension of Preconfigured Content in Master Data Governance for Material

    March 2011 145

    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 su