SAP TRY - Reference ABAP Statements

Get Example source ABAP code based on a different SAP table
  


Standard SAP Help for TRY

TRY

ABAP Reference
ABAP Code Snippet


ABAP Syntax TRY.

[try_block]
[CATCH [BEFORE UNWIND] cx_class1 cx_class2 ... [INTO oref].
[catch_block]]
...
[CLEANUP [INTO oref].
[cleanup_block]]
ENDTRY.
ABAP Code Snippet

What does it do? Defines a monitored area try_block, whose class-based exceptions cx_class1, cx_class2, ... can be handled in in CATCH blocks catch_block. The CLEANUP block cleanup_block is executed if a class-based exception is triggered in the TRY block and is not caught in a separate CATCH block but in a parent TRY control structure.

ABAP Addition BEFORE UNWIND
Retains the context of the exception until the end of the exception
handling.
INTO oref
Assigns oref a reference to the exception object.

Return to menu