Entering content frame

Assigning Values Locate the document in its SAP Library structure

There are many different ways in which you can change the value of a variable; for example, using the user interface, Open SQL, or by assigning the values of data objects in your program to a variable. The most important statement for the latter method is MOVE. It has the same meaning as the equal sign (=). The ABAP statement CLEAR can be used to reset a data object to the original value for its type.

In contrast to other programming languages, where the assignment between different data types is often restricted to a small number of possible combinations, ABAP provides a wide range of automatic type convertions.

As well as the statement MOVE, that converts the value of the source field, when necessary, into the data type of the target field, ABAP has the statement WRITE TO. This statement allows the formatted contents of a character field, which can also be entered dynamically, to be assigned to a different character field.
For more information about the statement WRITE TO see the keyword documentation.


Leaving content frame