SAPFree checklistPDF, Excel, Word exportSAP ECC / S/4HANA

ABAP Performance Tuning Checklist

Slow ABAP programs usually fail in the same few ways: SELECT in a loop, linear reads on large standard tables, reading far more columns than needed, and no measurement. This checklist gives you the checks to run before release, grouped by database access, internal tables, memory and analysis.

0%

0 of 32 items complete

8 critical items still open - these are the highest-risk gaps.

Download checklist:

Database access

Internal tables

Memory and strings

Analysis and measurement

S/4HANA and design

Critical items are the ones that most often cause production time-outs and memory dumps. Fix all critical items before tuning anything else, and measure before and after each change.

Review a slow custom report

Optional: send us a description of a slow ABAP report and we will discuss how a private review could help.

Optional. The tool and every export work without this. No spam.

How to use the checklist

Run through the groups on the program you are about to transport, ticking each item you have checked. Start with measurement: take a trace in SAT and an SQL trace in ST05 so you know the real cost centres instead of guessing. Then fix the critical items first, repeat the measurement and note the before and after in the change ticket. Export your ticked list to PDF or Excel as evidence for review.

Database access rules

The database is usually where the time goes. Reduce the number of round trips by reading once and processing in memory, reduce the data volume by selecting only the needed columns and rows, and make the database use an index by filtering on key or indexed fields. FOR ALL ENTRIES with an empty driver table selects the whole table, which is a classic production incident, so always test the driver table first. On HANA, push aggregation into the SELECT.

  • One SELECT before the loop, not one per iteration
  • Explicit field lists
  • Full key for SELECT SINGLE
  • Check the driver table of FOR ALL ENTRIES

Internal table access

A READ TABLE on a standard table scans linearly, which is fine for ten rows and painful for a hundred thousand inside a loop. Use a sorted or hashed table with the key you read by, or a standard table sorted once and read with binary search. Hashed tables give near constant time reads by unique key, and sorted tables help with range access and partial keys. Choose the table type at declaration based on how you will access it.

Measure, then change

Do not tune by intuition. A trace shows if the time is in the database, in ABAP or in a remote call. Compare runs with the same data and a warm buffer, and run the final check with a realistic volume. Document the result, because performance regressions usually return after later changes. Add a performance test to your release routine for programs that run in business-critical windows such as month-end or MRP.

Frequently Asked Questions

Why is SELECT inside a loop so slow?

Each SELECT is a database round trip with its own parsing and network cost. A loop with ten thousand iterations makes ten thousand round trips, where one set-based SELECT could fetch all rows at once. Read the data once into an internal table and look it up in memory.

What is wrong with FOR ALL ENTRIES and an empty table?

If the driver table is empty, the WHERE condition based on it is dropped and the statement reads the whole table. Always check that the driver table has rows before the SELECT. Also remember that FOR ALL ENTRIES removes duplicate result rows, which can change counts.

When should I use a hashed table?

Use a hashed table when you read single rows by a complete unique key very often, such as looking up material descriptions by material number. For range access or partial key reads, a sorted table is usually the better choice.

Which tools show where the time is spent?

SAT, the ABAP runtime analysis, shows time per statement and call. ST05 traces SQL, RFC and enqueue calls and shows the number of executions and duration. The Code Inspector flags known performance anti-patterns statically before you run anything.

If a long-running custom report is slowing your plant or finance close, Netray can discuss reviewing it with a private AI assistant that works on your own code, with developers approving every change.