Nesting Interfaces 

ABAP Objects supports nested, or compound interfaces. A compound interface contains one or more interfaces as component interfaces. These may also contain interfaces as components, thus allowing multiple-level nesting of interfaces.
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. In the Class Builder, open the class editor.
  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 system checks your entry against the class library, and inserts the short descriptions of the component interfaces.

  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.
The component interfaces are implemented equally, regardless of their nesting level ("flat hierarchy"). You access their components using their original names, that is, the form:

<Interface name>~<component>