UNCAUGHT_EXCEPTION — UNCAUGHT_EXCEPTION short dump
UNCAUGHT_EXCEPTION means a class-based ABAP exception (a CX_ class) was raised somewhere in the call stack and no TRY/CATCH block anywhere above it was written to handle that exception class or one of its superclasses. The dump names the exception class and the exact raising statement; the fix is almost always adding or correcting a CATCH, not patching the symptom.
This page covers the UNCAUGHT_EXCEPTION runtime error, the class-based counterpart to RAISE_EXCEPTION, and how to trace it from the ST22 header back to the missing or mismatched CATCH block. It ranks the real causes seen in support work, shows the ST22 fields worth reading, and separates the correct fix from the reflex of catching CX_ROOT and swallowing the error.
Published 16 Sept 2026· 1,290 words
What the dump means
ABAP has two exception mechanisms: the old classic RAISE, which produces the RAISE_EXCEPTION dump, and class-based exceptions built on CX_ROOT and its subclasses, raised with RAISE EXCEPTION TYPE or RAISE EXCEPTION NEW. UNCAUGHT_EXCEPTION fires when a class-based exception propagates through every calling method and program without being caught. The runtime does not know what to do with an unhandled object reference exception, so it terminates the session and writes the dump. The dump identifies the exception class, the method or form that raised it, and the point in the call stack where propagation stopped because nothing above it declared a matching CATCH. This is a design gap, not a syntax error: the code compiled and ran, but the exception contract between caller and callee was not honoured somewhere along the chain.
Root causes that actually produce it
- Missing TRY/CATCH around a call to a method whose signature declares RAISING for a checked exception class, most often introduced when a developer adds a new method call but does not wrap it, or copies an existing call and strips the exception handling by mistake.
- Exception propagated through several layers of custom code with no handler anywhere, common in Z reports that chain multiple class calls under the assumption that the top-level program will somehow deal with it.
- BAdI or user-exit implementation raising an exception class that the surrounding standard framework method does not expect and cannot catch, because the standard interface signature was never designed to carry that exception.
- RTTI or dynamic programming failures, such as CREATE OBJECT by name or dynamic method call, wrapped internally as a CX_SY_ system exception class that the calling code never anticipated needing to catch.
- RFC call to a remote system where the remote method raises an exception class that either does not exist locally or is not mapped in the local proxy, so the local CATCH clause never matches it.
- Interface or superclass change during an upgrade or transport where a standard method's RAISING clause gained a new exception class; existing custom callers compiled against the old signature and their CATCH block no longer covers the new class.
- Custom exception class thrown deep inside a batch program or function module with no central exception handling layer, so the first uncaught occurrence is the top of the call stack itself.
What to inspect in ST22
- Dump header: exception class name, for example CX_SY_MOVE_CAST_ERROR or a Z-class, and the program, include, and line number where it was raised.
- 'What happened' section: confirms the exception was not caught anywhere in the call hierarchy and states the category, checked versus unchecked, which tells whether the missing CATCH was a compile-time requirement or an oversight.
- ABAP call stack: read bottom to top to find the exact method that raised the exception and every caller above it; the CATCH is missing at one or more of these levels, usually the first custom frame encountered.
- Source code extract in the dump: shows the RAISE EXCEPTION statement or the standard statement that internally triggers the CX_SY_ class, plus surrounding logic and any relevant variable values.
- System environment and user context: identifies whether this happened online, in a background job (cross-check SM37 job log), or via RFC (cross-check the calling system's trace).
- Follow up in SE24 on the exception class to see its superclass hierarchy and existing text IDs, and in SE80 or the ABAP editor on the raising method's signature to confirm what RAISING actually declares.
Resolution path
If a custom method call lacks a CATCH, add TRY/CATCH INTO a reference variable of the specific exception class or its documented superclass, then decide the handling: raise an application message, log via the application log, or re-raise a business-meaningful exception to the caller. This requires a code change and a transport. If the exception originates in standard SAP code because of bad customizing or missing master data (for example a currency, unit, or number range configuration gap that a standard method turns into an exception), fix the configuration or data, not the code; no transport of ABAP is needed, though a change to customizing tables still needs its own change process. If a BAdI or user-exit implementation raises an exception the framework cannot catch, correct the implementation to either handle the condition internally or raise only what the interface signature permits; this is a transportable code fix. If the cause is a signature change in standard code after an upgrade, adjust the custom caller's CATCH clause to cover the new exception class; this is mandatory post-upgrade remediation, not optional cleanup. If the raising logic sits inside standard, unmodified SAP code with no configuration explanation, this is the case to open an incident with SAP rather than attempt a local workaround.
The fix people try first (and why it fails)
The reflex is to wrap the failing call in TRY. CATCH INTO cx_root. ENDTRY. with an empty or near-empty catch block, or to catch the specific exception and do nothing with it. This stops the dump immediately, which is exactly why it feels like a fix, but it discards the exception's payload and the business condition it was reporting. The program continues past a state it was never designed to continue past, often producing incomplete postings, skipped records, or silently wrong output that surfaces days later as a reconciliation break, by which point the original stack trace is gone and the investigation starts from zero.
Prevention
Run static code checks, such as the ABAP Test Cockpit or code inspector variants, that flag method calls with a declared RAISING clause and no corresponding CATCH in the caller, and flag any CATCH INTO cx_root that does not re-raise or log. Enforce a project standard that custom programs have one central exception-handling layer near the top of the call stack that logs to the application log with enough context to identify the business object involved, rather than scattering ad hoc CATCH blocks. Re-run affected custom code through a syntax and unit test check after any upgrade that changes standard method signatures.
Whose problem this is
ABAP development owns this in the large majority of cases, since the fix is almost always a missing or incorrect CATCH block or an exception-raising custom enhancement. Functional consultants get involved when the exception is standard SAP code reacting to a configuration or master data gap. Basis is rarely involved unless the dump occurred inside an RFC connection or background job infrastructure. The handover note should include the exception class, the exact raising line from the call stack, the business transaction and key that triggered it, and whether it reproduces on demand.
Related SAP objects
Reviewed pages this object connects to in the ERPClimb knowledge graph.
Source: ERPClimb — https://erpclimb.com/sap-abap-dumps/uncaught-exceptionERPClimb is an independent platform and is not affiliated with SAP SE. Reference pages are written and reviewed by SAP consultants for learning and troubleshooting.