Skip to Content
Author's profile photo Senthil Murugan

Recreate or Copy Screens from XML

Hi Everyone,

Sometimes, we may face a situation to recreate screen from one solution to another solution, where as porting and solution template upload replaces entire solution. We know for each fields in the UI designer has corresponding XML tags generated already which is further used to interact with SAP servers. So it is possible to regenerate the UI from XML. The request from each UI might be separated by the namespaces,Unique ID’s, PTPs etc,as long as we are able to distinguish them from source and destination it is easy to manipulate screen from XML.

This blog is for copy screen from one solution to another solution without porting.

Lets begin the implementation part.

Here is my source solution and Destination solution


1 Source Solution Structure.jpg2 destination solution sturcture.jpg

I’ve created the Business object in same name(FabricOrderDesigns) as in destination and I have created the screen in destination solution.

3 create screen.jpg

Before copying from my source, my screen will be looking as below.

before owl.jpg

   1. Click the screen and press enter, XML mode of the UI component will appear.

5 destination XML mode.jpg

   2 . Now open the Find and Replace(Ctrl + F) Window and search namespace, you will get the URL of the solution, this URL can be seen under many tags and values such as designtimeMainBOEsrNamespace, EsrNamespace etc, Copy the namespace and store it  somewhere temporarily

6 copying destination namespace.jpg

   3. Next Step is to copy the path of PTPs, Since the PTP differs from source to destination, we have to give proper path.

7 copying portype package.jpg

   4. This is step is not mandatory, if you need export to Excel option you can do this or you can simply delete the Event Handler tag to avoid errors.


8 copy excel.jpg

   5. Once you copying from the destination UI’s XML, repeat the same for the source UI’s XML and store it temporarily like below

temporary copy.jpg

   6. Now copy everything from the source UI and paste it in destination UI.

9 copy from source.jpg10 paste in destination.jpg

   7.Now we have to replace(Ctrl + F, quick replace) the namespaces, PTPs and Excel(not mandatory) in the destination UI as below

11 replace namespaces.jpg12 REPLACE PTP.jpg13 replace excel.jpg

   8. Once you done replacing close XML mode of the UI and save

save the doc.jpg

   9. Since changes in the XML mode temporarily locks the UI, you have to delete the session to proceed further

16 delete the session.jpg

   10. Now Open the OWL in UI Designer (Right Click and Open In UI Designer or Simply double click). You can see the UI is copied as in source, now just save and activate the UI, it will work in most cases, unless the current UI may refer any other objects.

18 new owl.jpg

    11. For QA, OIF, GAF, etc we may use our custom OVS for that we have to copy the location of the OVS and paste in the destination UI. Rest of the steps are same (Copy & Replace namespaces, PTPs,,..)

We can get the Path from Properties tab

21 ovs properties.jpg22 copy path.jpg

20 search ovs.jpg

Thats all about Screen Copy.

Some Thoughts:

  1. I keep the BO names are same, since different names of BO leads to change a lot in XML.
  2. Before copying Screen, its necessary to create corresponding Query, BC Sets, OVS etc
  3. UI of PTP are usually sames for both source and destination, if not we should copy and paste that too.
  4. The XML copy is possible only for custom UI not standard one.
  5. Deleting Session is mandatory on Step 9, if the session is locked, the UI designer will not open for edit.
  6. If any component in the UI refers to the unknown component, it is difficult to activate as in step 10, at that time we have to fix the component in XML or UI designer, or we delete that component and recreate it.

Regards,

Senthil

Assigned Tags

      8 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Katie Bebbington
      Katie Bebbington

      Is there a way to get the XML for a Standard screen?

      Author's profile photo Senthil Murugan
      Senthil Murugan
      Blog Post Author

      Sorry, you can't get the XML for a standard screen.
       

      Author's profile photo Dhruvin Mehta
      Dhruvin Mehta

      Ahhh!! that could have been awesome! that being said! thanks for your above post, it was informative!

      Author's profile photo Tiago Almeida
      Tiago Almeida

      Hi Senthil, thanks for the good blog post on a workaround for recreating the screens.

       

      Do you know if this technique also works for Embedded Component (EC.uicomponent) screens?

       

      Thank you

      Kind regards,

      Tiago

      Author's profile photo Senthil Murugan
      Senthil Murugan
      Blog Post Author

      Hi Tiago,

       

      Sorry for the delay.

       

      Yes, you can apply this technique for EC.

       

      Thanks and Regards,

      Senthil

      Author's profile photo Peter Sipos
      Peter Sipos

      Hello Senthil,

       

      I didn´t know how else to contact you, so I´m writing you here, in your last post. I´ve seen your question from 2016 about the PGIinbackground : https://archive.sap.com/discussions/thread/3939470

      We are using the same action for a long time, but now we have a requirement to control the released quantity. You wrote that you had some kind of a workaround for adding the actual quantity.

       

      Could you please share with me what work-around did you use?

      Many thanks,

      Peter

      Author's profile photo Senthil Murugan
      Senthil Murugan

      Hi Peter,

       

      Sorry for the delayed reply, as my s-user is locked with my previous organization, I couldn't access my s-user ID anymore :(.

       

      In the workaround, If I remember correctly, there is an element in the name "PartialDeliveryQuantity", I had used that field and called the PGIInBackground() action.

       

      Br,

      Senthil

       

       

       

      Author's profile photo Peter Sipos
      Peter Sipos

      Hello Dear Senthil,

      thanks, for not letting this question go 🙂 I allready had to rework the process flow, but good to know for the future.

      take care 🙂

      Peter