This blog is about legal entity merge of customer and vendor into single Business Partner during CVI conversion. A functional description can be found at blog post
SAP S/4HANA Business Partner Conversion – Merge Customer and Vendor into single Business Partner
This blog post is focusing on transaction CVI_LEDH (Legal Entity Data Harmonization Report).
Transaction CVI_LEDH lists customer and vendor records that cross-reference each other forming a legal entity pair but are not mapped to a business partner.
During the synchronization process in MDS Load Cockpit (MDS_LOAD_COCKPIT), there may be errors for the customer and vendor legal entity pair due to inconsistencies in the address, bank details and tax data between them.
This report allows you to select the customer or vendor to be the leading entity for address, tax details and bank data. The MDS Load Cockpit (MDS_LOAD_COCKPIT) uses the leading entity information from this report to synchronize the legal entity customer and vendor pair to business partner. This will harmonize the data and avoid errors for legal entity pairs.
Here I want to show 3 different cases of maintaining data at CVI_LEDH and describe how MDS_LOAD_COCKPIT will react at CVI conversion.
Customer and vendor have different data at address, bank accounts, tax numbers.
Target audience: Functional expert, Development expert
Version: SAP ECC 6.0 or higher
Foundation of merge scenario is customer/vendor assignment at KNA1 and LFA1 level. This assignment is used determine potential legal entity pairs:
You can run CVI_LEDH transaction out of CVI Cockpit as a preparation step. Please take care that all previous steps are done already:
To work with legal entity merge scenario it is very important to activate enhancement implementation CVI_MAP_LEGAL_ENTITY of BAdI CVI_CUSTOM_MAPPER via customizing:
IMG: Cross-Application Components->Master Data Synchronization->Customer/Vendor Integration->Business Partner Settings->Business Add-Ins (BAdIs)->BAdI: Data Assignment BP <-> Customer/Vendor/Contact Person
It might be helpful to restrict this merge scenario to certain account groups. In this case you have to create your own BAdI implementation as a copy of standard delivery implementation.
Important are the following methods for account group restriction:
IF_EX_CVI_CUSTOM_MAPPER~MAP_CUSTOMER_TO_BP
IF_EX_CVI_CUSTOM_MAPPER~MAP_VENDOR_TO_BP
Run Transaction CVI_LEDH either with enter Transaction directly or choose CVI Cockpit step ‘Legal Entity Pre-Check’.
Check Address differences
As you can see there are address differences City, Name, Search Term 1 and Street.
Red traffic light at tax shows that there are differences at tax numbers.
Bank data is a special case. Standard logic for bank data works as following:
Independent on which value (customer or vendor) is selected, if there is an entry in CVI_LEDH for bank data both bank accounts of customer and vendor are transferred to (collected at) Business Partner.
If no source value is set, bank data is compared. If there are differences you will get an error message at PPO that bank data is different.
Set all fields to Customer as source object.
Start MDS_LOAD_COCKPIT out of CVI Cockpit or use Transaction directly.
Run Conversion with direction Vendor -> Business Partner
Run Transaction BP
As you can see customer address is used.
Tax number (VAT Tax Number) is taken from Customer as well.
Bank Accounts are merged/added to Business Partner.
Start MDS_LOAD_COCKPIT out of CVI Cockpit or use Transaction directly.
Run Conversion with direction Customer -> Business Partner
Run Transaction BP
As you can see customer address is still in place and Business Partner got Vendor role.
Run Transaction CVI_LEDH either with enter Transaction directly or choose CVI Cockpit step ‘Legal Entity Pre-Check’.
Leave all source definitions blank.
Start MDS_LOAD_COCKPIT out of CVI Cockpit or use Transaction directly.
Run Conversion with direction Vendor -> Business Partner
In this case no further conversion is possible.
At this case same master data is used as at the previous case.
Run Transaction CVI_LEDH either with enter Transaction directly or choose CVI Cockpit step ‘Legal Entity Pre-Check’.
Start MDS_LOAD_COCKPIT out of CVI Cockpit or use Transaction directly.
Run Conversion with direction Vendor -> Business Partner
In this case Address would taken from Customer based on CVI_LEDH setting. Now it stops at Tax number check.
There are two possibilities to correct this:
Adjust Vendor tax number based on Customer data out of PPO.
Or set source value
Stay at or navigate into PPO to run synchronization again out of PPO.
Current PPO error turns into status green.
Run MDS_LOAD_COCKPIT again
A new error occurs at PPO
As you can see it is very important to maintain CVI_LEDH for Legal Entity Merge scenarios. Otherwise you will end up into PPO errors, latest at bank data.
A workaround would be to create you own enhancement implementation.
Maintain CVI_LEDH might be a big workload but most comfortable way for merge scenario.