on 06-22-2010 8:24 AM
Hello all,
As part of POC, I have created a table and have to push some dummy(hard-coded) data into the table. I have the reference to context node. But, there are methods to bind element/elements/structure to the node and not to add element to node.
Now, i tried to populate the element and add it to internal tab and bind it to context node. It creates an entry in table but the data is not displayed.
The code is given below:
method WDDOINIT .
DATA lo_nd_zviposhead TYPE REF TO if_wd_context_node.
DATA lo_el_zviposhead TYPE REF TO if_wd_context_element.
DATA ls_zviposhead TYPE wd_this->element_zviposhead.
TYPES: BEGIN OF ty_itab,
node_elements TYPE REF TO if_wd_context_element,
END OF ty_itab.
DATA: element_itab TYPE table of ty_itab,
wa_element type ty_itab.
navigate from <CONTEXT> to <ZVIPOSHEAD> via lead selection
lo_nd_zviposhead = wd_context->get_child_node( name = wd_this->wdctx_zviposhead ).
@TODO handle not set lead selection
lo_el_zviposhead = lo_nd_zviposhead->create_element( ).
***lo_el_zviposhead->set_attribute( name = 'FIELD1' value = '0.601.010.005').
***lo_el_zviposhead->set_attribute( name = 'FIELD2' value = 'Ordered').
***lo_el_zviposhead->set_attribute( name = 'FIELD3' value = '4').
***lo_el_zviposhead->set_attribute( name = 'FIELD4' value = '14').
***lo_el_zviposhead->set_attribute( name = 'FIELD5' value = '0').
wa_element-node_elements = lo_el_zviposhead.
append wa_element to element_itab.
<< the above code is repeated to add 3 more sets of data >>
It was answered in similar thread in the same forum.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It was answered in similar thread in the same forum.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please be aware this is a duplicate thread - please ref to thread
Sharath, could you please close this thread/mark it as answered so that others don't accidentally try to reply!
Thanks,
Chris
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.