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


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

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

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


   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

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

   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.


   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

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

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

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

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

   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.

    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

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

New NetWeaver Information at SAP.com

Very Helpfull

User Rating: Be the first one !

Comments (0)
Add Comment