TYPES - BOXED
Short Reference
ABAP Syntax TYPES comp TYPE struc_type BOXED.
What does it do? This statement defines a substructure comp of a
structure as a static box
. It can only be used within the relevant structure definition with the
BEGIN OF and
END OF additions of the TYPES statement and must be at the
highest component level and not within nested BEGIN OF ... END OF
blocks.
If you want to create a nested structure whose static boxes already
contain static boxes, this is only possible if each substructure
affected exists as an independent type. You cannot specify BOXED
for substructures that exist as a result of nested
TYPES BEGIN OF
... TYPES END OF .
The BOXED addition can also be used in the
DATA statement to declare a structured attribute of a class or
an interface.
Example ABAP Coding The following section shows the permitted use of the
addition BOXED with the statement TYPES . In a structured
type t_struc2 , a substructure t_struc2-comp2 of type
t_struc1 is declared as a static box.
TYPES: BEGIN OF t_struc1,
comp1 TYPE c LENGTH 100,
comp2 TYPE n LENGTH 100,
END OF t_struc1.
TYPES: BEGIN OF t_struc2,
comp1 TYPE string,
comp2 TYPE t_struc1 BOXED,
END OF t_struc2.
Documentation extract taken from SAP system, � Copyright SAP AG. All rights reserved