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: 

delete all buttons in the menu

Former Member
0 Kudos

hi friends..

i am using grid (oo)..

i want to delete all buttons in the menu.for that i used

g_grid->delete_all_menus..

but i got a error like fallow...

ACCESS TO PROTECTED METHOD "delete_all_menus" IS NOT ALLOWED

what it means , how can i get the result

1 ACCEPTED SOLUTION

uwe_schieferstein
Active Contributor
0 Kudos

Hello Deva

There is very simple way to remove the entire (toolbar) buttons:

DATA:
  gs_layout    TYPE lvc_s_layo.

...
  gs_layout-no_toolbar = 'X'.
...

  CALL METHOD go_grid->set_table_for_first_display
    IMPORTING
      ...
      is_layout = gs_layout
     ...
     .

Regards

Uwe

3 REPLIES 3

Former Member
0 Kudos

<b>Hi deva,

Access to protected method 'delete_all_menus' is not allowed.

What this implies is that we cannot call a protected method

using an instance of that class. The class here is cl_gui_alv_grid

that has a method called 'delete_all_menus' , while the visibility

of this method is protected & hence it cannot be called using an instance of that

class.

All the components defined in the protected section is accessible to all the

methods of that class & of the classes that inherit from it.... thank you/

</b>

uwe_schieferstein
Active Contributor
0 Kudos

Hello Deva

There is very simple way to remove the entire (toolbar) buttons:

DATA:
  gs_layout    TYPE lvc_s_layo.

...
  gs_layout-no_toolbar = 'X'.
...

  CALL METHOD go_grid->set_table_for_first_display
    IMPORTING
      ...
      is_layout = gs_layout
     ...
     .

Regards

Uwe

0 Kudos

hi Uwe Schieferstein ..

thanks very much..

actually now i am in starting stage in oops abap..

your effort on my query is very helpful..