cancel
Showing results for 
Search instead for 
Did you mean: 

Field labels using OTR text or DE Text ?

vijay_e
Explorer
0 Kudos

How to ascertain whether the a field labels uses OTR text or Data Elements text ?

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

Launch the application in other language by adding URL parameter &sap-language=DE and check.

If it is showing label description, then it is bound to OTR text else not.

Ex : I have one label namely : welcome which is not bound to any OTR texts. When i launch my application in default language ( EN) , following is the output

But when i launch my application in other  language ( DE) , following is the output i.e welcome text is blank


Thanks

KH

former_member184578
Active Contributor
0 Kudos

Hi,

The attribute VL_TEXT would be filled if it is from OTR or Manual entered value. As there is no provison to read this attribute, enhance the class CL_WD_LABEL and create a new public method say, GET_LABEL_BOUND_TYPE and check if VL_TEXT is inital or not and return the relevant type.

And use this below code,

   DATA: lr_label TYPE REF TO cl_wd_label.    

    lr_label ?= view->get_element( id = 'LABEL_NAME' ).

lv_type = lr_label->get_label_bound_type( ).

hope this helps,

Regards,

Kiran

vijay_e
Explorer
0 Kudos

Hi Kiran,

In this case I cannot do any modification. Pl suggest if there is an alternate solution to this.

Regards

Vijay

harsha_jalakam
Active Contributor
0 Kudos

Hi Vijay,

Please launch the application from the workbench, and try changing the language parameter sap-language=EN/DE, etc. If the labels does change wrt to change in language, then the labels are bound to OTR texts.

Regards,

Harsha

former_member184578
Active Contributor
0 Kudos

Hi,

The attribute which I have mentioned is protected and there is no provision to read that. SO the option would be to enhance the class and create a method as suggestion. And it is not modification, it's enhancement( Create a Z Enhancement implementation ).

Regards,

Kiran