ABAPDATA_BOXED - DATA BOXED

ABAP Short Reference   CL_GUI_FRONTEND_SERVICES - Frontend Services  
This documentation is copyright by SAP AG.

DATA - BOXED

Short Reference



Syntax

DATA struc TYPE struc_type BOXED.

Effect

This statement defines a structured attribute of a class or interface as astaticbox. It can only be in the declaration section of a class or an interface and only at the highest level there.

A structured data type must be specified for struc_type. This can be a local program structuredtype, a visible structured type of a class or a global interface, or a structure from the ABAP Dictionary, and can contain static boxes.

Static boxes support initial value sharing. The structure is not saved in the higher-level context itself. Instead, an internal reference that points to the actual structure is stored in place of the component. A static box is therefore adeep component.

Notes

  • A structure with a static box is a deep structure and the corresponding restrictions apply.

  • The BOXED addition defines the static box with reference to its context (structure or class).A data type that is declared by a direct TYPE or LIKE reference to a static box is assigned its data type but is not a static box.

  • When a static box is copied from one structure to another structure using the INCLUDETYPE|STRUCTURE statement, its static box attribute is also copied.

  • The BOXED addition can also be used in the TYPESstatement to declare a substructure of a nested structured data type.


Example

The following section outlines the permitted use of the BOXED addition with the [CLASS-]DATAstatement. In a class, a static structure struc1 and a structured instance attribute struc21 are declared as a static box.

CLASS c1 DEFINITION.
  PUBLIC SECTION.
    TYPES: BEGIN OF t_struc,
             comp1 TYPE c LENGTH 100,
             comp2 TYPE n LENGTH 100,
           END OF t_struc.
  PRIVATE SECTION.
    CLASS-DATA struc1 TYPE t_struc BOXED.
   DATA       struc2 TYPE t100    BOXED.
ENDCLASS.


rdisp/max_wprun_time - Maximum work process run time   CL_GUI_FRONTEND_SERVICES - Frontend Services  
This documentation is copyright by SAP AG.


Length: 3363 Date: 20120522 Time: 043305     triton ( 150 ms )