Show TOC Start of Content Area

Procedure documentation Defining Actions  Locate the document in its SAP Library structure

Use

You use the Actions tab in the Define Action dialog box to define the action (or event) that can be triggered by a control. You can add a single or compound action for the control. You use the Validation tab in the Define Action dialog box to define the validation behavior for the control.

You can define two types of actions:

      Predefined actions: Standardized events, such as closing a window or inserting a row.

      Custom actions: Specialized actions that you define.

The options in the Define Action dialog box change according to the action that you define. For a full description of the actions and their fields, see Define Action Dialog Box in the Visual Composer Reference Guide.

Prerequisites

On the Layout board, you have added a control to a view or container element.

Procedure

...

       1.      Select the control for which you want to define an action and in the Configure task panel, click the Browse button in the Action field. (Alternatively, you can right-click the control and choose Action from the context menu.) The Define Action dialog box is displayed.

Note

To define a single custom action, with only its name (and no other properties), you can enter its name in the Action field in the Configure task panel. You do not need to open the Define Action dialog box. The Action field is only editable if no actions have yet been defined for the control, or if the only action defined for the control is a single custom action.

       2.      In the Actions tab, click the Add Action (+) button. The list of actions is displayed.

       3.      Choose the action that you want to define for the control. You can choose a predefined action from the list, or Custom Action to define a specialized action. You can choose Other from the list to display additional predefined actions.

       4.      Define the properties for the action. If you defined a custom action, you also need to define the action name. The available properties depend on the action you choose. For a description of all the action properties, see Define Action Dialog Box in the Visual Composer Reference Guide. For certain action properties, you can define the value using a dynamic expression (by clicking the fx button). For more information, see Working with Dynamic Expressions.

       5.      Repeat steps 2 to 5 to define additional actions, as required.

       6.      If you defined more than one action for the control, choose an option in the Execution mode dropdown list to specify how the actions should be performed:

       Sequence: Indicates that the first action in the list should be checked at runtime to see whether its defined condition criteria are met. If yes, the action is performed and the next action in the list is then checked, and so on. This process continues until all actions in the list have been checked and all actions that meet the condition criteria have been performed.

       Switch: Indicates that the first action in the list should be checked at runtime to see whether its defined condition criteria are met. If yes, the action is performed and no other actions in the list are checked or performed. If no, the next action in the list is checked, and so on. This process continues until a single action in the list meets the defined condition criteria and is performed.

       7.      In the Validation tab, specify which controls are validated when this action is triggered. We recommend that you leave the default settings in this tab, unless you need to change the validation behavior for a specific control. For example, you may want to remove validation for a Cancel button. For more information and examples about validation behavior and creating validation rules, see Defining Validation Rules.

       8.      Click Close.

Result

The action(s) are defined and triggered at runtime.

Note

You can modify action definitions at a later stage by right-clicking the control for which the action was defined, and choosing Edit Action from the context menu. In the displayed dialog box, you can modify the action definitions as required.

Example

For step-by-step examples that use predefined and custom actions, see Creating a Wizard and Adding a Popup.

End of Content Area