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:
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:
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.
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:
- 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:
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:
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:
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:
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
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
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:
After the below please follow the steps.
- Log on to your SAP S/4HANA system in the SAP GUI.
- Call up transaction DRFIMG.
- Navigate to .
- 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.
- Choose Save.
- Select the business system and double-click Define Bus. Systems, BOs in the dialog structure.
- Choose New Entries.
- Add BO Type 194(Material) using the input help and check the Sys. Filt. field.
If this entry exists, skip the step.
- Select the entry BO type and double-click Define Bus. Systems, BOs, Communication Channel in the dialog structure.
- Choose New Entries to add the communication channel as 1 Replication via Services.
If this entry exists, skip the step.
- Choose Save.
- Navigate back.
- Select the IMG activity Define Replication Models.
- Choose New Entries and define the replication model name and the description.
- Under Log days, set the number of days to 50.
- 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.
- Choose Enter.
- Select the entry created and double-click Assign Outbound Implementation.
- Choose New Entries.
- Select Outbound Implementation as Outbound Impl. For Product via Services (194_3) using the input help and choose Enter.
- Under Sequence, enter 2.
- Select the row added and double-click Assign Target Systems for Repl. Model/Outb. Impl in the dialog structure.
- Choose New Entries and add the business system created earlier using the input help.
- Select the business system row and double-click the node Assign Outbound Parameter in the dialog structure.
- Choose New Entries to add the outbound parameter PACK_SIZE_BULK using the input help.
- Check the Mandatory field and enter the outbound parameter value 20.
- Choose Save.
- Choose Activate to activate the replication model.