ABAP Keyword Documentation →  ABAP − Reference →  Program Flow Logic →  Exception Handling →  Class-Based Exceptions → 

TRY  Syntax Diagram

Short Reference

Syntax

TRY.
    [try_block]
 [CATCH [BEFORE UNWIND] cx_class1 cx_class2 ... [INTO oref].
    [catch_block]]
    ...
  [CLEANUP [INTO oref].
    [cleanup_block]]
ENDTRY.

Effect

The statement TRY introduces a control structure with multiple statement blocks. The first statement block try_block is always executed, whereas a branching off to exactly one of the remaining statement blocks only occurs if a class-based exception is raised in try_block.

A TRY control structure defines the following statement blocks:

A TRY control structure invalidates the simultaneous use of the obsolete statement CATCH SYSTEM-EXCEPTIONS to handle catchable runtime errors in the current processing block.

Notes




Continue
CATCH
RESUME
RETRY
CLEANUP
ENDTRY