ABAP Keyword Documentation → ABAP - Release-Specific Changes → Changes in Release 4.6A
Data Objects and Data References in Release 4.6A
In Release 4.6A, references to data objects have been introduced in the following variants:
1. Reference variables for data objects
2. Creating data objects and getting references
3. Assignment of referenced fields
Other versions: 7.31 | 7.40 | 7.54
Modification 1
Reference Variables for Data Objects
Previously, reference variables were only available in ABAP Objects. In Release 4.6A, DATA f TYPE REF TO DATA can be used to declare f as a reference variable that points to a different data object.
Modification 2
Creating Data Objects and Getting References
CREATE DATA dref ...
can be
used to create a new data object (field) at runtime, where dref
can be any
reference variable with type REF TO DATA
.
Furthermore, GET REFERENCE
can be used to get a reference to a data object (field).
Modification 3
Assignment of Referenced Fields
The statement ASSIGN dref->* TO <fs>
makes the field symbol <fs>
point to the same content as the
data reference dref
at runtime. If the field symbol is typed, the type is checked when the assignment is made.