Show TOC Start of Content Area

Procedure documentation Nested Enhancement Implementations   Locate the document in its SAP Library structure

Nested Enhancement Implementations for Interfaces

In an interface, you can enhance an existing enhancement implementation with another enhancement implementation by:

      adding new attributes

      adding new types

      adding new (optional) parameters to a method belonging to an other enhancement implementation.

To create a nested enhancement implementation for an interface, proceed as follows:

...

       1.      In the Class Builder, choose Interface ® Enhance.

A screen containing the already existing enhancement implementations for the interface appears.

       2.      Choose the enhancement implementation you want to enhance and press the Create nested enhancement button.

       3.      Enter a name for the new enhancement implementation.

The relationship between the new enhancement implementation and the already existing implementation is visible in the Parent Enhancement column.

Note

Currently, only two levels of nesting for class and interface enhancement implementations are allowed.

Only the components belonging to the parent enhancement implementation can be processed in the nested enhancement implementation. If you want to enhance the original object (an interface or a class), you should place the new enhancement implementation at the first enhancement level.

Nested Enhancement Implementations for Classes

In a class, you can enhance an existing enhancement implementation with another enhancement implementation by:

·        adding new attributes

·        adding new types

·        adding new (optional) parameters to a method in the class which belongs to an other enhancement implementation.

·        adding PRE/POST/OVERWRITE methods for a method belonging to an enhancement implementation.

To create a nested enhancement implementation for a class, proceed as follows:

...

       1.      In the Class Builder, choose Class ® Enhance.

A screen with the already existing enhancement implementations for the class appears.

       2.      Choose the enhancement implementation you want to enhance and press the Create nested enhancement button.

       3.      Enter a name for the new enhancement implementation.

The relationship between the new enhancement implementation and the already existing implementation is visible in the Parent Enhancement column.

       4.      To create a method exit, position the cursor on the method belonging to the enhancement implementation you want to enhance and choose Edit ® Enhancement Operations ® Insert Pre-Method.

Note

At the second nesting level you are not allowed to add method exits to a method belonging to the original class. You can enhance only components belonging to the parent enhancement implementation.

For more information, see SAP Note 1286805.

 

 

End of Content Area