on 05-05-2011 8:32 AM
HI,
scenario : if the element is selected, I want to pass some of its attributes to the backend.
description : In a Context node, I want to check which elements are selected by the user. For this there is a method in the in if_wd_context_elemenent API in web dynpro ABAP. The method is called is_selected. How to use this method ?
Please give me an example. What does this method return. can I use it in the if condition.
Regards
seventyros
Edited by: seventyros on May 5, 2011 9:32 AM
thanks !
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi tryos,
IS_SELECT method is available at element and node level.
check this...
http://help.sap.com/saphelp_nw04s/helpdata/en/fd/be5b4150b38147e10000000a1550b0/content.htm
Check this is set_selected method, try with is_select also...
if lo_el_it_lips->is_selected ( flag = abap_true ).
endif.
// Node
DO count TIMES.
lo_nd_it_lips1->is_selected( // lo_el_it_lips - element has no index, only flag.
flag = abap_true
index = int ).
ADD 1 TO int.
ENDDO.
Cheers,
Kris.
Edited by: kissnas on May 5, 2011 9:49 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
The forum link you provided does not talk about is_selected. it talks about set_selected. I found that is_selected does not have any parameters. how can we use flag = abap_true in the bracket like IS_SELECTED( flag = abap_true ).
even if I use it as suggested by you, following error comes when compiling
formal parameter ' flag'' is not an importing parameter. It is a returning parameter.
Regards
seventyros
Hi,
if_wd_context_node - contains flag and index as parameters.
if_wd_context_element. - contains flag as parameter check once.
try like this..
data flag type wdy_boolean.
flag = lo_el_it_lips->is_selected( ).
if flag = 'X'. // row is selected else not.
endif.
Cheers,
Kris.
Edited by: kissnas on May 5, 2011 10:26 AM
hi,
OK, I figured it out from some other resource on the internet.
the answer is : To check whether an element is selected in a node of selection 1..n, we need to do following
if elem->is_selected() is not initial.
// do something if node element is selected.
endif.
regards
seventyros
http://learnsaponline.blogspot.com
Edited by: seventyros on May 8, 2011 7:04 AM
User | Count |
---|---|
84 | |
25 | |
12 | |
9 | |
6 | |
6 | |
5 | |
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.