Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

ALV: Need to select/deselect all output rows iwth a Button

Hi All,

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

Rajiv

Tags:
replied

Hí Rajiv,

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

EXPORTING

is_variant = gs_variant

i_save = x_save

is_layout = gs_layout

CHANGING

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.

regards,

Alejandro

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question