cancel
Showing results for 
Search instead for 
Did you mean: 

Why this simple dynamic UI not workuFF1F

Former Member
0 Kudos

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.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

thanks sara. program solved.

Former Member
0 Kudos

Did not get the question...

Former Member
0 Kudos

The question is, The code doesn't work and the dynpro will dump.

I don't know if there is any issues I overlook, since it's a simple code to dynamic create a tab in a existing tabstrip.

If I add a tab without set its content, the dynpro will not dump.

...

saravanan_narayanan
Active Contributor
0 Kudos

Layout is not set for the group. Create a new layout either Flow/Matrix and set the layout to the group.

BR, Regards,

Saravanan