h1. *Debug Customer/Vendor<->BP Synchronization *
This blog shows the way for debugging Customer/Vendor<->BP synchronization process using the Class CVI_MAPPER as an entry point for the debugger.
Imagine that we are synchronizing Customer to BP. And we have a problem there: when we remove the bank data from the Customer, the change is not synchronized on the BP. So we have a synchronization issue, because our BP has incorrect data.
CVI_MAPPER is a class that allows us to stop the debugger on the mapping process between Customer and BP (This is also valid for all the synchronization types Customer<->BP or Vendor<->BP).
So we can open SE24 and Display the details of CVI_MAPPER class:
There we can see a lot of interesting methods we can use for stopping the debugger and check why our bank data is not removed on the BP…
For us the most important methods are the following ones:
On our example we will have a look to method MAP_CUSTOMERS_TO_BPS, and we will put a breakpoint on the following code:
On this code, the customer data is filled on <customers> variable and the BP data is returned on l+s_partners +variable.
So we start XD02 transaction and open our Customer:
Then we open the “Payment transactions” tab and remove the existing Bank Details:
We can proceed to the saving process:
The debugger will stop on our breakpoint:
We can press F5 to go inside this method to see if we can find where the mapping of the bank data is located:
We found one method named “map_customer_bankdetails”, where the system maps the customer bank data to the BP bank data. If we enter using F5 to the method and see that in the last line, the variable LS_BP_BANKDETAILS is returned.