cancel
Showing results for 
Search instead for 
Did you mean: 

how to add components dynamically to tab using tabstrip

Former Member
0 Kudos

Hi,

I have to submit this task to my senior as tommorow. Its urgent.Is anybody help for this scenerio, how to add components dynamically to tab using tabstrip and in tabstrip, tabs have to be dynamic ( its depend on client requirement).

Thanx in Advance,

Accepted Solutions (1)

Accepted Solutions (1)

former_member196517
Contributor
0 Kudos

Hi pawan,

here it is..

DATA: wd_tabstrip TYPE REF TO cl_wd_tabstrip.

DATA: wd_tab TYPE REF TO cl_wd_tab.

DATA: wd_caption TYPE REF TO cl_wd_caption.

DATA: wd_vc TYPE REF TO cl_wd_view_container_uielement.

  • get reference to tabstrip

wd_tabstrip ?= i_view->get_element( 'TAB_STRIP' ).

      • make new caption for tab

CALL METHOD cl_wd_caption=>new_caption

EXPORTING

id = 'CAPTION_3'

text = 'ABCD'

RECEIVING

control = wd_caption.

wd_tab = cl_wd_tab=>new_tab( id = 'TAB_3' ) .

        • add this caption to tab

wd_tab->set_header( wd_caption ).

      • add tab to tabstrip

CALL METHOD wd_tabstrip->add_tab( wd_tab )

Reward if useful..

Regards

Anuj

former_member196517
Contributor
0 Kudos

no need to mention that it has to be done in WDOMODIFYVIEW...

Former Member
0 Kudos

hi anju,

thanks for reply, if i want to add more than one tab how to do(depending on client requirements) and how to add the components dynamically into the tab. plz i reply me soon. its very urgent.

thanks in advance.

former_member196517
Contributor
0 Kudos

hey i already told you there rite.. ?

u just make tab and caption add caption to tab and then add this tab to tabstrip...

i wrote code for u.. now if you want to add more than one than just change the name there of tab TAB_3 ( of course u have to create more local variables)

No if you have tab you can add elements to it thru

wd_tab->set_content( )

Regards

Anuj Goyal

Former Member
0 Kudos

Hi Anju,

If i want add components into the tab instead of elements. What i have to do?

Advance Thanx.

Answers (0)