SAP how-to guides · LessonBy Ravi M, SAP Trainer, 10 yrs · Published · Updated · SAP S/4HANA 2023 · all levels
SAP Debug ABAP
Debugging lets you step through ABAP and inspect data at runtime. This guide shows how to start and use the debugger effectively.
Quick answer
The skill is breaking in the right place, use a breakpoint on the error message or exception rather than stepping through thousands of lines.
Key takeaways
- Set a breakpoint: in the editor (ADT/SE80), or type /h in the command field before running a transaction.
- Run the program/transaction; execution stops at the breakpoint.
- Step through with F5 (into), F6 (over), F7 (return); inspect variables and internal tables.
- Watch out: a session breakpoint never fires for an OData or RFC call; those need an external breakpoint.
Step by step
- Set a breakpoint: in the editor (ADT/SE80), or type
/hin the command field before running a transaction. - Run the program/transaction; execution stops at the breakpoint.
- Step through with F5 (into), F6 (over), F7 (return); inspect variables and internal tables.
- Use conditional/statement/exception breakpoints to break at the right place (e.g. on a message or exception).
- Fix the issue in code (in DEV), then re-test.
Notes and tips
The skill is breaking in the right place, use a breakpoint on the error message or exception rather than stepping through thousands of lines. Watchpoints break when a variable changes. Be careful changing values, especially in production (tightly controlled). Reading ST22 dumps complements debugging.
Common pitfalls
- Following steps without understanding the concept.
- Skipping testing in a non-production system.
- Applying blindly to a different scenario.
Practice challenge
+0 XPStreak ×0
Question 1 of 3
Which statement is true of Debug ABAP?