Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
8,454
Master Data plays an important role in any SAP solution.With master data, businesses maintain central view of mission-critical data and teams that need these records execute their business functions based on the same information. Without having access to master data, information begins to fall out of sync between departments.

When customer is having very huge landscape of SAP systems including both S/4 HANA and ECC systems importing of Master Data( Business Partner and Products) becomes the tedious job and there can be Coex scenarios as well.

You can use the Data Replication Framework (DRF) to replicate master data such as business partners, products, and locations between source systems and target systems. The DRF uses a Key Mapping Framework to map the IDs of the corresponding objects in the source and the target system when replicating master data.

Since customers are widely using the DRF framework to transfer their master data between on premise systems same can be used to transfer the master data to SAP BTP applications as well.

The support of the middle wear might be required based on the need if your BTP application is not importing the data as it is.

In this blog I am explaining the steps which is carried out replicate both Business Partner and Product master data into SAP BTP offering SAP Returnable Packaging Management.  The blog covers  how to  configure the business systems to transfer the data and configure the replication models, middle wear configurations etc.

 

Business Partner Replication from S/4 HANA On Premise


Define replication models and outbound implementations to control the transfer of data from SAP S/4HANA to RPM for execution using a Data Replication Framework (DRF).Perform the following steps to set up a replication model for the business partner

1) Define Logical System: Logical systems are defined as Cross-client Systems.

a. Go to the transaction: BD54

b. In the Change View “Logical Systems”: Overview, choose New Entries.

c. Create a logical system that identifies the on-demand system, as shown in the following table:






















Field

Value
Logical System Specify logical system

For example, S42CPI


Name Specify the meaningful name of the system

For example, SAP RPM integration with SAP


S/4 HANA




Screen BD54 -

2)  Activate Function Modules



If you have activated function modules when you used the direct business partner integration, skip the following step.



a. Go to the transaction BUPA_CALL_FU using the following path: Cross-Application Components -> SAP Business Partner Data Distribution -> Activate Function Models

b. In the Change View Data Exchange: Activation of Function Modules: Overview, maintain the following values to activate the function module:


































Field

Value
Event Business Partner Outbound
Object Business Partner and BP Relationship
Item 5000001
Function Module MDG_BS_BP_OUTBOUND_DRF
Call X

c. Click Save.


3) Configure Data Replication Framework


a. Go to the transaction DRFIMG using the IMG following path: Define Custom Settings for Data Replication -> Define Technical Settings -> Define Technical Systems for Business Systems


b. In the Change View Define Business Systems: Overview, choose New Entries or use the entry created in step 1.
























Field

Value
Business System S42CPI
Logical System S42CPI
Unicode Code Page 0


c. Choose the Business System and double-click Define Bus. Systems, Bos in the left navigation panel.

d. In the Change View Define Bus. Systems, Bos: Overview, choose New Entries:


























Field

Value
BO Type 986
Sys. Filt. <selected>
Output Mode D Direct Output





  • If Output Mode is selected as Direct Output, product data distribution will be triggered immediately on Save. In this case, DRFOUT is not required to replicate changes.

  • If Output Mode is selected as Pooled Output, data is distributed using DRF change pointers and DRFOUT has to be executed or scheduled to create and send the data.




e. Choose the BO Type and double click Define Bus. Systems, Bos, Communication Channel in the left navigation panel.

f.  In the Change View Define Bus. Systems, Bos, Communication Channel: Overview, choose New Entries:






























Field

Value
C.Channel Replication via Services
Key Harm. Not Defined
Storage Not Defined
Time Dep. Not Defined


g. Click Save.

4) Configure Replication Model

a. Go to the transaction DRFIMG using the following IMG path: Define Custom Settings for Data Replication -> Define Replication Models

b. In the Define Replication Model: Overview, choose New Entries:






























Field

Value
Replication Model RPM_CPI
Description SAP RPM Integration with SAP S/4HANA
Log Days 50
Active Selected


c. Click Save.

d. Choose the replication model and choose Assign Outbound Implementation in the left navigation panel.

e. In the Assign Outbound Implementation: Overview, choose New Entries:






























Field

Value
Outbound Implementation 986_3
Description Outbound Impl. for BP/REL via Services
Communication Channel 1 Replication via Services
Filter Time 2 Filter after change analysis


