Enterprise Resource Planning Blogs by SAP
Get insights and updates about cloud ERP and RISE with SAP, SAP S/4HANA and SAP S/4HANA Cloud, and more enterprise management capabilities with SAP blog posts.
cancel
Showing results for 
Search instead for 
Did you mean: 
henrietta_helena_erdei
Product and Topic Expert
Product and Topic Expert
12,318

In this post blog, I will guide you how to identify problems in the Business Partner Replication process and how to correct them.I am also sharing reason(s) of common issues and I collected the frequently asked questions with the answer/solution/current state by SAP. 

 

Introduction

 

Purpose and target

 

The purpose of this document is to help you to identify the root cause of the issue in the Business Partner replication process, especially, if the root cause is not a bug but an incorrect configuration, incorrect user handling, knowledge gap, modification.  

The content of the blog is the following

  • Configuration
  • Logic behind BP replication
  • Modes of Business Partner replication
  • Possible root cause(s) of the error in S/4HANA (S/4 is the target)
  • How to debug webservice tickets
  • Badi to manipulate the standard
  • How to identify Z programs/enhancements
  • Hits to debug issues relating to mapping of data
  • FAQ/Common BP replication issues

Target audience: Functional, technical expert, Consultant

Version: SAP S/4HANA, ERP, MDG, Ariba, C4C

 

Configuration

To replicate Business Partner from one system to another one, the following configuration guide needs to be followed:

If the replication is not working correctly or you are facing an issue, ensure that the guide is followed correctly. Many times, the root cause of the replication issue is an incorrect customizing. For questions related to the configuration, involve the local consultant, or use our SAP Community which is the official channel for consulting inquiries.

Required release level for Ariba

Required release level for C4C

Older SAP S/4HANA, SAP ERP or SAP MDG releases do not support the end-to-end scenario as a SAP standard solution. SAP does not recommend building any custom solution for unsupported software products / releases.

 

Main logic behind BP replication

With this feature the BP can be replicated from the source to the target system. It is working based on the current state logic. It means that the BP with the roles which are available in the source, will be contained in the payload and replicated to the target system. If the data is not contained in the payload, the data will be not replicated/deleted in the target system. If based on your business requirement you do not want to replicate all data, you can use DRFF filters or modification. Related to the DRFF setting, scroll until the FAQ section.

In order to avoid issues due to the configuration, ensure that the configuration such us CVI, number range…etc is same in the source and in the target.

 

Modes of Business Partner replication

  • Direct modes for triggering replication.
  • Manual modes for triggering replication.

As an example, in the case of direct replication mode, within transaction BP in S/4HANA, the data is modified or created then the change pointer is always written, and replication is triggered when we click on the save button as the replication event is also registered here.

This is determined within the customizing:

  • Transaction DRFIMG
  • Define custom settings for data replication.
  • Define technical settings.
  • Define technical settings for business system.
  • Select the business system.
  • Click of Define Bus. System,BOs.
  • Select the BO type and from here you can select the output mode. 

*Please note that this customizing is system specific.*

Automatically Trigger:

  • Direct Output: Changes are directly transferred to a target system. (For example, you need to send customer data immediately to a target system for urgent processing.)
  • Pooled Output: Changes are collected and transferred in a mass process at a later point in time. (For example, you wish to collect the changes made to BP master data and send them to a target system)
    You can trigger the mass process for pooled output by starting or scheduling the report Execute Data Replication (RDRF_MESSAGE_OUT) for the relevant replication models with the replication mode Changes. 
  • Object-Dependant Default or no settings.
    With these options , the settings are as follows:
    -Direct Output for all Business

 

Manually Trigger: via DRFOUT transaction

