ALV: Need to select/deselect all output rows iwth a Button
I have an ALV grid displaying a few lines of data.
User needs a button in the application toolbar to SELECT/DESELECT all rows displayed in the ALV list.
I am using OO for displaying the layout.
I want to know if there is a method which can SELECT/DESELECT all displayed rows. If there is no method, is there a workaround of achieving same.
Just for your info I dont have a check-box as the first colum of my ALV.
Appreciate your feedback on same.
Thanks and Regards
Alejandro Lopez R replied
This is the code that i used, it active the button in the upper left corner in the ALV grid. This button allows select or deselect All or none of the rows of ALV.
gs_variant-report = sy-repid.
CALL METHOD alv_grid->set_table_for_first_display
is_variant = gs_variant
i_save = x_save
is_layout = gs_layout
it_outtab = it_orden
it_sort = it_sortcat
it_fieldcatalog = gt_fieldcat.
If you want to obtain the values of the rows, you should use the methods of ALV.