Show TOC

Request-Based Debugging - ProcedureLocate this document in the navigation structure

Procedure

Proceed as follows to use request-based debugging:

Setting External Breakpoints

  1. Log on to Microsoft Windows on the frontend PC. The Microsoft Windows user that you use to log on with becomes the current end user.

  2. Start SAP GUI for Windows.

  3. Log on to the AS ABAP that is to be used for checking HTTP or RFC requests.

  4. The AS ABAP user that you used to log on to the AS ABAP with, and the user of the AS ABAP that is to process the requests that are to be checked should both be available using the Rights for Debugging.

  5. Open the Object Navigator ( SE80) or the ABAP Editor ( SE38).

  6. Choose Start of the navigation path Utilities Next navigation step Settings Next navigation step ABAP Editor Next navigation step Debugging End of the navigation path.

    • In the screen area ABAP Debugger, ensure that the new ABAP Debugger os the standard Debugger of the current user session: Select the radio button New Debugger.

    • In the Debugging External Requests screen area, specify request-based debugging as the required debugging variant: Select the Terminal ID radio button for this.

    • If it has not yet happened, the terminal ID is generated automatically for the current end use and then stored in the Windows Registry of the front-end PC.

    • The terminal ID of the current end user is displayed in the write-protected field next to the Terminal ID radio button. It flags external breakpoints that are yet to be set.

    • Apply the settings: Choose Transfer (Enter).

  7. Now set the external breakpoints: Open the source code of the program to be tested in the ABAP Editor ( SE38, SE80, SE37, SE24,…) and set external breakpoints. See External Beakpoints for this.

    The new external breakpoints, as well as all those previously set by the current user, are flagged according to the debugging variant that was last selected (user-based debugging here) and their related settings (the temrinal ID of the current end user here). Related information appears in the status row of the ABAP Editor:

  8. Do not log off from the AS ABAP. This retains the dialog session in which the breakpoints were set so that the ABAP Debugger can start later within the framework of this dialog session.

  9. The temrinal ID of the current end user can be looked up at any time in the following way:

    • In the Object Navigator (SE80) or the ABAP Editor (SE80), choose Start of the navigation path Utilities Next navigation step Settings Next navigation step ABAP Editor Next navigation step Debugging End of the navigation path.

    • The terminal ID appears on the Debugging External Request screen area in the write-protected field next to the Terminal ID radio button.

    If required, the current terminal ID should be shared with the end user who will start the related request. The terminal ID can, for example, be sent by e-mail.

  10. The request to be checked can only be sent (using HTTP or RFC) to the AS ABAP.

Send Requests

The request to be tested should be assigned to the terminal ID that is valid for related external breakpoints. Proceed as follows:

  1. Log on to Microsoft Windows on the frontend PC. The Microsoft Windows user that you use to log on with becomes the current end user.

  2. Start the request. The procedure for this depends on the following aspects:

    • The current end user is the same as or different than the end user who set the breakpoints.

    • The type of GUI of the application to be tested (more exact: The GUI that sets the request).

      Proceed as follows:

      End User

      UI

      Procedure

      The current end user is the same as the one who previously set the breakpoints.

      The terminal ID of the current end user flags the related breakpoints.

      It can be associated with the request automatically.

      SAP GUI for Windows

      1. In the window of the SAP GUI that initiates the request, enter /htid in the command field.

        From now on, all requests initiated from this window (that is, from this external mode) are automatically given the terminal ID of the current end user. The system displays an appropriate message in the status bar.

      2. Start the request.

       

      Microsoft Internet Explorer

      1. Start Microsoft Internet Explorer using the SAP HTTP plug-in for IE.

      2. A new browser window opens. Another window of the plug-in appears in the foreground.

      3. In the plug-in window, choose Start Transaction with a double-click. Do not close the window of the plug-in.

      4. In the browser window start the request as normal.

        For more information about SAP HTTP plug-in for IE, see SAP Note 1041556.

      The current end user is different than the user who set the breakpoints:

      The terminal ID that applies to the related breakpoints must be entered manually.

      SAP GUI for Windows

      1. Determine the terminal ID that applies to the related breakpoints.

        Contact the person who set the breakpoints for this. They can, for example, send the terminal ID by e-mail.

      2. In the window of the SAP GUI that initiates the request, enter /hset tid= <tid> in the command field. Enter the terminal ID for <tid>.

        From this point all requests initiated from this window of the SAP GUI (that is, this external mode) are assocated with the terminal ID that is entered.

      3. Start the request.

  3. After executing the program has achieved an external breakpoints and the terminal ID of the request matches that of the external breakpoint, the ABAP Debugger starts in the new main mode of the dialog session where the external breakpoint was set. The ABAP Debugger window is focussed and you can check and control the remaining program process flow as normal and then cancel the debugging session.

Call terminal ID and assign to the main mode.

You can always assign a terminal ID (either of the current user or of another user) to the current main mode of the application for applications with an SAP GUI-based interface. You can change or remove the assignment later. All requests that were initiated in a main mode are flagged with the related terminal ID.

In the next window of the SAP GUI, enter one of the following commands in the command field of the application:

/htid

Terminal ID of the current end user is assigned

/hset tid=<tid>

Any terminal ID is assigned

/hget tid

Assigned terminal ID is displayed

/hdel tid

Assignment is reset