If the direct replication is not working (the BP does not replicate to the target system by pressing the save button automatically in spite of the fact that the configuration is done correctly) test, if the manual replication (directly from Tcode DRFOUT) is working. The Function module MDG_BS_BP_OUTBOUND_DRF is responsible for triggering the service in direct mode. If the manual replication is working but the direct is not, check, if the FM MDG_BS_BP_OUTBOUND_DRF is calling during direct mode. This is activated in CRMC_BUT_CALL_FU.

 

Possible root cause(s) of the error in S/4HANA
(S/4 is the target)

Possible root cause(s):

  • The configuration guide did not follow correctly

As mentioned above many times the root cause of the BP replication issue is that the guide is not followed correctly. If you are facing an error, ensure that the Guide is followed correctly.

  • Incorrect customizing in the target

If the Guide is followed correctly, check if the customizing in the target system is compatible with the source system. If the customizing is different, can cause an error in the target.

  • Incorrect key mapping

To check, if the key mapping is correct/ solve key mapping issues, you can read the following blog: Troubleshooting Business Partner Key Mapping Issues

  • Incorrect data in the XML file (the target system does not get the data correctly from the source)

Check, if the original XML file contains the data. If no, create a ticket on the component component which belongs to the source system. In the section FAQ you can find a help how to identify the correct component. 

  • Custom program/custom enhancement

Involve your local development team to check, if there is any Z program/ Z enhancement is causing the issue.

  • Bug in Standard

Create a ticket for SAP on the correct component where the target system belongs. In the section FAQ you can find a help how to identify the correct component. 

 

How to debug webservice tickets

Debug failed payload

  1. Go to SRT_MONI
  2. Double click on the failed XML file

henrietta_helena_erdei_0-1717578606701.png

  1. Open the Original XML file (Ensure that you clicked on the message body otherwise the XML will contain the error and not the original sent data)
  2. Download the XML file

henrietta_helena_erdei_1-1717578606706.png

  1. Go to Tcode SPROXY_START
  2. Go to Tab Web service definition and put the correct service definition

henrietta_helena_erdei_2-1717578606707.png

Service definition: BUSINESSPARTNERSUITEBULKREPLIC for method BP_SUITEBULK_REPL_REQ_IN

Service definition: BusinessPartnerRelationshipSUI for method BUSINESS_PARTNER_RELATIONSHIP

  1. Click on the button Test henrietta_helena_erdei_3-1717578606707.png or press F8
  2. Execute
  3. Load file

First always test, if the issue is recreatable in the target system. Click on the button execute and check, if the error is there. If yes, the issue is recreatable. At this point, copy the message ID of the error.  After that Go back to the Step 5, Test the correct service definition and load the file again.

  1. Put /h and click on the button Execute
  2. Set a breakpoint at the error message and press F8

 

Debug successful payload

Example issue: The Payload is successful but the update did not happen in the BP. There is no error. Key mapping is correct.

The steps are the same as debug failed payload until Step 9.

  1. Once the XML file is uploaded click on the button XML editorhenrietta_helena_erdei_4-1717578606708.png
  2. Click on the button Pretty printer
  3. Search for “changeOrdinalNumberValue”
  4. If the XML contains any, delete it. If the XML contains more, delete all of them including the change ordinal number value E.g., changeOrdinalNumberValue="3"

Now the XML file looks like as first-time replication so you can debug.

 

Badi to manipulate the standard

E.g., map custom fields, prevent the value deletion in the target, if the field is not contained in the payload ( and also the field is not in the source system) 

For inbound: MDG_SE_BP_BULK_REPLRQ_IN

For outbound: MDG_SE_BP_BULK_REPLRQ_OUT

 

How to identify Z programs/enhancements

Set a trace via ST12

  1. Go to Tcode ST12

henrietta_helena_erdei_5-1717578606710.png

 

  1. Once the trace is started open a new screen and execute the steps to recreate the process
  2. Once it is finished go back to Tcode ST12 and click button End traces & collect
  3. Select all of them and press enter
  4. Click on full screen button on the Collected trace analysis section
  5. Once the status is green the system finished with collecting the called programs

