Uploaded by office

MDG-F Extensibility Ways of Extending the 0G Data Model

advertisement
MDG-F Extensibility: Ways of
Extending the 0G Data Model
Applies to:
SAP MDG-F running on SAP ERP 6 EhP6. For more information, visit the Master Data Management
homepage. (http://www.sdn.sap.com/irj/sdn/master-data-governance)
Abstract
In this article we look at two different approaches for extending the 0G data model of MDG-F. In the first
section, we extend the 0G model directly. In the second section, we extend a copy of 0G. Finally, we
compare the advantages and disadvantages of the two approaches.
SAP COMMUNITY NETWORK
© 2011 SAP AG
SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
1
MDG-F Extensibility: Ways of Extending the 0G Data Model
Table of Contents
Executive Summary ............................................................................................................................................ 3
Extend data model by changing 0G ................................................................................................................... 4
Edit the Data Model......................................................................................................................................... 4
Generate Data Model Specific Structures 0G ................................................................................................. 4
Extend the User Interface Configuration ......................................................................................................... 5
Validations ....................................................................................................................................................... 6
Creating Validations ..................................................................................................................................................... 6
Replication ...................................................................................................................................................... 7
SMT-mapping .............................................................................................................................................................. 7
Extend data model by copying 0G ...................................................................................................................... 9
Data Model ...................................................................................................................................................... 9
Copy Data Model 0G .................................................................................................................................................... 9
Generate Data Model Specific Structures 0G............................................................................................................... 9
Adjust Search Help .................................................................................................................................................... 10
User Interface ................................................................................................................................................ 11
Copy UI configuration ................................................................................................................................................ 11
Validations ..................................................................................................................................................... 15
Creating Validations ................................................................................................................................................... 15
Reuse of standard validations .................................................................................................................................... 21
Replication .................................................................................................................................................... 22
Filter Objects .............................................................................................................................................................. 22
SMT Mapping per Entity Type .................................................................................................................................... 23
Outbound Implementations ........................................................................................................................................ 23
Related Content ................................................................................................................................................ 24
Copyright........................................................................................................................................................... 25
SAP COMMUNITY NETWORK
© 2012 SAP AG
SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
2
MDG-F Extensibility: Ways of Extending the 0G Data Model
Executive Summary
This document compares and describes two techniques for extending the MDG-F data model, 0G. It is
significantly more efficient to extend the 0G data model directly than to copy it and extend the copy (see table
below). However, sometimes, you must extend a copy (for example, when you are not allowed to use
editions)
Estimated Efforts
Extend 0G
Extend copy of 0G
Data Model
Copy Data Model 0G
Generate Data Model Specific Structures
Adjust Search Help
o
+
o
+
+++
+++
User Interface
Extend UI configuration
+
++
Validations
Creating Validations
Reuse of standard validations
+
o
+
+++
Replication
Filter Objects
SMT-mapping per entity type
Outbound implementation
o
+
o
++
+++
+
o
= no effort or not applicable
+
= small effort
++
= medium effort
+++
= high effort
SAP COMMUNITY NETWORK
© 2012 SAP AG
SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
3
MDG-F Extensibility: Ways of Extending the 0G Data Model
Extend data model by changing 0G
Edit the Data Model
1. To open Customizing for Master Data Governance, run transaction MDGIMG.
2. Open General Settings -> Data Modeling -> Edit Data Model.
Master Data Governance -> General Settings -> Data Modeling ->
3. Make the necessary adjustments to the data model 0G and activate the data model.
Generate Data Model Specific Structures 0G
1. To open Customizing for Master Data Governance, run transaction MDGIMG.
2. Open General Settings -> Data Modeling -> Edit Data Model -> Generate Data Model-Specific
Structures.
3. Select the 0G Data Model, open the Structures view, and choose the Generate Structures
pushbutton.
SAP COMMUNITY NETWORK
© 2012 SAP AG
SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
4
MDG-F Extensibility: Ways of Extending the 0G Data Model
Extend the User Interface Configuration
At this stage you have to make a decision whether you want to extend the standard UI configuration or
create a copy. If you are only going to make small changes to the UI configuration (e.g. adding a field) you
can follow the steps described below to extend the standard configuration. In case you need to make
significant adjustments to the UI configuration it is recommended to modify a copy (follow steps in section
Copy UI configuration on page 11).
1. Run transaction SE80.
2. Open the WDR_CFGE_EDITOR Web Dynpro Component.
Start the customize_component Web Dynpro Application.
3. To customize the Web Dynpro component, complete the following entries and press the New
pushbutton:
 Component Name: FPM_OIF_COMPONENT
 Configuration ID: 0GMDG_0G_FINANCIALS
4. Enter a description.
5. Assign a transport request.
6. If you have extended the data model and you want to display additional fields on the user interface, you
can now continue to make the necessary adjustments.
SAP COMMUNITY NETWORK
© 2012 SAP AG
SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
5
MDG-F Extensibility: Ways of Extending the 0G Data Model
Note
If you want an overview of the UI Customizing settings or if you need to delete UI Customizing settings, refer to the
following Web Dynpro applications: WD_ANALYZE_CONFIG_USER (user perspective),
WD_ANALYZE_CONFIG_COMP (component perspective), and WD_ANALYZE_CONFIG_APPL (application
perspective).
Note
UI customizing is client specific.
7. To change the user interface for processing an individual change request for a custom object in MDG-F,
you can use Enhancement Spot USMD_UI_EVENT2. Proceed as follows:
a. To open Customizing for Master Data Governance, run transaction MDGIMG.
b. Open General Settings -> UI Modeling -> Edit Data Model -> Business Add-Ins -> BAdI:
Adjust User Interface for Single Processing.
Validations
Creating Validations
Enhancement Spot USMD_RULE_SERVICE enables you to create customer specific validations.
To access this BAdI, go to General Settings -> UI Modeling -> Edit Data Model -> Business Add-Ins ->
BAdI: Define Validations/Derivations.
SAP COMMUNITY NETWORK
© 2012 SAP AG
SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
6
MDG-F Extensibility: Ways of Extending the 0G Data Model
Note
You only need to implement anything here if you want to replace the existing validations or if you have new entity
types where no standard validations are available.
Replication
SMT-mapping
If you have extended the 0G data model, it is important to adapt the SMT mapping to include the extensions.
You can maintain SMT mapping in Customizing for Master Data Governance (transaction MDGIMG) under
Master Data Governance -> General Settings -> Data Modeling -> Create and Edit Mappings -> Create
and Edit Mappings -> Extend Mappings.
If you added an extra field to an existing entity type, find the mapping for the entity type and the message
type (IDOC SOA) and include the additional field in the mapping.
Standard SMT mappings for IDOC communication are shown below.
SAP COMMUNITY NETWORK
© 2012 SAP AG
SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
7
MDG-F Extensibility: Ways of Extending the 0G Data Model
Standard SMT mappings for service communication are shown below.
SAP COMMUNITY NETWORK
© 2012 SAP AG
SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
8
MDG-F Extensibility: Ways of Extending the 0G Data Model
Extend data model by copying 0G
Data Model
Copy Data Model 0G
Start transaction MDGIMG and navigate to: Master Data Governance -> General Settings -> Data
Modeling -> Edit Data Model.
In edit mode, select data model 0G and click the “copy as” button. Enter the name YL for the new data
model, press enter, and when prompted choose the Copy All pushbutton.
Press Enter for the following steps until all elements of data model 0G have been copied.
Finalize the process by saving all changes of the customizing activity and do not forget to activate the data
model copy. The activation process may take some time.
Now you can start making any necessary adjustments to the copy of the data model.
Generate Data Model Specific Structures 0G
Start transaction MDGIMG and navigate to: Master Data Governance -> General Settings -> Data
Modeling -> Generate Data Model-Specific Structures.
SAP COMMUNITY NETWORK
© 2012 SAP AG
SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
9
MDG-F Extensibility: Ways of Extending the 0G Data Model
With the new data model selected, click on Structures node in the left-hand panel and insert new entries for
structures of the entity types belonging to the new data model. Because the new data model is a copy of 0G,
you can create all entries similar to those belonging to data model 0G.
It might be easier to create the entries if you display the structures from the 0G data model in a separate
window.
Make sure that you enter an allowed namespace (for example ZMDG) in the Prefix Namespace field.
Note
You can find the namespaces in the TRNSPACET database table. SAP Note 105132 explains how to reserve a new
namespace. Otherwise, you can use namespaces without the symbol before or after the namespace name (for
example, ZMDG)
Adjust Search Help
After creating a copy of the data model, the search help for attributes does not return any result. Only search
helps using data elements and domains continue to work. To resolve this issue, see OSS Message
2197966:
SAP COMMUNITY NETWORK
© 2012 SAP AG
SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
10
MDG-F Extensibility: Ways of Extending the 0G Data Model
User Interface
Copy UI configuration
You use a copy of the standard UI Configuration MDG_0G_FINANCIALS. You create the copy using the
option Deep Copy. The copy can be saved using the technical name ZGC_MDG_0G_FINANCIALS.
Start transaction MDGIMG and navigate to: Master Data Governance -> General Settings -> UI Modeling > Edit UI Configuration.
Select UI configuration MDG_0G_FINANCIALS and choose Create with Template.
Next you change the names for the Target Configuration ID (add prefix ZG and remove the numbers at the
end).
SAP COMMUNITY NETWORK
© 2012 SAP AG
SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
11
MDG-F Extensibility: Ways of Extending the 0G Data Model
Choose the Start Deep-Copy pushbutton. When requested assign a transport package.
Start the Edit UI Configuration activity. Choose the Edit pushbutton.
Choose the Change pushbutton.
Select the Application Parameters tab and change the Data Model to YL.
If you have extended the data model and would like to display additional fields on the user interface you can
now continue to make the necessary adjustments (button Go to Component Configuration).
SAP COMMUNITY NETWORK
© 2012 SAP AG
SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
12
MDG-F Extensibility: Ways of Extending the 0G Data Model
To change the user interface for processing an individual change request for a custom object in MDG-F you
can use Enhancement Spot USMD_UI_EVENT2. Start transaction MDGIMG and navigate to: Master Data
Governance -> General Settings -> UI Modeling -> Business Add-Ins -> BAdI :Adjust User Interface
for Single Processing.
SAP COMMUNITY NETWORK
© 2012 SAP AG
SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
13
MDG-F Extensibility: Ways of Extending the 0G Data Model
SAP COMMUNITY NETWORK
© 2012 SAP AG
SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
14
MDG-F Extensibility: Ways of Extending the 0G Data Model
Validations
Creating Validations
Enhancement Spot USMD_RULE_SERVICE can be used for customer specific validations.
The Enhancement Spot contains the BAdI-Definition USMD_RULE_SERVICE. This BAdI must be
implemented for the validation of entity types.
This section explains how to create the BAdI-Implementation for the validation of profit center. You must
repeat these steps must be all other entity types that you use.
Note: You must decide whether or not to use a specific validation in addition to standard validations. If the
standard validations are sufficient, you just need to create a BAdI implementation in the customer
namespace that references the standard class, and has the filter set to the new data model.
Start transaction SE19
The Enhancement Spot contains the BAdI-Definition USMD_RULE_SERVICE. This BAdI must be
implemented for the validation of entity types.
The following steps explain how the BAdI-Implementation is being created, first only for the validation of
profit center. These steps must be repeated for all other used entity types.
Note: It hast to be distinguished if a specific validation needs to be created in addition to the
standard validations, or if only the standard validation should be used. In the first case the
following steps should be used. For the second case it would be sufficient to create a new BAdI
implementation in the customer namespace that references the standard class and only has the
filter set to the new data model.
SAP COMMUNITY NETWORK
© 2012 SAP AG
SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
15
MDG-F Extensibility: Ways of Extending the 0G Data Model
Note
You must choose between using the standard validations exclusively and supplementing the standard validations
with your own validations. If you want to use the standard validations only, you can create a new BAdI
implementation in the customer namespace that references the standard class and only has the filter set to the
new data model.
Start transaction SE19.
SAP COMMUNITY NETWORK
© 2012 SAP AG
SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
16
MDG-F Extensibility: Ways of Extending the 0G Data Model
Or use the corresponding Customizing entry.
SAP COMMUNITY NETWORK
© 2012 SAP AG
SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
17
MDG-F Extensibility: Ways of Extending the 0G Data Model
After you specify an implementation name and a short description, additional entries are required. For
example:



BAdI-Implementation: Z_..._USMDZ7_RS_CCTR
Implementation Class: ZCL_USMDZ7_RS_CCTR
BAdI-Definition: USMD_RULE_SERVICE
After you create the BAdI implementation, you must define the filter criteria.
SAP COMMUNITY NETWORK
© 2012 SAP AG
SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
18
MDG-F Extensibility: Ways of Extending the 0G Data Model
Finally, you must activate the BAdI implementation.
You can activate or deactivate specific implementations in Customizing for Master Data Governance
(transaction MDGIMG) under General Settings -> Data Quality and Search -> BAdI: Definition
Validations/Derivations.
SAP COMMUNITY NETWORK
© 2012 SAP AG
SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
19
MDG-F Extensibility: Ways of Extending the 0G Data Model
After you create the BAdI-implementation and the implementing class (for example ZM_CL_IMPL_RS_PCTR
or ZCL_USMDZ7_RS_CCTR) use must create the implementation of the individual methods. Use transaction
SE80:
Note: Whenever the method CHECK_REQUEST is being called at runtime the current edition is passed as a parameter.
Because the edition is persisted in table USMD020C, the validity can be read directly from the table.
SAP COMMUNITY NETWORK
© 2012 SAP AG
SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
20
MDG-F Extensibility: Ways of Extending the 0G Data Model
Reuse of standard validations
Open the validation class created in the previous steps (for example ZCL_USMDZ7_RS_CCTR)
Create an attribute that references the standard-validation class of the entity type.
SAP COMMUNITY NETWORK
© 2012 SAP AG
SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
21
MDG-F Extensibility: Ways of Extending the 0G Data Model
The methods of the customer class must call the methods of the standard class. For example, each method
of the customer class must call the CHECK_REQUEST method
Replication
You must adapt each entity type.
Filter Objects
You define filter objects in the Customizing activity Define Filter Objects.
Start transaction MDGIMG and navigate to: Master Data Governance -> General Settings -> Data
Replication -> Enhance Default Settings for Outbound Implementations -> Define Filter Objects
For every entity type in the YL data model (for example, cost center and hierarchy), you must assign a filter
object.
Examples of assignments are as follows:


You assign the CCTR entity type from the YL data model to the F_COCTR filter object.
You assign the CCTRH entity type from the YL data model to the F_CGHRY filter object.
SAP COMMUNITY NETWORK
© 2012 SAP AG
SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
22
MDG-F Extensibility: Ways of Extending the 0G Data Model
SMT Mapping per Entity Type
The SMT mapping is maintained in the MDG-customizing activity (transaction MDGIMG) Master Data
Governance -> General Settings -> Data Modeling -> Create and Edit Mappings -> Create and Edit
Mappings for the data model YL.
To create the necessary mappings for the newly created YL data model, you must copy and adapt existing
mappings for each entity type.
So for the example of the cost center, you copy the USMD_IDOC_0G_COSMAS mapping template to
ZUSMD_YL_IDOC_CCTR and you copy the source structure in all places from /MDG/_SX_0G_CCTR to
/ZMDG/_SX_YL_CCTR.
For all fields in the transformations, you ensure the mapping is identical to the original mapping (for all
mapping steps).
Outbound Implementations
You assign mapping for the outbound implementation has in Customizing for Master Data Governance
(transaction MDGIMG) under General Settings -> Data Replication -> Enhance Default Settings for
Outbound Implementations -> Define Outbound Implementations.
Here are the steps required to assign relevant mappings to the cost center. You must repeat the same steps
for all entity types.
1. Choose Outbound Implementation 1102 (Cost Center IDOC)
2. Open the Assign Entity Type and SMT Mapping view.
Create a new entry with the following attributes:
 Entity Type: CCTR
 SMT Mapping: ZUSMD_YL_IDOC_CCTR
 Data Model: YL
3. Choose Outbound Implementation 1112 (Cost Center Group Hierarchy IDOC)
4. Open the Assign Entity Type and SMT Mapping view.
Create new entries with the following attributes:


Entity Type: CCTRG
 SMT Mapping: ZUSMD_ YL_ IDOC_CCTRG
 Data Model: YL
Entity type: CCTRH
 SMT Mapping: ZUSMD_ YL_ IDOC_CCTRG
 Data Model: YL
SAP COMMUNITY NETWORK
© 2012 SAP AG
SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
23
MDG-F Extensibility: Ways of Extending the 0G Data Model
Related Content
SDN Master Data Governance
Extensibility Center
SAP COMMUNITY NETWORK
© 2012 SAP AG
SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
24
MDG-F Extensibility: Ways of Extending the 0G Data Model
Copyright
© Copyright 2012 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, Excel, Outlook, and PowerPoint are registered trademarks of Microsoft Corporation.
IBM, DB2, DB2 Universal Database, System i, System i5, System p, System p5, System x, System z, System z10, System z9, z10, z9,
iSeries, pSeries, xSeries, zSeries, eServer, z/VM, z/OS, i5/OS, S/390, OS/390, OS/400, AS/400, S/390 Parallel Enterprise Server,
PowerVM, Power Architecture, POWER6+, POWER6, POWER5+, POWER5, POWER, OpenPower, PowerPC, BatchPipes,
BladeCenter, System Storage, GPFS, HACMP, RETAIN, DB2 Connect, RACF, Redbooks, OS/2, Parallel Sysplex, MVS/ESA, AIX,
Intelligent Miner, WebSphere, Netfinity, Tivoli and Informix are trademarks or registered trademarks of IBM Corporation.
Linux is the registered trademark of Linus Torvalds in the U.S. and other countries.
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.
SAP, R/3, SAP NetWeaver, Duet, PartnerEdge, ByDesign, SAP Business ByDesign, 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 other countries.
Business Objects and the Business Objects logo, BusinessObjects, Crystal Reports, Crystal Decisions, Web Intelligence, Xcelsius, and
other Business Objects products and services mentioned herein as well as their respective logos are trademarks or registered
trademarks of Business Objects S.A. in the United States and in other countries. Business Objects is an SAP company.
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.
SAP COMMUNITY NETWORK
© 2012 SAP AG
SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
25
Download