Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

How to de-activate some functions from application toolbar in ALV Grid?

Former Member
0 Kudos

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?

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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.

7 REPLIES 7

Former Member
0 Kudos

Hi,

Pls go through the following links.

Warm Regards

R Adarsh

Former Member
0 Kudos

hi

just go to pf-staus and revoe or deacticate The Funtion code that u gave to it

Cheers

Snehi

Former Member
0 Kudos

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.

0 Kudos

Thank you Joyjit.

It works.

Can you please tell me how to add some more buttons on application toolbar?

0 Kudos

Check BCALV_GRID_05

0 Kudos

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

Former Member
0 Kudos

Hi Megha,

Check these programs:

BCALV_GRID_VERIFY

BCALV_GRID_VERIFY_OLD

BCALV_TEST_GRID_EVENTS

Thanks,

Keerthi.