cancel
Showing results for 
Search instead for 
Did you mean: 

generic type for creating node element table

Former Member
0 Kudos

Assuming there is a view by the name MAIN and its context has a node called TABLE. This node is to be used to fill up the texts for a radiobuttongroup by index element.

We have something like IF_MAIN=>ELEMENT_TABLE available to declare a table to fill up the values.

something like

data : itemlist type table of if_main=>element_table.

But in my case i am creating the context node dynamically. Is there a generic type available using which i can declare my table?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Udaya,

Yes, declare your element itab with type wdr_context_element_set (table of ref to if_wd_context_element).

Here is a code sample:


method your_method.
  data:
    lo_elem type ref to if_wd_context_element,
    lt_elem type wdr_context_element_set,
    node type ref to if_wd_context_node.

* Get the node
node = wd_context->get_child_node( name = 'TABLE' ).

* Get the items
lt_elem = node->get_elements( ).

* Process the elements
loop at lt_elem into lo_elem.

endloop.

endmethod.

Regards... Lucio Menzel

Answers (0)