06-25-2008 3:34 PM
Hello all,
I am using CL_GUI_ALV_GRID. I want to deactivate ascending sorting?
I think this can be done by class CL_CTMENU with the method DISABLE_FUNCTIONS .
Can anyone give me example how to use the class CL_CTMENU with the method DISABLE_FUNCTIONS?
06-25-2008 3:39 PM
we can exclude some functions with the parameter 'it_toolbar_excluding' from method 'set_table_for_first_display'. Here's an example:
REFRESH t_fcodes .
APPEND cl_gui_alv_grid=>mc_fc_expcrdata TO t_fcodes.
APPEND cl_gui_alv_grid=>mc_fc_expcrdesig TO t_fcodes.
APPEND cl_gui_alv_grid=>mc_fc_expcrtempl TO t_fcodes.
APPEND cl_gui_alv_grid=>mc_fc_graph TO t_fcodes.
APPEND cl_gui_alv_grid=>mc_fc_help TO t_fcodes.
APPEND cl_gui_alv_grid=>mc_mb_sum TO t_fcodes.
APPEND cl_gui_alv_grid=>mc_fc_average TO t_fcodes.
APPEND cl_gui_alv_grid=>mc_fc_to_office TO t_fcodes.
APPEND cl_gui_alv_grid=>mc_fc_view_crystal TO t_fcodes.
APPEND cl_gui_alv_grid=>mc_fc_send TO t_fcodes.
APPEND cl_gui_alv_grid=>mc_fc_info TO t_fcodes.
APPEND cl_gui_alv_grid=>mc_fc_call_abc TO t_fcodes.
CALL METHOD grid->set_table_for_first_display
EXPORTING
is_layout = w_layout
it_toolbar_excluding = t_fcodes[]
CHANGING
it_fieldcatalog = t_cat[]
it_outtab = g_tab[] .
Regards,
Joy.
06-25-2008 3:36 PM
06-25-2008 3:36 PM
hi
just go to pf-staus and revoe or deacticate The Funtion code that u gave to it
Cheers
Snehi
06-25-2008 3:39 PM
we can exclude some functions with the parameter 'it_toolbar_excluding' from method 'set_table_for_first_display'. Here's an example:
REFRESH t_fcodes .
APPEND cl_gui_alv_grid=>mc_fc_expcrdata TO t_fcodes.
APPEND cl_gui_alv_grid=>mc_fc_expcrdesig TO t_fcodes.
APPEND cl_gui_alv_grid=>mc_fc_expcrtempl TO t_fcodes.
APPEND cl_gui_alv_grid=>mc_fc_graph TO t_fcodes.
APPEND cl_gui_alv_grid=>mc_fc_help TO t_fcodes.
APPEND cl_gui_alv_grid=>mc_mb_sum TO t_fcodes.
APPEND cl_gui_alv_grid=>mc_fc_average TO t_fcodes.
APPEND cl_gui_alv_grid=>mc_fc_to_office TO t_fcodes.
APPEND cl_gui_alv_grid=>mc_fc_view_crystal TO t_fcodes.
APPEND cl_gui_alv_grid=>mc_fc_send TO t_fcodes.
APPEND cl_gui_alv_grid=>mc_fc_info TO t_fcodes.
APPEND cl_gui_alv_grid=>mc_fc_call_abc TO t_fcodes.
CALL METHOD grid->set_table_for_first_display
EXPORTING
is_layout = w_layout
it_toolbar_excluding = t_fcodes[]
CHANGING
it_fieldcatalog = t_cat[]
it_outtab = g_tab[] .
Regards,
Joy.
06-25-2008 3:47 PM
Thank you Joyjit.
It works.
Can you please tell me how to add some more buttons on application toolbar?
06-25-2008 3:50 PM
06-25-2008 3:52 PM
Pl. check std. prog. BCALV_GRID_05.
Steps:
1.Apply steps for event handling for events TOOLBAR and
USER_COMMAND (see example for print events)
2.In event handler method for event TOOLBAR: Append own functions
by using event parameter E_OBJECT.
3.In event handler method for event USER_COMMAND: Query your
function codes defined in step 2 and react accordingly.
4.Call method 'set_toolbar_interactive' to raise event TOOLBAR.
Regards,
Joy.
<REMOVED BY MODERATOR>
Edited by: Alvaro Tejada Galindo on Jun 25, 2008 4:24 PM
06-25-2008 3:42 PM
Hi Megha,
Check these programs:
BCALV_GRID_VERIFY
BCALV_GRID_VERIFY_OLD
BCALV_TEST_GRID_EVENTS
Thanks,
Keerthi.