SAP Inline Declaration of Data Objects
SAP Inline Declaration of Data Objects
In this example, gx_excp assumes the type REF TO cx_sy_move_cast_error, since its
purpose is to catch exception objects of this type.
If the CATCH statement is located in an event block or a dialog module of an ABAP
program, gx_excp will have the lifetime and visibility of a global variable. If the CATCH
statement is located in a method, gx_excp will be a local variable within the method.
Note: At runtime, the variable will exist from the beginning of the program or, respectively
from the point in time where the method is called. You cannot, however, address the variable
statically before the declaration.