Debugging RFC functions in SAP

7
6509

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.

7 COMMENTS

  1. When i am trying to change the username in Menu-utilities-settings-debugging,I am getting following error “Log on with a dialog user”.In this time What to do ?.

LEAVE A REPLY

Please enter your comment!
Please enter your name here