I have to create a menu_button in my ALV toolbar,
I searched in SCN and I found some examples.
I know that we have to create a button with the btn_type = 2
like that :
CLEAR: ls_buttn.
ls_buttn-icon = gi_livra.
ls_buttn-butn_type = 2.
ls_buttn-text = 'Vue Livraison'.
ls_buttn-quickinfo = 'Vue Livraison'.
ls_buttn-function = 'LIVRAISON'.
APPEND ls_buttn TO e_object->mt_toolbar.
After that I have to handle menu button im my class like that:
METHODS handle_menubtn FOR EVENT menu_button OF cl_gui_alv_grid
IMPORTING e_object e_ucomm,
After that to implement it
METHOD handle_menubtn.
IF e_ucomm = 'LIVRAISON'.
CALL METHOD e_object->add_function
EXPORTING
fcode = 'DISPLAY'
text = 'DISPLAY'.
ENDIF.
ENDMETHOD.
But it does not work. The debugger does not go into this method when I click on my button.
Why?
I think that what you did is right but maybe you forgot to
Regards,