cancel
Showing results for 
Search instead for 
Did you mean: 

Set OTR to label during runtime

former_member305388
Active Contributor
0 Kudos

Hi Experts,

I am using class cl_wd_label method set_text to change the label text dynamically during runtime. This works fine but in case of different language the label is not assigned the correct translation as its always hardcoded to same value. Is there any proper way to assign an OTR during runtime to a label to avoid this issue?

lr_lbl->set_text( ' Text' ).

Basically I want the label to be be available in the local language login like in standard.

Accepted Solutions (0)

Answers (1)

Answers (1)

saravanan_narayanan
Active Contributor
0 Kudos

Hello Srinivas,

you can maintain the text in OTR and then you can use the CL_WD_UTILITIES=>GET_OTR_TEXT_BY_ALIAS method to retireve text at runtime and assign the same as label text.

BR, Saravanan