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 with the following variants:
1. Reference variables for data objects
2. Creation of data objects and reference procurement
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 within ABAP objects. You can now use DATA f TYPE REF TO DATA to declare f as a reference variable that points to a data object.
Modification 2
Creation of data objects and reference procurement
CREATE DATA dref ...
allows
you to create a new data object (field) at runtime, where dref
can be any
reference variable with type REF TO DATA
.
You can also use GET REFERENCE
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 system checks the type during the assignment.