Hi Ajinkya,
To get the element of subnode, you should know the element index of parent node and use the method PATH_GET_NODE of interface IF_WD_CONTEXT_NODE.
Please refer below links:
Reference Path to Deeper Context Nodes - Web Dynpro for ABAP - SAP Library
Other way, get child node
data lo_parent_node type ref to if_wd_context_node.
data lo_child_node type ref to if_wd_context_node.
data lo_element type ref to if_wd_context_element.
lo_parent_node = wd_context->get_child_node( name = 'MY_PARENT_NODE' ).
" get the index of node which you are willing
lo_element = lo_parent_node->get_element( 2 ). " sub node of second line
lo_child_node = lo_element->get_child_node( name = 'MY_CHILD_NODE' ).
LO_CHILD_NODE->INVALIDATE( ).
Also, you can use supply function to set the value/initialize subnode based on parent node's element .
Please refer the below link
Supply function with singleton concept | Team ABAP
Hope this helps you.
Regards,
Rama







