06-08-2018 10:21 AM
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
06-14-2018 9: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.
06-08-2018 12:22 PM
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
06-08-2018 12:48 PM
Hi,
There is a standard report as a reference : BCALV_TEST_GRID_TOOLBAR
Check form d0100_sflight_event_toolbar in the report.
06-14-2018 9: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.