on 12-03-2010 9:38 AM
Dear Experts,
I have WD ALV table with grouped and therefore sorted layout. I know that sorted ALV beahve differently.
The problem is that if the values in cell is updated (setting attribute of selected element of context node bound to the ALV table), then the whole table is redrawn and selection disappears. It does not happen when layout of ALV is not sorted/grouped.
I need somehow to select the ALV line again. Method MOV_To of IF_WD_CONTEXT_NODE for some reason is not working in sorted ALV (it selects element on node but not in ALV table). And in ALV Interface controller I also could not find anything usefull.
Thanks.
Best regards,
Dmitry.
Hi, I solved keeping the row selection by adding an extra column just to hold information that such row is understood as selected.
I have written a blog post (including source code) because I've faced similar problem: ABAP - ALV Context menu + keep row selection after a filter is applied
So if you find it useful, please feel free to re-use it
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Are you not able to select any row in ALV after sorting
Regards,
Lekha.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear Lekha,
sorry - I was not clear. I can select manually, but I wanted selection to stay, or select again programmatically.
Otherwise user do not see which line was selected. The problem is that if values in the ALV are updated (by updating context node) then ALV table is refreshed (resorted again) and selection is lost. I would like to select it again programmatically because I know which line was selected.
Regards,
Hi,
In the View where you ALV is placed, go to methods tab and try to implement the ON_STD_FUNCTION_AFTER and ON_STD_FUNCTION_BEFORE.
Please check wether these are getting triggered before and after sort.
If yes, then get the lead selection index/lead selection element in the BEFORE event and try to set it to the node in the AFTER event.
If the above ones are not triggering try to check for other ALV event handlers that gets triggered to solve your issue.
Regards,
Lekha.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.