In this recipe, we will see how we can carry out an SQL trace. We will run the trace on the program RIBELF00
(Display Document Flow).
We will now carry out the following steps:
RIBELF00
. We enter on transaction SE38
the program name in the field provided, and execute the program in order to display the selection screen. We will not execute the program, yet we will enter the input values on the selection screen.ST05
. The screen appears, as shown in the following screenshot:The Activate Trace button switches on the database trace. Then, any database-related activity related to SELECT
and UPDATE
statements are recorded. This may be displayed using the Display Trace button.
For carrying out a trace, you may even stop a program in the debugger in one session and then switch on the trace in another session. In addition, you may enter data on a SAP entry screen and just before pressing the Save button, switch on the SQL trace, and then switch off the trace after Save is pressed and the success message appears. In this case, all database statements are executed between the time the Save button is pressed and the message display are recorded.
It is recommended that you run only the concerned program transaction and stop any other activity. Otherwise, many irrelevant entries will also be included in the trace result, making it very large and difficult to read.
The next recipe will cover how the trace results may be displayed.
18.118.93.175