Function documentationAction Menu

 

You can use the action menu to perform, for example, actions on fields in form views and tables in the WebClient UI. These actions enable the use of various communication channels. You can perform actions such as showing if a person is online or offline, sending e-mails and SMS, sending instant messages, and making phone calls by using SAP Business Communications Management and Skype technologies.

If you click the icon next to the field, the action menu opens, in which you can choose an action. The action starts immediately, either in the same window or in a new window, by clicking the entry in the action menu.

Prerequisites

To define action providers, you need to make the necessary settings in Customizing for UI Framework under Start of the navigation path UI Framework Definition Next navigation step Design Layer Next navigation step Define Action Providers End of the navigation path.

Features

You can use one of the following options to assign an action menu to a field:

  • Assign an action menu tag to a field

  • Assign an action menu from a configurable view to a field

  • Assign an action menu to a particular field in multiple views by using the design layer

Assign an Action Menu Tag to a Field

To assign actions to a specific field, this field needs to be inserted into the action menu tag. The attribute of the action menu tag corresponds to the ID of the specific field.

Example Example

<thtmlb:actionsMenu ... for=”BP_RESP” ...>

<thtmlb:inputField id=”BSP_RESP” ...>

</thtmlb:actionsMenu>

End of the example.

The following table explains which attributes can be assigned to a specific field:

Name

Mandatory

Description

Possible Values

id

X

Specifies the ID for the action menu instance; unique name that identifies the BSP element; the attribute is used in event handling and data handling.

Character values, for example, actionMenuforBP1

actionItems

Defines a table that describes the menu items. Every row specifies a menu item, for example, ID, text, icon, and so on.

Table type WCFT_THTMLB_ACTION_MENU_ITEMS

actionProvider

Retrieves the action items. This is an alternative to actionItems. If this attribute is specified, the actionItems attribute is skipped.

Class that inherits the abstract class CL_BSP_WD_ACTION_PROVIDER and implements only the abstract method IF_BSP_WD_ACTION_DESCR_EXT~BUILD_ACTIONS

actionMenu

Specifies icon source and tooltip for the action menu

Structure WCFS_THTMLB_ACTION_MENU

for

X

Explicitly associates the actionMenu with another BSP element, for example, textView. The value of this attribute must be the same as the value for the id attribute of the element wrapped by this actionMenu.

loadOnDemand

Specifies that the HTML for the menu is retrieved from the backend only on demand, which means only when the menu is opened. This attribute is provided for performance reasons: reducing HTTP response size and rendering time.

TRUE/FALSE

iconSrc

Defines the URL of the icon. The WebClient UI framework provides a standard URL.

switchId

Used to switch the tag on and off that uses the switch framework transaction. If the switch is active, the tag is rendered.

tooltip

Defines the tooltip of the action menu button

Assign an Action Menu from a Configurable View to a Field

To assign an action menu from a configurable view to a field, you need to implement a special getter method. The getter returns all the information that is required to build the action menu. The framework runtime engine generates the action menu, which is assigned to the corresponding field.

Example Example

Field City (CITYTO) is part of the configurable view. You need to provide the getter method get_ac_City (GET_AC_CITYTO) to assign the action menu to that field.

End of the example.

The following table explains the signature of the getter method:

Parameter Name

Type

Typing Method

Associated Type

Details

IV_COMPONENT

Importing

Type

STRING

IV_INDEX

Importing

Type

I

Only if it is used in table view context node

IV_MODE

Importing

Type

CHAR1

IV_DISPLAY_MODE

Importing

Type

BOOLEAN

RV_ACTION_DESCRIPTOR

Returning

Type Ref To

CL_BSP_WD_ACTION _PROVIDER

Use the Design Layer for the Action Menu

You can assign the action menu to a field by using the design layer. You can assign an action provider to one attribute of a design object. If you change the attribute, for example, the implementation class, this change is displayed in all views in which this design object is used.

You can define action providers in Customizing for UI Framework under Start of the navigation path UI Framework Definition Next navigation step Design Layer Next navigation step Define Action Providers End of the navigation path.

More Information

Design Layer