henrietta_helena_erdei_6-1717578606715.png

  1. The first line is the summary, so select the second one and click on the ABAP Trace
  2. Click on the program column (name)  to select it,  right click on the mouse and select sort in descending order

henrietta_helena_erdei_7-1717578606735.png

The Z programs will be listed. You can set breakpoint in every Z program and test one by one if the incorrect coding in a Z program is causing the issue.

 

Via debugger by using the button Configure Debugger Layer

henrietta_helena_erdei_8-1717578606738.png

 

henrietta_helena_erdei_9-1717578606740.png

 

To jump between the Z programs use F5 button

Always ensure that it is still active

henrietta_helena_erdei_10-1717578606741.png

To skip the Z program you can use the Goto Statement

Menu >> Debugger >> Goto Statement

 

Hits to debug issues relating to mapping of data

CL_MDG_BP_FND_MAPPING

For issues relating to Mapping of Data 

Inbound

 

MAP_BUPA_COMPLETE_IN

Map Business Partner complete: Inbound

MAP_CURR_STATE_IN

Map Complete Transmission indicator to API Current State

MAP_BUPA_CONF_COMPLETE_IN

Map Business Partner complete: Confirmation Inbound

APPLY_SEGMENT_FILTERS

Apply DRF Segment Filters in Inbound Processing

Outbound

 

FILL_BUPA_MSG_OUT

Fill single BUPA Message for Outbound

MAP_BUPA_COMPLETE_OUT

Map Business Partner complete: Outbound

MAP_COMMON_DATA_OUT

Map Common Data: Outbound

HANDLE_BP_CURRENT_STATE

Handle potential data loss in BP from outbound service

FORCE_CTRL_INITIAL_VALUES

Analyze Data and force sending of Initial Values

Mapping

 

FILL_MESSAGE_HEADER

Fill Message Header

EXECUTE_STEP

Execute SMT Mapping Step

HANDLE_SMT_ERROR

SMT Error Handling

MAP_LOG

Map the LOG to the BAPIRETURN table

MAP_LOG_OUT

Map the BAPIRETURN table to the LOG

Common

 

MAP_COM_DATA_NOTES_IN

Map Communication Notes: Inbound

MAP_COM_DATA_NOTES_OUT

Map Communication Notes Outbound

MAP_COMMON_DATA_IN

Map Common Data: Inbound

MAP_TAX_NR_IN

Map Tax Numbers: Inbound

MAP_TAX_NR_OUT

Map Tax Numbers: Outbound

MAP_PAYMENT_CARD_IN

Map Payment Cards for inbound

MAP_PAYMENT_CARD_OUT

Map Payment Cards for Outbound

Address

 

MAP_ADDRESS_INFO_IN

Map Address Information: Inbound

MAP_ADDRESS_INFO_OUT

Map Address Information: Outbound

BUPA_GET_ADDRESS_CVI

Get BP Address in CVI structure format

Misc. 

 

READ_BUPA_GROUPING

Read Business Partner Grouping

READ_BUPA_RECEIVER_ID

Read Business Partner Receiver ID

MAP_CREDIT_WORTHINESS_OUT

 

MAP_CREDIT_RATING_OUT

 

MAP_CREDIT_WORTHINESS_IN

 

MAP_CREDIT_RATING_IN

 

ADJUST_DATA_AND_DATAX

Adjusting data and datax for current state

 

FAQ/Common BP replication issues

  • Usage of DRFF filter/ does not work as expected

Read KBA 3393140 - Detailed explanation and examples of the use of segment filters in BP SOA webservice (DRF)

  • Automatic replication between more systems

System A >> System B >> System C

Requirement: Once the BP is replicating to the system B, the system replicate that BP automatically to the system C

This scenario does not support in standard.

Workaround exists in SAP Note 2849394 - Subsequent replication is not triggered from an inbound web service to S/4HANA to further ...

  • Multiple target systems

