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: 

ALV Grid: exclude a menu button

Former Member
0 Kudos

Hello,

I have a strange problem here:

I'm excluding several buttons and menu buttons from the default alv grid toolbar. But one the the menu buttons doesn't behave like the others.

cl_gui_alv_grid=>mc_fc_views

and

cl_gui_alv_grid=>mc_mb_view

both remove the menu entries but not the button itself !

Other menu buttons like

cl_gui_alv_grid=>mc_mb_subtot

are removed properly.

Any ideas on this one ?

Best regards,

Patrick Baer

11 REPLIES 11

ssimsekler
Active Contributor
0 Kudos

Hi Patrick

Are you sure about the button code you are passing is the one for the button you want to be excluded.

Regards

*--Serdar <a href="https://www.sdn.sap.com:443http://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.sdn.businesscard.sdnbusinesscard?u=qbk%2bsag%2bjiw%3d">[ BC ]</a>

0 Kudos

Serdar,

not completely sure but the codes do change the menu button in fact by removing the 'dropdown' part of the button that gives the user selection possibilities.

Problem is, that I am working on a german frontend but I will try to translate:

the button that I am trying to remove has the tool tip text 'List output'

Regards,

Patrick Baer

P.S.: by the way: I'm using your document "An Easy Reference for ALV GRID CONTROL" which is fantastic !

0 Kudos

I would like to bring this topic to everybodys attention again since it is still unsolved.

Thank you very much,

Patrick Baer

0 Kudos

Hi Patrick,

Do I understand it correctly that the button does not disappear, but is merely <i>greyed out</i> ?

Regards,

Anand Mandalika.

0 Kudos

Hmm, not really

Let me try to explain via an example:

in the object navigator -> repository browser you have a menu button for the favourites. It is a dropdown menu on the right combined with a button on the left.

In my case the dropdown part of the button on the right is removed but the left button part remains and it's still clickable or not greyed out respectively.

Best regards,

Patrick Baer

0 Kudos

what i understand is that the "views" icon is not removed but only some of the entries withing the views options (list, grid, excel, etc).

to remove views you need to exclude the following.

MC_FC_VIEWS

MC_FC_VIEW_CRYSTAL

MC_FC_VIEW_EXCEL

MC_FC_VIEW_GRID

MC_FC_VIEW_LOTUS

Regards

Raja

0 Kudos

Raja,

you are correct - all of the options are removed but the button itself remains.

I tried your suggestion but sad enough it didn't work either. Same effect as just MC_FC_VIEWS excluded i.e. button remains without options.

Best regards,

Patrick Baer

0 Kudos

The suggestion i am going to give you is not a nice one, but would work.

i had one alv where i had removed all the standard buttons. and the following is the contents of the exclusion table.

place all of them into the exclusion table and remove one by one from the exclusion table to check out.

