Skip to Content
Technical Articles
Author's profile photo Henrietta Helena Erdei

BP Number determination during replication

We are getting many questions, how the number is determined for the BP/customer/vendor/contact person. For better understanding the number determination of the Business Partner generally and the meaning of internal and external number range, please start with reading the blog SAP S/4HANA Business Partner – General Number Settings .

In this post blog, I’ll guide you to understand Business Partner number range during the replication processes between different systems through examples.

Introduction

Purpose and target

The purpose of this document is to describe how the number of the BP is determined during the replication scenarios between MDG/ C4C/Ariba and ERP/ S/4HANA systems. It is introduced through an example.

The content of the blog is the following:

  1. How the Business Partner Number Range assignment works in an Integration Scenario between MDG and S/4HANA system
    1. Contact person replication
    1.2. MDG key mapping
  2. How the C4C Business Partner Number Range assignment works in an Integration Scenario between C4C and ERP
  3. How the C4C Business Partner Number Range assignment works in an Integration Scenario between C4C and S/4HANA
  4. How the Ariba Business Partner Number Range assignment works in an Integration Scenario between Ariba and ERP and/or S/4HANA
  5. Debmas/cremas

Target audience: Functional expert

Version: SAP S/4HANA, ERP

How the Business Partner Number Range assignment works in an Integration Scenario between MDG and S/4HANA system

1.      Scenario: To achieve the same number in the source and in the target system

BP was created with BP grouping (0002-External) in the source system and send it to the target system via DRFOUT

XML looks like the following:

 

It is recommended to use the same number range settings both in the source and in the target system.

 

2.      Scenario: To achieve different number in the source and in the target system

BP was created with BP grouping (0001-Internal) in the source system and send it to the target system via DRFOUT

XML looks like the following:

 

Contact person replication

It is working in the same way as the BP replication.

1.      Scenario:

BP organization and the contact person were created with external number range and sent it to the target via DRFOUT.

XML looks like the following:

 

2.      Scenario

BP organization and the contact person were created with internal number range and sent it to the target via DRFOUT.

XML looks like the following:

BP:

Contact Person:

 

MDG-key mapping

If the BP has already sent from the MDG to the S/4HANA system and the BP number in the S/4HANA system is not the expected one, the key mapping can be corrected by using the transaction MDG_KM_MAINTAIN.

Steps:

  1. Run Transaction: MDG_KM_MAINTAIN, a browser window will be opened.
  2. Select the Business Object type : Customer/ Vendor.
  3. Business System : Sender system ID.
  4. Object ID type/Object ID : ERP Customer number / mentioned the customer number.
  5. Click Add row on table toolbar.
  6. System ID –> Receiver system ID.
  7. Object ID –> Customer number in receiver system.
  8. Save the data.

How the C4C Business Partner Number Range assignment works in an Integration Scenario between C4C and ERP

If a BP is created in the ERP system, during the number range determination the system is checking what was the last assigned number for the BPs. By default the Standard Grouping for Internal Number Assignment will be selected. During the replication process, this BP number will be sent out to C4C. In C4C the BP has two different number: One which was sent from the ERP system (external number from the C4C perspective ) and one which was get from the C4C side (internal number from the C4C perspective) .

If a BP is created in C4C system, during the number range determination the system is checking that what was the last assigned number for the BPs. During the replication process, the system is checking what is the next available internal number in the C4C system and it will also automatically assign the next available number reserved for ERP as an external number. ID mapping is updated (C4C ID – 10000 and ERP ID – 70000). Upon replication to ERP, a new BP will be created in ERP with the reserved number (E.g., 70000).

 

How the C4C Business Partner Number Range assignment works in an Integration Scenario between C4C and S/4HANA

Based on the SAP Standard delivered CPI/PI mapping in the C4C generated BP payload (BusinessPartnerSUITEBulkReplicateRequest) the tag <NumberRangeIntervalBusinessPartnerGroupCode> is not populated. Whenever the C4C account data is received in S/4HANA BP interface BusinessPartnerRelationshipSUITEBulkReplicateRequest_In, the Internal standard grouping (standard setup is 0001) is determined automatically by default.

To achieve the same number in the C4C and in the S/4HANA system the tag <NumberRangeIntervalBusinessPartnerGroupCode> can be populated in the middleware (CPI/PI). If CPI is used, instead of modifying the standard iflow, the post-exit iflow can be used to populate the tag.

Regarding the C4C integration, you can read the following blog:

SAP Cloud For Customer and SAP S/4HANA Business Partner Integration – Creating BPs using a specific group number range

 

How the Ariba Business Partner Number Range assignment works in an Integration Scenario between Ariba and ERP and/or S/4HANA

It is working in the same way as explained above regarding the C4C ERP and C4C S/4HANA integration. In Ariba the BP has two different number: One which was sent from the ERP/S4HANA system (external number from the Ariba perspective ) and one which was get from the Ariba side (internal number from the Ariba perspective)

 

Debmas/cremas

Scenario:

Customer/vendor was created with account group (0001-External) in the source system and send it to the target system via BD12/BD14.

The ALE inbound processing of the customer and vendor master assumes that the object ID (the customer or vendor number) is always delivered in the IDoc. In the case of the customer master, this affects segment field E1KNA1M-KUNNR; in the case of the vendor master, this affects segment field E1LFA1M-LIFNR.
This is also the case if an account group with internal number assignment is used in the creation of the customer or vendor. In this situation, the numbers under which the customers or vendors are created should be determined in advance and the IDoc entered in the above-mentioned segment fields.
To determine the customer or vendor numbers in advance, BAPIs BAPI_CUSTOMER_GETINTNUMBER (customer master record) and BAPI_VENDOR_GETINTNUMBER (vendor master) are available as of Release 4.5 .
In earlier releases, you have to determine the next free numbers from the number range objects (DEBITOR for customer, CREDITOR for vendors) yourself and increase the number range after this.

ALE inbound processing of Customer and Vendor master assumes that the object ID (Customer or Vendor number) is always delivered in the IDoc. However, this note provides a workaround which no longer works in S/4HANA. Differently from ECC, the number range has to be defined as external for Vendors and Customers that will be created from IDocs, otherwise the integration will fail with many different errors.

As standard behavior, Customers and Vendors number ranges have to be set as external in order to allow the creation of both entities from IDocs.

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: 

Assigned Tags

      Be the first to leave a comment
      You must be Logged on to comment or reply to a post.