ABAP Keyword Documentation → ABAP - Reference → Obsolete Language Elements → Obsolete Type Reference
LIKE - obsolete
Other versions: 7.31 | 7.40 | 7.54
Obsolete Syntax
... LIKE dtype ...
Effect
Outside of classes, the addition LIKE
can also be used to refer to
flat structures,
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 LIKE
:
- in the statement
PARAMETERS
If there is a data object called dtype
in a local context, then this object hides the data type from ABAP Dictionary.
Notes
- Use the addition
LIKE
only to refer to data objects.
- It is not possible to make a
LIKE
reference to a CDS entity of a CDS view. It is possible, however, to make aLIKE
reference to a CDS database view.
- Always use the addition
TYPE
to refer to data types.
Bad example
DATA wa LIKE scarr.
Good example
DATA wa TYPE scarr.