Implementing Enhancements in the Controller

Use

All parts of a Web Dynpro controller can be enhanced. The following also applies here: Controller parts created in the original component cannot be changed or deleted in an enhancement implementation.

Context Nodes and Context Attributes

For each existing context, additional nodes and attributes can be created within an enhancement. However, if you wish to add an attribute to an existing node, note the following different situations:

  • Within a node without a dictionary structure, this is possible without restriction.

  • Within a node with a dictionary structure, one or more attributes from the used structure can be added by choosing the context menu option Start of the navigation pathCreate Using the Wizard Next navigation step Attributes from Components of a StructureEnd of the navigation path.

    If you select an attribute added in this manner, you will see the name of the implementation for which it was created displayed in its properties table in the last row Enhancement Implementation.

Methods, Pre-Exits, Post-Exits, and Overwrite Exits

In accordance with all the steps performed so far, it is possible to create and implement new methods for a controller in an enhancement.

However, to be able to intervene in existing methods, a pre-exit, post-exit, and an overwrite exit are provided in an enhancement for each method.

These self-contained, additional methods are run directly before or after the corresponding original method is called, or instead of calling the method. The prerequisite for this is that the original method is called using the local controller interface ( WD_THIS->...), and not directly using the local controller instance ( ME->...).

If several pre-exits or post-exits are specified, the sequence of execution is arbitrary.

Pre-Exits

The pre-exit method automatically provides all the importing and changing parameters of the corresponding original method.

Post-Exits

The post-exit method automatically reads the importing parameter of the original method. All the other parameters of the original method (exporting, changing, and returning parameters) are provided as changing parameters.

Overwrite Exits

The overwrite exit method takes on the signature of the original method and overwrites it. This means that an overwrite exit is executed instead of the original method.

Attributes

Additional attributes can be created within an enhancement implementation.

Events

Additional events can be created within an enhancement implementation. In the same enhancement implementation event handlers can be registered to this event.