Start of Content Area

Background documentation Implementing Enhancements in the Controller  Locate the document in its SAP Library structure

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, there are 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 Create Through Wizard ® Attributes from Components of a Structure. If you select an attribute added in this manner, you can see the name of the implementation for which it was created displayed in its properties table in the last row, Enhancement Implementation.

Note 

You may only change or delete a context note or context attribute that was created for enhancement purposes in exactly that enhancement implementation in which it was created.

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 was 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.

Note

At runtime only one overwrite exit can be active. If several overwrite exits are active, a runtime error occurs.

Attributes

Additional attributes can be created as part of 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.

 

 

End of Content Area