Skip to Content

After user-command exclude custom toolbar button in cl_gui_alv_grid

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

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • Best Answer
    Jun 14, 2018 at 08:50 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • Jun 08, 2018 at 11:22 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • Jun 08, 2018 at 11:48 AM

    Hi,

    There is a standard report as a reference : BCALV_TEST_GRID_TOOLBAR

    Check form d0100_sflight_event_toolbar in the report.

    Add comment
    10|10000 characters needed characters exceeded