Entering content frameSyntax documentation assign_static_ctxmenu_table Locate the document in its SAP Library structure

Use this method to assign context menus to a group of pushbuttons for the entire lifetime of the control. When you assign a context menu statically, the system loads it into the frontend control and it remains there after the user has closed it. Normally the system triggers the DROPDOWN_CLICKED event when the user clicks a pushbutton that has a dropdown menu. In your application, you would then assign the context menu to the button, but only for that one occasion. If you assign the context menus statically, they reside at the frontend, and are available whenever the user clicks the corresponding pushbutton without you having to reassign it each time.

You should use static context menus in all but the most context-sensitive cases.

Note

Any changes that are made to the context menu during the lifetime of the control are automatically updated at the frontend.

CALL METHOD toolbar->assign_static_ctxmenu_table
                EXPORTING   table_ctxmenu = table_ctxmenu.

Parameter and Type

Meaning

table_ctxmenu
TYPE TTB_BTNMNU

Internal table containing the assignments of context menus to pushbuttons in the toolbar instance. It has the line type STB_BTNMNU (described below).

Structure STB_BTNMNU

Component and Type

Meaning

Function
TYPE UI_FUNC

The function code of the pushbutton in the toolbar to which you want to assign the context menu

ctmenu
TYPE REF TO CL_CTMENU

A reference variable pointing to the context menu you want to assign to the pushbutton (see Structure link Context Menus)

 

 

Leaving content frame