Get Example source ABAP code based on a different SAP table
• EXTEND TYPE ABAP_DDIC_STATEMENT • { } ABAP_DDIC_EXTEND_TYPE • WITH ABAP_DDIC_EXTEND_TYPE
ABAP_DDIC_DDL - EXTEND TYPE>
ABAP_SYNTAX structure_annos> EXTEND TYPE struct$|dbtab WITH append_struct { ... component> $[... extend> ...$]; ... include;> ... }>
What does it do? Dictionary DDL> statement for defining an ABAP Dictionary append structure> append_struct> in the ABAP Development Tools >.
The statement EXTEND TYPE> adds the append structure append_struct> either to an existing structure struct> or to a DDIC database table dbtab>.
The mandatory properties of the append structure must be specified in front of the statement EXTEND TYPE> using the same annotations structure_annos> > as in the definition of a structure.
As in the definition of a structure using DEFINE STRUCTURE>>, the components of the append structure are defined in a semicolon-separated list in curly brackets { }>, either as individual components component>> or by including include structures include>>.
As when including structures, an assignment to a search help and a definition of a foreign key dependency can be overwritten using the addition extend>> in a blank-separated list.
Latest notes:
As in the CDS syntax>, the definition of an ABAP Dictionary append structure can contain comments after //> and between /* ... */>.
A more detailed description of the syntax is available in the ADT> documentation Syntax of ABAP Dictionary Objects> . ABAP_HINT_END
Example ABAP Coding
Adds the append structure DEMO_APPEND_STRUCTURE>> to the structure DEMO_STRUCTURE>> in the ADT. @EndUserText.label : 'Demo append structure' @AbapCatalog.enhancement.category : #EXTENSIBLE_CHARACTER_NUMERIC extend type demo_structure with demo_append_structure { comp3 : dats; comp4 : tims; }> The source code used to define the structure DEMO_STRUCTURE> is not modified by this extension. In the ADT, however, an icon indicates that the structure is extended using DEMO_APPEND_STRUCTURE>. ABAP_EXAMPLE_END