
assign_static_ctxmenu_table
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.

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 |
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 |
The function code of the pushbutton in the toolbar to which you want to assign the context menu |
ctmenu |
A reference variable pointing to the context menu you want to assign to the pushbutton (see
Context Menus) |