Debugging Part 6: ST22 Short Dump Analysis
Read ABAP short dumps in ST22: runtime error name and exception class, "What happened", "Error analysis", "How to correct", source code extract, active calls (call stack), chosen variables, user and transaction, and the most common dumps with their typical causes and fixes.
Explanation
📌 KEY POINTS
✅ ST22 shows every runtime error with name (e.g. CONVT_NO_NUMBER), exception class (CX_SY_CONVERSION_NO_NUMBER), program, line, user and time.
✅ Read in this order: short text → "What happened" / "Error analysis" → "Source code extract" (the failing line) → "Active calls" (call stack) → "Chosen variables".
✅ "Debugger" button (for recent dumps in some cases) or reproducing with a breakpoint at the failing line gives the full context.
⚠️ A dump in SAP standard code is often caused by custom data or exits (e.g. wrong values passed) — check the call stack for Z code before opening an SAP incident.
━━━━━━━━━━━━━━━━━━━━
▶ WHERE WE ARE
Parts 2–5 debugged running code. When a program terminates, ST22 is the starting point.
━━━━━━━━━━━━━━━━━━━━
▶ 1. FINDING THE DUMP
ST22 → select by date, user, program; dumps are kept for a limited time (default about 14 days).
━━━━━━━━━━━━━━━━━━━━
▶ 2. SECTIONS
- Short text and runtime error: category of the problem.
- What happened / What can you do: general explanation.
- Error analysis: specifics (e.g. "the value 'ABC' cannot be interpreted as a number").
- How to correct: SAP's hints; search SAP notes by runtime error + program.
- Source code extract: the failing statement marked with >>>.
- Active calls/events: the call stack — find the first custom program.
- Chosen variables: values at the dump time.
━━━━━━━━━━━━━━━━━━━━
▶ 3. COMMON DUMPS
- CONVT_NO_NUMBER / CX_SY_CONVERSION_NO_NUMBER: text into numeric field → validate/convert input.
- BCD_ZERODIVIDE: division by zero → check divisor.
- TSV_TNEW_PAGE_ALLOC_FAILED / memory: huge internal tables → packages, selective reads.
- GETWA_NOT_ASSIGNED: field symbol not assigned → IS ASSIGNED check.
- DBSQL_* / SAPSQL_*: invalid SQL (e.g. empty FOR ALL ENTRIES consequences, too many values, wrong types).
- ITAB_DUPLICATE_KEY: insert duplicate into unique table.
- TIME_OUT: dialog step exceeded rdisp/max_wprun_time → run in background or optimize.
- MESSAGE_TYPE_X: deliberate abort (MESSAGE X) — read the message and caller.
- RAISE_EXCEPTION / UNCAUGHT_EXCEPTION: exception not caught → add handling.
━━━━━━━━━━━━━━━━━━━━
▶ 4. FIX PATTERN
Understand the data that triggered it → fix code (validation, TRY/CATCH, guards) or data → test with the same data.
━━━━━━━━━━━━━━━━━━━━
▶ STEP BY STEP
- Run the code example to create a controlled dump in a sandbox.
- Analyse it in ST22 section by section.
- Fix with TRY/CATCH and rerun.
✅ CHECKPOINT: you can read ST22 dumps and derive the root cause quickly.
Code example
REPORT zdebug_st22. PARAMETERS: p_text TYPE c LENGTH 10 DEFAULT 'ABC', p_div TYPE i DEFAULT 0. DATA: lv_num TYPE i, lv_result TYPE p DECIMALS 2, lx_conv TYPE REF TO cx_sy_conversion_no_number, lx_zero TYPE REF TO cx_sy_zerodivide, lv_msg TYPE string. START-OF-SELECTION.* ===== Without TRY: dumps CONVT_NO_NUMBER in ST22 =====* lv_num = p_text. * ===== With handling: no dump, clear message ===== TRY. lv_num = p_text. " CX_SY_CONVERSION_NO_NUMBER lv_result = 100 / p_div. " CX_SY_ZERODIVIDE WRITE: / 'Result:', lv_result. CATCH cx_sy_conversion_no_number INTO lx_conv. lv_msg = lx_conv->get_text( ). WRITE: / 'Input error:', lv_msg. CATCH cx_sy_zerodivide INTO lx_zero. lv_msg = lx_zero->get_text( ). WRITE: / 'Calculation error:', lv_msg. ENDTRY. * ===== ST22 reading order =====* 1 Runtime error / exception class 2 Error analysis* 3 Source code extract (>>> line) 4 Active calls: first Z program in the stack* 5 Chosen variables 6 Search SAP notes: runtime error + programReal project scenario
A nightly interface dumped with CONVT_NO_NUMBER in a standard function module. The team was about to open an SAP incident, but the "Active calls" section showed a Z mapping program passing a quantity field containing "1,5" (comma decimal) from a partner file.
Adding input normalisation in the mapping and a TRY/CATCH with a clear error log fixed the issue without SAP support.
Common mistakes
- Reading only the short text.
- Assuming SAP code is at fault without checking the call stack.
- Ignoring chosen variables.
- Fixing by catching everything (CX_ROOT) silently.
- Not reproducing with the same data.
Best practices
- Read ST22 section by section.
- Find the first custom program in the call stack.
- Use error analysis and variables for root cause.
- Catch specific exceptions with meaningful messages.
- Search SAP notes by runtime error and program.
Interview angle
Questions: "How do you analyse a short dump?", "Name common dumps and causes.", "A dump occurs in SAP standard code — what do you do?"
Strong answer: ST22 sections: runtime error/exception class, error analysis, source extract, active calls, variables; common: CONVT_NO_NUMBER, BCD_ZERODIVIDE, TSV_TNEW_PAGE_ALLOC_FAILED, GETWA_NOT_ASSIGNED, ITAB_DUPLICATE_KEY, TIME_OUT, MESSAGE_TYPE_X, UNCAUGHT_EXCEPTION; check call stack for Z code, SAP notes; fix with validation/TRY-CATCH.
Practice this lesson
Quick check
1. In ST22, which section shows the chain of programs/routines leading to the dump?
2. Which transaction is used to analyze ABAP short dumps?
3. A short dump analysis is done in transaction:
Interview questions
1. A month-end job dumped with a numeric conversion error. How do you use ST22 to find the root cause?
Answer it in your own words first, then compare.
2. How do you analyze an ST22 short dump?
Answer it in your own words first, then compare.
Reference-verified: the steps are checked against official SAP documentation and tutorials, and object and field names in the sample code are checked for consistency. The code has not been compiled or run on an SAP system by ERPClimb. Syntax marked release-dependent varies by SAP release, so check it in your own system.
More lessons in this topic
- Debugging Part 1: How to Approach an ABAP Problem
- Debugging Part 10: Production Debugging — Evidence First
- Debugging Part 2: ABAP Debugger Essentials
- Debugging Part 3: External Breakpoints — Why They Are Not Hit
- Debugging Part 4: Watchpoints, Layers and Static Checks (ATC)
- Debugging Part 5: Debugging Internal Tables and Field Symbols
- Debugging Part 7: Update Task Debugging
- Debugging Part 8: Background Job Debugging with SM37, JDBG and SM50