cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Renaming fields in SRM

former_member114630
Active Participant
0 Likes
1,197

Has anyone gone through the process of renaming fields in SRM?  For example, on the shopping cart itself, the field is called goods recipient.  However, under Change User Settings, the attribute is called Requisitioner.  I've been asked in the past to change the names but have been reluctant because I don't know what impact this would have in other areas.

Any recommendations/suggestions would be appreciated as to how to change and if it is even recommended to do so.  The fields have been this way since the beginning and most of our users are familiar with the naming.

Monique Stephens

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Likes

Hi Monique

Yes I have seen its like that and earlier it was awkward but now its how it really is ..since I have been working for 5-6 years on it ..

If you change the field labels it wont impact a lot of things technically since its a webdynro screen and you will only be changing the text part of it /SAPSRM/WDC_DODC_SC_I_BD  will be your webdynpro component in that you need to go to WDDOINIT and WDDOMODIFy methods and do coding to change the label of those fields ...

use this Class : CL_WD_LABEL and Method SET_TEXT can be used for the same .

Functionally : I would not recommended making a lot of changes except if it is for  a few fields .. else

it may create confusion when the client upgrades as these changes would need be done again ..

Also SAP std nomenclature is how the system interacts with the other Modules ..

so in such cases if the client checks in backend it might be getting them confused .

But at the end of the day it should be driven by client to decide on what they really want ..

I hope that helps ?

Regards

Vinita

former_member114630
Active Participant
0 Likes

Thanks for the information.  I agree that it has been like this from the beginning and most users probably don't even notice the differences.

venkatakrishna
Active Participant
0 Likes

Hi Vinita,

I am trying to change DESCRIBE_ITEM text 'With Free Description' in view V_SC_DOTC_BASIC for

webdynpro /SAPSRM/WDC_DODC_SC_I_BD by using below logic ,but getting error


"dynamic type conflict when assigning references web dynpro" .


Data :   lr_lbl type ref to  cl_wd_label.

     lr_lbl ?= view->get_element( 'DESCRIBE_ITEM' ).

     LR_LBL->SET_TEXT( 'New Text' ).


I have come across with  thread https://scn.sap.com/thread/3317202


can please explain me what they mean by enhancing the WD table...?


or any other way to achieve this , is there any issue if we change this in OTR,


Thanks for your Help,

Venkat

Former Member
0 Likes

Hey Venkat

Try doing this 1st call the code wizard to get element do not WRITE the code .

Let it get generated automatically to ensure your TYPE declaration is correct ..

and then use this :

if lr_lbl is BOUND.

  lr_lbl->set_text('TEXT').

  endif.

Let me know if it works

Ideally a new thread should have been opened ..

Regards

Vinita

laurent_burtaire
Active Contributor
0 Likes

Hello Venkat,

if you have an OTR for your text label, you can change the OTR text.

Regards.

Laurent.

venkatakrishna
Active Participant
0 Likes

Hi Vinita,

I bit confused with code wizard to get element , when I am trying this getting error method

get_element not exits,

can please explain me.

Thank you,

Venkat

Former Member
0 Likes

HI Venkata

Whats the webdynpro name you are using .I will give you the exact code after I try in my system .This is how you should do basically

DATA :   l_label TYPE REF TO cl_wd_label.

l_label ?= view->get_element( 'REF_DOC_LABEL_CP' ).

IF L_label is BOUND .

  l_label->set_text( 'test' ).

ENDIF .

NOTE : You need to ensure you are putting the LABEL name REF_DOC_LABEL_CP and not the field name .. I hope you understand ?

Regards

Vinita

venkatakrishna
Active Participant
0 Likes

Hi Vinita,

I am trying to change DESCRIBE_ITEM text 'With Free Description' in view

V_SC_DOTC_BASIC for webdynpro /SAPSRM/WDC_DODC_SC_I_BD


by using below logic.


DATA :   l_label TYPE REF TO cl_wd_label.

l_label ?= view->get_element( 'DESCRIBE_ITEM' ).

IF L_label is BOUND .

   l_label->set_text( 'test' ).

ENDIF .

DESCRIBE_ITEM is ID of the field from field properties and I am trying

this in Pre exit of WDDOMODIFYVIEW.


But still I am getting Error

'Dynamic type conflict when assigning references'.



Thanks for all your Help,

Venkat

venkatakrishna
Active Participant
0 Likes

Hi Laurent ,

Yes I am able to change with OTR , but keeping mind of upcoming

enhancements(usually OTR is overwritten) ,

I am trying for Pre exit in WDDOMODIFYVIEW

Thank you,

Venkat

laurent_burtaire
Active Contributor
0 Likes

Hello Venkata,

DESCRIBE_ITEM is not a label: this is a menu action item (class CL_WD_MENU_ACTION_ITEM).

Regards.

Laurent.

venkatakrishna
Active Participant
0 Likes

Hi Laurent,

so what is the procedure to rename menu action item ,

Please suggest.

Thank you,

Venkat

laurent_burtaire
Active Contributor
0 Likes

DATA :   l_label TYPE REF TO cl_wd_menu_action_item.

l_label ?= view->get_element( 'DESCRIBE_ITEM' ).

IF L_label is BOUND .

   l_label->set_text( 'test' ).

ENDIF .

venkatakrishna
Active Participant
0 Likes

Thank you Laurent & Vinita,

Issue resolved by above code.

Former Member
0 Likes

Hi Venkat

Could you please share a screenshot of what you were trying to change ..

I checked in my system, but in the webdynpro /SAPSRM/WDC_DODC_SC_I_BD

I have a view V_DODC_SC_I_BD   and not the one which you mentioned ..V_SC_DOTC_BASIC

So I am not sure what you were trying to rename ..

if you could please share a screenshot . I know your issue is fixed but just for my understanding..

Regards

Vinita

Former Member
0 Likes

Hey Laurent

whats the correct way to find the data type of the label ..

I am always doing hit and trial to identify whether it is  cl_wd_label ,

cl_wd_menu_action_item  OR cl_wd_toolbar_button ..

Any genius Tip from you please

Regards

Vinita

venkatakrishna
Active Participant
0 Likes

Hi Vinita,

I am sorry , I have given wrong webdynpro earlier,

please check this /SAPSRM/WDC_UI_SC_DOTC_BD.

screenshot attached.

Thank you,

Venkat

laurent_burtaire
Active Contributor
0 Likes

Hello Vinita,

each layout field has a property and an ID:

For DESCRIBE_ITEM, property is MenuActionItem.

For each property, a corresponding class exists: CL_WD_XXXX.

Regards.

Laurent.