Application Development and Automation 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: 
Read only

User Command in Dynamic ALV Display

Former Member
0 Likes
555

Hi,

I have an requirement where i'm displaying Dynamic ALV grid by calling the method by passing the field Symbol in it_outtab parameter:

CALL METHOD cl_gui_alv_grid->set_table_for_first_display

For this i'm creating a custom container in my screen container

CREATE OBJECT cl_gui_custom_container

EXPORTING container_name = lv_container.

Now in the output every record is having a checkbox in the end.Now if the user check this checkbox n clicks on push button(added in Application toolbar) then this record should be kept and rest all the records should be deleted.

This can be done if an internal table is passed to the method as the field symbol doesnt hold any data after the output is displayed.

Is there any solution where this can be made possible.

Thanks in advance.

Sheetal

1 REPLY 1
Read only

Former Member
0 Likes
373

try this ..

before displaying ALV , store all the data in the fieldsymbol into another internal table

then display ALV with field symbol

after u click the pushbutton , get the seleted rows into another table using get_selected rows,

now again call CALL METHOD cl_gui_alv_grid->set_table_for_first_display

and give the new selected rows of internal table and refresh the grid