LIKE - obsolete
... LIKE dtype ...
Outside of classes, the addition
LIKE can also be used to refer to
database tables, or
classic views in ABAP
Dictionary, as well as to their components. A
LIKE reference to the flat
components of a deep dictionary structure is not possible. This affects the following ways of using
- in the statement
If there is a data object called
dtype in a local context, then this object obscures the data type from ABAP Dictionary.
- The addition
LIKEshould only be used to refer to data objects.
- It is not possible to make a
LIKEreference to a CDS entity. It is possible, however, to make a
LIKEreference to a CDS database view.
- Always use the addition
TYPEto refer to data types.
DATA wa LIKE scarr.
DATA wa TYPE scarr.