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

ALV Selection

Former Member
0 Likes
606

Hi,

I have a SALV created using cl_salv_table=>factory() method to create the ALV. I want to be able to select a few rows and process them in PAI. Currently I'm able to select multiple lines. But in the PAI, I'm not able able to get the selected rows. Basically the method

lr_selections = gr_table1->get_selections( ).

lt_rows = lr_selections->get_selected_rows( ).

returns me nothing.

Suggestions/alternate solutions are appreciated.

Thanks,

Vinodh.

3 REPLIES 3
Read only

steven_dierick
Participant
0 Likes
565

Hi,

I have the same problem.

I have two SALV's in one screen and I want to know in the PAI which lines of both ALV's are selected. But I got nothing.

I then tried the following.

I added a custom function to one of the ALV's. I added an event handler for the event 'on_user_command '. In the event handler I'm able to get the selected rows of the ALV with the button. I can't get the selected rows of the other ALV.

Does anyone know how I can get the selected rows of two ALV's.

Thanks

Steven

Read only

0 Likes
565

Hi,

Check the internal table of ALV output, I think your table table definatly having first column to hold checkbox value.

loop through ALV.

check first field, it it 'X' means record is seleted

endloop.

Regards,

shiak bhasha

Read only

0 Likes
565

Shiak,

We are using the new ALV object model. (class CL_SALV_TABLE)

Steven