How to upgrade a modified CRM WebChannel or E-Commerce application based on Java
Overview.
You are using a CRM WebChannel or E-Commerce application and modified it with the SAP NetWeaver Development Infrastructure (NWDI). Now you want to upgrade to a newer CRM Release level. This is only relevant if you have modifies/enhanced a CRM WebChannel/E-Commerce application based on Java if this has not been done these steps can be ignored.
Solution
When planning an upgrade from one CRM Release to another you need to perform some steps before the upgrade.
First create a new track for the new release. SAP strongly recommends using a new Track for release upgrades. With this approach you can avoid critical situations during an upgrade process.
The blog “Best Practices for NWDI: Track design for ongoing development” describes possible situations that may occur during an upgrade.
The process is the following:
- Create the track with your target version
- Create the new Track and add the software components (SCs) to it If you only modifying content from SAP-SHR* packages, then you do not need the software components SAP-CRMAPP, SAP-CRMWEB. Only if you modify SAP-CRMAPP or SAP-CRMWEB, then you also need the SAP-SHR* software components.In addition you also should maintain the build variant properties. The main used properties are:
- com.sap.jdk.javac.source = 1.4
- com.sap.jdk.javac.target = 1.4
- com.sap.xlf.trim-property-keys = true
- Also if you are using a newer NWDI, then the default JDK is not a 1.4 JDK. Then you have to set the 1.4 JDK for the build variant. The SAP Help page describes how to do it with DI 7.30.
The javac source and target should be 6 for versions starting with 7.3x. E.g. 7.31# - Set the Exclude from Deployment flag for all SCs except SAP-CRMDIC and CUSTCRMPRJ (or any other SC you will place your applications in)
- Also set the Exclude from Deployment flag to the dependencies. This can be done by
- Enter the edit mode of the track (click on the change button)
- Click on “Filter” (in the software components (SC) section, just right to the Define Dependencies button.
- Some new selection/filter screen will be shown.
- Select in the selection box Show the option “All software components” or “Required Software Components”
- Set the “Exclude from Deployment” flag for all SCs you do not want to be deployed/shown in the system info page
- Switch back the filter to “Developed software components”
- Click again on “Filter” to let the filter to be disappeared
- The initial set up of the target track is finished.
- Create the new Track and add the software components (SCs) to it If you only modifying content from SAP-SHR* packages, then you do not need the software components SAP-CRMAPP, SAP-CRMWEB. Only if you modify SAP-CRMAPP or SAP-CRMWEB, then you also need the SAP-SHR* software components.In addition you also should maintain the build variant properties. The main used properties are:
- Prepare the target version track
- Go to your track with your current application and find out the used version
- Go to your CMS, tab System State
- Select one of the Components you want to import later
- Click on Details
- In the pop up you will see the Support Package Number and the Patch Level
- Import the target SAP version of the software components into the track. If you only modifying content from SAP-SHR* packages, then you do not need the software components SAP-CRMAPP, SAP-CRMWEB. Only if you modify SAP-CRMAPP or SAP-CRMWEB, then you also need the SAP-SHR* software components.
- Take the unmodified SAP archives in exact the same version used by your current application and import it into the new created track
- The track might have conflicts caused by SAP. Resolve these conflicts as described in note 1672262.
This step also applies if you only use one track for the upgrade.
- Go to your track with your current application and find out the used version
- Finish the upgrade
- Go to your old track and assemble your software components depending if your new track will use the same Design Time Repository (DTR) or
- If your new track will use the same DTR then assemble the SCs with the option:
Include Source Pointer in Archive - If your new track will use another DTR then assemble the SCs with the option:
Include Modifiable Sources in Archive (More information on software component assembly can be found in http://help.sap.com/saphelp_nw70/helpdata/en/46/708a9df11b0e9ce10000000a155369/frameset.htm )
- If your new track will use the same DTR then assemble the SCs with the option:
- Import the assembled SCs into the new track
- Resolve the conflicts caused by your modifications/enhancements
- Go to your old track and assemble your software components depending if your new track will use the same Design Time Repository (DTR) or
With a new track your active version will be the version from your old track.
One Example:
Let’s assume you have CRM 6.0 and you want to upgrade to CRM 7.0. We also assume your CRM 6.0 is in the track CRM60P. In that case you have to do the following:
- Create the track with your target version
- Create a new Track for 7.0. That track might look like this after creation:
- Do not forget to exclude all SAP Archives
- Exclude dependencies from deployment
- Click on the button “Filter” and select in the filter the selection box entry “All Software Components” or “Required Software Components”
- Set the “Exclude from Deployment” flag on all dependent SCs
- Switch back the filter to “Developed Software Components”
- Click again on Filter to hide the filter entries again
- Prepare the target version track
- Go to your track with your current application and find out the used version
- Go to your CMS, tab System State
- Select one of the Components you want to import later
- Click on Details
- In the pop up you will see the Support Package Number and the Patch Level
- Import the SAP version of the software components into the new track
- Take the unmodified SAP archives in exact the same version used by your current application and import it into the new created track
- The track might have conflicts caused by SAP. Resolve these conflicts as described in note 1672262.
- Finish the upgrade.
- Go to your old track and assemble your software components depending if your new track will use the same Design Time Repository (DTR) or not.
- Import the assembled SCs into the new track
- Resolve the conflicts caused by your modifications/enhancements.
The upgrade is finish after the steps above.
Content provided by Iwan Zarembo.
Hi Foley,
It's very nice article.I really liked it. Now I have a situation that,I don't have souce track (means application is developed and deployed with out NWDI),now what I have is the EAR file of 5.0,what should I do to upgrade it from 5.0 to 7.0..
This is a tricky situation and has some additional effort:
1. Find out the version on which your application is based by extracting the EAR, then the WAR file and look into WEB-INF/lib/sap.com~crm~tc~core~assembly.jar/META-INF/MANIFEST.MF
It contains the version information. Take all entries there and send them to SAP Active Support. They will be able to tell you which version you have and also give you the files you need..
2. Set up a track with your target version
3. Generate the WAR file from your source version
4. Extract all the files from the WAR file and compare the difference between your version and the base version from SAP
5. Redo the modifications in the new version manually
hi Iwan Zarembo,
Thank you very much for your reply.We created a track and imported it into NWDS and created a web application(by following this link http://sateeshchandrach.googlepages.com/How_To_Create_Custom_App_ECO5200.pdf), can we copy the web-inf and webContent folder from our source war file, to target application in NWDS(track we have created),will it work same as our old application.
Hi Aravind,
The problem is that the files you see in your final WAR file are merged from several other DCs during the build. You should identify which files are coming from which DC and copy them into the correct location.
Also do not forget that the WEB-INF folder has been moved onto the webContent folder in the releases running on NetWeaver 7.30 and that the catalog has been switch to frameless ui.
Hi Iwan,
we deployed custom b2b application from SDM as it is not working as excepted so we are working with NWDI and NWDS.We have imported the standard b2b project from sap-shrapp in NWDS and named as per our requirement(xyz_b2b), we have our custom application .ear file. can we copy the webcontent and web-inf folders from our custom application to the xyz_b2b application.
. please guide on this.
Hi Aravind,
please see my answer before. You have to identify which files should be replaced in which DC. I should not just replace all the files in crm/isa/web/b2b DC.
This is such a helpful blog!
Thanks Mark! 🙂