Get Example source ABAP code based on a different SAP table
Data References in ABAP Release 6.10 ITOC
ABAP_MODIFICATION_NN Typing Using TYPE DATA>>
TYPE DATA> was previously handled like TYPE REF TO DATA>> and were therefore completely typed. Now TYPE DATA> can only be used for formal parameters and field symbols; otherwise a syntax error occurs. A non-generic type can now be specified after REF TO>.
ABAP_MODIFICATION_NN Specifying Types for CREATE>>
A type no longer needs to be specified for the statement CREATE DATA ...>> if the reference is completely typed. In this case, the new data object is given the type of the reference.
ABAP_MODIFICATION_NN Uppercase and Lowercase in Dynamically Specified Types>
In the statement CREATE DATA ...>>, previously only uppercase letters could be used for the field content of dynamically specified types. In ABAP_RELEASE 6.10, lowercase letters can also be used. Initially the system searches using the specified field content; if this search fails, the system searches again using uppercase letters. If this search also fails, a runtime error occurs.
ABAP_MODIFICATION_NN Defining Typed Data References>
In the case of the statements TYPES>> and DATA>>, a fixed type can now be specified for the addition REF TO>.
ABAP_MODIFICATION_NN Casting Data References>
The introduction of typed data references enables downcasts in assignments between data reference variables. Downcasts must be expressed using a special assignment operator, ?=>.
ABAP_EXAMPLE_VX5 ABEXA 01154 ABAP_EXAMPLE_END
ABAP_MODIFICATION_NN 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. DATA: dataobj TYPE dtel_1, dataref_1 TYPE REF TO dtel_2, dataref_2 TYPE REF TO data. FIELD-SYMBOLS <(><)> TYPE ANY.
GET REFERENCE OF dataobj TO dataref_1. dataref_2 = dataref_1. ASSIGN dataref_2->* TO <(><)>.> In this case, dataref_1->*>, dataref_2->*>, and < F > inherit the attributes of the dictionary data element DTEL_2>.
ABAP_MODIFICATION_NN Any Typing for CREATE DATA>>
New types, such as data references and internal tables, can be constructed when data objects are created using the statement CREATE DATA>>. Previously, only references to existing types were possible.
ABAP_MODIFICATION_NN Dereferencing in Any Operand Positions>
If a data reference variable is completely typed, it can be dereferenced in any operand position, using the dereferencing operator ->*>.