Show TOC

Pull-up Members to InterfaceLocate this document in the navigation structure

You can move member definitions from a class and add them to the implemented interface. To avoid invalidation of existing usages, aliases are declared.

Prerequisites

This functionality is provided in SAP NetWeaver Release 7.40 SP08 and higher.

Context

Example

Before Execution After Execution

To copy the source code example, click here Code Example Before Execution

The cl_car class contains the move method and implements the if_vehicle interface.

The declarion of the move method has been removed from the cl_car class and added to the if_vehicle interface.

Additionally, an alias definition has been added to the cl_car class to avoid invalidations of existing usages.

Procedure

  1. In the definition part, select the member that you want to move to the interface.
  2. Get the quick assist proposals by choosing Quick Fix from the context menu (shortcut Ctrl 1) or by using the Quick Assist view.
  3. Apply Pull-up Member with Alias.