f. Choose the new outbound implementation and choose Assign Target Systems for Repl. Model/Outb.Impl. in the left navigation panel.

g. In the Assign Target Systems for Repl. Model/Outb.Impl.: Overview, choose New Entries:

           Business System: S42CPI


h. Choose the new Business System and double-click and click Assign Outbound Parameter in the left navigation panel.

i. In the Assign Outbound Parameter: Overview, choose New entries:



























Field

Value
Outbound Parameter PACK_SIZE_BULK
Parameter Description Package Size for Bulk Messages
Mandatory Selected
Outbound Parameter Value 100





The outbound Parameter value for PACK_SIZE_BULK can be set according to the most efficient package size, which will differ from system to system.



j. Click Save.

k. Go to the Define Replication Model.

l. Choose the replication model RPM_CPI and click Activate.

5) Configuring Filter Values

a. Go to the transaction: DRFF

b. In the browser, select the relevant Replication Model and click Change.

c . Add the desired filters and save them.

Create Outbound Services for data replication (SOAMANAGER)


Below are the different objects used in the SOAMANAGER screen.

































Object Name



Description


CO_MDG_BP_RPLCTRQ Business Partner Data Replication
CO_MDG_BP_RELATIONSHIP_OUT Business Partner Relationship Data Replication
CO_MDM_PRD_BULK_REPL_REQ_OUT Product Data Replication
CO_CRMS4_SRVO_NOTIFY_REQUEST Service Order Notification Outbound Service Interface
CO_MMIM_MATSTOCK_REPLICATION Product Stock Data Replication
CO_SDCM_ESR_SALES_PRICING_COND_SPRX Product Price Replication


1. Start the transaction SOAMANAGER.

2. Choose Web Service Configuration under Service Administration.

3. Search for the following mentioned object names one after the other and repeat the below-mentioned procedure





















Object Name




Description

CO_MDG_BP_RELATIONSHIP_OUT Business Partner Relationship Data Replication

CO_MDG_BP_RPLCTRQ

Business Partner Data Replication


4. Click Create and Choose Manual Configuration.

a. Under Logical Port Name

Enter the logical port name, for example, LP_<System name that you are connecting to>. ex: RPM_CPI_LP

Choose Logical port in the Default check box.

Enter the description, for example, <For Business Partner Data Replication>.

Choose Next.

b. Under Consumer Security

For Basic Authentication:

In case the Authorization type is User Role in your integration flow, choose the User ID/Password option, and enter the SAP Cloud Platform integration User ID and password to connect to the SAP Cloud Platform Integration tenant.

In case the Authorization type is Client Certificate for your Sender configuration in the integration flow, choose X.509 SSL Client Certificate for Authentication Settings. Then choose an item for your SSL Client PSE of transaction TRUST.

Choose Next.

c. Messaging





























Field




Value

Transfer protocol Transfer via SOAP header
RM Protocol SAP RM
Message ID Protocol SAP Message ID
Data transfer scope Basic Data Transfer


d.Under Transport Settings

Enter CPI operation server/worker node URL in the URL field - https://c2812-iflmap.hcisb.int.sap.eu2.hana.ondemand.com/cxf/BusinessPartner

NOTE





Don't change the default values Transport Binding section.



Choose Next.

e. Repeat the same procedure for CO_MDG_BP_RPLCTRQ with the URL to be entered as (same as above in step 4), if you use the same integration flow to receive Business Partner Relationship payload.

SAP CPI


Create a new Iflow to make all the mappings between the S/4 HANA payload and RPM BP entity.

Click on the package. Go to the Artifacts tab. Then select and click on "Replicate Business Partner from backend to RPM" to open.

Click on edit to make changes to the iflow. Then Save it.

Click on Configure to change the configurations of the sender (S/4 HANA) and receiver (RPM).

Select Sender to configure S/4 HANA details. Make sure the below values are present. Authorization: UserRole is used here as we have used Basic Authentication in SOA MANAGER configurations above. Change to Client Certificate if it is used for Authentication between S/4 HANA and CPI.


Go to Receiver to configure the RPM API URL. Provide the details below and save them.

We have used Authentication OAUTH Client credentials to access RPM APIs.


Add the already created Credentials artifact under the Credentials Name field. Check below for creating a Credential artifact.

Create the Credentials using the following steps -

