cancel
Showing results for 
Search instead for 
Did you mean: 

PERSONAS : Can we rename a Control's ID?

alexandreourth
Active Participant
0 Kudos

Hi experts,

My need is very simple, yet i can't find a solution...When i create a custom control in my PERSONAS screen (label, input field etc.), i want to give it a custom ID! For now, i'm having a generated ID which is not very friendly to read like :

"wnd[0]/usr/txtPersonas_152448904728053" => not good looking

How can i change that "txtPersonas_152448904728053" by a useful text? (Found nothing in advanced option)

I want to do that because i have to duplicate my flavor manually from IW52 to IW53 (because there is no official copy function for a flavor from one tcode to another which are alike) and i have a lot of scripts using my screen's elements => I would like to avoid to go on each of my script and adapt the control's IDs.

Do i have to use the overwrite ID concept? Even if it's not the purpose of this concept?!

PERSONAS 3.0 SP05

Kind regards,

Alexandre

Accepted Solutions (1)

Accepted Solutions (1)

tamas_hoznek
Product and Topic Expert
Product and Topic Expert

As Cris mentioned, you cannot rename the controls. These IDs are generated automatically and there is no feature to edit them.

We are going to add the feature of copying a flavor between transaction codes in the soon upcoming SP07, but if you cannot wait until then, I can offer you a hack to do this.

  • Create a copy of your IW52 flavor that you want to copy to another transaction
  • Export this flavor to a local file via the Admin transaction
  • Physically delete your IW52 flavor copy (not just mark for deletion, but make sure you delete it permanently)
  • Open the exported ZIP file and look for the file flavor.GUID.xml in the archive. Extract that to your desktop
  • Edit the extracted XML and replace the APP_ID value with the target transaction code IW53
  • Replace the flavor.GUID.xml file in your ZIP archive with the edited XML and save it
  • Import the ZIP file via the Admin transaction

This will result in your copied flavor, assigned to the other transaction that is 100% equivalent to the original flavor, so your scripts will still work the same like in the original transaction.


alexandreourth
Active Participant
0 Kudos

Hi Tamas,

Thanks for the tip. I'll give it a try. The copy is a workaround ok. Now, i have checked that if i want to use the same ID for the same control in different flavors, i have to create a model. But it is quite heavy to do especially when i want to apply this concept to all my custom fields (or at least 80% of them).

Working with the same ID for a custom field available in several screens is, for me, better for maintenance and makes the documentation of the screens easier to write.

Maybe you should add a functionality that can easily transform a normal custom field in a model custom field (add the option in the "Conception" toolbar). Like we select the field we want to transform, we push "Transform into model" or "Replace model" (if it is already existing). It will be easier to do than open a new browser, open the "Create Template" mode, make the changes, reload the other browser to see the changes.

Regards,

Alexandre

tamas_hoznek
Product and Topic Expert
Product and Topic Expert
0 Kudos

Turning individual controls into templates may technically work, but it seems this can create an unnecessarily high number of templates, which in turn can quickly result in a maintenance headache. I wouldn't recommend this.

alexandreourth
Active Participant
0 Kudos

It's like for everything, it would be useful for relevant things. It's up to the developer judgment to create or not a model. For my project, this functionality would have been useful 🙂

Thanks for your time Tamas have a good day.

Regards,

Alexandre

Answers (1)

Answers (1)

cris_hansen
Advisor
Advisor
0 Kudos

Hi Alexandre,

AFAIK, this is not possible.

Even though the name might be not good looking, you can always use the editor to pick the correct name.

Regards,
Cris

alexandreourth
Active Participant
0 Kudos

Hi Cris,

Thanks for your time. Of course i know i can use the editor to pick the new name 🙂

Regards,

Alexandre