Entering content frameProcedure documentationNesting Interfaces Locate the document in its SAP Library structure

ABAP Objects supports nested, or compound interfaces. A compound interface contains one or more interfaces as component interfaces. These may contain further interfaces as components. A number of levels of nesting are therefore possible.
Interfaces that do not contain other interfaces are referred to as simple interfaces.

Use

A compound interface is a specialization of its component interfaces. Component interfaces, as well as having their individual uses, can be combined to specify a new interface.

Prerequisites

All of the component interfaces must already exist in the class library.

Procedure

  1. Go to the Class Editor of the Class Builder.
  2. Choose Interfaces for the relevant interface (making sure you are in change mode).
  3. Under Includes, enter the names of the component interfaces.
    If you select the Only modeled option, the system does not create a corresponding entry in the class pool.
  4. Press Enter.
    The entry in the class library is checked. The description is then added.
  5. Save your entries.

Result

All of the component interfaces that you entered belong to the same nesting level. When a class uses a compound interface, it must implement all methods of all component interfaces.
All the interfaces involved are implemented at the same level, whatever their nesting hierarchy. They are now "next to each other". You access their components using their original names, that is, the form:

<Interface name>~<component>

NoteNote

You can assign all the components of the interfaces alias names as an abbreviation for the full name. To do so, click on Aliases and enter the alias name. In addition to the name, you can also define the visibility (PUBLIC, PROTECTED, PRIVATE) and thus restrict the use of alias names.

 

 

Leaving content frame