Skip to content

ABAP Keyword Documentation →  ABAP - Reference →  Assignments 

Setting References

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).

The statements for assigning data objects to field symbols and data references are:

Other versions: 7.31 | 7.40 | 7.54

Programming Guideline

Use field symbols and data references in appropriate ways


Notes

  • If you set references with ASSIGN and 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.

Continue

ASSIGN

UNASSIGN

GET REFERENCE