Skip to Content

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:

MAP_BPS_TO_CUSTOMERS

MAP_BPS_TO_VENDORS

MAP_CUSTOMERS_TO_BPS

MAP_VENDORS_TO_BPS

 !https://weblogs.sdn.sap.com/weblogs/images/251863033/image003.jpg|height=336|alt=|width=388|src=https://weblogs.sdn.sap.com/weblogs/images/251863033/image003.jpg!

On our example we will have a look to method MAP_CUSTOMERS_TO_BPS,  and we will put a breakpoint on the following code:

 !https://weblogs.sdn.sap.com/weblogs/images/251863033/image005.jpg|height=336|alt=|width=364|src=https://weblogs.sdn.sap.com/weblogs/images/251863033/image005.jpg!

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:

 !https://weblogs.sdn.sap.com/weblogs/images/251863033/image007.jpg|height=336|alt=|width=390|src=https://weblogs.sdn.sap.com/weblogs/images/251863033/image007.jpg!

Then we open the “Payment transactions” tab and remove the existing Bank Details:

!https://weblogs.sdn.sap.com/weblogs/images/251863033/image009.jpg|height=336|alt=|width=412|src=https://weblogs.sdn.sap.com/weblogs/images/251863033/image009.jpg

We can proceed to the saving process:

!https://weblogs.sdn.sap.com/weblogs/images/251863033/image011.jpg|height=336|alt=|width=409|src=https://weblogs.sdn.sap.com/weblogs/images/251863033/image011.jpg

The debugger will stop on our breakpoint:

 !https://weblogs.sdn.sap.com/weblogs/images/251863033/image013.jpg|height=362|alt=|width=336|src=https://weblogs.sdn.sap.com/weblogs/images/251863033/image013.jpg!

We can press F5 to go inside this method to see if we can find where the mapping of the bank data is located:

 !https://weblogs.sdn.sap.com/weblogs/images/251863033/image015.jpg|height=374|alt=|width=336|src=https://weblogs.sdn.sap.com/weblogs/images/251863033/image015.jpg!

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.

 !https://weblogs.sdn.sap.com/weblogs/images/251863033/image017.jpg|height=352|alt=|width=336|src=https://weblogs.sdn.sap.com/weblogs/images/251863033/image017.jpg!</body>

To report this post you need to login first.

1 Comment

You must be Logged on to comment or reply to a post.

Leave a Reply