0% found this document useful (0 votes)
50 views

SAP Inline Declaration of Data Objects

Inline declarations allow variables and field symbols to be declared directly in operand positions as of NetWeaver 7.40. Inline declarations define variables within exception handling blocks that take on the type of the caught exception, and have either global or local scope depending on whether the catch block is in an event, dialog, or method.

Uploaded by

Debebook
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
50 views

SAP Inline Declaration of Data Objects

Inline declarations allow variables and field symbols to be declared directly in operand positions as of NetWeaver 7.40. Inline declarations define variables within exception handling blocks that take on the type of the caught exception, and have either global or local scope depending on whether the catch block is in an event, dialog, or method.

Uploaded by

Debebook
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Inline declarations are a new way of declaring variables (and field symbols) at operand positions.

Inline declarations are available as of NetWeaver 7.40.

Inline Declaration in Exception Handling

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.

You might also like