ABAP Keyword Documentation → ABAP - Reference → Assignments
This section deals with the special statements that assign pointers (references) pointing to existing data objects to field symbols and data references.
When you work with field symbols and data references that contain references to data objects, note the following:
- In a normal assignment between field symbols, as occurs with the statement
MOVE, each field symbol is handled as a dereferenced pointer (value semantics).
- In a normal assignment between data references, as occurs with the statement
MOVE, the references are copied (reference semantics). The corresponding rules can be found at the conversion rules for reference variables.
The statements for assigning data objects to field symbols and data references are:
Other versions: 7.31 | 7.40 | 7.54
Use field symbols and data references in appropriate ways
- If you set references with
GET REFERENCE, then permission to access the data object in question is only checked at the position of the statement. After that, the references can be passed on to any destination and you can access the corresponding data objects from any position using the references. To prevent access to private and read-only attributes using references outside classes, do not publish references to these attributes externally.
- For the dynamic data objects (strings, internal tables, and boxed components) which are also managed internally using references, value semantics apply. This means that the internal management is not visible for the developers.