on 04-04-2011 7:31 AM
Hi Experts,
Is it possible that based on customizing table data , the tab position will be controlled in tab strip.
Ex:- If there are 4 tabs (TAB1,TAB2,TAB3,TAB4) in tab strip then depending on the value coming from table , either the position of tab will be like (TAB1,TAB4,TAB3,TAB2) or (TAB2,TAB3,TAB1,TAB4) or....any possible set coming from customizing table.
Please help.
Thanks
Mahesh
solved
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
We have selected tab property for tabstrip, set this property dynamically based on your condition.
You can get the reference in DOMODIFYVIEW method of view containing the tabstrip UI element .
try the following code
data: lo_tabstrip type ref to cl_wd_tabstrip.
lo_tabstrip ?= view->get_element( 'TABSTRIP_ID' ). "replace by tab strip id
now you have the reference and you can call set_selected_Tab method
lo_tabstrip->set_selected_Tab( 'SELECTED_TAB_ID ).
Cheers,
Kris.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
see the class CL_WD_TABSTRIP, i remember seeing that you can add tabs method having index parameter.
You can get the instance of the tabstrip, get the tabs and add them according to your requirement using index.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi Mahesh,
I guess you can not change the positions of the tab once it is defined initially. This is something not allowed at runtime. But what is allowed is to create TabStrip at design time and then Add required Tabs dynamically based on your logic.
You can get the reference of TabStrip like below
lo_tabstrip ?= view->get_element( id = 'TBS_TAB' ).
And then you can create and add Tabs like below
lo_caption = cl_wd_caption=>new_caption( id = 'CAP3' ).
lo_caption->set_text( value = 'Tab3' ).
llo_tab = cl_wd_tab=>new_tab( id = 'TAB3' ).
lo_tab->set_header( the_header = lo_caption ).
lo_tabstrip->add_tab( the_tab = lo_tab ).
This way you can achieve what you want. Hope this helps.
Regards
Abhinav
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.