on 08-01-2011 6:58 AM
Hi Experts,
I have a table editor with 3 columns.
Column 1. DD By Index - Subjects
Column2: marks ( input field )
column3: Result ( text view)
On an action of button on top of the view, i am getting the data for column2 and 3 and populating the node but i am unable to populate the column 1 Dropdown by Index.
My Node looks like this:
Node_Parent
Node_DD
Subject_Text
Marks
Result
When i get the internal table for Node_parent i am not getting Node_dd in that, so i am populating Marks and Result. binding it.
again looping on lt_parent and binding the node_dd.
it works fine when there is one row in lt_parent, its going for dump when its more than 2 records.
What am i missing while binding the subnode Node_DD while looping?
Any clue is highly appreciated.
Note: I am not using Supply Function to populate the subnode.
Ajay
Edited by: ajay matam on Aug 1, 2011 12:40 PM
Get all element of the parent node ( you have a method to get all the elements)
loop at all_elements.
get child node's element here....
using element u can bind or read the records.
endloop.
I assume you are looping at the values but not at the elements.
Edited by: ssm on Aug 1, 2011 1:43 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ,
Thanks for your help.
I was not pointing to the Parents node and element instance while looping.
i changed it as below and its working fine.
Loop
l_element = lo_parent_node->get_element ( sy-tabix )
lo_child_node = l_element->get_child_node ( 'Node_DD' ).
lo_child_node->bind_table ( new_items = lt_data ).
Endloop
node_parent should be 0 to N cardinality.
Node_Dd should be 0 to N cardinality.
if you want to set or read the values.
get the context_element of the node_parent.
get the child node...and then get the values of the child node
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Parent Node and Child node has cardinality 0 to N only.
I am getting the child node of the parent.
Lo_node_parent->get_child_node ( name = 'Node_dd' )
i am trying to bind an internal table to Lo_node_parent but i am getting a dump with error
"COMPONENTCONTRLLER.1.PARENT.2.NODE_DD.NODE_DD" does not exist.
Binding works when there is one record in Parent node
loop at lt_parent into ls_parent.
binding the child node
endloop.
above thing works fine when there is one record, but when there are more than 1 record i am getting the above error.
Ajay
Edited by: ajay matam on Aug 1, 2011 1:40 PM
Hi ajay,
What is the cardinality you are using for Node_DD, it should be 0-n,0-1 for both parent node also.
Check this once.. goto st22 and and find what error you are getting?
Cheers,
Kris.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
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.