Show TOC

Analyzing SQL Statements Using the SQL Trace ToolLocate this document in the navigation structure

When you create an SQL trace file, you can see exactly how the system handles database requests.

Prerequisites

The trace option Enable SQL trace is switched on for the relevant trace (before you start the ABAP Profiler). More on this: Setting Trace Preferences.
Enable SQL trace option in the preferences
Figure 1: The option Enable SQL trace lets you switch on the SQL trace in addition to the ABAP trace

Procedure

To display the SQL trace events for a trace:

  1. Open the ABAP Traces view.
  2. In the view, expand the relevant project tree and double-click the trace entry to open the trace overview.

    The Overview page appears for the selected trace.

  3. In the section Analysis Tools, open the link for SQL Trace.

Results

The system displays the Trace List tool in the SAP GUI window.

Trace List in the embedded SAP GUI
Figure 2: Trace List in embedded SAP GUI

You can then analyze:

  • The SQL statements executed by your application
  • The parameters that the system uses for particular database accesses and changes
  • How the system converts ABAP Open SQL statements (such as SELECT) into standard SQL statements
  • Where your application executes COMMITs
  • Where your application repeats the same database access
  • The database accesses and changes that occur in the update part of your application