on 11-10-2011 10:41 AM
Hi Experts,
I have a standard webdynpro screen which has a Tabstrip having different tabs. For one of the tabs in the Tab Strip I want to change the Tab text on certain condition during runtime.
When I check the Tab property, the propery Caption is holding the Text for the Tab. Is it possible to change the text during runtime?
I would need to create and assign an OTR text to make enable the text in other login, so I is it possible to create another caption and bind it during runtime? or anyother option?
Is it possible to change the text during runtime?
> I would need to create and assign an OTR text to make enable the text in other login, so I is it possible to create another caption and bind it during runtime? or anyother option?
As the text property of the caption of the Tab is bindable, Yes you can bind it at runtime. As you mentioed it is standard component, you need to use enhancment concepts to do this.
you can create OTR and then use below code,
data: lw_alias TYPE sotr_alias,
lw_otr TYPE string.
data: l_otr type ref to cl_sotr.
IF NOT l_otr IS BOUND.
CREATE OBJECT l_otr.
ENDIF.
lw_alias = 'Z_OTR_TAB_TEXT'.
* Get OTR text
CALL METHOD l_otr->get_text_by_alias
EXPORTING
i_alias = lw_alias
IMPORTING
e_text = lw_otr.
* set single attribute
lo_el_tab_text->set_attribute(
EXPORTING
name = `TAB_TEXT` "TAB_TEXT is attribute having type string
value = lw_otr. ).
Thanks,
Chandra
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I mentioned that you have Tabstrip UI element which consists of different Tabs. Inside this Tab UI element, the Tab description is displayed by Caption UI element. I am saying to create an attribute of type String and then bind it to the Text property of Caption UI element.
Now as it is standard WD component, you need to use concepts of enhancing WD component. refer http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/700317da-bd79-2c10-368e-8f18bf5d8... and http://help.sap.com/saphelp_nw04s/helpdata/en/3a/f6ba42a950da11e10000000a155106/frameset.htm
Thanks,
Chandra
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.