05-26-2015 6:15 AM
Hello Experts,
I am using FM REUSE_ALV_GRID_DISPLAY for alv in my program. I have added a toggle button (Change <-> Display) using menu painter. But i have no idea how to implement it. Initially grid is in edit mode set in field catalog. (ex: ls_filedcatalog-edit = 'X'). My requirement is that i want to switch the grid in to display mode on clicking upon toggle button, and back to edit mode on the next click.
i wrote a user command for the button.
Can you please help me how can achieve this functionality>
05-26-2015 6:47 AM
My recommendation would be to switch to cl_gui_alv_grid class instead of reuse_alv_grid_display FM.
Refer BCALV_EDIT_01 Program.
05-26-2015 7:32 AM
05-26-2015 7:54 AM
Hi
Try the following method :
At the time of click on Display toggle button, you refresh the fieldcat table and again fill the field cat remove the edit and call ALV.
Same as click on Change toggle button, you refresh the fieldcat and again fill the field cat pass edit option and call ALV.
Regards,
Chandu.