Skip to content

Avoid Explicit RAISE SHORTDUMP in Application Logic ​

WarningSecurity & Robustness#EC NO_RAISE_SHORTDUMPRemote Enabled

Overview ​

Avoid RAISE SHORTDUMP.

ATC Finding Message: Avoid RAISE SHORTDUMP; prefer graceful class-based exceptions

Rationale ​

The statement RAISE SHORTDUMP deliberately triggers an instant runtime crash and short dump in transaction ST22. Triggering intentional crashes bypasses standard cleanup handlers, cancels asynchronous update tasks, and leaves database locks dangling.

Best Practice: Raise standard class-based exceptions inheriting from CX_STATIC_CHECK or CX_NO_CHECK. Allow the caller or global exception boundary to handle the incident gracefully.

Non-Compliant ​

abap
" Anti-pattern: Forces instant ST22 crash
RAISE SHORTDUMP TYPE zcx_fatal_error.

Compliant ​

abap
" Clean ABAP: Structured exception allowing caller recovery
RAISE EXCEPTION NEW zcx_fatal_error( textid = zcx_fatal_error=>c_system_unavailable ).

Suppression ​

To suppress findings for this rule, append the pseudo-comment to the statement:

abap
" Standard pseudo-comment:
... "#EC NO_RAISE_SHORTDUMP

" SAP CI_ prefix format:
... "#EC CI_NO_RAISE_SHORTDUMP

Technical Details ​

Released under the MIT License.