Hello,
i have added a custom menu button (button type 2) to an ALV toolbar using the following code.
action-handler-method: "on_toolbar FOR EVENT toolbar OF cl_gui_alv_grid"
DATA: ls_toolbar TYPE stb_button. CLEAR ls_toolbar. MOVE 'TEST' TO ls_toolbar-function. MOVE icon_change_order TO ls_toolbar-icon. MOVE 'moep'(110) TO: ls_toolbar-quickinfo, ls_toolbar-text. MOVE 2 TO ls_toolbar-butn_type. MOVE space TO ls_toolbar-disabled. APPEND ls_toolbar TO e_object->mt_toolbar.
So far, so good, but when i add menu entries to the menu button their ICON is not displayed.
Am i doing something wrong, or is it a known error, that this function is not working?
Because i've never seen an SAP-Standard ALV that had icons for ALV toolbar menu button items.
The Menu Items of the SAP-Standard Menu Button "Layout" for example don't have any icons either.
Here the coding i use to add menuitems.
action-handler-method: "on_menu_button FOR EVENT menu_button OF cl_gui_alv_grid"
IF e_ucomm = 'TEST. CALL METHOD e_object->add_function EXPORTING fcode = 'TEST2' text = 'meep'(132) icon = icon_mail. ... ENDIF.
Now my ALV Toolbar has the new Menu Button with 1 menuitem, that menuitem should be displayed with "ICON_MAIL", but isn't. I also tried using @1S@ and @T_MAIL@.
Would be great if anyone could help me,
thanks.