Hello Experts,
I have created an ALV in webdynpro application. This ALV contains the list of projects. User can select any project --> Navigate to Edit View for particular project. When user comes back.... that project should be selected as left before.
This functionality is working fine, when user works with standard view(ALV) without any modification on GUI level like sorting in ALV settings.
But when user makes any modification on GUI level basically sorting with any column, selection of last changed row (projectid) do not works.
What I have done:
when user comes back to the ALV screen, I make a loop on ITAB which fills the data to the Node of ALV. Get the index value for the last selected project and write the code below:
LOOP AT lt_prolist INTO ls_prolist. "contains list of projects to display
IF ls_prolist-projectid = projectid. "last selected project for edit
CALL METHOD lo_nd_prolist->clear_selection. "clears the selection
lo_nd_prolist->set_lead_selection_index( sy-tabix ). "select the row with index
ENDIF.
ENDLOOP.
Does any one knows that why I am getting this issue? User can have any no of view created for them. My requirement is just that, what ever the configuration done on GUI level by the user in the ALV settings, the Last project should be selected..
Please let me know what should I do...
Thanks
Chandan