How well you use the debugger largely determines how productive ABAP development is. Where standard source is readable, it also lets you follow what SAP itself is doing.
Starting the debugger
| Method | How |
|---|---|
| Breakpoint | Set a stop position in the source |
| /h in the command field | The debugger starts at the next statement |
| BREAK-POINT statement | Written in the source; never transport it |
| BREAK username | Stops only for that user |
| Run from SE38 | Choose debug execution |
Kinds of breakpoint
| Kind | Behaviour |
|---|---|
| Session | Active for the logon session; the usual choice |
| External | Also stops in RFC and web processing |
| Statement | Stops on a specific ABAP statement, such as MESSAGE |
| Exception | Stops when a given exception class is raised |
| Method or subroutine | Stops on entry to a processing block |
A statement breakpoint on MESSAGE is the quickest way to find where an unexplained error message is being issued.
Watchpoints
A watchpoint halts when a variable changes, optionally only when it reaches a given value โ the way to catch one specific iteration inside a large loop.
Short dumps
| Section | Content |
|---|---|
| Runtime error | The category of failure |
| Error analysis | What went wrong |
| Source code extract | The failing line and its surroundings |
| User and terminal | Who ran it |
| Active calls | The call stack |
| Error | Cause |
|---|---|
| CX_SY_CONVERSION_NO_NUMBER | Arithmetic on text that is not numeric |
| CX_SY_ZERODIVIDE | Division by zero |
| CX_SY_ITAB_LINE_NOT_FOUND | A table expression found no row |
| CX_SY_REF_IS_INITIAL | Calling a method on an initial reference |
| TIME_OUT | Runtime exceeded the dialog limit |
| DBIF_RSQL_SQL_ERROR | The database rejected the statement |
Messages
| Type | Meaning | Behaviour |
|---|---|---|
| S | Success | Status bar; processing continues |
| I | Information | Dialog box; continue on OK |
| W | Warning | Return to the screen; can proceed |
| E | Error | Return to the screen; must be corrected |
| A | Abend | Terminates processing |
| X | Exit | Produces a short dump |
Performance tools
| Code | Purpose |
|---|---|
| ST05 | SQL trace โ statements and their durations |
| SAT (formerly SE30) | ABAP runtime analysis |
| ST22 | Short dump list and detail |
| SM50 / SM66 | Process monitoring; find long runners |
| SLG1 | Application log |
| ST12 | Combined SQL and ABAP trace |