Debugging RFC functions in SAP

During the integrated tests, sometimes we need to debug a RFC that has been called from ASP.NET, just because the bug we are facing does not happens at SE37.

Debugging

So, everytime we needed to debug the RFC, we have to insert code something like following:

IF <<CONDITION>>. WHILE 1 EQ 1. BREAK-POINT. ENDWHILE. ENDIF.
By doing so, the program may get stuck. Then we have to go to SM50 and debug it.

Following are the easy alternate steps for RFC debugging:

  • Get the username that makes the RFC call into SAP in ASP
  • Fire up SE37, go to the code section of your RFC
  • Look at the menu on top, click on ‘Utilities’
  • Click on Settings
  • Go for the Debugging tab
  • Fill in the username that will make the call from ASP
  • Click IP Matching ( otherwise a debug session appears for every time any user makes the call )
  • Session breakpoint active immediately is nice to click as well
  • Put your external breakpoint where you need it ( click the icon with the stop sign and the little man )
  • Test your ASP connector
  • The breakpoint should come into effect , a debug window will pop up
  • You might not have the authorization to do this, if it doesnt work, use SU53 to find out what you’re missing.

Debug RFC

This should work.

You might also be interested in these posts:

  1. Debugging Smartforms and SAPScript in ABAP
  2. Debugging Background Scheduled Jobs in SAP
  3. BDC Session – Automatic Execution from Report
  4. Assign a T-code to Maintenance View in SAP
  5. Conversion Routine in SAP

5 Responses to “Debugging RFC functions in SAP”
CNA Certification Posted on May 28, 2010 at 5:02 AM

this post is very usefull thx!

Passing the CNA Exam Posted on June 5, 2010 at 11:13 AM

What a great resource!

Rafael Posted on May 27, 2011 at 9:26 PM

Does this work for JCOs?

Admin Posted on June 4, 2011 at 9:56 AM

Please go ahead and check.

Sahil Posted on October 13, 2011 at 8:13 PM

Thanks! Works great.

Post a Comment