on 08-18-2013 7:20 PM
Hi
In my context i have Node called PARENT_NODE which contains a sub node called CHILD_NODE.
Is there a way to bind a table to the CHILD_NODE ? the sub node is in cardinality 0...n
i wrote:
data: context_node type ref to if_wd_context_node.
data: lt_table type table of childe_node.
context_node = wd_context-> get_child_node( name = 'PARENT_NODE.CHILDE_NODE').
context_node->bind_table( lt_table ).
when i test my webdynpro i get the error
"SUBNODE.PARENT.CHILD_NODE DOES NOT EXIST".
Is there a way to correct that ???
Thanks Ami
Hi AMI
In order to fill the data into sub-node (CHILD_NODE) you have to use the concept of SUPPLY FUNCTION.
DATA ls_parent_attributes TYPE wd_this->element_ekko.
parent_element->get_static_attributes(
IMPORTING
static_attributes = ls_parent_attributes ).
* data declaration
DATA lt_ekpo TYPE wd_this->Elements_ekpo.
DATA ls_ekpo LIKE LINE OF lt_ekpo.
* @TODO compute values
* e.g. call a data providing FuBa
* Manual coding
SELECT * FROM EKPO
INTO CORRESPONDING FIELDS OF TABLE lt_ekpo
WHERE ebeln = ls_parent_attributes-ebeln.
* Manual coding
* bind all the elements
node->bind_table(
new_items = lt_ekpo
set_initial_elements = abap_true ).
Points Please if helpful
Regards
Subhash
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ami,
You should get the path of parent node, then you can bind anything to your child node.
lo_nd_<child_node> = wd_context->path_get_node( path = `<parent node name >.<child node name>` ).
Try this you will able to execute.
Regards
Ravindranath Reddy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.