SAP LIKE - Obsolete



Get Example source ABAP code based on a different SAP table
  


• LIKE ABAP Statement

LIKE, Obsolete

Obsolete Syntax
... LIKE dtype ...

What does it do?
Outside of classes, the addition LIKE can be used to refer to flat structures in the ABAP Dictionary and their components, as well as the properties of data objects. A LIKE reference to the flat components of a deep dictionary structure is not possible. This affects the following uses of LIKE:
in the declarative statements TYPES, DATA, and so on.
in complete typings
in the statement PARAMETERS
If there is a data object with the name dtype in a local context, then this object hides the data type from the ABAP Dictionary.



Latest notes:

The addition LIKE should only be used to refer to data objects.
It is neither possible to make a LIKE reference to a CDS entity, nor to make a LIKE reference to a CDS- managed DDIC view of a ABAP_CDS_V1_VIEW (obsolete).
For a reference to data types, the addition TYPE should always be used.
ABAP_HINT_END

ABAP_EXAMPLE_BAD
ABEXA 01072
ABAP_EXAMPLE_END

ABAP_EXAMPLE_GOOD
ABEXA 01073
ABAP_EXAMPLE_END