https://help.sap.com/viewer/6d52de87aa0d4fb6a90924720a5b0549/1709%20000/en-US/9baba5519178245de10000...

https://blogs.sap.com/2020/03/13/drf-site-and-bp-master-data-between-s-4hana-systems/

https://blogs.sap.com/2018/08/06/configuring-service-group-in-soamanager/

  • Determination of customer/vendor account group in target ( target is S/4HANA)

KBA 3426073 - Determination of the customer/vendor's account group in the target system during BP replic...

  • Employee replication

Employee Business Partner replication was temporarily disabled in 1909. This has been reverted.

KBA 2848981 - Unable to replicate Employee Business Partners using API_BUSINESS_PARTNER, DEBMAS and CREM...

  • The TM0001 driver role is only partially stored as a Business partner

KBA 3462733 - DRF_OUT doesn't include Driver Business Partner Role details

  • BP number

Read the blog BP Number determination during replication

  • Return supplier

KBA 2841479 - Returns Supplier is not replicated via DRFOUT

  • Issues related to the country specific fields

Belongs to the correct component of the country specific component

E.g., CIN number is missing for India from the payload << belongs to the component FI-LOC-SD-IN

  • Adjustments for Data Replication with Pending Messages

SAP Note 3314768 - S/4 BP: Adjustments for Data Replication with Pending Messages

  • Common key mapping issues:

In the following table, you can see some of the most common error messages returned during the inbound processing when there are key mapping issues in the payload:

 

Message text

Technical number

Object Identifier type 888 still exists for ID value

006(BS_SOA_COMMON)

Object identifier type 927 still exists for ID value

006(BS_SOA_COMMON)

External Address ID  already used for Business Partner Guid &

009(BP_DATAREPL_FND)

Address doesn't exist

010(AM)

Business partner &1 already exists

286(R1)

Address is still being used and may not be deleted

455(R1)

BP role &1 does not exist for partner &2

657(R11)

Task insert is not supported for existing customer

007(CVI_EI)

Task insert is not supported for existing vendor

042(CVI_EI)


Not always an error will be raised. Sometimes, wrong key mapping will just cause unexpected behaviors:

  • Partner Functions not created or updated
  • A Business Partner appears multiple times in the same payload

See blog Troubleshooting Business Partner Key Mapping Issues

  • How to create proper webservice ticket to SAP

    Please provide us the following information in the problem description, if you create a webservice ticket for us:

    1. Mention what is the target and the source system (and if there is any system in the middle). Mention also the type of the systems ( etc: Ariba, S4. C4C) and the system ID including the correct client. 
    2. Ensure that the R/3 connection is opened for both systems and the logon credentials are updated in the Customer Remote Logon updated
    3. Step by step instruction with every relevant data how the issue can be recreated (for manual replication, provide us replication model, example BP). Screenshots would be appreciated.
    4. If you have payload (failed/successful), provide us a message ID of the payload for SRT_MONI and the correct date (please make message ID of the payload copyable)
    5. Provide us a detailed error description including the message ID (please make the error message including the message ID copyable)
    6. Clear problem description
    7. Clear business requirement

  • How to identify the correct component
    Error occurs in the system, which is 
  •  C4C
    • Integration with ERP: LOD-CRM-INT-ERP
    • Integration with S/4HANA: LOD-CRM-INT-S4H
  • Ariba: BNS-ARI-SLP-XML
  • Non-SAP: Not supported
  • S/4HANA: LO-MD-BP-WS
  • ERP (MDG involved): LO-MD-BP-WS
  • MDG Portal (the error is not recreatable in the backend): CA-MDG-APP-BP
  • Replication happens via MDG Change request: CA-MDG-APP-BP

If you have any questions, feel free to ask on our SAP Community.

I hope this blog post was helpful for you. If so, click on "like" or "share". I'm looking forward to your feedback and thoughts or clarification questions you may have in the comment section below. 



Helpful links: 
1 Comment