on 09-10-2008 10:18 AM
Can I assign Text Symbols in assistance class directly into UI element properties? I read something about assistance class and only find a way to get the value of text symbol by coding, such as 'my_text = WD_ASSIST->IF_WD_COMPONENT_ASSISTANCE~GET_TEXT( KEY = '001' '. How can i assign the text symbol value to the property of UI element directly in view editor?
Hi,
Define a context attribute TYPE string.Suppose name of the attribute is TEXT.
bind that attribute to the Text property of the UI element.
if text element is already there
Data:str type string.
CALL METHOD wd_assist->if_wd_component_assistance~get_text
EXPORTING
key = '001' ''provide Key of the text element
RECEIVING
text = str.
now read the attribute...
DATA lo_el_context TYPE REF TO if_wd_context_element.
DATA ls_context TYPE wd_this->element_context.
DATA lv_text LIKE ls_context-text.
get element via lead selection
lo_el_context = wd_context->get_element( ).
set single attribute
lo_el_context->set_attribute(
EXPORTING
name = `TEXT`
value = str ).
It's done.
Thanks,
Subhasis.
Edited by: subhasis on Sep 10, 2008 11:52 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I don't think you can directly assign the ui element property with a class text element.
You can use OTR texts using $OTR:Aliasname as property value
OR
http://help.sap.com/saphelp_nw70/helpdata/EN/43/787a85600d6fc9e10000000a1553f6/content.htm
Abhi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
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.