cancel
Showing results for 
Search instead for 
Did you mean: 

tabstrip with 5 tabs, in every tab the same view should be displayed

Former Member
0 Kudos

Hello together,

i have the requirement to display different tables in one tabstrip.

So, the tabstrip should have e.g. 5 tabs, in every tab a table should be displayed. Now i want to do the table display dynamically, so i need one view for all tabs. This view (with a dynamic table) will be changed when changing the tab.

How to do that? I wanted to create a new view V_TABLE and assign this view to every tab, but this is not possible.

Thanks and Regards

Christopher

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Are all the tables share same structure...but the content is differing...OR

all the tables have different sturctures....

Are you mapping the same node to the TABLE UI element..

If you can provide these details...then I can share some inputs..

Former Member
0 Kudos

Do you really need to include a view in every tab? If its just a table in every tab, then you might just go ahead and add a table and update it at the change of tab.

For example :-

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

Hope this helps.

Former Member
0 Kudos

Hello,

the structure of tables is different, the creation of corresponding Context will be dynamic.

I don't need a view in every tab, but i would like to have this more dynamic. If tomorrow a new table should be inserted, i just want to add this table in a customizing table.

Maybe i think to complicated, it should work like this:

- Create a TABSTRIP in Layout

- When opening the View, the customizing is read. For each db table, a TAB will be created with corresponding table

I think this is done in Component "WDR_TEST_DYNAMIC", but i don't have access to it..

Former Member
0 Kudos

Hi Chris,

I understand that you are looking embedd the tables in the tabs dynamically and also create the contexts dynamically. I suggest you look into this.

http://help.sap.com/saphelp_nw04s/helpdata/en/4c/60154219fce12ce10000000a1550b0/frameset.htm

Former Member
0 Kudos

I think i found the solution.

I have created a two transparent container in this view:

TC_1 --> invisible

TC_2 --> visible

TABLE / ALV

In TC_2 i will place my table. Now, in TAB, i assign TC_2 as TAB Content. So, this table is then shown in TAB.

Former Member
0 Kudos

hi,

I have tried to look into WDR_TEST_DYNAMIC.

check this code:

loop at wd_comp_controller->component_usages assigning <f> where embedding_position is not initial.
      split <f>-embedding_position at '.' into table l_embedding_tab.
      describe table l_embedding_tab lines l_lines.
      read table l_embedding_tab index l_lines into l_embedding_pos.
      if sy-subrc = 0.
        split l_embedding_pos at '/' into l_view_name l_container_name.
        if view->name = l_view_name.
* create tab
          concatenate 'TAB_' l_container_name into l_id.
          l_tab = cl_wd_tab=>new_tab(
                   id = l_id
                   view = view ).
          concatenate 'CAP_' l_container_name into l_id.
          l_caption = cl_wd_caption=>new_caption(
                    id = l_id
                    view = view
                    text = <f>-component_usage_name ).
          l_tab->set_header( l_caption ).
          l_content = cl_wd_view_container_uielement=>new_view_container_uielement(
                         id = l_container_name
                         view = view ).
          l_tab->set_content( l_content ).
          l_tabstrip->add_tab( l_tab ).
        endif.
      endif.
    endloop.

wd_comp_controller->component_usages is of type WDAPI_COMPONENT_USAGES and is filled using the following code:

wa_cmp_usage-component_usage_name = 'USAGE1'.
  wa_cmp_usage-used_component       = 'WDR_TEST_DYNAMIC_1'.
  wa_cmp_usage-embedding_position   = 'MAIN/CONTAINER2.V1/VC1'.
  wa_cmp_usage-component_usage      = wd_this->usage1 = wd_this->wd_cpuse_usage1( ).
  insert wa_cmp_usage into table wd_this->component_usages.

Regards,

Dolly

Answers (0)