Skip to Content
0
Former Member
Jun 30, 2011 at 06:18 AM

Why this simple dynamic UI not workuFF1F

13 Views

method WDDOMODIFYVIEW .
  if first_time is initial.
    return.
  endif.

  data: lo_tabstrip type ref to cl_wd_tabstrip.
  data: lo_tab type ref to cl_wd_tab.
  data: lo_caption type ref to cl_wd_caption.
  data: lo_group type ref to cl_wd_group.
  data: lo_vcui type ref to cl_wd_view_container_uielement.

  lo_tabstrip ?= view->get_element( 'TABSTRIP' ).
  lo_caption = cl_wd_caption=>new_caption( text = 'TAB caption' id = 'C2' ).
  lo_tab = cl_wd_tab=>new_tab( id = 'TAB2' ).
  lo_tab->set_header( lo_caption ).

  lo_group = cl_wd_group=>new_group( id = 'G2' ).
  lo_caption = cl_wd_caption=>new_caption( text = 'Group caption' ).
  lo_group->set_header( lo_caption ).
  lo_tab->set_content( lo_group ).

  lo_tabstrip->add_tab( lo_tab ).
endmethod.

No context.

Layout is only a TABSTRIP whose id is 'TABSTRIP'.

This dynpro will dump with the error some ui element is initial.