Show TOC

Background documentationImplementing Enhancements in the Controller Locate this document in the navigation 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.

Caution Caution

Note that enhanced objects in the component controller, such as methods and context nodes, cannot be included in the interface controller and therefore not in the external interface of the component.

If a context node exposed in the interface is enhanced with additional attributes, these attributes are likewise not statically available in the corresponding context node of the interface controller. However, these enhanced attributes can be accessed dynamically at runtime.

End of the caution.
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   Create Using the Wizard   Attributes from Components of a Structure  .

    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.

Note Note

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

End of the note.
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.

Note Note

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

End of the note.
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.