DEBUGGING CUSTOMER DELTA DOWNLOAD
This is a summary about how to debug a customer delta download from an ECC system to a CRM system. The main places for setting the breakpoints are indicated here.
Modify any data in the ECC system with transaction XD02 and activate the debugging mode with /h in the command field. Then save the data.
1.- Data is collected in PI_BP_CUSTOMER_BTE_1321 (EVENT 132 Tx BF31). This is the first place to set an external breakpoint. Then, navigate into the following code:
1.1.- PERFORM START_DOWNLOAD (filters are checked)
Loop AT gt_kunnr into ls_kunnr
1.1.1.- PERFORM CHECK_FILTER_COMPLETE
(lv_filter_ok = X ) checking if customer can be downloaded according to the filtering.
1.1.2.- PI_BP_MAP_CUST_TO_BUPA (generates the data to be send to CRM systems –> BAPIMTCS: structures that contain the modified data in the customer) Go inside this function….
220.127.116.11.- PERFORM GET_BUPA
-PERFORM MAP_KNA1 (F8) (create the Complex Structure)
LS_CENTRAL_DATA contains what has been changed
In this point, when data is set in the Complex Structure, before creating the BAPIMTCS structure to send the data to CRM, the following user exit is call:
Call User Exit DE_EIOUT (tx: bf34)
-FM: PI_BP_MAIN_TO_BAPIMTCS (creates the lineal structure)
At the end of FM PI_BP_MAP_CUST_TO_BUPA we have the BAPIMTCS structures to be sent to CRM (lt_bapimtcs). In case of number of rows sent from here are different than the number of rows received by CRM, this means that a problem happens in MW!)
2.- Up here, the debugging has been done in R/3.
In this moment data are collected in the Inbound Queue in CRM (SMQR)
R3A* queue should be deregistered, then the R/3 Adapter in CRM is debugged.
2.1.- BUPA_MWX_BDOC_DOWNLOAD_R3A. Mapping BAPIMTCS structures into mbdocs (complex structure)
In the previous FM MAP_BAPIMTCS_AND_PROCESS we should have the same number of rows in the BAPIMTCS structure (ti_bapimtcs) that we saw in R/3
2.2.- Validation FM: CRM_BUPA_MAIN_VAL
In this FM, the relevant FM’s of table CRMC_BUT_CALL_FU are executed for event CRMIN and object BUPA.
For instance: –> BUPA_INBOUND_MAIN_CENTRAL (takes care of the mapping of the central data)
–> CRM_BUPA_INBOUND_MAIN_MD (CRM specific data )
At this point, data are in the Complex Structure that is the only way that CRM is able to understand the information (LS_BP)
(loop AT message_ext_partners INTO ls_bp)
From here , different BAPI’s are called for saving the data in the CRM system.
In case we need to debug an initial or request download, the starting point should be PI_BP_CUSTOMER_MAIN_EXTRACT for CUSTOMER_MAIN and PI_BP_CUSTOMER_REL_EXTRACT for CUSTOMER_REL. These are the extractor modules for a Customer and its Relation/Partner Functions in the ECC system. After extracting the data, these modules call the subroutine START_DOWNLOAD which does the filtering and mapping of data to complex structure and forward it to the middleware to be sent to the CRM system.