ABAP - Keyword Documentation →  ABAP - Programming Language →  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 operator does the following:

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

In assignments of constructor expressions to a data object using VALUE, the data object is used directly. It is completely overwritten with an initial value or start value before it is assigned the values specified in the parentheses.

Hints

Example

Construction of 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