on 10-17-2014 6:39 AM
Hi
In my web dynpro app, i am trying to set context by using below code
DATA lo_nd_employee TYPE REF TO if_wd_context_node.
DATA lo_el_employee TYPE REF TO if_wd_context_element.
lo_nd_employee = wd_context->get_child_node( name = wd_this->wdctx_employee ).
lo_el_employee = lo_nd_employee->get_element( ).
lo_nd_employee is getting nodes but, lo_el_employee = lo_nd_employee->get_element( ).
Not getting elements, lo_el_employee is still initail .
Hi Nandish,
DATA lo_nd_employee TYPE REF TO if_wd_context_node.
DATA lo_el_employee TYPE REF TO if_wd_context_element.
lo_nd_employee = wd_context->get_child_node( name = wd_this->wdctx_employee ).
lo_el_employee = lo_nd_employee->get_element( ).
Replace above statement with below one:
lo_el_employee = wdevent->get_context_element( 'CONTEXT_ELEMENT' ).
Even if Initialize Lead Selection property of node is not checked, this will return the selected record.
Thanks & Regards,
Sankar Gelivi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
When reading the child node use the path.
lo_nd_employee = wd_context->path_get_node( path = `PARENT_NODE.EMPLOPEE` ). " PARENT_NODE is the node name of parent node and EMPLOYEE here is the node name of CHILD
hope this helps u,
Regards,
Kiran
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi kiran
Can you tell me, how to call a method of specific view from window...
Ex:-
Consider I have one window, in that i have 2 views but i want display any one of view, it will be decided at run time by url ......i also wanted to pass one integer value to view ....
i m checking url in HANDLEDEFAULT method
Hi Nandish,
You may get the node reference but it is always not true that you should get elements from node. Because, node exists without any elements in it.
Make sure that your node has any elements in it.
If you are not able to get, please elaborate your requirement in detail.
Regards,
Rama
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nandish,
I think you need to understand the basics of context node, element and attributes.
Example: Node : Employee
Attributes: PERNR, BEGDA, ENDDA
Now you cannot think that you can get attributes.......
Set the Lead Index Initialization, to get element based on lead index.
At runtime, the context node can have as many as context elements based on cardinality. Until your node has any context element, you cannot get the attributes value at runtime.
First you need to set data to context node EMPLOYEE and then you can read it back
Are you using your node in Table or for input screen ?
if its used in Table, you need to add rows, to make context elements available at runtime.
if its used in input screen, you can get 1 context element available. So you code works.
I suggest you, please go through some basic tutorials to understand the GET/SET concepts of context node / context element.
Regards,
Rama
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.