Skip to Content

Access a child node data

Hi experts,

Now to get data from Node 3.

    ------Node 1 (Cardinality [0...N])

              ------Node 2 (Cardinality [1...1])

                            ------Node 3 (Cardinality [0...N])

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Apr 26, 2016 at 07:29 AM

    Hi Vimal,

    Try this:

    * Data declaration

      DATA lo_nd_node1 TYPE REF TO if_wd_context_node.

      DATA lo_nd_node2 TYPE REF TO if_wd_context_node.

      DATA lo_nd_node3 TYPE REF TO if_wd_context_node.


    * Declare internal table of type Node3

      DATA lt_node3_table TYPE wd_this->Elements_node3name.


    * Navigate from CONTEXT to child node NODE1

      lo_nd_node1 = wd_context->get_child_node( name = wd_this->wdctx_node1name ).


    * Navigate from NODE1 to child node NODE2

      lo_nd_node2 = lo_nd_node1->get_child_node( name = wd_this->wdctx_node2name ).


    * Navigate from NODE2 to child node NODE3

      lo_nd_node3 = lo_nd_node2->get_child_node( name = wd_this->wdctx_node3name ).


    * Get contents of NODE3 into internal table

      lo_nd_node3->get_stattic_attributes_table( IMPORTING Table = lt_node3_table ).


    Regards,

    Felipe

    Add comment
    10|10000 characters needed characters exceeded