Skip to content

ABAP Keyword Documentation →  ABAP − Reference →  Processing Internal Data 

Assignments

An assignment passes the content of a source to a target data object. A source can be one of the following:

The following sections describe the rules, operators, and key words where the assignment of source values to target data objects is of significance.

Assignments also occur, however, in the operand positions of many other statements in which the assignment rules also apply.

Other versions: 7.31 | 7.40 | 7.54


Example

Typical assignment with the assignment operator (=) in which a conversion takes place. During the assignment to a data object num of type i, the current date in the system field sy-datlo is converted to the number of days since 01.01.0001.

DATA num TYPE i. 

num = sy-datlo. 

cl_demo_output=>display( |{ sy-datlo }->{ num }| ).

Continue

Assignment and Conversion Rules

= - Assignment Operator

CONV - Conversion Operator

Assigning Structure Components

Assigning References

Lossless Assignments

Special Assignments

Initializations