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: 

Toggle option in ALV FM Reuse...

Former Member
0 Kudos

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>

3 REPLIES 3

Sijin_Chandran
Active Contributor
0 Kudos

My recommendation would be to switch to cl_gui_alv_grid class instead of reuse_alv_grid_display FM.

Refer BCALV_EDIT_01 Program.

former_member223213
Participant
0 Kudos

Hi prasad,

help full link  check it .

EDIT_MODE in REUSE_ALV_GRID_DISPLAY | SCN

Thanks & Regards,

Manoj.

Former Member
0 Kudos

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.