Sometimes when we do data upload from CRM to ERP and get ERP errors, we want to debug into ERP from the LUW in CRM outbound queues.
Usually we do this by de-registering the RFC destination in the outbound scheduler in SMQS. However, this is sometimes incovenient because all outbound queues for this RFC destination is stopped and this may affect other users, and also you may not be authorized to de-register the queues.
Therefore now we introduce a way to debug the outbound queue without de-registering.
Please refer to the following steps:
(1)set a breakpoint in method CL_SMW_MFLOW->PROCESS_OUTBOUND at line 37 (after calling cl_smw_mflow-> set_header_fields).
If you are updating the application data in SAP GUI, please set a session breakpoint.
If you are updating the application data in SAP WebClient UI, please set an external breakpoint. (If this external breakpoint is not called afterwards, please activate it in all servers in tcode SRDEBUG).
(2)Process the application data and save. e.g. Save after creating/changing business partners or business transactions.
(3)The program stops at the breakpoint.
Please change the variable “ls_header-dbgmode” to value ‘X’ :
Then press F8 .
(4)Go to Tcode SMW01 to view the Bdocs. The Bdoc will have status “To be processed (Debug)”.
Please enter “/h” to activate the debugger and then select the Bdoc and press the “reprocess” button.
(Please note that this is actually a “process” and not a “reprocess” because we set to debug mode and the Bdoc is not yet processed.)
(5) Then it goes to debug mode.
If you are using new debugger, please select the menu path : [Settings-> Change debugger Profile/ Settings]
Please set the flag “block sending” and continue.
If you are using classic debugger, please refer to the following screenshot:
After setting this flag, please press F8.
(6) In the popup, please press “yes”.
(Please ignore this message because this is actually a “process” and not a “reprocess” because we set to debug mode and the Bdoc is not yet processed.)
(7)Go to tcode SMQ1 (or use the queue monitor in SMQS), you will find the queue is stopped with status “Ready” :
(8)double click on the queue name twice and you can debug the LUW now.
Press the “debug LUW” buton and then you debug into ERP. (This requires the RFC user to be “dialog” type.)