Skip to Content
Product Information
Author's profile photo Siwen Hu

How to Replicate Condition Records for Pricing to External System

Background

In S/4HANA system, you can use asynchronous outbound services to replicate condition records to external systems, include Sales and Purchasing pricing condition records. The service contains nodes that respectively represent condition record, condition supplement, validity of condition record, and pricing scale.

Communication Scenario Configuration

To be able to use this service, you have to configure communication scenario SAP_COM_0295 with below steps.

Communication System

New communication system is the external system which used to receive the pricing condition record.

1.Open Communication System app, and create new communication system with System ID and System Name, such as  ‘TEST_SYS1’.

2.Click Create button, filling below technical data for above system.

3.Add user which has authorization for above system.

Communication Arrangement

New communication arrangement use to implement the communication scenario.

1.Open Communication Arrangements app, and create new communication arrangement for SAP_COM_0295.

2.Select communication system.

3.Set sales replicate service:

  • Package Size: It corresponds to the number of condition records that are sent together in one message.
  • Parallel Task Size for Delta Records: It corresponds to the maximum number for change pointers for analysis per task during parallel processing.
  • Parallel Tasks Size for Messages: It corresponds to the number of condition records that a single parallel task should process.
  • Exclude deleted condition record: If you choose X, the deleted condition records will be excluded from the replication.

Note: The value in parameter Parallel Task Size for Delta Records and Parallel Tasks Size for Messages must large than or equal to Package Size.

4.Set purchasing replicate service.

5.Click Save button, the replication model will be created automatically.

Replication Type

There are four replication modes: Initial Load of Data Replication, Direct Replication, Deferred Replication and Manual Replication.

Initial Load of Data Replication

If no condition records currently exist in your target system and you want to replicate all the existing condition records at once.

You can perform an initial load of data replication by choosing the initialization mode for your replication model.

Direct Replication

With direct replication, condition records can be replicated to the target system automatically once they have been created, changed or deleted.

For this, you should set the output mode parameter should be set as ‘D’ (Directly output) in the Communication Arrangements app.

Deferred Replication

There may be cases in which you don’t want to replicate condition records immediately after they have been created, changed or deleted. For example, you adjust product prices but don’t want them to take effect in the target system until the prices are finally agreed.

For such cases, you should set the output mode parameter should be set as ‘P'(Pooled output) in the Communication Arrangements app. This mode causes the system to pool the new, changed and deleted records until you execute the replication.

Replication of Individual Condition Records

There may be cases in which inconsistent condition records exist between the source and target systems due to, for example, network packet loss or the condition records being changed in the target system by mistake. To resolve it, you can replicate the relevant individual condition records manually to your target system.

To do so, you enter the condition record numbers in the Replicate by Object Selection app.

Replicate Sales Condition Record

After created replicate mode, you can start to replicate condition record to external system. You need create new user which assigned below business roles:

  • SAP_BR_PRICING_SPECIALIST
  • SAP_BR_ADMINISTRATOR_DATA_REPL
  • SAP_BR_CONF_EXPERT_BUS_NET_INT

Initialization Replication

For Initialization mode, normally used to copy all condition records to external system. But also, you can minimize the filter to replicate few condition records to external system.

Step 1: Replicate Condition Record by Replication Model

Open Replicate by Replication Model app, select the Replication Model as ‘SALES_REP’, select replication mode as Initialization.

Parallel Processing used to replicate huge condition records to external system and the value in parameters Parallel Task Size for Delta Records and Parallel Tasks Size for Messages will be used in parallel processing.

Note: Before implement replicate, you can run this replicate for testing only, if marked Test Run Only check box.

Click Display Filter Criteria, new filter page will be opened, if you keep it as blank, it means all condition records will be replicated.

Note: If need change the filter, open Define Filter Criteria app, click the Filter Criteria column for ‘SALES_REP’ replication model line. You can edit the filter as below which will be used in Initialization mode.

Filter condition record, which condition type is ‘PPR0’, condition table is from ‘304’ to ‘305’ and material is grater than ‘TG11’. And exclude condition record which material is equal to ‘TG12’.

Click Replicate button, new message will be prompt up.

Step 2: Monitor Replicate Log (Option A)

Open Monitor Replication app, select replication model as ‘SALES_REP’  and select all logs and all modes.

After that, you can check the replication is successfully or not , filter result and parallel process progress.

Click Continue button, check two success log, expand the log and you will see the total number for condition records.

Step 2: AIF Message Monitor (Option B)

To be able to monitor messages transferred by this service, you need to assign the following recipient to the users:

  • Namespace: /SDPCR
  • Recipient Name: CNDRCD_OUT

To assign recipients to users, use the Assign Recipients to Users app. For message monitoring, use the Message Dashboard app, you can find the detailed condition record content and processing progress status.

Direct Replication

For direct replication, the parameter Output Mode need be set as ‘D’. After that, if changes happened for condition record, system will replicate the changes to external system automatically.

Step 1: Create new condition record

Open Manage Prices – Sales app, create new condition record number as below.

Step 2: Monitor Replicate Log (Option A)

Open Monitor Replication app, only 1 condition record in filter.

Step 2: AIF Message Monitor (Option B)

Open Message Dashboard app, find the detailed condition record content and processing progress status.

Deferred Replication

For direct replication, the parameter Output Mode need be set as ‘P’. After that, if changes happened for condition record, will pool the changes in system. You can manually do replicate with specific filter or waiting the job execution by system.

Step 1: Update Condition Records

Open Manage Prices – Sales app, update below condition amount to 1000.00 EUR.

Step 2: Create New Condition Record

Open Manage Prices – Sales app, create new condition record as below.

Step 3: Delete Condition Record

Open Manage Prices – Sales app, delete below condition Record.

Step 4: Execute Deferred Replication

Open Replicate by Replication Model app, select ‘SALES_REP’ model and select Replication Mode as Changes.

Click Replication button.

Step 5: AIF Message Monitor

Open Message Dashboard app, check the content only contained above two condition records for replication.

Replication of Individual Condition Records

In this replication, you just specify the condition records and replicate to external system with Sales Condition Record object.

Step 1: Replicate by Condition Record Object

Open Replicate by Object Selection app, select Business Object Type as ‘Sales Condition Record’, input condition record number as below:

Click Replicate button.

Step 2: AIF Message Monitor

Open Message Dashboard app, check the content only contained above three condition records for replication.

Conclusion

In this blog post, we introduce how to do condition record replication with different replication mode. For Purchasing part, it is same as Sales part, user can refer this blog to do same operation for Purchasing part.

Source: https://help.sap.com/viewer/03c04db2a7434731b7fe21dca77440da/latest/en-US/e2500c848c264417a9380ad6407dd5a4.html

https://help.sap.com/viewer/bb9f1469daf04bd894ab2167f8132a1a/latest/en-US/656cc013d89844679a9df204980a8403.html

Assigned Tags

      1 Comment
      You must be Logged on to comment or reply to a post.
      Author's profile photo Tikeer Guo
      Tikeer Guo

      Hi Siwen, great blog, thanks a lot for your kindly sharing.