Click on the eye symbol in the navigation and then select "security material" under the "Manage Security Material" section.

Then click on Create and enter details to create new credentials artifact.  The name provided here should be used in the above section

Then deploy the artifact.

Iflow Deployment :

  • After providing all the above details, deploy the iflow.

  • Check the iflow deployment status by following the below steps -

    • Click on the eye symbol in the navigation and click on the below-highlighted box




Search the iflow by providing the name below. Check if it has deployed successfully. fix if there are any errors and re-deploy.

Find the iflow url under the endpoints section and this URL is configured in the SOAMANAGER - under the Transport Settings tab URL field.

Trigger the BP Replication



  • Login to the S/4 HANA system using SAP GUI.

  • Go to transaction BP and search for a BP. Update any field and save the record.

  • It will automatically trigger an outbound message to CPI.

  • Check CPI for BP in the messages.

  • Then trigger the GET BP API from the postman (attached collection below) or check the BP in RPM UI.


Manual Replication :

Go to transaction DRFOUT. Select the replication model (created in the starting) and outbound implementation (986_3) for BP.

Select/Enter the values in Manual Replication Filter Criteria. Save it. Then click on F8 to execute the transaction. 

Troubleshooting :

  • Check transaction "SRT_MONI" for the status of outbound messages. This will help to fix if there are any errors in the processing.

  • The business System should be configured in the SLD system before using it in DRFIMG Configurations

  • Make sure the USER ROLE in the iflow is configured to ESBMessaging.send if user credentials are provided in SOAMANAGER.

  • Download the WSDL files of respective objects from S/4 and upload them in the iflow→message mappings section before mapping source to destinations fields in Iflow.


Products Replication from S/4 HANA On Premise 


Define replication models and outbound implementations to control the transfer of data from SAP S/4HANA to RPM for execution using a Data Replication Framework (DRF).

Perform the following steps to set up a replication model for the product master.

1) Define Logical System: Logical systems are defined as Cross-client Systems.

a. Go to the transaction: BD54

b. In the Change View “Logical Systems”: Overview, choose New Entries.

c. Create a logical system that identifies the on-demand system, as shown in the following table:






















Field

Value
Logical System Specify logical system

For example, S42CPI


Name Specify the meaningful name of the system

For example, SAP RPM integration with SAP


S/4 HANA




After the below please follow the steps.


  1. Log on to your SAP S/4HANA system in the SAP GUI.

  2. Call up transaction DRFIMG.

  3. Navigate to Define Custom Settings for Data Replication  Define Technical Settings  Define Technical Settings for Business Systems.

  4. Choose New Entries to add a business system for SAP Field Service Management.Note

    If the business system is already created, select the business system and the logical system name using the input help.



  5. Choose Save.

  6. Select the business system and double-click Define Bus. Systems, BOs in the dialog structure.

  7. Choose New Entries.

  8. Add BO Type 194(Material) using the input help and check the Sys. Filt. field.

    If this entry exists, skip the step.



  9. Select the entry BO type and double-click Define Bus. Systems, BOs, Communication Channel in the dialog structure.

  10. Choose New Entries to add the communication channel as 1 Replication via Services.

    If this entry exists, skip the step.



  11. Choose Save.

  12. Navigate back.

  13. Select the IMG activity Define Replication Models.

  14. Choose New Entries and define the replication model name and the description.

  15. Under Log days, set the number of days to 50.

  16. Note down the name of the replication model that you created.

    It should be used for sending the data from the source system to the target system.



  17. Choose Enter.

  18. Select the entry created and double-click Assign Outbound Implementation.

  19. Choose New Entries.

  20. Select Outbound Implementation as Outbound Impl. For Product via Services (194_3) using the input help and choose Enter.

  21. Under Sequence, enter 2.

  22. Select the row added and double-click Assign Target Systems for Repl. Model/Outb. Impl in the dialog structure.

  23. Choose New Entries and add the business system created earlier using the input help.

  24. Select the business system row and double-click the node Assign Outbound Parameter in the dialog structure.

  25. Choose New Entries to add the outbound parameter PACK_SIZE_BULK using the input help.

  26. Check the Mandatory field and enter the outbound parameter value 20.

  27. Choose Save.

  28. Choose Activate to activate the replication model.


 

 

 

 

 
4 Comments