0 ratings0% found this document useful (0 votes) 703 views20 pagesConfigure Data Replication (MDG) Custom Objects (Flex Option)
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here.
Available Formats
Download as PDF or read online on Scribd
PUBLIC
How-To Configure Data Replication for MDG
Custom Objects (Flex Option)
Applicable Releases:
From MDG 7.0 and from SAP S/4HANA 1511
Version 2.0
July 2023Document History
Document
Version Description
1.0 First official release of this guide (September 2011)
2.0 Change layout and minor adjustments (July 2023)41 BUSINESS SCENARIO.
2 BACKGROUND INFORMATION..........
3 STEP-BY-STEP PROCEDURE.
3.4 Create the ZZ Data Model Using the Flex Option
3.2 Enable Key Mapping (Optional Step)..
3.3 Create a Business Object Type.
3.4 Define Object Nodes.
3.5 Create and Assign Object Identifier Types
3.6 Generate Structures
3.7 Assign a Key Structure to Object Identifier Type
3.8 Assign a Data Model to a Business Object Type
3.9 Create an Outbound Interfact
3.10 Create an Outbound Implementation ....nssnnnnnmnmnnnnnnnnnnnnnnnnnnnmnnnnnmnnnne 13
3.41. Create a Filter Object.
3.12 Assign a Filter to a Business Object Type or an Outbound Implementation...
3.13. Create a Replication Model...
3.14 Create a Filter.
3.15 Replicate Dati
4 ADDITIONAL INFORMATION ..
19
44 Further Reading snnmnnmnnnnnnnnnnninnnnnnnnnnnnnnnninnnnnnmnnnnnnnnnnnaene 19
4.1.1 Information on SAP MDG on SAP S/4HANA, 19
4.1.2 SAP Roadmap Explorer 19
4.1.3 Related Information fo fennel fo 19
3/201 Business Scenario
SAP Master Data Governance (MDG) provides business processes to find, create, change, and mark master
data for deletion. It supports the governance of master data in a central hub and the distribution to connected
operational and business intelligence systems.
‘The processes are workflow-driven and can include several approval and revision phases, and the
collaboration of all users participating in the master data maintenance.
MDG offers change request (CR)-based processing of master data with integrated workflow, staging,
approval, activation, and cistrbution
This how-to guide describes the configuration of data replication for your customer speeific data model flex
ently types).
2 Background Information
MDG offers the following options to store active master data (data that has been approved):
‘+ The reuse option used by MDG-M and MDG-S stores data in the tables such as NARA or LFA2.
‘+The flex option used by MDG-F and MDG for Custom Objects stores data in generated tables.
In both options, inactive master data (data that has not yet been approved) is stored in the generated tables.
Data that the MDG system replicates to target systems is always active data. The MDG system takes the
active data from the SAP ERP tables or from the generated tables depending on the option n use (reuse
option or flex option)
MDG applications such as MDG-M, MDG-S, and MDG-F include standard implementations of the Date
Replication Framework (DRF) that read the data and cend the messages to the target system. The standard
implementations support key mapping and value mapping.
‘SAP also delivers generic implementations that you can configure to replicate data from customer- specific
applications (MDG for Custom Objects). This guide describes the necessary configuration steps.
You can perform most configuration tasks in Customizing for Master Data Governance under SAP
Reference IMG > Cross Application Components > Processes end Tools for Enterprise Applications >
Master Data Governance.
‘Additionally, you can use the following transactions:
NOGIMG ~ IMG Master Data Governance
DRFIMG ~ IMG Data Replication Framework
TDMING ~ IMG Key Mapping
‘MING — IMG Value Mapping
3 Step-by-Step Procedure
3.1 Create the ZZ Data Model Using the Flex Option
‘This example involves a simple definition of the Data Model that includes two Entity Types and a
relationship. The example covers a small part of the SFLIGHT scenario, a scenario that is often used in SAP
training materials.
‘The assumption behind the example is that you are building @ custom MDG application for creating and
governing data about airines.
In Customizing for Master Data Governance (transaction HDGING), choose General Settings > Data Modeling
> Edit Data Model. In the Entity Types view, edit the CARR Entity Type for Carrier (Airline) as shown below.
4/20PG Newentles 1 Bb BBB ab t vewlmta Model veualte actratecData Node
Gaerany Types
+ Datwetee
~ Gera ates Sot Cuanyeable sie 1D5e 8. ¥" no Eaten
+ Biseracn armbutes tog a
Figure 1 - The Entity Types view of the General Settings > Data Modeling > Edit Data Model Customizing
activity
rr
= fe
re
oR oo
Terese [Ra Sma fe acto eel et —
Clngoprtepnde To
toe tentaa E]
acum Tex Lert [)
Figure 2 - The cage Entity Type
Specify an attribute URL for the CARR Entity Type.
tention Bb 6 EB DB (BE teat Yur natal ale Mal
= Clery tees
Sata
Slasres chest pe
+ Fg tee Heer
= Gera ates
Boerne en
(Cenc
(Charme mse
tito fata tore ented
mm w
Figure 3- The Attributes view
In the Entity Types view, edit the CURR Entity Type for Currency as shown below.
5/204 lovee
ety (Hera chy 6 Net Eon Dependent
ey assert Nay Gert Be Changed Nb Iearal ay Rarer
Clennage Dependant Tes
ong Tert:tenath |
edum Tex: Length
Shot Tart Length [|
Figure 4 - The CURR Ent
iy Type
In the Relationships view, specify the relationship between CARR and CURR.
petawotei (2)
[Femnttyipe [ciate Tey Type Rein. Type _Crny Ota rt
SR ee ee |
After you generate the Data Model, you can use the USMD_DATA_MODEL report to identify the tables
generated for your Data Model. You can access this report from transaction SE38.
(@) SFM) EF. Sle 1 es) Os)
Bggmrsncrer Suanpe Lagat tare phyzaliame
Figure 5 - Generated tables shown after running the USMD_DATA_MODEL report from transaction SE38
3.2 Enable Key Mapping (Optional Step)
This stop is required if you want to implement key mapping.
+B @ atonietuos choc wrx aera
+7 Gee eg cares x US
Bo
Figure 6 - Transaction IDMIMG: Define a Mapping Context for UKMS -> Define Mapping Contexts
6/20The system generates a set of tables based on standard tables. These tables should have a prefix of
2Z to identify them as customer specific objects.
The system requires confirmation of tables to be copied.
3.3 Create a Business Object Type
Data replication always refers to business object types, which are based on data models. You can define
business object types in the Define Business Objects customizing activity or in the Define Business Objects
Available for Replication customizing activity
= ker wanirg
By owalineman
By © castanze pres Obects fe ay Mapa
ohne cay appr centere
Figure 7 - Transaction IDMIMG
+ saan
FB tte eerie eee rE
toto tener wore
$B toromwes cree stg:
trast
Figure 6 - Transaction DRFIMG
ie ein, 9
‘Bus. Ob}. Type Description “Constant Name Projecton Man OT |b. 1D Type Key St. Acc.
usr SUGHT (Flex Option) 22S¥LIGHT Oo
For key mapping, you must assign each Business Object Type to a Main Context. In this example the 27SF
Business Object Type is assigned to the ZZSFLIGHT Main Context.
1 BO Gisene tres cosets ety Mase
+ B® dome tunres ome
B® comecopet enters
1 sssgnsersouces to chet enters
cemecrie nae
cy
WEB
7/20[li nell Co
80 Type [Descripton “Man Context “secondary Mapping Context
|jaeese SSFLIGHT (Flex Option) _ZZSFLIGHT
3.4 Define Object Nodes
Define the 225F Object Node Type for the 225F airline code.
7 sep ana
+B) owe roman
1 EE @ Gitar tren Ott Ce Meer
= three es arpra Crtnt
BD Cet tres bees
+ cote ppc
pam =
You can use the Define Object Identifiers customizing activity if there are different Object Identifier Types
that must map to each other (for example, if a GUID must map to @ number). An example used for the
business partner is shown below.
(eer come i ———
Figure 9 - Transaction [DMIMG: Enhance Key Mapping Content -> Define Object identifiers
3.5 Create and Assign Object Identifier Types
Create the 22SF Object Identifier Type. When doing this, specify the 225 Object Node Type defined earlier.
komen
Be Overal bsrstion
© captors Surens Coots fer Kes Mazora
+ Barone Meping Content
+ BB © dots eusressChicts
“Bo
(i
| Seber eevee omer ees 8 et
Next, assign the 27SF Object Identifier Type to the 2ZSF Business Object Type.
keesepora
Bord iter
+BY ® castor Bess obec fer ey Manni
+ erharcs iy mpeg contert
BS
ree
3.6 Generate Structures
Create a package in SEBO.
8/20Generate data model-specific structures for the CARR Entity Type.
118 @ cet om te ce doves ome Te
1. bercuner rset Aare
as, Sn
(SOS ial
Data Model {zz]
Structures
Entity Type Where Used |Pref/Namespace Name of Structure
CARR. DRE Structures vo ZDRE_CARR
Figure 10- Elements of the Generate Data Model-specifc Structures Customizing activity
Ty, [Message Text
(iw [Data mociel ZZ: Structure ZXM_S_ZZ_ZDRF_CARR activated
Figure 11 - Confirmation message after the activation of data model-specific structure
Do the same for entity type CURR.
Use transaction S13 to check the structures for the 2xx_S2Z_ZDRF_CARR data type.
ABAP Dictionary: Initial Screen
a) eee oo
Costas te
Ose —
sie tee ons fl
or
over ————
a
tock ope: |
a) Be) Cee)
Figure 12 Searching for date model-specific structure using transaction SE11
Whenever MDG generates these structures, it activates them.
9/20Dictionary: Display Structure
9 VRE At SABO M tertony tpndsncue
Tae Tyee ah Pec. Sha Dasoeon
3.7 Assign a Key Structure to Object Identifier Types
Start transaction DRFIMG and navigate to Data Replication > Enhance Default Settings for Outbound
Implementations > Define Business Objects and Object Identifiers. Execute customizing activity Assign Key
Structures to Object identifiers.
‘sgn Key Structures to objact enstars
Ouect Type [peserton of Object 1D Type Key Strucure [Delmar BO Typ! —_Deserbton oF ausmass hyeet THe
er SFUIGHT - Ate Code 20 S12 SORE COR, SF SFLGHT (Fex Opton)
3.8 Assign a Data Model to a Business Object Type
Start transaction MDGIMG and navigate to Central Governance > General Settings > Data Modeling. Start
customizing activity Ealt Data Model.
Dae Seu stants
= Chace Oats Mode a a a
‘ashes Cec Toe
| s0Tpe Rost asgton
ise @—_SRUGHT (Fx Onn)
Generate data model ZZ.
3.9 Create an Outbound Interface
To prepare for the creation of an outbound interface, run transaction SE80 (Create Package / Function
Group). Create the Z_2Z_PACKAGE package.
cimensre
Samer mea,
elena
Biren
+ eiemeue
rates
+ Biome
tale
10/20Create the Z_2Z_FUNC_GROUP function group in the Z_ZZ_PACKAGE package.
SEE 2
rte .
Start transaction OIF_MAINTAIN. Create and define an Interface Mode! ID.
Create Outbound Interface Modei
Interface Medel Description Object Type Code Object Type Code Description
» fr ? 3 ‘ 4
(aerios [Nea | [Goss]
ee
aan eee
ieee ncaa ©
yea ER
eS a oe
Se en or
vane *
oor + (cots Cs Sige ara EA}
Choose the Name ABAP Dictionary Objects pushbutton to define and name structures.
Create Outbound Interface Model : ZZ_SFLIGHT
otc tel racine $F iteed(22) Oey Cowe ZF tet Tipe Cate con LOT)
11/20Create Outbound Interface Model : 2Z_SFLIGHT
\tetaehnel resins SF dows (EZ) hie Te Coe ZF hed pe Cot ein S42
oe eo eel
rama RT | (oe)
Toe en tit ey 86
reat neem 5)
‘etait OTR EPORT Demo
on 1
‘rede curation Rewer
shearer
‘The Transport Request Manager that opens when you complete Step 3 in creating an Outbound Interface
Model — Review and Submit. You can use the same transport to transfer the function module in the target
system later on.
Create Outbound Interface Model : 2Z_SFLIGHT
=|__f} —_4
i Ae Oceay ie Zr Eas
+ iw rswocneay ange 861m edt
+ WAS oeieay ne IF CAR ated
+ Ww Aberrant ZF C8 ches
+ heen esue Ze suai arte
+ a rere erste
1 @zimzn sesecercom
+ nthe rom ZZ SUM ces
‘The Application Log that opens in Step 4 of creating an Outbound Interface Model ~ Create Application Log.
After you define the 2Z_SFLIGHT Outbound Interface Model, the system generates the ZZ_SFLIGHT function
module (see below). The outbound implementation defined in the DRF calls this function module,
12/20(uct ela,
SPR] SS ASO SB vcs rey mois romioneneccums
[SSteascsestoy
(aeons)
mpnecou Le gal
[tise ) Ue) ek Jf Le
tte jus
Bua pac row ia
Sanco
Bronte mine
3.10 Create an Outbound Implementation
Start transaction DRFIMG. Navigate to Data Replication > Enhance Default Settings for Outbound
Implementations. Execute IMG activity Define Outbound Implementations.
‘When defining an outbound implementation, use the generic outbound implementation class
(CL_M0G_OTF_DRF_OUTBOUND_INPL). You can copy this class to allow additional capabilities that are not,
Supported by default such as Key mapping and value mapping. For more information, you can refer to the
standard outbound implementations that SAP delivers for other objects.
For your outbound implementation, you must specify @ Business Object Type (inthis case ZzSF_e1), an
Outbound Implementation Class (in this case CL_MOG_OIF_DRF_OUTSOUND_IHPL), and an Outbound
Interface Model ID (in this case 22_SFLIGHT). The Outbound Interface Mode! ID is the last column in @ table
that requires scroling. The two screenshots below show the relevant fields.
fies ine, Maefon tenet Deptt A
pees etre
S|
Paaeaas
ae
13/20Change View "Define Outbound Implementation”: Overview
D ew ints (Bh ER
aa Struchae: _ | eeline outieand_imoesrentanon
etre outburst
ote ate Treo | [eumness cect Toe ier omect —FerTme [[ourttound interface wocel
+ Ghasogn outbred par [2 a
Bavetna vas of
Jas eraty Typ2a
3.11 Create a Filter Object
Start transaction DRFIMG. Navigate to Data Replication > Enhance Default Settings for Outbound
Implementations. Execute customizing activity Define Filter Objects.
Change View "Define Filter Objects”: Overview
@ Newentes (3 Gh vo EM BL
Dadog structure Dafne iter clspets
‘boine Fiter Chests a
+ Ghassan ats
+ Glassgn enti Tree
Leave field Table Name blank. A complex fiter such as the one in the example does not require a table
name. The system only requires table names for simple filters. Such filters are only available for standard
applications that are built using the reuse option.
If required, you can define your own structure to include all relevant fields from the generated table. In the
Assign Filters view, apply the following settings.
‘+ Forfield Filter use codes between 8@ and 99. This range is assigned to the customer namespace.
«Use the generic Filter Class CL_MDG_OIF_DRF_FILTER.
‘New Entries: Overview of Added Entries
vSRBR
T] ete ee SERRE ove armen 7) tot
Po fete nee oro |
You do net have to assign an Entity Type.
3.12 Assign a Filter to a Business Object Type or an Outbound
Implementation
You can assign a Filter Object to a Business Object Type.
14/20ate Reokaion
Be Overalineraten
‘etn Cutan Seth fr Ost elation
hance Dela Sctngs fr Cutter Inglanetatre
BS tororsretes
© botnets Cogcts
= otro pusres Coxe: and obser erties
‘Alternatively, you can assign @ Filter Object to an outbound implementation, which is more specific than a
Business Object Type.
sta Reseson
+ EB Over nfarston
+ Dafa custom Sets fer bata Repeston
7 ___ennance pefult setengs fr otbeund inlementatons
© dotne Parnetors
ig Scho
eee re| (asresciat Tes exe are bar ec
ieagn ution 7
Close viet
+ Gossage crue Tosa]
3.13 Create a Replication Model
Define the ZZSF Replication Model. This customizing activity is client-specific.
Run transaction DRFING and choose Define Custom Settings for Outbound Implementations > Define
Replication Models.
rota Modo SIGHT
‘The Data Mode! field is specific to MDG.
objects.
inancials. You do not need to specify a data model for custom
Assign the 27SF_@1 outbound implementation to the ZZSF Replication Model
ft
9 BL
oo fuk nos SF aaa nes
Cheer al tt at Er —
Assign the Business System or systems that act as receiver systems for the combination of the Replication
Model and the Outbound Implementation,
15/203.14 Createa
Run transaction DRFF.
(ory by Buses Object BLUE) ateuersse Cae
ery by Repeaton Rodel ATPHa (0 8 dotsins 1)
wmout tegen Assignment B2SAUBATIM EL
Define a fiter specifying that Airline local currency is EUR.
Replication Model Repkestin Moder SFLGHT Susiness Object SFLGHT (Pex Opt0n)
Fate Critenieo cde inca Obes
[Rite bealeoreney =] [ie feu a
Fier Crterato Facade BusinessObjects
(if 19.
3.15 Replicate Data
Execute data replication in transaction DRFOUT. Enter Replication Model ZZSF and execute the program,
16/20QB wysteatonrt ono 2
eteteemats
Rest oe ea fester oe SGT]
|e permet
Giiardigertin 7]
(enemas
Cater
One
(Diss omen Tints
‘ostercate Love ine —
{etre Ln Unt aa
{oroncxe peur —
cetera Urine ‘canon
own
Dienaitciano rte cra ate
The system calls the 2Z_SFLIGHT outbound interface,
— = pe ee Dowsgat Gigee Rlatignitngy
Miers mress (are mecazrm Sse
eww se ET On ee:
FF) Bswnsee | @ Dvistcrvont Glavo EAcooaue osbvove Laver
{aes ‘meat ——”—~””CSO
6B
ow came (e(120)) (oemieuicon "TEXT [intemal Table] ‘unt (C1255)
a Scandard Table (1n¢(22)] sutehens.con
417/20Note, this example ends with the data passed to the function module in the sender system. The next step is
to create a function module with the same name (2Z_SFLIGHT) in the receiver system. The function module
in the sender system (shown above) calls the function module in the receiver system. Additionally, you need
to implement settings that allow the posting of the data.
‘You can consider more sophisticated implementations like using ALE / [Docs or WebServices for the data
replication. To do this, start by implementing an RFC-enabled function module in the receiver system. Based
on the implementation of the function module, you can generate a BAPI and an Doc (including functions
modules for sending and receiving). The function module of the sender system (shown above) calls the
function module you implement in the receiver system. Likewise, you can generate and consume a
WebService.
18/204 Additional Information
4.1 Further Reading
4.1.4 Information on SAP MDG on SAP S/4HANA
© Exchange knowledge: SAP Community | Q&A | Blog
‘Try SAP Master Data Governance on S/4HANA for free: Trial Version
© Learn more: Latest Release | Webinars | Help Portal | How-to Information | Key Presentations
44.2 SAP Roadmap Explorer
# Please see the roadmap for SAP Master Data Governance
4.1.3. Related Information
© Leam more: Floorplan Manager for Web Dynpro ABAP | How to Adapt FPM | FPM Blog | Howto
Information | Service Mapping Too! | SAP S/4HANA Cookbook CVI
19/20(05 005 on ate copy Agr mes Seep Pensa ee dsr ane scm AP pene
ey