Get Example source ABAP code based on a different SAP table
Boxed Components in ABAP Release 7.0, EhP2 Structures or classes often have further structures as components which are not used every time a program is executed. This can lead to unnecessary memory usage, especially if these structures are instantiated multiple times. Examples are structures with substructures as a line type from internal tables or structures in classes that are frequently instantiated. To avoid unnecessary memory usage without this having to be programmed by ABAP developers, static boxes> were introduced as a preliminary form of boxed components> in ABAP_RELEASE 7.0 (EhP2). Like strings and internal tables, these are based on an implicit referencing and support initial value sharing>. ITOC
ABAP_MODIFICATION_NN Structured Types with Static Boxes>
Within a structure definition using TYPES BEGIN OF>>, the addition BOXED>> in TYPES > can be used to create a substructure as a static box.
ABAP_MODIFICATION_NN Attributes of Classes as Static Boxes>
Within a class declaration, the BOXED>> addition of DATA> can be used to create a structured attribute as a static box.
ABAP_MODIFICATION_NN Enhancements to RTTS for Static Boxes>
The class CL_ABAP_TYPEDESCR>> contains the new 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>>. The return value of the method GET_COMPONENTS> of the class CL_ABAP_STRUCTDESCR>> contains boxed components and reference variables as type description objects of the class CL_ABAP_REFDESCR>>. 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> >.