Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Creating and accessing a node under the node (Context)

Hi all,

I need your help on designing context nodes.

What I need is




             -----childattribute (String)

Iam unable to figure out how to fill values and access the child nodes (child 1 and child 2).

Any code snippets would be helpfull.

I tried retrieving the child1 using get_child_node of nodeA reference but it is not working when nodeA is 0..n (It works when nodeA is 1..1).

Thanks and regards

M Karthiheyan

Former Member
Former Member replied

Hi all,

Thanks for your answers ..

I have solved the problem.

Initially the entire node was empty.

So to bind values to subnode I need reference of the element referring to the current instance.

When I bind a structure to the parent node , it returns me the reference as element for that instance with which I can get the child nodes and bind table values .

Code Snippet

          le_parent = ln_parent->bind_structure( new_item = ls_parent     set_initial_elements = abap_false ).

          ln_child= le_parent->get_child_node( 'child' ).

        ln_child->bind_structure( new_item = ls_child
                                             set_initial_elements = abap_false ).

Thanks and regards,

Karthiheyan M

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question