ABAP Keyword Documentation → ABAP − Reference → Processing Internal Data → Structures

# Boxed Components

Boxed components are structures that are not saved in the higher-level context itself. Instead, an internal reference that points to the actual structure is stored in place of the structure. A boxed component is always a deep component of its context.

It is currently to possible to declare substructures of data types and structured attributes of classes as

These boxes support initial value sharing.

Other versions:
7.31 | 7.40 | **7.54**

Notes

- Boxed components are a halfway house between static and dynamic data objects. Their memory requirements are not defined when the program is started in the internal session, but these components can be handled like static data objects with a fixed length.

- A nested structure that contains a boxed component as a component is always a deep structure.

- Structures of ABAP Dictionary can also contain boxed components. ABAP Dictionary database tables cannot contain any boxed components since their structures have to be flat.

- In RTTS classes and objects, boxed components are handled as follows:

- The class CL_ABAP_TYPEDESCR contains the constant TYPEKIND_BREF for static boxes. The value of these constants is specified as the type of a static box in the component table COMPONENTS of the class CL_ABAP_STRUCTDESCR or the attribute table ATTRIBUTES of the classes CL_ABAP_CLASSDESCR or CL_ABAP_INTFDESCR.

- In the return code of the method GET_COMPONENTS of the class CL_ABAP_STRUCTDESCR
or GET_ATTRIBUTE_TYPE of the classes CL_ABAP_CLASSDESCR or CL_ABAP_INTFDESCR,
boxed components are specified as type description objects of the class CL_ABAP_REFDESCR,
like reference variables. The method GET_REFERENCED_TYPE of this class gets a type description object
for the substructure. A type description object of the class CL_ABAP_REFDESCR, which describes a boxed
component, cannot be used in the statements CREATE
DATA or
`ASSIGN CASTING`

.