SAP NetWeaver AS ABAP Release 740, ©Copyright 2014 SAP AG. All rights reserved.
Cannot Use LIKE Reference to Dictionary Types
In ABAP Objects, the following statement causes an error message:
DATA f LIKE dbtab.
Correct syntax:
DATA f TYPE dbtab.
Cause:
The TYPE addition should be the only construction that allows a reference to data types, while the LIKE addition should only be used for data objects. The
Repository objects
in the ABAP Dictionary are data types, not data objects. Outside the ABAP Objects context, the LIKE reference to database tables and
flat structures in the ABAP Dictionary is still allowed for compatibility reasons.