Ansicht
Dokumentation

ABENNEWS-71-BOXED_COMPONENTS - NEWS-71-BOXED COMPONENTS

ABENNEWS-71-BOXED_COMPONENTS - NEWS-71-BOXED COMPONENTS

BAL Application Log Documentation   General Material Data  
This documentation is copyright by SAP AG.
SAP E-Book

Boxed Components in 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 Release 7.0 (EhP2). Like strings and internal tables, these are based on an implicit referencing and support initial value sharing.





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.



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.



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.






ROGBILLS - Synchronize billing plans   PERFORM Short Reference  
This documentation is copyright by SAP AG.

Length: 2947 Date: 20240426 Time: 180048     sap01-206 ( 51 ms )