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: 

After user-command exclude custom toolbar button in cl_gui_alv_grid

0 Kudos

Hello everyone,

I have simple problem but i couldn't found in SCN. How can i exclude custom toolbar button after user-command process. I have one solution but it didn't seem like efficient. I don't want to call set_table_for_first_display method again. Have you got any alternative solution?

Thank you

1 ACCEPTED SOLUTION

0 Kudos

Hello,

I found very simple solution. After user-command trigger toolbar event again. I put control parameter in method head line and check it.

  METHOD handle_toolbar.
    CHECK  mv_buton_dis = space.
    APPEND LINES OF VALUE ttb_button( ( function  = 'SAVE'
                                          butn_type =  0
                                          icon      = icon_system_save
                                          text      = 'Kaydet'(b01)
                                          quickinfo = 'Kaydet'(b01) )   ) TO e_object->mt_toolbar.

  ENDMETHOD.

3 REPLIES 3

jitendra_it
Active Contributor
0 Kudos

I presume you are doing this with class CL_ALV_GRID_TOOLBAR_MANAGER.

Call method REORGANIZE with attribute of MT_TOOLBAR- DISABLED.

Check this link http://saptechnical.com/Tutorials/ALV/Toolbar/buttons.htm

omer_sakar
Participant
0 Kudos

Hi,

There is a standard report as a reference : BCALV_TEST_GRID_TOOLBAR

Check form d0100_sflight_event_toolbar in the report.

0 Kudos

Hello,

I found very simple solution. After user-command trigger toolbar event again. I put control parameter in method head line and check it.

  METHOD handle_toolbar.
    CHECK  mv_buton_dis = space.
    APPEND LINES OF VALUE ttb_button( ( function  = 'SAVE'
                                          butn_type =  0
                                          icon      = icon_system_save
                                          text      = 'Kaydet'(b01)
                                          quickinfo = 'Kaydet'(b01) )   ) TO e_object->mt_toolbar.

  ENDMETHOD.