cancel
Showing results for 
Search instead for 
Did you mean: 

Create dynamic table in dynamic tabstrip

rodrigo_paisante3
Active Contributor
0 Kudos

Hi all,

I creating dynamic tabstrip tabs and I need to create table in each new tabstrip tab. User will need to input data in undetermined number of tables.

I am creating a test program to see if it is possible to do,  but each table created is being added to the layout also being presented 2x, causing slowness

I tried using the method of eliminating child but dump occurs.
I tried using the method cl_wd_table=>new_table, class loads the columns, but are not shown in the table.

Thanks in advance.

Best regards.

I using wddomodifyview  method.

DATA: o_tab      TYPE REF TO cl_wd_tabstrip,
        o_obj      TYPE REF TO cl_wd_tab,
        o_text      TYPE REF TO cl_wd_caption,
        o_table    TYPE REF TO cl_wd_table,
        o_node      TYPE REF TO if_wd_context_node,
        o_container TYPE REF TO cl_wd_uielement_container.

  DATA: v_texto  TYPE char20,
        v_string TYPE string.

  CHECK NOT first_time IS INITIAL.

  DO 5 TIMES.

    WRITE sy-index TO v_texto.
    CONDENSE v_texto.
    CONCATENATE 'NOVO' v_texto INTO v_string.
    o_tab ?= view->get_element( id = 'TABSTRIP' ).
    o_obj = cl_wd_tab=>new_tab( ).
    o_text = cl_wd_caption=>new_caption( text = v_string ).
    o_obj->set_header( the_header = o_text ).
    o_node = wd_context->get_child_node( 'SFLIGHT' ).
    o_container ?= view->get_root_element( ).
    o_table = cl_wd_dynamic_tool=>create_table_from_node( ui_parent = o_container
                                                          table_id = v_string
                                                          node = o_node ).

    o_obj->register_to_view( i_view = view ).
    o_obj->set_content( the_content = o_table ).
    o_tab->add_tab( the_tab = o_obj ).
 
  ENDDO.

Accepted Solutions (1)

Accepted Solutions (1)

rodrigo_paisante3
Active Contributor
0 Kudos

Solved.

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/000334e2-f34d-2c10-dd8c-94194607e...

This link above suggests "Note: In each tab only one element can be created. The UI Element ‘transparent container’ can be used to have multiple elements in a single tab."

I just create dynamic transparent container to each dynamic tab and use the container as ui_parent parameter in cl_wd_dynamic_tool=>create_table_from_node.

thanks.

Answers (0)