ABAP Keyword Documentation →  ABAP − Reference →  Creating Objects and Values → 

VALUE - Value Operator

Syntax

... VALUE type( ... ) ...

Effect

A constructor expression with the value operator VALUE creates a result of a data type specified using type. The following can be specified for type:

The # character as a symbol for the operand type. Can be specified only if the data type required in an operand position is unique and fully identifiable. An exception to this rule is VALUE #( table_exp ).

The operator

The content of the result is determined by the parameters specified in parentheses. The syntax used in pass by parameter depends on the type used when the value was constructed. There are specialized categories of pass by parameter for each possible type.

If a single table expression is specified as a parameter, VALUE does not construct a value and controls the category of its result instead, as described in the related section.

Notes

Example

Constructs the values of a structure of type T100 declared inline.

DATA(wa) = VALUE t100( sprsl = 'E'
                       arbgb = 'DEMO'
                       msgnr = '111'
                       text = '...' ).




Continue
VALUE - Initial Value for All Types
VALUE - Structures
VALUE - Internal Tables