Introduction
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.
- Set all data (address, bank accounts, tax numbers) to customer as source and start conversion with vendor
- Set nothing as source
- Set only address to customer as source
Target audience: Functional expert, Development expert
Version: SAP ECC 6.0 or higher
Prerequisites
Customer/Vendor assignment
Foundation of merge scenario is customer/vendor assignment at KNA1 and LFA1 level. This assignment is used determine potential legal entity pairs:
Preparations steps at CVI Cockpit
You can run CVI_LEDH transaction out of CVI Cockpit as a preparation step. Please take care that all previous steps are done already:
Activate/Implement BAdI CVI_CUSTOM_MAPPER
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
Background Execution
To have option for background execution available it might be needed to implement SAP Note
3371701 - Enhancing the "Legal Entity Data Harmonization Report( Tcode CVI_LEDH)" with Background ex...
Set all fields to source customer and start conversion with vendor
Display Customer Master Data
Display Vendor Master Data
Check/Set CVI_LEDH values
Run Transaction CVI_LEDH either with enter Transaction directly or choose CVI Cockpit step 'Legal Entity Pre-Check'.
Run in Foreground: This option runs the report and displays the result on the next screen after completion. This option is recommended for smaller amount of data.
Run in Background: This option schedules the report to run in the background. This option is recommended for larger amount of data. A dialog box with the name of the ongoing background job appears.
Display Output: Choose the option to view the completed report. The report displays the result of the last report run (foreground and background) and does not automatically reflect the current state of master data.
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.
Run MDS_LOAD_COCKPIT (Business Partner Conversion)
Conversion Vendor -> Business Partner
Start MDS_LOAD_COCKPIT out of CVI Cockpit or use Transaction directly.
Run Conversion with direction Vendor -> Business Partner
Display generated 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.
Conversion Customer -> Business Partner
Start MDS_LOAD_COCKPIT out of CVI Cockpit or use Transaction directly.
Run Conversion with direction Customer -> Business Partner
Display generated Business Partner
Run Transaction BP
As you can see customer address is still in place and Business Partner got Vendor role.
Keep all fields empty and define no source and start conversion with vendor
Display Customer Master Data
Display Vendor Master Data
Check CVI_LEDH values
Run Transaction CVI_LEDH either with enter Transaction directly or choose CVI Cockpit step 'Legal Entity Pre-Check'.
Leave all source definitions blank.
Run MDS_LOAD_COCKPIT (Business Partner Conversion)
Conversion Vendor -> Business Partner
Start MDS_LOAD_COCKPIT out of CVI Cockpit or use Transaction directly.
Run Conversion with direction Vendor -> Business Partner
Open PPO
In this case no further conversion is possible.
Set only Address at CVI_LEDH
At this case same master data is used as at the previous case.
Set Customer in CVI_LEDH as source for Address
Run Transaction CVI_LEDH either with enter Transaction directly or choose CVI Cockpit step 'Legal Entity Pre-Check'.
Run MDS_LOAD_COCKPIT (Business Partner Conversion)
Conversion Vendor -> Business Partner
Start MDS_LOAD_COCKPIT out of CVI Cockpit or use Transaction directly.
Run Conversion with direction Vendor -> Business Partner
Open PPO
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
Re-Run Conversion Vendor -> Business Partner out of PPO
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
Conclusion
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.