The SAT ABAP runtime analysis tool can be used to identify performance problems in ABAP programs.
Questions that will be answered in this blog are:
- How to run the SAT tool?
- How to read the results of the SAT tool?
Starting the SAT tool
The SAT ABAP runtime analysis tool can be started with transaction SAT:
Top left there is a Tips & Tricks button. This will bring you the to the following tool:
Here you can compare the optimal and not optimal way of coding. By hitting measure runtime button you can actually compare in real time the difference between the 2 methods.
The performance issue program
To test the tool, we first write a simple test program:
REPORT zperftest2. DATA: zlt_vbak TYPE TABLE OF vbak. DATA: zls_vbak TYPE vbak. DATA: zlt_vbap TYPE TABLE OF vbap. DATA: zls_vbap TYPE vbap. DATA: zls_vbap2 TYPE vbap. SELECT * FROM vbak INTO TABLE zlt_vbak UP TO 100 ROWS. LOOP AT zlt_vbak INTO zls_vbak. SELECT * FROM vbap INTO zls_vbap. DO 10000 TIMES. zls_vbap2 = zls_vbap. ENDDO. ENDSELECT. ENDLOOP.
Now we start the SAT tool, enter the program name. Make sure the tick box evaluate immediately is on and press Execute.
Now the measurement will start.
Result of the trace tool
The result of the trace tool is as follows:
On the left side you see the split in where the program spends it time. Here you can see that most of the time is spend on internal processing and not on SQL statements. SQL statement can be analyzed from the SAT tool or from the ST05 SQL trace tool.
By double clicking on the the internal access the right hand side of the screen is filled. Here you can see in which code blocks the most net and gross time is spent. It does not always point you to the exact statements that are not ok, but it can point you to the program that is causing the biggest delay.
In our case the DO 10000 TIMES loop is the performance killer. With only SQL tracing this cannot be found.
Runtime analysis for web applications
For runtime analysis for web applications, read this dedicated blog.
Relevant OSS notes
Check and if needed you can apply these OSS notes to solve bugs in the SAT tool:
- 2524975 – Performance tracing overview: SAT, ST05 & ST12 traces
- 2737535 – Slow listing of traces in SAT (ABAP Runtime Analysis)
- 2838533 – Runtime Error in SAT during trace analysis (CL_ATRA_EXPAND)
- 2910818 – CX_SY_ARITHMETIC_OVERFLOW abortion in SAT when large trace file exists
- 2935022 – SAT: Delete trace files displayed wrongly as running
- 2958034 – SAT: Analysis of trace file produces runtime abortion in CL_ATRA_TRACE_DATA_NARROW
- 2958006 – SAT: Trace Files from other system not displayed correctly
- 2975331 – ABAP Trace File reorganization not complete (some AT* files are not deleted)
- 3054239 – SAT / ADT Profiler cannot terminate obsolete trace sessions
- 3100096 – Remove UML diagram function from SAT
- 3204807 – Misleading text in SAT in case of arithmetic or decimal overflow
- 3290913 – SAT: DB tables view from AS ABAP 7.53
- 3432668 – Improve labels in trace schedule popup in transaction SAT
One thought on “SAT ABAP runtime analysis”