Show TOC Start of Content Area

Component documentation Debugging ABAP Code from Within the Developer Studio Locate the document in its SAP Library structure

Let us assume you have a Web Dynpro application that calls function modules using Adaptive RFC, and you want to debug the corresponding ABAP code from within the Developer Studio.

You can do this quite simply, provided that the SAP GUI is installed on your local machine and the ABAP system is connected to via a dedicated server (no load balancing). You then only have to activate the relevant setting for external debugging in the ABAP Workbench and set the breakpoint in the ABAP code before starting the Web Dynpro application on the J2EE Engine. 

Prerequisites

This graphic is explained in the accompanying text

Step-by-Step Procedure

  1. Use the SAP GUI to log on to the system or server to which the RFC call is to take place.

This graphic is explained in the accompanying text

You should log on with the same user with which the call will take place.

Due to the large amount of parallel calls, using a collective user is not recommended.

 You should try to execute the application with a dedicated user throughout the duration of the debugging session.

  1. Activate external debugging in the ABAP Workbench.
    1. To do this, call the ABAP Workbench using one of the transactions SE37, SE38, or SE80.
    2. Choose Utilities à Settings and then the ABAP Editor tab followed by Debugging.
    3. Enter the user for which the debugging session is to take place. Select the Active checkbox and deactivate IP-Matching.
    4. Save your settings.
  2. Set an HTTP (external) breakpoint in the ABAP code.
    1. Display the source code of the relevant function module.
    2. Position the cursor at the place in the source code where execution is to be stopped.
    3. Choose the external breakpoint icon This graphic is explained in the accompanying text from the toolbar. 

The relevant line is highlighted.

This graphic is explained in the accompanying text

This graphic is explained in the accompanying text

Note that the validity period for the external breakpoint is limited to 2 hours. If you require more time to debug, you must set the breakpoint again.

  1. Start the J2EE Engine and – if you have not already done so – deploy your application.
  2. Start your test application on the J2EE Engine.

The following example of a Web Dynpro application is used to display flight data from the SAP system in a table.

This graphic is explained in the accompanying text

The J2EE Engine establishes a connection to the SAP GUI and starts the ABAP Debugger in a new GUI session. The Debugger is stopped at the line in the ABAP code at which the breakpoint is set.

This graphic is explained in the accompanying text

 

End of Content Area