12-08-2008 12:56 PM
Hi Experts in ALV-OM,
i try to add a new menu-button to alv-om. (CL_SALV_TABLE), but I don't find the right methods.
The methods
lr_functions = go_alv->get_functions( ).
lr_functions->set_all( abap_true ).
lr_functions->set_group_filter( abap_true ).
supplies standard-menu-buttons, therefore it must be possible to add an own menu_button.
It is possible to add functions with (CL_SALV_FUNCTION_LIST->ADD_FUNCTION), but I can't find the right coding to add an group, all methods I found (set_group, set_item) are protected.
Thanks for your help
Christiane
12-08-2008 2:19 PM
Hi Christiane,
If you check in this link [adding functions|http://help.sap.com/saphelp_nw70/helpdata/EN/41/b22041d69ba52fe10000000a155106/frameset.htm], there is a line
In the container display, you are only able to add pushbuttons in the application toolbar. You are not able to generate menu entries.
this made me shift to [CL_GUI_ALV_GRID Toolbar|http://help.sap.com/saphelp_nw70/helpdata/EN/ee/c8e07dd52611d2b468006094192fe3/frameset.htm] for implementing menu-entries function in toolbar...
Cheers,
Jose.
12-09-2008 9:31 AM
Hi Jose,
yes I also read that, but I don't want to believe it. If I've no solution till noon, I will take CL_GUI_ALV_GRID.
Thanks
Christiane
12-08-2008 2:22 PM
There are methods in the class CL_SALV_FUNCTION which will allow you to set the Group, Icon, Visibility etc for each Function of the Toolbar.
Try like:
DATA: lt_function TYPE salv_t_ui_func,
la_function LIKE LINE OF lt_function,
l_function TYPE string,
lo_function TYPE REF TO cl_salv_function.
lt_function = lr_functions->get_functions( ).
LOOP AT lt_function INTO la_function.
l_function = la_function-r_function->get_name( ).
check l_function = 'MYFUNCTION'.
lo_function ?= la_function-r_function.
lo_function->set_group( 'MYGROUP' ).
ENDLOOP.
Regards,
Naimesh Patel
12-09-2008 9:29 AM
Hallo Naimesh,
thanks for your answer, but my first problem ist to create a new menu-button. Do you know, how to do?
Thanks a lot
Christiane