Skip to Content

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

create element

Hi,

Context

+root 1..1

++tab 0..n

+++F1

+++F2

How do i create a internal table of type tab and bind it to the context

Former Member
Former Member replied

Hi,

Since your root is 1..1 , an element is always there. So i guess the following would work.

DATA lo_nd_tab TYPE REF TO if_wd_context_node.
  DATA lt_tab TYPE wd_this->elements_tab.
  DATA ls_tab TYPE wd_this->element_tab.

  lo_nd_tab = wd_context->path_get_node( path = `ROOT.TAB` ).
  
  " fill the lt_tab here.
  
  lo_nd_tab->bind_table( new_items = lt_tab set_initial_elements = abap_true ).

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