append cl_gui_alv_grid=>mc_fc_auf                   to exl_tab.
  append cl_gui_alv_grid=>mc_fc_average               to exl_tab.
  append cl_gui_alv_grid=>mc_fc_back_classic          to exl_tab.
  append cl_gui_alv_grid=>mc_fc_call_abc              to exl_tab.
  append cl_gui_alv_grid=>mc_fc_call_chain            to exl_tab.
  append cl_gui_alv_grid=>mc_fc_call_crbatch          to exl_tab.
  append cl_gui_alv_grid=>mc_fc_call_crweb            to exl_tab.
  append cl_gui_alv_grid=>mc_fc_call_lineitems        to exl_tab.
  append cl_gui_alv_grid=>mc_fc_call_master_data      to exl_tab.
  append cl_gui_alv_grid=>mc_fc_call_more             to exl_tab.
  append cl_gui_alv_grid=>mc_fc_call_report           to exl_tab.
  append cl_gui_alv_grid=>mc_fc_call_xint             to exl_tab.
  append cl_gui_alv_grid=>mc_fc_call_xxl              to exl_tab.
  append cl_gui_alv_grid=>mc_fc_check to exl_tab.
  append cl_gui_alv_grid=>mc_fc_col_invisible to exl_tab.
  append cl_gui_alv_grid=>mc_fc_col_optimize to exl_tab.
  append cl_gui_alv_grid=>mc_fc_current_variant to exl_tab.
  append cl_gui_alv_grid=>mc_fc_data_save to exl_tab.
  append cl_gui_alv_grid=>mc_fc_delete_filter to exl_tab.
  append cl_gui_alv_grid=>mc_fc_deselect_all to exl_tab.
  append cl_gui_alv_grid=>mc_fc_detail to exl_tab.
  append cl_gui_alv_grid=>mc_fc_excl_all to exl_tab.
  append cl_gui_alv_grid=>mc_fc_expcrdata to exl_tab.
  append cl_gui_alv_grid=>mc_fc_expcrdesig to exl_tab.
  append cl_gui_alv_grid=>mc_fc_expcrtempl to exl_tab.
  append cl_gui_alv_grid=>mc_fc_expmdb to exl_tab.
  append cl_gui_alv_grid=>mc_fc_extend to exl_tab.
  append cl_gui_alv_grid=>mc_fc_f4 to exl_tab.
  append cl_gui_alv_grid=>mc_fc_filter to exl_tab.
  append cl_gui_alv_grid=>mc_fc_find to exl_tab.
  append cl_gui_alv_grid=>mc_fc_fix_columns to exl_tab.
  append cl_gui_alv_grid=>mc_fc_graph to exl_tab.
  append cl_gui_alv_grid=>mc_fc_help to exl_tab.
  append cl_gui_alv_grid=>mc_fc_html to exl_tab.
  append cl_gui_alv_grid=>mc_fc_info to exl_tab.
  append cl_gui_alv_grid=>mc_fc_load_variant to exl_tab.
  append cl_gui_alv_grid=>mc_fc_loc_append_row to exl_tab.
  append cl_gui_alv_grid=>mc_fc_loc_copy to exl_tab.
  append cl_gui_alv_grid=>mc_fc_loc_copy_row to exl_tab.
  append cl_gui_alv_grid=>mc_fc_loc_cut to exl_tab.
  append cl_gui_alv_grid=>mc_fc_loc_delete_row to exl_tab.
  append cl_gui_alv_grid=>mc_fc_loc_insert_row to exl_tab.
  append cl_gui_alv_grid=>mc_fc_loc_move_row to exl_tab.
  append cl_gui_alv_grid=>mc_fc_loc_paste to exl_tab.
  append cl_gui_alv_grid=>mc_fc_loc_paste_new_row to exl_tab.
  append cl_gui_alv_grid=>mc_fc_loc_undo to exl_tab.
  append cl_gui_alv_grid=>mc_fc_maintain_variant to exl_tab.
  append cl_gui_alv_grid=>mc_fc_maximum to exl_tab.
  append cl_gui_alv_grid=>mc_fc_minimum to exl_tab.
  append cl_gui_alv_grid=>mc_fc_pc_file      to exl_tab.
  append cl_gui_alv_grid=>mc_fc_print        to exl_tab.
  append cl_gui_alv_grid=>mc_fc_print_back   to exl_tab.
  append cl_gui_alv_grid=>mc_fc_print_prev   to exl_tab.
  append cl_gui_alv_grid=>mc_fc_refresh      to exl_tab.
  append cl_gui_alv_grid=>mc_fc_reprep       to exl_tab.
  append cl_gui_alv_grid=>mc_fc_save_variant to exl_tab.
  append cl_gui_alv_grid=>mc_fc_select_all   to exl_tab.
  append cl_gui_alv_grid=>mc_fc_send         to exl_tab.
  append cl_gui_alv_grid=>mc_fc_separator    to exl_tab.
  append cl_gui_alv_grid=>mc_fc_sort         to exl_tab.
  append cl_gui_alv_grid=>mc_fc_sort_asc     to exl_tab.
  append cl_gui_alv_grid=>mc_fc_sort_dsc to exl_tab.
  append cl_gui_alv_grid=>mc_fc_subtot        to exl_tab.
  append cl_gui_alv_grid=>mc_fc_sum           to exl_tab.
  append cl_gui_alv_grid=>mc_fc_to_office     to exl_tab.
  append cl_gui_alv_grid=>mc_fc_to_rep_tree   to exl_tab.
  append cl_gui_alv_grid=>mc_fc_unfix_columns to exl_tab.
  append cl_gui_alv_grid=>mc_fc_views         to exl_tab.
  append cl_gui_alv_grid=>mc_fc_view_crystal  to exl_tab.
  append cl_gui_alv_grid=>mc_fc_view_excel    to exl_tab.
  append cl_gui_alv_grid=>mc_fc_view_grid     to exl_tab.
  append cl_gui_alv_grid=>mc_fc_word_processor to exl_tab.
  append cl_gui_alv_grid=>mc_lystyle_drag_drop_rows to exl_tab.
  append cl_gui_alv_grid=>mc_lystyle_no_delete_rows to exl_tab.
  append cl_gui_alv_grid=>mc_lystyle_no_insert_rows to exl_tab.
  append cl_gui_alv_grid=>mc_lystyle_no_insert_rows to exl_tab.
  append cl_gui_alv_grid=>mc_ly_drag_drop_rows to exl_tab.
  append cl_gui_alv_grid=>mc_ly_no_delete_rows to exl_tab.
  append cl_gui_alv_grid=>mc_ly_no_insert_rows to exl_tab.
  append cl_gui_alv_grid=>mc_mb_export         to exl_tab.
  append cl_gui_alv_grid=>mc_mb_view           to exl_tab.
  append cl_gui_alv_grid=>mc_mb_sum            to exl_tab.
  append cl_gui_alv_grid=>mc_mb_subtot         to exl_tab.
  append cl_gui_alv_grid=>mc_mb_filter         to exl_tab.
  append cl_gui_alv_grid=>mc_mb_variant        to exl_tab.
  append cl_gui_alv_grid=>mc_mb_paste          to exl_tab.
  append cl_gui_alv_grid=>mc_style4_link       to exl_tab.
  append cl_gui_alv_grid=>mc_style4_link_no to exl_tab.
  append cl_gui_alv_grid=>mc_style_button            to exl_tab.
  append cl_gui_alv_grid=>mc_style_disabled          to exl_tab.
  append cl_gui_alv_grid=>mc_style_enabled           to exl_tab.
  append cl_gui_alv_grid=>mc_style_f4                to exl_tab.
  append cl_gui_alv_grid=>mc_style_f4_no             to exl_tab.
  append cl_gui_alv_grid=>mc_style_no_delete_row     to exl_tab.

Regards

Raja

0 Kudos

Raja,

got it now

I hate brute force approaches to solve a problem but in this case in fact it seemed to be the last remaining possibility. So I went through all the exclusion properties and figured out the right combination:

mc_fc_views AND <i>mc_fc_print_prev</i> must be excluded.

The latter one was missing because I didn't really associate the button with print preview...

Best regards,

Patrick Baer

Former Member
0 Kudos

Hi all,

where can I look for the mc_mb_* attributes af cl_gui_alv_grid?

Is better work with mc_fc* or with mc_mb* to exclude a lot of pushbutton in toolbar?

Christian

0 Kudos

Hi Christian,

you need to open a new thread.

regards,

venu.