SAP NEWS-610-REFERENZEN
Get Example source ABAP code based on a different SAP table
Data References in Release 6.10
1 Typing using
2 Specifying types for
3 Uppercase and lowercase in dynamically specified types
4 Defining typed data references
5 Casting data references
6 Additional type information for ASSIGN dref->*
7 Any typing for
8 Dereferencing in any operand positions
ABAP_MODIFICATION_1 Typing Using
ABAP_MODIFICATION_2 Specifying Types for
A type no longer needs to be specified for the statement
ABAP_MODIFICATION_3 Uppercase and Lowercase in Dynamically Specified Types
In the statement
ABAP_MODIFICATION_4 Defining Typed Data References
In the case of the statements
ABAP_MODIFICATION_5 Casting Data References
The introduction of typed data references enables
Example ABAP Coding
DATA:
d1 TYPE REF TO data, 'Generic
d2 TYPE REF TO i. 'Typed
d1 = d2.
d2 ?= d1.
ABAP_MODIFICATION_6 Additional Type Information for ASSIGN dref->*
If a data reference has fixed typing, it passes on its additional attributes if it is assigned to an untyped data reference.
dataobj TYPE dtel_1,
dataref_1 TYPE REF TO dtel_2,
dataref_2 TYPE REF TO data.
FIELD-SYMBOLS <(><<)>fs> TYPE ANY.
GET REFERENCE OF dataobj TO dataref_1.
dataref_2 = dataref_1.
ASSIGN dataref_2->* TO <(><<)>fs>.
In this case,
ABAP_MODIFICATION_7 Any Typing for
New types, such as data references and internal tables, can be constructed when data objects are created using the statement
ABAP_MODIFICATION_8 Dereferencing in Any Operand Positions
If a data reference variable is fully typed, it can be dereferenced in any operand position, using the dereferencing operator
DATA dref TYPE REF TO i.
...
dref->* = dref->* + 1.