Show TOC

Append StructuresLocate this document in the navigation structure

Syntax Form
<structure_annotations>
EXTEND TYPE struct WITH append_struct {
  [components]
  [component_extensions]
}
Definition

Append structures are used to add components or component extensions to an existing structure without modifying the latter. They are independent development objects that are edited separately.

An append structure is introduced with the EXTEND TYPE keywords, followed by the name of the original structure, followed by the WITH keyword and the name of the append structure.

For append structures you use the same annotations as for regular structures.

Notes
You can only add a
  • value help if no value help exists for the original component
  • foreign key if no foreign key exists for the original component

Example

The employee_with_address append structure adds the street and city components.

In addition, the existing component department is extended by an assignment to the departments value help.

@EndUserText.label: 'Employee with additional fields'
@AbapCatalog.enhancementCategory: #EXTENSIBLE_CHARACTER
EXTEND TYPE employee WITH employee_with_address {
  street : abap.char(40);
  city   : abap.char(30);
    EXTEND department : WITH VALUE HELP departments
      WHERE department_id = employee_with_address.department;
...
}