on 04-16-2008 10:31 AM
hi all,
I have one table uielement ( cc and context has cardinality 0..n) and i wanted to pass only selected (multiple selection) values to CC from view1 . Still i am using the below code in v2 to get all the binded values...
data elem_node_sflight TYPE REF TO if_wd_context_element.
data node_node_sflight TYPE REF TO if_wd_context_node.
data stru_node_sflight TYPE IF_V_DETAILS=>Elements_node_flight_passed.
node_node_sflight->GET_STATIC_ATTRIBUTES_TABLE(
importing
TABLE = stru_node_sflight ).
here i am getting all the values from view1 (ie table)..
but i need only user selected values ....
how can i do this ????
Regards
Jose
Hi,
if you have a node named authorizations then the following code can be used.
DATA: lo_nd_authorizations TYPE REF TO if_wd_context_node,
lt_elements TYPE wdr_context_element_set,
ls_authorizations TYPE wd_this->element_authorizations,
lt_authorizations TYPE TABLE OF wd_this->element_authorizations.
lo_elements TYPE REF TO if_wd_context_element.
lo_nd_authorizations = WD_CONTEXT->get_child_node( name = wd_this->wdctx_authorizations ).
CHECK NOT lo_nd_authorizations IS INITIAL.
lt_elements = lo_nd_authorizations->get_selected_elements( ).
CHECK NOT lt_elements[] IS INITIAL.
**********************************************************************************
*... If some rows are selecetd for deletion get their static attributes....
**********************************************************************************
LOOP AT lt_elements INTO lo_elements.
*get the contents of selected rows
lo_elements->get_static_attributes(
IMPORTING
static_attributes = ls_authorizations ).
APPEND ls_authorizations to lt_authorizations.
ENDLOOP.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Joes,
Use GET_SELECTED_ELEMENTS to get the selected elements. It returns a table with the selected elements.
DATA : lt_selected_elements type WDR_CONTEXT_ELEMENT_SET,
ls_selected_elements type IF_WD_CONTEXT_ELEMENT.
Loop at lt_selected_elements into ls_selected_elements.
ls_selected_elements->GET_STATIC_ATTRIBUTES( ls_table ).
append ls_table into lt_table.
clear ls_table.
endloop.
Now your lt_table holds selected elements in a table.
Regards,
Sravan Varagani
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi jijo....
you can use the get_selected_elements method in interface if_wd_context_node for this pupose.
---regards,
alex b justin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI Jose,
You can use the method get_selected_elements' of Interface if_wd_context_node.
Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.