on 12-20-2007 2:14 PM
Hi,
in a method, I want to remove all selected elements, including the Lead Selection of my table. My Context specifies that selection is 0..n. The method IF_WD_CONTEXT_NOTE->CLEAR_SELECTION( ) unselect all selected elements, except the lead selection. I would like to do like if user hold Control and press on his lead selection line.
Thanks
Davy
Hi Davy,
On the Button click event write the following code.
This is for Flight Node
data lo_nd_flight type ref to if_wd_context_node.
data lo_el_flight type ref to if_wd_context_element.
data ls_flight type wd_this->element_flight.
navigate from <CONTEXT> to <FLIGHT> via lead selection
lo_nd_flight = wd_context->get_child_node( name = wd_this->wdctx_flight ).
lo_nd_flight->CLEAR_SELECTION( ).
This will reset the lead selection.
lo_nd_flight->SET_LEAD_SELECTION_INDEX( '-1' ).
Reward Point if this answers your question.
With Kind Regards,
Arjun
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Davy,
Try out this code, for me it works fine:
lr_allsu_node = wd_context->get_child_node( name = wd_this->wdctx_all_offerred_su ).
CALL METHOD lr_allsu_node->get_element
" EXPORTING
" index = USE_LEAD_SELECTION
receiving
node_element = lr_allsu_elem
.
CALL METHOD lr_allsu_elem->set_selected
EXPORTING
flag = abap_false.
I hope this solves your problem.
Thanks
Aditya
Edited by: Aditya Kumar on Dec 21, 2007 5:53 AM
Edited by: Aditya Kumar on Dec 21, 2007 6:01 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Do this on your button action
data :
lo_nd_node TYPE REF TO if_wd_context_node,
lo_el_node TYPE REF TO if_wd_context_element,
ls_node TYPE wd_this->element_node.
data:
lo_element TYPE REF TO if_wd_context_element,
lt_elements TYPE wdr_context_element_set.
lo_nd_node = wd_context->get_child_node( name = 'NODE" ).
lo_el_node = lo_nd_node->get_element( ).
This Mehod Will Take all the selected element
CALL METHOD lo_nd_node->get_selected_elements
RECEIVING
set = lt_elements.
Here It will Remove
LOOP AT lt_elements INTO lo_element.
lo_element->remove_element( element = lo_el_node ).
endloop.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
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.