on 09-27-2012 7:39 PM
Hi All,
In my ALV, everytime an ALV event occurs, the table is refreshed and the lead selection clears out.
Now i am abe to get the index of the row for which want the lead selection but it doesnt get set.
Any help how i can set the lead selection to a perticular row in the ALV?
Thanks,
Pris.
Hi Pris,
This is a known limitation of ALV in WDA. There's an explanation for the behavior in the ALV documentation-- see the section at the bottom labelled, Important Exception: Sorting.
You mention that you are able to get the index of the row you want to use as lead selection. You should be able to use that index to set your local DATA node's lead selection with method set_lead_selection_index.
Cheers,
Amy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
For this you can explicitly call that lead selection event and set the index for the table .
**********************************************************************
* Trigger lead seletion
**********************************************************************
DATA: lr_param TYPE REF TO cl_salv_wd_table_lead_select,
lr_event TYPE REF TO cl_wd_custom_event.
CREATE OBJECT lr_event
EXPORTING
name = 'ON_LEAD_SELECT'.
CREATE OBJECT lr_param.
lr_param->set_index( 1 ).
wd_this->alv_on_lead_select(
r_param = lr_param
wdevent = lr_event ).
In the method alv_on_lead_select you can set the index to the binded table.
IF r_param->index <> 0 AND wd_this->dyn_node_items IS BOUND
AND wd_this->dyn_node_items->get_element_count( ) >= r_param->index.
wd_this->dyn_node_items->set_lead_selection_index( r_param->index ).
Endif.
Regards,
Lavanya.
Hi Amy,
It still didnt work. When i try to set the lead selection index for ALV, i can see that the existing selection becomes unselected but doesnt show the new row as selected.
I dont get any dump or errors also. I may have to look if there is a sap note for this. We are on Ehp5 , netweaver 702.
Thanks,
Pris.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.