Code: Alles auswählen.
Data: ls_toolbar TYPE stb_button,
i_object TYPE REF TO cl_alv_event_toolbar_set.
...
* context menu for calculate automatically
CLEAR ls_toolbar.
ls_toolbar-function = c_fcode-auto_k.
ls_toolbar-butn_type = 0.
ls_toolbar-icon = icon_activity.
ls_toolbar-quickinfo = text-p33.
INSERT ls_toolbar INTO i_object->mt_toolbar INDEX 6.
Code: Alles auswählen.
* context menu for calculate automatically
CLEAR ls_toolbar.
ls_toolbar-butn_type = 2.
ls_toolbar-icon = icon_activity.
ls_toolbar-quickinfo = text-p33.
INSERT ls_toolbar INTO i_object->mt_toolbar INDEX 6.
* build new context menu
CREATE OBJECT cs_btnmenu-ctmenu.
cs_btnmenu-ctmenu->add_function( fcode = c_fcode-auto_an_k
checked = lv_on
text = text-k08 ).
cs_btnmenu-ctmenu->add_function( fcode = c_fcode-auto_aus_k
checked = lv_off
text = text-k09 ).
INSERT ls_btnmenu INTO i_object->mt_btnmnu INDEX 1.
Code: Alles auswählen.
* for handling user actions
handle_user_command FOR EVENT user_command OF cl_gui_alv_grid
IMPORTING e_ucomm,