How to debug CRM outbound queue for upload without de-registering the RFC destination
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.)
Hi Ellen, this is what exactly I'm looking for, thanks for sharing!
Hi Ellen,
Thanks a lot for a very wonderful step by step SAP CRM middleware debuggiing blog. I tried to simulate the scenario by creating a Business Partner and to block the queues to SAP ERP. I performed all the steps till 6 but after that the queues are not getting blocked in SMQ1 Transaction. Neither I can see any queues in SMQS Transaction.
Can you let me know if something more needs to be done here ? Or I'm missing some steps ?
Thanks in advance for your help.
Best Regards,
Samantak Chatterjee.
Hi Samantak,
(1)Did you select the "block sending" flag in the debugger? if it does not work, please also try pressing the "save" button in debugger after selecting the "block sending" flag.
(2)There is also possibility that the outbound queue is not generated. Please check whether the data has been replicated to ERP. (Also. you can test by de-registering the outbound queue to see whether the queue is generated).
If the outbound queue is not generated, there are multiple reasons. Firstly, please check whether there are filters in SMOEAC for business partners to prevent the upload. Secondly, please check whether the FM are registered according to note 757955 and see if there is Z-FM. If this does not resolve, you can stop the CSA* queue in SMQR and debug from here to check why the outbound queue is not created.
Hi Ellen,
Thanks for your valuable input. I checked the details which you provided. You are correct regarding the transfer of data from SAP CRM to SAP ECC. But we don't have any Z-FM. I even checked the Note 757955.
I was able to progress to the next step i.e. getting the queues in the SMQ1 Transaction code. But if I try to debug the queues then the queues are processed very fast and the debugger is not getting triggered.
Is there any other work around for the same ?
Thanks a lot for your help.
Best Regards,
Samantak Chatterjee.
Hi Samantak,
If you follow the steps, the queue will be in SMQ1 with status "Ready" and it will not process automatically. Then you click the queue name twice and press "debug LUW" button to trigger the debugger.
Best Regards,
Ellen
Hi Ellen,
Many thanks for your reply.
I the problem which I'm facing is that when ever I'm clicking on the Debug LUW Button, the queues are getting processed instead of the debugger getting triggered. I tried to put the break point in the function module but the same is not working.
Any further pointers regarding this problem.
Thanks for your help in advance.
Best Regards,
Samantak Chatterjee.
As I mentioned in the blog, debug the LUW requires the RFC user to be "dialog" type.
If you cannot go into the debugger, it is probably the RFC user is not dialog user. The RFC user is maintained for the ECC RFC destination in CRM SM59. Please make sure this user is dialog type in the ECC (SU01).
😆