on 04-11-2008 10:23 PM
Hi All
I am doing some customization in the ESS T&E WDA applications. One of my requirement is to change the already existing label properties and I am trying to do it as enhancement in the post-exit method of wddomodifyview( ).
Here is the Code I use
DATA ui_element TYPE REF TO if_wd_view_element.
DATA lable TYPE STRING.
ui_element = view->get_element( id = 'LOCATION_LABEL' ).
till here it works fine. After this I face the problem.
ui_element->get_<prop>( ). -
> using get_text( ) gives error.
From the forum and examples I could only see that I can use the method "get_<prop>( )" and "set_<prop>( )". If I try to use get_text( ) I get an error. It would be great if any of you would let me know the properties I can access instead of <prop>.
Thanks,
Venkat
Edited by: Venkat on Apr 11, 2008 11:23 PM
Edited by: Venkat on Apr 11, 2008 11:24 PM
Hi,
DATA: ro_label type ref to cl_wd_label,
lv_text type string.
ro_label = cl_wd_label=>new_label( id = lv_label_id ).
if lv_text is not initial.
ro_label->set_text( lv_text ).
ENDIF.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Alex/Sridevi
Thank you guys for your response. Actually the label I am trying to change is in the SAP provided WDA program for ESS T&E as enhancement. The labels in this particular views are retrieved from the "Short Description" of the components (LOCATION - for instance) of the defined structure by some program. Using the above code set_text ( ) sets the "vl_text" value which does not used at all. This is the reason the label is not getting changed. If you guys could give me some suggestions that would be great.
Thanks, Raj
Any suggestion folks?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
I used the following code now, though it gets the text, but using the set_text( 'test') does not do any thing.
DATA label TYPE REF TO cl_wd_label.
label ?= view->get_element( 'LOCATION_LABEL' ).
label_text = label->get_text( ). -
> it gets the text "Location" successfully
label->set_text( 'test' ). -
> but this seems not working
The program gets executed successfully, but the text does not gets changed.
Am I missing something?
Thanks, Venkat
User | Count |
---|---|
87 | |
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.