Skip to Content

During the lifecycle of a custom Java application, based on SAP Netweaver, it happens that archive name(s) change with the new version of the software. As SAP Software logistics logic rely on archive name (to find the application components successors), there is special treatment build in the update and upgrade Java tools called refactoring.

Example: existing application has version 1.x.x and the new release 2.x.x comes with different number SCAs. Some of the SCAs have changed name and, in addition, some SDAs inside were removed.

The mapping between old source (SCA/SDA) components and the new target components is done with the help of a specific configuration file (.sap-refactoring) which should be packed in new target (2.x.x) SCA. You need one SCA which haven’t change its name between 1.x.x and 2.x.x release which contains .sap-refactoring file. This .sap-refactoring file will describe structural changes of all you components and the upgrade tool will use it to map the detected source component to the new target components.

How to delete a development component:

  1. Create a file .sap-refactoring in the correct folder of your project or DC.
    (to create a file starting with a ‘.’ on Windows you can use Command prompt: echo > .sap-refactoring)
  2. Use the example listed below (“Attachment”) for “.sap-refactoring” and adjust by:
  3. Calculate/copy new guid, from Guid Generator (128-bit Globally unique identifier)
  4. Set the textID/name to match the name of your DC
  5. Set the textID/when/date to the date on which you have created this .sap-refactoring file
    textID/when/date must be <= TODAY
  6. Set the deleted/when/date to the date per which the delete mus become effective
    deleted/when/date must be <= TODAY
    deleted/when/date must be >= textID/when/date
  7. Add the following entry to the SAP_MANIFEST.MF file (which is contained in the new SCA):
    refactoringfile: .sap_refactoring

Note

  1. Refactoring of SCAs and SDAs is supported from SAP Netweaver 7.10 and higher releases. Which is to say – one can use .sap-refactoring when upgrading SAP Netweaver to 7.10/7.11/7.20CE/7.30, or performing update of custom components on the already mentioned releases of SAP Netweaver.
  2. The File .sap-refactoring with proper format should be in META-INFO folder of the SCA (among the manifest).
  3. The DC listed for removal inside .sap-refactoring should have correct tags “technical name”, same “vendor” and “date” in the past.
  4. When performing “update” (EHP/SP/Patch), the undeployment happens after all SCA deployments unless tag refactoringSlot is set to preDeployment;
    for Switch upgrade scenario there is no real undeployment, but shadow DB schema built is without listed DCs.
  5. The content of this blog was migrated from the SCN SL wiki; original author is T. Tzvetanov.

Attachment

.sap_refactoring

<?xml version="1.0" encoding="utf-8"?>
<refactoring
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation=".sap-refactoring_1_0.xsd">
  <sc>
   <guid>00000000-0000-0000-0000-000000000000</guid>
   <textIDList>
    <textID>
     <vendor>sap.com</vendor>
     <name>YOUR-SC-NAME</name>
     <when>
      <date>2000-01-01</date>
     </when>
    </textID>
   </textIDList>
 <dcList>
  <dc>
   <guid>00000000-0000-0000-0000-000000000000</guid>
   <textIDList>
    <textID>
     <vendor>sap.com</vendor>
     <name>YOUR-DC-NAME</name>
     <when>
      <date>2001-01-01</date>
      <refactoringSlot>preDeployment</refactoringSlot>
     </when>
    </textID>
   </textIDList>
   <deletedList>
    <deleted>
     <when>
      <date>2001-01-01</date>
     </when>
    </deleted>
   </deletedList>
  </dc>
 </dcList>
</sc>
</refactoring>

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply