TYPES - BEGIN OF Struct - Type: Syntax
TYPES - BEGIN OF Struct - Type: Syntax
Quick Reference
Syntax
TYPES BEGIN OF struc_type.
...
TYPES comp ...
TYPES comp TYPE struc_type BOXED.
INCLUDE TYPE|STRUCTURE ...
...
TYPES END OF struc_type.
Effect
Defines a structured type struc_type. This is introduced using a TYPES statement with the
addition BEGIN OF and must finish with a TYPES statement with the addition END OF.
• The statements INCLUDE TYPE and INCLUDE STRUCTURE for including components from
other structures.
No structured types can be created that do not have at least one component.
The TYPES statements within the statements BEGIN OF and END OF define the components of the
structured type struc_type. If a component is a structured type or if a new structured type is defined
within a structure usingBEGIN OF and END OF, substructures are created. A structure with substructures
is known as a nested structure.
The statement INCLUDE defines components of the structured type struc_type by using the
components of a differently structured type or an existing structure at the same level.
The components of a structured type are divided using the name struc_type and the name of the
component, and addressed using the structure component selector (-).
Notes
• The value operator VALUE can be used to construct the content of structures.
• A structure type is always fully specified. There is no generic structure type.
Example