cancel
Showing results for 
Search instead for 
Did you mean: 

Change Label name in a standard component in Performance mangement

Former Member
0 Kudos

Hi All,

My requirement is to change the label in a standard SAP component HAP_DOCUMENT_BODY . I am trying use

CL_WD_LABEL-SET_TEXT for this.. But I recieve a dump while doing the same. Could you knindly let me know the right process to do this.

Thanks.

KM

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Kousik,

You want To change only Labels?? Then why dont you go for component configuration or admin personalization?

Its very easy, no code required. try this...

OR you want to do Enhancements.

Do Enhancement implementation. In WDDOMDIFYVIEW in POSTEXIT metod write code to change label.

data lr_lbl type ref to  cl_wd_label.
 
lr_lbl ?= view->get_element( 'LABEL' ). "label is the ID of the label UI element
LR_LBL->SET_TEXT( 'YOUR TEXT' ).

Cheers,

Kris.

Former Member
0 Kudos

Hi Kris,

Thanks for your reply.. I tried doing the enhancement. Actually my objective was to remove a label permanently. So i tried using set_visible but unfortunately the label id is being shared by many fields so all got removed. then i caught the label name in the framework and changed it. Now in my application the label is not coming but i am seeing a :. Which generally comes when we use the property label for. I am unable to remove this.

Also please share with me how to do the component configuration or admin personalization as i am not aware of it.

Thanks so much..

Koushik

Former Member
0 Kudos

Hi Koushik,

Search in SDN we have somay options.

[original link is broken]

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/b52e13c3-0901-0010-8fa6-d11...

[original link is broken]

Cheers,

Kris.

Former Member
0 Kudos

Hi ,

Whenever I am doing a get text for the label I am getting a dump in the below line.

attr_pointer-element->if_wd_context_element~set_attribute( name = attr_pointer-attribute_name value = <attr> ).

Am not able to figure out the reason.

Thanks,

Koushik