on 01-28-2011 3:09 AM
Hi All,
I have a requirement wherein I want to change the standard text of mainly LABEL UI in travel and expenses ABAP webdynpro components. As per my knowledge we canu2019t change UI text directly by changing it in layout in enhancement. We have to do it via wdmodify view method and post and pre exits methods.
Can you please help me with the steps that I have to follow and code?
Regards,
Madhvika
1. Create and enhacement.
2. in the preexit method of wddomodify.
write the code to dynamically modify the label'text property as shown below.
data lr_lbl type ref to cl_wd_label.
lr_lbl ?= view->get_element( 'LABEL1' ). "label1 is the ID of the label UI element
LR_LBL->SET_TEXT( 'New Text' ).
3. save it and activate.
done.
thanks
sarbjeet
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Do you really want to use coding in an Enhancement to just change labels? Why not use component configuration or administrative personalization? This is generally easier to maintain since it is done at runtime in the browser and doesn't involve any ABAP coding.
http://help.sap.com/saphelp_nw70ehp1/helpdata/en/47/b170d256293c5ce10000000a421937/frameset.htm
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi madhvika,
in pre exit of wdmodify use this code
button TYPE REF TO cl_wd_button.
button ?= view->get_element( 'button' ).
button->set_text('message you want').
regards,
sahai.s
Edited by: sahai.s on Jan 28, 2011 8:25 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ,
Please go through this document.
[Doc|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/700317da-bd79-2c10-368e-8f18bf5d8b81?quicklink=index&overridelayout=true]
Create a Pre Exit method for WDDOMODIFY method of the view , and in that method code somthing like this.
lo_button TYPE REF TO cl_wd_button.
lo_button ?= view->get_element( 'ID of button' ).
lo_button->set_text('New Text').
Thanks,
Aditya.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
25 | |
12 | |
9 | |
6 | |
6 | |
5 | |
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.