04-20-2017 10:47 AM
Dear Gurus,
I am adding a custom button on toolbar of ALV (CL_GUI_ALV_GRID).
My requirement is based on some condition at runtime I need to change the text of this button.
I search SCN but did not get any helpful answer.
Please help.
Regards,
Ashutosh Vikram
04-20-2017 11:18 AM
04-20-2017 11:21 AM
Hi!
You need to call method SET_TOOLBAR_INTERACTIVE of CL_GUI_ALV_GRID, it will trigger again TOOLBAR event. And you can change your buttons texts in the handler method.
Evgeny.
04-20-2017 12:02 PM
Hi Gubenko,
Actually i tried calling method SET_TOOLBAR_INTERACTIVE and changed the text but after my code method REFRESH_TABLE_DISPLAY is called and all the change reverted to default text which i have given to button while creating it.
In my requirement based on the function code of this button i am changing ALV data so REFRESH_TABLE_DISPLAY is being called.
What to do to retain the changed text?
Regards,
Ashutosh Vikram
04-20-2017 3:17 PM
04-20-2017 11:26 AM
How do you add your custom button to the toolbar, via event toolbar of cl_gui_alv_grid, or other way?
04-20-2017 2:28 PM
Hi Sandra,
I added the button through event 'toolbar' of CL_GUI_ALV_GRID only.
My requirement is on trigger of function code of this button i need to change few fields of ALV as well as text of this button also accordingly.
But after the call of REFRESH_TABLE_DISPLAY the changed text of button is getting reset.
Please suggest.
Regards,
Ashutosh Vikram