cancel
Showing results for 
Search instead for 
Did you mean: 

ABAP web dynpro translation of label and caption element without OTR

former_member215756
Discoverer
0 Kudos

Hi,

I'm using 3 labels (Timeframe, From, To) in a WD ABAP view.

Even though I just entered text in property text (no OTR reference), I got a German translation for it.

What else triggers translation besides OTR?

(Background: Is it reliable or shall I use OTR?)

Best Regards,

René

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hallo,

while executing an application following criteria will decide the language used:

- settings in internet explorer

- logon language

- language settings in masterdata of the user

- if used in a portal, the language settings

If you enter the texts litteraly in the properties, it should appear as you typed it.

Possibly you haven't activate the view yet and the system takes the default values via ddic.

grtz,

Koen

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Rajkumar,

I have checked it in SE24, its not reflecting. Did you do something extra, inclusion of some particular package etc?

Regards,

Prosenjit.

yesrajkumar
Active Participant
0 Kudos

Hi,

Please see to that you have the package named PTRM_WEB_UI. It has alll the relevant classes.

Thanks,

Rajkumar.S

Former Member
0 Kudos

Hi Rajkumar,

I tried your code, but the class cl_fitv_wd_util is not recognized.

Can you please elaborate on your example?

Regards,

Prosenjit.

yesrajkumar
Active Participant
0 Kudos

Hi,

The class cl_fitv_wd_util is available in EHP2(Travel management). Could you check in se24 whether the same is available?

Thanks,

S.Rajkumar.

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

I wouldn't recommend using the cl_fitv_wd_util since it is not part of NetWeaver. It is an application specific class for working with Web Dynpro and only available if you have ERP EnhP2. You should stick to the Foundation classes. The person who recommended this solution should be more cautious in the future. You can't assume that everyone is doing Web Dynpro on ERP, much less that they have EnhP2.

This same functionality can easily be acomplish in standard Web Dynpro. First of all it should never be necessarily to set the texts in WDDOMODIFYVIEW as suggested. You should always be able to set the proper texts in the view layout designer. You should override the texts there. Fixing in WDDOMODIFYVIEW really only complicates the structure of the component for future maintenance.

For the sake of completness however, you could acomplish the same thing with dynamic code in WDDOMODIFYVIEW without using the FITV application specific classes. Each UI element has its own Web Dynpro API class. Here is a small example, although I don't recomend this to solve your problem. You should find the root cause.

data lr_caption type ref to cl_wd_caption.

lr_caption ?= view->get_element( 'CAPTION1' ).
lr_caption->set_text( 'Some Text' ).

yesrajkumar
Active Participant
0 Kudos

Hi,

Just use the following code in the WDDOMODIFYVIEW it will fix your problem.

data lv_explanation_text type string.

data lv_explain_text type string.

lv_explanation_text = cl_fitv_wd_util=>get_text(

iv_source = ' My Time Frame' -> Your description here

iv_type = cl_wd_formatted_text=>e_type-wad ).

cl_fitv_wd_util=>ui_set_text(

io_view = view

iv_id = 'TIME_FRAME' -> YOUR UI ID

iv_text = lv_explanation_text ).

Thanks,

Rajkumar.S

Edited by: Rajkumar S on Jan 19, 2009 3:31 PM