on 11-12-2008 1:07 PM
Hello Xperts,
I have a requirement where I need to find the current node element of the recursive node.
I was trying following code for the same
Data:
selected_elem type ref to if_wd_context_element.
selected_elem = WDEVENT->GET_CONTEXT_ELEMENT( NAME = 'CONTEXT_ELEMENT' ).
selected_elem ->get_static_attributes(
IMPORTING
static_attributes = sel_attri ).
But it does not work for me and I always get 1st node value.
Please help me in this issue.
-Ashutosh
I could not understand ur question properly...
If you mean that you want to get the selected row of the node use one of the following...
GET_LEAD_SELECTION Instance Method Returns Element of Lead Selection
GET_LEAD_SELECTION_INDEX Instance Method Returns Index of Lead Seletion
Thanks,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Yes that is right assumption.
I have a tree element where I need to check which child of the tree has been selected.
The code that you have given has been already tried and tested, but it does not work.
Generally while dealing with recursive node, we have a method in WDP java
wdContext.node<NodeName>().node<ChildNode>()...
Do we have similar function available in ABAP as well?
-Ashutosh
Hello Ashutosh,
I am new to the webdynpro. I have the problem with reading the Recursive node value with onlcick. I am using the table tree in my application.
When I am trying to read the value with read method of webdynpro (code generated automatically) I am getting value of parent node only.
Kindly let me know the steps, to read the node value as I click on the table.
I am writing my code in 'onselect' event method of table.
I am making my table tree with following reference .
http://divulgesap.com/blog.php?p=ODQ=
My context node are:
Hello Ashutosh,
How did you resolve the problem. I am really stuck with this point . I need to read the node value of recursive node. but I am always getting parent node value.
How you did to the looping at node. Please let me know its urgent for today.
Waiting for your reply
My context node is:
Thanks.....
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Ashutsoh ,
If you are using the the recursive tree node then you can add the import parameter
context_element . This will help .
Regards
Vivek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
In the event 'onACTION' of the node,create an import parameter 'context_element' type ref to if_wd_context_element and access this variable inside the event handler method
Hope this helps U
Regards
Tamil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello ,
Do you have checkbox as a table column ? Are you adding the paramter in the event handler of checkbox . then its wrong . You have to add the parameter to load children.
Regards
Vivek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Vivek,
Thanks again for the reply,
I am not using any checkbox in my table.
I just have a tree column which is mapped with the recursive node.
I added the PATH parameter to onLoadChildren event of the tree column. It had no impact.
Infact when I set the debugger inside this event, it doesn't even gets called.
-Ashutosh
Hello ,
If you implementing a simple tree ( not table tree ) and you want the selected element for
OnLoadChildren event .
Then create an importing parameter CONTEXT_ELEMENT of type IF_WD_CONTEXT_ELEMENT
in the event handler of onLoadChildren .
Webdynpro framework automatically filled up the context element with the current node in the tree .
I tried it , It really worked for me .
If you have a table tree then you need to create an importing parameter PATH of type String in tha event handler .
Webdynpro frame automatically fills the PATH .
the use can use the following method to get the element from the PATH .
wd_context->path_get_element( path ).
I tried it , It also worked for me .
Regards
Vivek
PS : please provide the points if answer is helpful .
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
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.