How-To Using Data Replication Framework for Material V3.1
How-To Using Data Replication Framework for Material V3.1
Applicable Releases:
From EHP6 FOR SAP ERP 6.0 and from SAP S/4HANA 1511
Version 3.1
September 2022
Document History
3
1. BUSINESS SCENARIO
SAP Master Data Governance for Material (MDG-M) provides business processes to find, create, change, and mark
material master data for deletion. It supports the governance of material master data on a central hub and the
distribution of material master data to connected operational and business intelligence systems.
The processes are workflow-driven and can include several approval and revision phases, including collaboration
between all users participating in master data maintenance.
The data replication framework (DRF) can be used to replicate data from the Master Data Governance (MDG) hub to
target systems.
You can replicate master data changes carried out centrally either manually or automatically in the background using
the data replication framework (DRF). Filters allow you to configure replication settings. You can replicate data
between the Master Data Governance hub and operational systems by means of SOAP services, IDoc’s, or file
download functions.
This guide provides background information about the data replication framework (DRF) valid for the domain material.
The guide also describes how to set up the system to enable immediate distribution of changes in the material master
during activation of the material. With MDG 9.0 and SAP S/4HANA 1610 it is configurable, if you would like to distribute
immediately or using change pointer.
4
2. PREREQUISITES
Makes sure that the following SAP Notes are implemented in the system if required:
5
3. BACKGROUND INFORMATION/TROUBLESHOOTING ON DRF FOR MATERIAL
3.1. Restrictions
This guide is valid for an MDG-M system. This means that in Customizing under MDGIMG > Central Governance for
Material > Activate Business Transaction Events, the Application Active checkbox is selected for the MDGM
application. Without MDG the application LO-MD is set and DRF outbound implementations 194_2 (MATMAS IDocs)
or 194_3 (Product SOAP Services) are used. For more information, see SAP Note 2700769. All information in this guide
refers to an MDG-M system.
The DRF material outbound implementation I_MAT supports only ALE message types MATMAS (with
PRODVERSION) and CLFMAS.
With MDG 9.0 and outbound implementation I_MAT_V2 also ALE message types for quality inspection setup
(MATQM), change number and revision level (ECMREV) and documents (DOLMAS) are supported.
If you want to replicate change states/revision levels using IDoc ECMREV, you must also activate the ALE change
pointers using SALE -> IDoc Interface / Application Link Enabling (ALE) -> Modeling and Implementing Business
Processes-> Master Data Distribution-> Activate Change Pointers for Message Types (transaction BD50).
The DRF material outbound implementations do not support ALE message DOCMAS. For distribution of DOCMAS you
can use the standard ALE distribution.
ALE and DRF distribution for MRP Areas is not possible as no IDoc exists for distribution of MRP Areas (MDMA). See
also SAP Note 2268203: Not possible to Update / Transfer MRP Area when using Message Type MATMAS.
Only in S/4HANA it is also possible to use outbound implementation 194_3 for replication via services.
https://help.sap.com/viewer/bc6b9325fedd4344a84412b2195064fa/latest/en-
US/f758dc3b2f444f3fb6c6cabc8ebd1689.html
Flex entities are not supported by the DRF material outbound implementation.
3.2. DRF Set Up, Customizing, Online Help, SAP Best Practices Explorer
For more information, see the section Set Up Data Replication Using ALE with DRF in Configuring Master Data
Governance for Material topic Set Up Data Replication
https://help.sap.com/viewer/6d52de87aa0d4fb6a90924720a5b0549/latest/en-
US/64a5cb5285135721e10000000a423f68.html as well as the Data Replication topic in Working with MDG, Central
Governance https://help.sap.com/viewer/6d52de87aa0d4fb6a90924720a5b0549/latest/en-
US/104bf4bff9c54d7796d266605a4111fd.html.
Note: Don’t forget to run transaction MDGIMG and navigate to Central Governance for Material Activate Business
Transaction Events and select the Application Active checkbox for the MDGM Application Indicator to enable MDG
Material with DRF. For more information, see SAP Note 2700769.
For more information about the data replication framework in SAP S/4HANA, see the Data Replication Framework
topic https://help.sap.com/viewer/8308e6d301d54584a33cd04a9861bc52/latest/en-
US/88e3f5577c84bc12e10000000a4450e5.html.
For more information about the integration of SAP S/4HANA Cloud to SAP Master Data Governance, see SAP Best
Practices Explorer https://rapid.sap.com/bp/#/scopeitems/1RO.
6
3.3. Web Dynpro Applications
Web Dynpro applications can be found here on the material governance homepage:
Or you can use transaction DRFOUT. For scheduled distribution with a background job you should use a variant of
transaction DRFOUT.
You can check the change pointer with transaction SE16n and table MDGD_CP to get the change pointer ID. Then
check table MDGD_CP_REP_STAT, that the status is now CR. There you can see that change pointer is written for
the business systems ID’s.
Solution:
Implement the following SAP Notes:
• SAP Note 2080421: DRF: Reduced IDoc message types cannot be sent
• SAP Note 2084728: Reduced IDoc message types for MDG implementations
• SAP Note 2093396: Reduced Message Type
Workaround:
If you can’t implement these SAP Notes, you can use this as a workaround.
The message type MATMAS is hard coded in method SEND_MATMAS_IDOC of class CL_MDG_MAT_IDOC_DRF.
This class is used in the outbound implementation I_MAT for DRF.
7
Search for the usage IF_MDG_MAT_DRF_CONSTANTS=>GC_MATMAS. You must replace the hard-coded message
type using an overwrite exit on this method, or by creating your own outbound implementation (inheriting from class
CL_MDG_MAT_IDOC_DRF).
Root cause:
DRF for material does not support message function ‘003’ (deletion). DRF for material always sends the full material.
ALE/DRF filters are of course considered.
Solution options:
Using only ALE:
Sending a segment deletion is supported in standard ALE (transaction BD21). This option doesn’t need additional
coding.
8
3.7.2. How to Customize ALE Audit
You can configure your client and hub systems so that your client systems send confirmation of replicated materials
back to the MDG hub. The technology that is used for this is called ALE auditing. The customizing for ALE audit is
described in the section Customizing for ALE Audit (Optional) in Adapting Master Data Governance for Material → Key
Mapping https://help.sap.com/viewer/db97296fe85d45f9b846e8cd2a580fbd/MDG92.latest/en-US
Scenario:
Option 3 (ALE audit) is used to replicate material with classification, key mapping required, update via ALE Audit active
(key created in target system)
Challenge:
The CLFMAS IDoc’s must not be sent until ALE audit has returned the material number of the target system and
updated the key mapping. To ensure this, the classification outbound will fail with an error message in the ALE
replication log (BD87) if no key mapping was found. Thus, the DRF change pointers will be set to processed but the
CLFMAS IDoc will not be sent but instead get an error status.
Note that no message is written into the DRF log, only the ALE log (as it was there where the replication failed).
After the ALE audit has updated the key mapping, the CLFMAS IDoc’s need to be replicated again. Unfortunately, this
replication can’t be automated from the ALE audit.
Solution:
Prerequisite is SAP Note 2030807.
Type Solution
Initial Load Retrigger replication for materials whose CLFMAS IDoc’s have failed – check BD87. No work list
available.
Delta Delta is driven by change pointers → new change pointers created for failed classification IDoc’s
→ for next periodic replication, material including CLFMAS will be sent again
Manual Restart replication for materials whose CLFMAS IDoc’s have failed – check BD87. No work list
available.
CR Custom coding: WAIT task until DRF replication status indicates that the ALE Audit was finished,
Activation then restart replication
Note that the restart sends CLFMAS IDoc as well as the corresponding MATMAS IDoc, which is somewhat redundant.
9
3.9. Filter Criteria
Filter Object - Defines the selection criteria used to determine the data objects which should be replicated. It combines
one or more filters. Maintenance of the selection criteria is done by the master data steward.
Filter - Carries out the comparison of a given set of objects against the maintained filter criteria. It returns the list of
objects that match the filter criteria. To apply filters sequentially on the same object list, they can be combined in Filter
Objects. Filter types available: Explicit (simple and complex) and implicit. Segment Filters are special filters that
generally do not limit the number of objects but the amount of data in the object itself.
Segment filters are used to exclude parts (“segments”) of the Business Object from replication.
The delivered outbound implementation I_MAT has the following filter criteria’s, which you can find in the MDG
customizing: General Settings->Data Replication->Enhance Default Settings for Outbound Implementations->Define
Outbound Implementations.
If these filters are not sufficient you can create your own outbound implementation with own filters. Filters are defined in
the MDG customizing: General Settings->Data Replication->Enhance Default Settings for Outbound Implementations->
Define Filter Objects.
Solution:
The DRF change pointer creation is triggered by a BTE (Business Transaction Event) as stored in table TBE31. To
prevent this creation, you should exchange/remove the two entries for MDG_BS_MAT_DRF_CP for BTE 00001250
and MDG_BS_CLF_DRF_CP for BTE 00004002. This is a modification.
In addition, different change pointer should be written. This could be achieved by:
• Alternative 1: Copy function module MDG_BS_MAT_DRF_CP and change the coding according to your
requirements. Then exchange the function module in table TBE31.
• Alternative 2: Use ALE-BAdI BDCP_BEFORE_WRITE. There you can create DRF change pointers if ALE
change pointers are created for the ALE-Message type. Prerequisite is the assignment of ALE-Message Type
10
to the Business Object.
11
4. STEP-BY-STEP EXPLANATION FOR IMMEDIATE REPLICATION WITH MDG 9.0 AND SAP S/4HANA 1610
From MDG 9.0 and SAP S/4HANA 1610 it is possible to configure pooled or direct replication.
12
5. RELATED CONTENT
5.1. Further Reading
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
Related Information
• Learn more: Floorplan Manager for Web Dynpro ABAP | How to Adapt FPM | FPM Blog | How-to Information |
Service Mapping Tool |
2461516 Functional Restrictions in MDG for Material with SAP Master Data Governance 9.1
Functional Restrictions in MDG for Material in SAP Master Data Governance 9.2 and on
2656693 SAP S/4HANA 1809
2816571 Functional Restrictions in MDG for Material on SAP S/4HANA 1909
13
www.sap.com/contactsap
The information contained herein may be changed without prior notice. Some software products marketed by SAP SE and its distributors contain proprietary software components of other software vendors. National
product specifications may vary.
These materials are provided by SAP SE or an SAP affiliate company for informational purposes only, without representation or warranty of any kind, and SAP or its affiliated companies shall not be liable for errors or
omissions with respect to the materials. The only warranties for SAP or SAP affiliate company 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.
In particular, SAP SE or its affiliated companies have no obligation to pursue any course of business outlined in this document or any related presentation, or to develop or release any functionality mentioned therein.
This document, or any related presentation, and SAP SE’s or its affiliated companies’ strategy and possible future developments, products, and/or platform directions and functionality are all subject to change and may
be changed by SAP SE or its affiliated companies at any time for any reason without notice. The information in this document is not a commitment, promise, or legal obligation to deliver any material, code, or
functionality. All forward-looking statements are subject to various risks and uncertainties that could cause actual results to differ materially from expectations. Readers are cautioned not to place undue reliance on
these forward-looking statements, and they should not be relied upon in making purchasing decisions.
SAP and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP SE (or an SAP affiliate company) in Germany and other countries. All
other product and service names mentioned are the trademarks of their respective companies. See www.sap.com/trademark for additional trademark information and notices.