on 06-04-2007 11:57 AM
hi all..
i have a standard table in my view..
I want to select multiple rows from it...
and also need to know which rows have been selected...
any idea...
jagruti..
Hi Jagruthi,
You can get all selected rows of the node using the method get_selected_elements of IF_WD_CONTEXT_NODE interface.
CALL METHOD mo_wd_context->get_selected_elements
EXPORTING
INCLUDING_LEAD_SELECTION = abap_true
RECEIVING
set = lt_elements.
Here mo_wd_context is the reference to context node that you are using for the table.
Thanks,
Prashanth
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi Jagruti,
Go to the table properties and give SelectionMode = Multiple . This will allow you to select multiple rows.The select rows will be availble in the WDEVENT or lead selection
Thanks
Anzy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jagruti:
There is a explanation in the WIKI:
https://wiki.sdn.sap.com/wiki/display/WDABAP/Context#Context-1.110
->How do I get all selected elements of a context node?
Cheers,
Sascha
Message was edited by:
Sascha Dingeldey
Hi Jagruti,
As prashanth said above you can get all selected rows of the node using the method get_selected_elements of IF_WD_CONTEXT_NODE interface.
CALL METHOD mo_wd_context->get_selected_elements
EXPORTING
INCLUDING_LEAD_SELECTION = abap_true
RECEIVING
set = lt_elements.
next loop through the above internal table and read the attributes of each element using the method get_static_attributes( ) of the interfrace if_wd_context_element.
Regards,
Shweta
hi sascha..
hey it has this code..
data:
lr_context_node type ref to if_wd_context_node,
lr_context_element type ref to if_wd_context_element.
data:
lt_selected_elements type wdr_context_element_set.
data:
ls_some_structure type some_structure.
lr_context_node = wd_context->get_child_node( name = 'NAME' ).
lt_selected_elements = lr_context_node->get_selected_elements( ).
loop at lt_selected_elements into lr_context_element.
lr_context_element->get_static_attributes(
static_attributes = ls_some_structure
).
so wht shud b ls_sone structure...
an internal table na.....
jagruti..
Hi Jagruti.
some_structure is the structure of your context node. if you have for example a
context node of structure kna1 this should be used here.
If you did not assigned a structure to the node just use
TYPE if_v_viewname=>element_contextnodename to get the structure of the node.
Cheers,
Sascha
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.