Entering content frame

This graphic is explained in the accompanying text UI Element Actions Locate the document in its SAP Library structure

 

Several UI elements contain Structure linkactions. Actions are special events triggered by activities of the user on the user interface of an application. Corresponding event handlers specify the subsequent processes of the application. The following example illustrates the procedure:

This graphic is explained in the accompanying text   You 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 a 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.  

 

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. Example:

This graphic is explained in the accompanying text If an action of a UI element has the name GO, the corresponding event handler method is automatically called ONACTIONGO.

 

For information on programming event handler methods and example programs, refer to Programming Controller Methods.

 

 

Leaving content frame