Skip to Content
Technical Articles

SAP S/4HANA Business Partner Conversion – Merge Customer and Vendor into single Business Partner

Introduction

In prepearation of a technical S/4HANA conversion it is mandatory to convert (CVI conversion) Customers and Vendors into Business Partners. Maybe you struggle with merge of Customer and Vendor into one Business Partner at CVI conversion. This Blog post is about to clarify how to merge Customers and Vendors into one Business Partner and what the result of this merge is.

This CVI conversion has to be processed in ECC environment as a preparation step for technical S/4HANA conversion. CVI Cockpit will guide you through this process. More information about CVI Cockpit you will find in blog post
New CVI Cockpit – Enabling Movement to SAP S/4HANA through seamless BP Synchronization

It might happen that it is needed to merge Customers and Vendors into one Business Partner. In this case the Business Partner represents a legal entity from legal point of view. This legal entity is characterized with

  • A single address
  • A single communication data
  • Several bank accounts
  • Several contact persons
  • Several credit cards

Target audience: Functional expert, Development expert

Version: SAP ECC 6.0 or higher

Prerequisits

At the following example Customer is the leading object. That means Customer data is the main information in regards to address and numbering (dependent on same number set up). If you decide to use Venbdor as leading object, start with Vendor conversion.
As the initial situation there are Customers and Vendors in the system. Usually Customer and Vendor master data is linked with cross reference. Meaning Customer number is stored at Vendor master (field LFA1-KUNNR) and Vendor number is stored at Customer master (field KNA1-LIFNR). If this link is not established yet, this will be a requisit. If this link is not available, alternatively address data can be used. Usually address data for the same legal entity is 100% equal at Customer and Vendor master data. That’s why uing Address data is much more complex and similiar to a duplicate check.

Initial situation

Separated Customer and Vendor master data with Contact Persons and bank accounts.

Initial%20Situation

Initial Situation

Customizing

All 4 synchronization directios have to be activated in customizing:

  • Customer -> BP
  • Vendor -> BP
  • BP -> Customer
  • BP -> Vendor

Enhancement Implementation

You have to implement your own Enhancement Implementation of BAdI CVI_CUSTOM_MAPPER. With SAP note

2363892 – Linking Customer and Vendor to a single Business Partner during initial load before upgrade to S/4

an example Implementation CVI_MAP_LEGAL_ENTITY is available at methods

IF_EX_CVI_CUSTOM_MAPPER~MAP_CUSTOMER_TO_BP
IF_EX_CVI_CUSTOM_MAPPER~MAP_VENDOR_TO_BP

This delivered implementation is a POC only, because following data has to be 100% equal:

  1. Customer/Vendor has to be linked via LFA1-KUNNR and KNA1-LIFNR as foundation
  2. Address data

I’ve never seen a system where address data of Customer and Vendor are the same. That’s why you have to create your own matching criteria in your own implementation. You can use standard implementations as template and do your own adjustments. Pay attention to inline documentation at each step. This will help you to decide which steps to take over.
Foundation is the assignment of Customer/Vendor with fields KNA1-LIFNR and LFA1-KUNNR. Sometimes it is enough to just use these assignment to merge Customer and Vendor to one Business Partner.

Conversion steps with MDS_LOAD_COCKPIT

Convert Customer to Business Partner

>Business Partner with Customer role has been created. Business Partner for each contact person and relationship to Customer Business Partner has been created.

Convert%20Customer%20to%20Business%20Partner

Convert Customer to Business Partner

Convert Vendor to Business Partner

Vendor data as of Vendor role, Contact Persons, relationships and bank accounts has been added to Customer Busines Partner. Business Partner has now the full set of Customer and Vendor data as foundation for reverse synchronization.

Convert%20Vendor%20to%20Business%20Partner

Convert Vendor to Business Partner

Convert Business Partner to Customer

Business Partner data inclusive vendor information as of Vendor Contact Persons and bank accounts are synchronized into Customer master.

Convert%20Business%20Partner%20to%20Customer

Convert Business Partner to Customer

Convert Business Partner to Vendor

Business Partner data inclusive Customer information as of Customer Contact Persons and bank accounts are synchronized into Vendor master.

Convert%20Business%20Partner%20to%20Vendor

Convert Business Partner to Vendor

All 3 data objects, Customer, Business Partner and Vendor, are synchronized now.

3 Comments
You must be Logged on to comment or reply to a post.
  • Hi Andi Mauersberger

    I am sorry but I must rectify some of your statements as they are unfortunately (at least) inaccurate:

    This delivered implementation is a POC only, because following data has to be 100% equal:

      1. Customer/Vendor has to be linked via LFA1-KUNNR and KNA1-LIFNR as foundation
      2. Address data
      3. Tax numbers
      4. Bank Data

    Tax numbers do not have to be the same. They are not checked by standard implementation of BADI CVI_CUSTOM_MAPPER. If there is a tax code that is not existing in the other party data then it is overtaken.

    Banks do not have the be the same – only if the same bank data is stored in both customer and vendor. If they have different data then all nonmatching bank data will be overtaken. Just the partner bank type needs to be different because it is a key field (unique) in BP.

     

    All 4 synchronization directios have to be activated in customizing:

      • Customer -> BP
      • Vendor -> BP
      • BP -> Customer
      • BP -> Vendor

    The BP backwards (-> Customer or -> Vendor) synchronization does not need  to be used (in ECC) if you’re not using Treasury module. That is even mentioned by SAP itself in the BP CVI Cookbook!

    In ECC it is enough to continue with Customer/ Vendor -> BP integration to ensure that each Customer/ Vendor has a BP (prerequisite for S/4 Upgrade).

     

    I wonder why the ridiculously high number ( 67! ) of fields being checked between vendor and customer was not mentioned. Among them customers can find fields like ‘Creation language’.

    Yes – if you have exactly the same data in customer and vendor but you created vendor while being logged on in English and some other person created customer with exactly the same data but was logged on in German your partners will not be synchronized due to address data mismatch.  Field responsible for that is ‘LANGU_CR’.

    Best Regards,

    Marek Turczyński

    • Hello Marek,

      thank you for precise statement. I had a look into this and corrected my post.

      You are right with the first part. Only address data has to be equal in standard BAdI implementation. Tax numbers and bank data are just added to the missing entity.

      For a correct merge/sync of customer/vendor into single BP it is mandatory to run all 4 synchronization steps. Otherwise you will miss customer’s contact persons at vendor and vice versa. If you are on S/4HANA later on, BP/customer/vendor are not in sync regarding contact persons.

      Best Regards
      Andi