cancel
Showing results for 
Search instead for 
Did you mean: 

Read Complete internal table from Context...

Former Member
0 Kudos

How can I read the complete node with cardinality 1..N into an internal table with same ddic structure as the node ????

when uses the DYNPRO WIZARD, it is saying both types are not compatible...

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

uday_gubbala2
Active Contributor
0 Kudos

Hi Stephan,

You can make use of the GET_STATIC_ATTRIBUTES_TABLE method of IF_WD_CONTEXT_NODE to download the contents of your entire context of cardinality 1..n into an internal table of the same structure. Refer the example coding as shown below.

Regards,

Uday

DATA: node_node_flighttab TYPE REF TO if_wd_context_node,
      lt_sflight TYPE if_resultview=>elements_node_flighttab.


node_node_flighttab = wd_context->get_child_node( name = `NODE_FLIGHTTAB` ).
node_node_flighttab->get_static_attributes_table( IMPORTING table = lt_sflight ).

Now lt_sflight will contain all the data which is bound to the context node NODE_FLIGHTTAB.

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

Lets say your node name is TEST with cardinality 1...n.

declare data in a method where you want to read the context as

DATA lo_nd_TEST TYPE REF TO if_wd_context_node..

DATA:

ls_TEST TYPE wd_this>element_TEST,

it_TEST TYPE wd_this->elements_TEST.

  • navigate from <CONTEXT> to <EMP_POPU_TAB> via lead selection

lo_nd_TEST = wd_context->get_child_node( name = wd_this->wdctx_TEST ).

lo_nd_TEST->get_static_attributes_table( IMPORTING table = it_TEST ).

in the internal table it_TEST you will get the entire context node values.

Regards,

Subhasis

Former Member
0 Kudos

Hi,

Please try to use the GET_NODE_INFO method of the IF_WD_CONTEXT_NODE that returns the IF_WD_CONTEXT_NODE_INFO and based on the ref try to retrieve the child nodes, attrtibutes names etc and populate the internal table using this information.

Regards

Lekha