2011 Nov 21 11:49 AM
Dear Fnds,
My requirement is, Iam displaying output data in ALV. in the output ALV i have 10 rows.
in the 10 rows if i select 5 rows(any rows), Example 3,7,1,2,5, Do we have any function module or class to determine the selected row sequence (which one we have selected as first, second and thrid etc.)
Dear Fnds,
My requirement is, Iam displaying output data in ALV. in the output ALV i have 10 rows.
in the 10 rows if i select 5 rows(any rows), Example 3,7,1,2,5, Do we have any function module or class to determine the selected row sequence (which one we have selected as first, second and thrid etc.)
2011 Nov 21 11:55 AM
If you selecting using the standard alv row(left most box column) selection i dont think so there is any event which triggers when you click it.. Instead you can place a check box in a field and while clicking a row you can trigger an event and maintain the sequence of selected records in the internal table.
Kesav
2011 Nov 21 12:09 PM
Hi,
Hope you are using SET_TABLE_FOR_FIRST_DISPLAY method. If so, pass 'D' to SEL_MODE field of LAYOUT structure and pass LAYOUT structure to above method. Now, use GET_SELECTED_ROWS method in CL_GUI_ALV_GRID class. The table which you import from ET_INDEX_ROWS parameter will be having row numbers that you selected in the output table.
Regards,
Naveen Inuganti
2011 Nov 21 1:04 PM
HI Kesav,
Even if i maintain check box, when multitle check boxs are selected, which event i have to use...?
2011 Nov 21 2:49 PM
You can refer this example . Next time please search yourself for the contents. Almost everything can be solved if we search clearly
2011 Nov 21 12:13 PM
Dear Fnds,
>
> My requirement is, Iam displaying output data in ALV. in the output ALV i have 10 rows.
>
> in the 10 rows if i select 5 rows(any rows), Example 3,7,1,2,5, Do we have any function module or class to determine the selected row sequence (which one we have selected as first, second and thrid etc.)
Hi,
I think you can achieve this thru GET CURSOR statement which will tell you current cursor position. I don`t think you can store it in a internal table to know the sequence.
Try, have a look at this document. http://help.sap.com/saphelp_470/helpdata/en/9f/dbabf135c111d1829f0000e829fbfe/content.htm
Hope, you find this useful.
Reetesh
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |