DATA var { {TYPE [LINE OF] type}
| {LIKE [LINE OF] dobj} }
[VALUE val|{IS INITIAL}]
[READ-ONLY].
In the specification of a data type type or a data object dobj, the data type of the variable var is already fully defined before the declaration. The syntax and meaning of the additions TYPE and LIKE has exactly the same meaning as the definition of data types with TYPES, except that for DATA after TYPE a standard table type with a generic table key can be specified. In this case, a bound table type with a standard key is created.
Prior to Release 6.10, no VALUE addition was possible if the data type
deep, specified using
TYPE or LIKE, was a string, a reference type,
a table type, or a structured type with deep components. As of Release 6.10, the VALUE addition can also be used for deep data types; however, with the limitation that a
start value
val can only be specified for the ABAP type string, and otherwise only IS INITIAL.
These statements define two data objects, both of which have the same data type as the database table spfli.
DATA: spfli_wa1 TYPE spfli,
spfli_wa2 LIKE spfli_wa1.