Ansicht
Dokumentation

ABENDDICDDL_DEFINE_STRUCT_COMPS - DDICDDL DEFINE STRUCT COMPS

ABENDDICDDL_DEFINE_STRUCT_COMPS - DDICDDL DEFINE STRUCT COMPS

rdisp/max_wprun_time - Maximum work process run time   ABAP Short Reference  
This documentation is copyright by SAP AG.
SAP E-Book

- DEFINE STRUCTURE, component

$[component_annos$]
$[foreign_key_annos$]
$[geo_annos$]
$[KEY$] comp : ${ ${data_element $[ value_help$]
                             $[foreign_key$]$}
               $|abap.type$[(n)$|(n,m)$] $}
           $| ${ REFERENCE TO any_type $}
           $| ${ struct $[BOXED$] $}
           $| ${ table_type $}
           $[NOT NULL$];


Effect

Defines a single component in the definition of a DDIC structure using the statement DEFINE STRUCTURE in Dictionary DDL.

  • Optional component properties can be specified using annotations component_annos in front of the component specification itself.
  • comp indicates the name of the component.
  • data_element or abap.type is used to define an elementary component or a component with a reference type:
  • data_element can be used to specify an existing DDIC data element. If the data element has an elementary data type, an elementary component is defined. If the data element has a reference type, the component is defined with this reference type.

  • abap.type$[(n)$|(n,m)$] can be used to specify a built-in data type from the ABAP Dictionary and an elementary component of this type is defined. When specified after the mandatory prefix abap, type indicates the type. n and m must be used to specify the length and number of decimal places, as specified by the type.

  • REFERENCE TO any_type is used to define a reference type. For any_type, the syntax abap.type$[(n)$|(n,m)$] can be used to specify any existing data types from the ABAP Dictionary, classes or interfaces from the class library, the generic types DATA or OBJECT, or built-in types.
  • struct $[BOXED$] is used to define a substructure. Structures, DDIC database tables, or DDIC views from ABAP Dictionary can all be specified for struct. BOXED can be used to define the substructure as a static box.
  • table_type is used to define a tabular component. Table types from the ABAP Dictionary can be specified for table_type.
  • The additions KEY and NOT NULL can be used to define the component as a key field and to set a flag for initial values. The addition KEY has no effect when the structure is included in DDIC database tables. It must be used for structure components that are used as lock parameters of lock objects. The addition NOT NULL can be respected for structures that are included in DDIC database tables.
  • The addition value_help can be used to assign a search help to a structure component whose data type is defined using a data element with elementary data type.
  • The addition foreign_key can be used to define a foreign key dependency for a structure component whose data type is defined using a data element with elementary data type. This addition only makes sense for structures that are included in DDIC database tables.

Note

The activation type (relevant only for DDIC database tables) cannot be modified using DEFINE STRUCTURE.

Example

Defines elementary components of the structure DEMO_DAY with reference to built-in dictionary types. In the example for include structures, the structure is included more than once in another structure.

@EndUserText.label : 'Demo for include structure'
@AbapCatalog.enhancementCategory : #NOT_EXTENSIBLE
define structure demo_day {
  work : abap.char(8);
  free : abap.char(16); }






ABAP Short Reference   TXBHW - Original Tax Base Amount in Local Currency  
This documentation is copyright by SAP AG.

Length: 8922 Date: 20240419 Time: 192952     sap01-206 ( 91 ms )