Show TOC

 UI Element ActionsLocate this document in the navigation structure

A number ofl UI elements contain Actions . Actions are special events that are triggered by user activities on the user interface of an application. Corresponding event handlers specify the subsequent processes of the application.

Tip

For example, you can create an action for UI element Button. In the event handler method of this action, you specify the response of the application when the user selects the UI element Button.

An action is always linked to exactly one event handler method. In some cases, however, you might want to simultaneously use the same action for multiple UI elements in the same view. For more information on the required parameterization for multiple-use actions, refer to Parameter Mapping .

Creating Actions

As is the case with data binding, actions of UI elements are created and maintained in the properties table of the View Editor.

Actions can transfer both mandatory and optional parameters.

If the value of the UI element is bound to a context element (e.g. RadioButton, CheckBox), and the value is changed, it is only transferred if an action is defined. Otherwise, the change is recorded on the client and transferred with the next roundtrip, and the context adjusted accordingly.

With UI elements that require no input, for example, Button or LinkToAction, an action can only occur if it has been defined. This can also be an empty event handler method.

Event Handler Methods

When you create a new action, the corresponding event handler method is created automatically. It is empty at first and the application developer can insert source code using the ABAP Editor. The event handler methods are - like all other methods of the view - part of the view controller. Therefore, they are listed in the table of the Methods tab in the View Editor.

Controller Methods

Event handler methods are special methods of a controller - in this case, of the view controller. From a technical point of view, they do not differ from other controller methods like the initial method WDDOINIT or the method WDDOEXIT. Due to a convention, however, their names have the prefix ONACTION followed by the action name specified by the application developer.

Tip

For example, if an action of a UI element has the name GO, the corresponding event handler method is automatically called ONACTIONGO.

For information about programming event handler methods and example programs see Programming Controller Methods .