Skip to Content
Author's profile photo Former Member

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.

/wp-content/uploads/2014/12/1_612463.png

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).

/wp-content/uploads/2014/12/2_612471.png

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’ :

/wp-content/uploads/2014/12/3_612472.png

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.)

/wp-content/uploads/2014/12/5_612477.png

(5) Then it goes to debug mode.

If you are using new debugger, please select the menu path : [Settings-> Change debugger Profile/ Settings]

/wp-content/uploads/2014/12/6_612478.png

Please set the flag “block sending” and continue.

/wp-content/uploads/2014/12/7_612482.png

If you are using classic debugger, please refer to the following screenshot:

/wp-content/uploads/2014/12/8_612483.png

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.)

/wp-content/uploads/2014/12/9_612484.png

(7)Go to tcode SMQ1 (or use the queue monitor in SMQS), you will find the queue is stopped with status “Ready” :

/wp-content/uploads/2014/12/10_612488.png

(8)double click on the queue name twice and you can debug the LUW now.

/wp-content/uploads/2014/12/11_612489.png

Press the “debug LUW” buton and then you debug into ERP. (This requires the RFC user to be “dialog” type.)

/wp-content/uploads/2014/12/12_612490.png

Assigned Tags

      8 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member

      Hi Ellen, this is what exactly I'm looking for, thanks for sharing!

      Author's profile photo Samantak Chatterjee
      Samantak Chatterjee

      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.

      Author's profile photo Former Member
      Former Member
      Blog Post Author

      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.

      Author's profile photo Samantak Chatterjee
      Samantak Chatterjee

      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.

      Author's profile photo Former Member
      Former Member
      Blog Post Author

      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

      Author's profile photo Samantak Chatterjee
      Samantak Chatterjee

      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.

      Author's profile photo Former Member
      Former Member
      Blog Post Author

      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).

      Author's profile photo Former Member
      Former Member

      😆