SAP NetWeaver AS ABAP Release 740, ©Copyright 2014 SAP AG. All rights reserved.
ABAP Keyword Documentation → ABAP − Reference → Declarations → Declaration Statements → Data Types and Data Objects → Declaring Data Types → TYPES →
TYPES - TYPE, LIKE
Syntax
TYPES dtype { {TYPE [LINE OF] type}
| {LIKE [LINE OF] dobj} }.
Addition:
Effect
If a data type type or a data object dobj is specified, dtype assumes all the properties of the specified data type or data object.
If a reference is made to a data type in ABAP Dictionary, its primary components are converted to predefined ABAP types according to the table of
predefined types in ABAP Dictionary.
Notes
... LINE OF ...
Effect
The optional addition LINE OF can be used if type
is a table type or if dobj is an internal table. If this addition is used, dtype inherits the properties of the line type of the internal table.
Example
These TYPES statements define two data types local to the program. The first assumes a table type from a type group of ABAP Dictionary, and the second corresponds to the line type of this table type.
DATA: event_table TYPE cntl_simple_events,
event LIKE LINE OF event_table.