Skip to Content
Author's profile photo Hemanth Kumar

Undeploying SCA/ SDA / EAR / WAR files on J2EE servers on Netweaver release 7.1,7.2,7.3,7.4 and 7.5

 

NOTE

 

Check SAP KBA 1715441 , SAP KBA 2462712  and SAP KBA 2553568 before commencing any undeployment activity.

 

****************************************************************************************************************************

NOTE: Undeployment operations as such are not supported and should be used only in cases where the SAP Basis Admin is well versed with the system landscape and the repercussions of this activity. There is no support for undeployment issues; if unknowingly a component is deployed, the official recommendation is to restore the system to the previous state it was before the deployment was triggered. Hence, you should always take a full offline backup before commencing deployment.

Once the SDAs have been undeployed, the SCA can be undeployed using SAP KBA ##2553568 .

Existing dependencies have to be taken into account while deploying/undeploying. For more details on this, check:

SAP KBA ##2640229 – How to find dependencies of a deployed SDA/SCA on SAP AS Java
****************************************************************************************************************************

 

On older releases, use the SDM tool. Check:

Undeploying Software/ Development component on NetWeaver Java release 7.0x


Purpose

 

The purpose of this document is to list all the undeployment options available to undeploy .SDA (Software Deployment Archive), .SCA (Software Component Archive), .EAR (Enterprise Archive) or .WAR (Web Archive) files on SAP J2EE servers Netweaver release: 7.1/7.2/7.3, 7.4 and the upcoming 7.5 version. For a similar knowledge base article for the deployment of these components, check SAP KBA document : http://service.sap.com/sap/support/notes/1715441.

 

In earlier SAP releases (version 6.40 and 7.00) the Software Deployment manager (SDM) tool could have been easily used for this. However, it has depreciated in the latter releases. For more information, check: Undeploying Components – Using Java – SAP Library

 

 

 

Option 1

 

The best option to use is the J2EE TELNET “UNDEPLOY” command.

1) Open telnet connection and run the below commands:

> lsc (to list the available server nodes)

> jump <server node> (usually jump 0)

> add deploy

> undeploy -h (to get the command syntax and all the available options. For more information, check:


(JAS-ADM)DeployController Commands – SAP Netweaver Application Server Java – SCN Wiki

 

For example: >undeploy name=com.sap.pct.mdm.tech.wizards vendor=sap.com name= on_undeploy_error=stop

telnet undeploy.jpg

 

If you wish to undeploy multiple SDAs , use the “list” option to supply an XML file as argument. Here is the syntax to run that command from telnet:

undeploy list=D:\usr\sap\UndeployItems.xml

on_undeploy_error=skip_depending on_prerequisite_error=skip_depending

 

******************* ******************* ******************* **** ******

The XML file has to be EXACTLY in the below format (including the case and spaces)

<Components>

<DevelopmentComponentLine name=”dev_comp1_name” vendor=”vendor1_name”></DevelopmentComponentLine>

<DevelopmentComponentLine name=”dev_comp2_name” vendor=”vendor2_name”></DevelopmentComponentLine>

.

.

.

</Components>

******************* ******************* ******************* **** ******

 

******************* ******************* ******************* **** ******

For example:

<Components>

<DevelopmentComponentLine name=”tc~sec~diagtool~ear” vendor=”sap.com”></DevelopmentComponentLine>

</Components>

 

******************* ******************* ******************* **** ******

NOTE: This will not calculate the dependencies though. If the operation fails, the logs will give you an idea on the dependency involved and then you can make a call on whether you wish to undeploy them in that order as well. Once all the SDAs related to the SCA are removed, then the “undeploy_empty_sca” command can be used to delete the empty SCA from the server.
This is extremely useful in cases where the SCA in question has many SDAs, like the GP-CORE SCA that has more than 102 deployed components and undeploying one by one can be a cumbersome affair.

For more help, check SAP KBA 2462712 .

 

 

Option 2

The Netweaver Developer Studio undeploy view can also be used to this purpose. Firstly navigate to NWDS -> window -> preferences and maintain the j2ee server details:

 

 

/wp-content/uploads/2012/08/preferences_129226.jpg

 

 

Now open the undeploy view by clicking on Window -> show view -> other

 

/wp-content/uploads/2012/08/view_129239.jpg

 

and select the undeploy view:

 

undeploy view.jpg

 

Once this is done, you can select the DC components that are part of the SCAs that need to be undeployed. It is also possible to select the whole SCA file using this technique:

 

undeploy list.jpg
Also do check:  http://help.sap.com/saphelp_nwce10/helpdata/en/44/70655c200812d2e10000000a422035/frameset.htm

 

Option 3
The guiconsole.bat in the location /usr/sap/<SID>/J<nr>/j2ee/console is a script that will inturn open the telnet application and you can commence undeployment as mentioned in option 1.


Option 4

ANT scripts can be used for undeployment of SDAs. For more information on this, check:

https://help.sap.com/saphelp_nw73ehp1/helpdata/de/4a/f01de74a5a6d62e10000000a42189c/content.htm

Assigned Tags

      26 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member

      Hi,

      there is a way to undeploy multiple SDA's from telnet:

      undeploy list=C:\my\list\UndeployItems.xml

      What is the structure for the undeployitems.xml? Does it handle dependency?

      Thanks,

      Zoltan

      Author's profile photo Hemanth Kumar
      Hemanth Kumar
      Blog Post Author

      Dear Zoltan,

      Great that you pointed this out.

      For SCAs where there are multiple components deployed under that (for example, GP-CORE has 102 deployed components) you can use "list" option to supply an XML file as argument. Here is the syntax to run that command from telnet:

      undeploy list=D:\usr\sap\UndeployItems.xml

      on_undeploy_error=skip_depending on_prerequisite_error=skip_depending

      ******************* ******************* ******************* **** ******

      The XML file has to be EXACTLY in the below format (including the case and spaces)

      <Components>

        <DevelopmentComponentLine vendor="sap.com" name="MyApp"/>

        <DevelopmentComponentLine vendor="sap.com" name="MyService"/>

      </Components>

      ******************* ******************* ******************* **** ******

      This will not calculate the dependencies though. If the operation fails, the logs will give you an idea on the dependency involved and then you can make a call on whether you wish to undeploy them in that order as well. Once all the SDAs related to the SCA are removed, then the "undeploy_empty_sca" command can be used to delete the empty SCA from the server.

      Regards,

      Hemanth

      Author's profile photo Former Member
      Former Member

      Very useful, thanks! Why is this not in the help section for the UNDEPLOY command?

      Author's profile photo Hemanth Kumar
      Hemanth Kumar
      Blog Post Author

      Hi Kevin,

      Well undeployment as such is not supported and should be used only in cases where the Basis admin knows the system landscape and the repercussions of this activity very well.

      The best option would be to restore the system to the previous state it was before the deployment was triggered. Hence, you should always take a full offline backup before commencing deployment.

      Kind Regards,

      Hemanth Kumar

      SAP AGS

      Author's profile photo Alan Rubin
      Alan Rubin

      Hi,

      I guess there is a fourth option - use ant scripts provided by SAP. Probably only works for NW 7.3. Do you have any experience with it ?

      http://help.sap.com/saphelp_nw73/helpdata/en/4a/f01de74a5a6d62e10000000a42189c/content.htm

      Cheers,

      Alan

      Author's profile photo Hemanth Kumar
      Hemanth Kumar
      Blog Post Author

      Hi Alan,

      Thank you for this.

      Yes, I just checked, an scripts can be used in older versions as well.

      They are located in :...\..\j2ee\deployment\ant

      Regards,

      Hemanth

      Author's profile photo Hemanth Kumar
      Hemanth Kumar
      Blog Post Author

      Added all the comments setion to the BLOG itself for easier reading

      Author's profile photo Alper Somuncu
      Alper Somuncu

      Thank you Hemanth, helpful and clear guide.

      In order to undeploy single components, below command can also be used after logged onto the Telnet console by NW Administrator user:

      undeploy vendor=sap.com name=<development component>

      For example:

      undeploy vendor=sap.com name=xapps~xmii~ear

      BR,

      Alper Somuncu

      Author's profile photo Hemanth Kumar
      Hemanth Kumar
      Blog Post Author

      Thank Alper.
      Actually that is the first option I mentioned (the telnet option). You are right, instead of stating:type "undeploy -h" to get the syntax, I should have given an example).
      I will amend this.
      Cheers 🙂

      Author's profile photo chandrababu katta
      chandrababu katta

      Hi Hemanth,

      I have a situation like following...

      We completed the implementation of SAP NW 7.3 ehp1 as java system and later i updated ll the support packs to Sp04 and then i want to update them to latest patch SP10.

      But at the time of  updating SPs from Sp01 to Sp04 except J2EE SERVERCORE all the components updated to SP04 and its getting complecated to me to update the Single Servercore Component.

      I used Telnet to deploy the single component but it was interupted middle of the phases and results an error.

      If we want to update SERVERCORE component it is only possible to update along with remaining CORE Components stated in the note   1794179 - Importing AS Java Core patches for NetWeaver 7.1 or higher based products .

      So can you please explain how to un-deploy the other CORE components except SERVERCORE from the system using Telnet.

      Appreciate your quick help and time.

      Regards,

      Chandrababu Katta

      Author's profile photo Hemanth Kumar
      Hemanth Kumar
      Blog Post Author

      Hi Chandrababu,

      Undeploying the core components is very tricky (and dangerous) due to the many dependencies it may have.
      The best option would be to force deploy the core components (all of them as mentioned in  note   1794179) so that dependencies are taken care of.
      I would suggest raising a forum question and we can investigate this further.

      Kind regards,
      Hemanth

      Author's profile photo chandrababu katta
      chandrababu katta

      Thanks Hemanth,

          Can you please let me know how we deploy forcely all the core components!!?,

      They all are at diff Sp levels

      all core components except SERVERCORE are at SP04 and SERVERCORE Itself at Sp01

      Thanks,

      Chandrababu

      Author's profile photo Hemanth Kumar
      Hemanth Kumar
      Blog Post Author

      Hi Chandrababu,
      Please raise a forum message in the area: SAP NetWeaver Application Server
      and we can check this further.

      Kind regards,

      Hemanth

      Author's profile photo chandrababu katta
      chandrababu katta

      Hi Hemanth,

      raise a forum message please respond.

      Regards,

      Chandrababu

      Author's profile photo Former Member
      Former Member

      Hi,

      Nice blog...

      Regards,

      M.Reddy

      Author's profile photo Hemanth Kumar
      Hemanth Kumar
      Blog Post Author

      Thank you for the kind words Mahee.

      Best Regards,

      Hemanth

      Author's profile photo Kelly Zheng
      Kelly Zheng

      Hi,

      I am trying to un-deploy a component with first method.
      However it show the there is no such component.
      I attached the un-deploy command  and the component Info, can anyone help me to check what's wrong with it?


      Thanks and Best Regards,
      Kelly

       

      Author's profile photo Former Member
      Former Member

      Hi Kelly 

      Did you resolve the problem?

      I think you are using a wrong name, try xapps-mpm-umeactions instead of  OE_MII. Something like this:

      undeploy vendor=sap.com name=xapps-mpm-umeactions on_undeploy_error=stop 

       

       

      Author's profile photo jorge velasquez
      jorge velasquez

      Hi

      I have this message in Managed System Setup:

      SAP Solution Manager Wizard
      ISAGENT component does not have expected level (current: 8 SP=24 P=0, expected: 8 SP>=024 P>=2

      If I understood correctly I have to deploy ISAGENT24P_2-10007435.SCA with SDM tool

      I followed steps:

      a) from solman server telnet localhost 50008
      b) j2ee_admin and password
      c) I executed command lsc and it showed dispatcher and server with status running.
      d) I executed command add deploy and it showed error

      There aren’t commands from DEPLOY group in the CommandContext.

      Then I should execute command deploy <location of isagent sca file> version_rule=all

      Any clue?

      Regards

       

      Author's profile photo Matt Fraser
      Matt Fraser

       

      Hi Jorge,

      First off, I wouldn't try to use SDM to undeploy ISAGENT on your SolMan system for this. That message you are getting is, I think, probably an error in the latest sp stack (15), because if you read the release notes for patch 2 of ISAGENT, it tells you that it is basically a reset back to patch 0 due to patch 1 causing problems on the managed systems (if I remember the notes correctly -- something like that, anyway). So, leave it where it is as patch 0, and set that particular step in the managed system setup as "manually performed" for now, and move on.

      And perhaps raise this as a separate question in the Solution Manager tag. I expect a bunch of folks will be running into it.

      Cheers,
      Matt

      Author's profile photo Matt Fraser
      Matt Fraser

      Hemanth,

      I had cause today to need to resort to this, and after a bit of experimentation it worked like a charm! That telnet and undeploy list= is a lifesaver in certain situations. And, bonus, I figured out how to use undeploy_empty_sca as well.

      Thanks for publishing this.

      Cheers,
      Matt

      Author's profile photo Hemanth Kumar
      Hemanth Kumar
      Blog Post Author

      Thanks Matt. You are right, the shell console admin has some amazing features and does not get the attention it deserves at times :).

       

      Author's profile photo Hemanth Kumar
      Hemanth Kumar
      Blog Post Author

      There was a definite need for this info as well Matt. Please also see SAP KBA ##2462712 -

      Deploy/undeploy set of EAR/WAR/RAR/SDA files using SAP Shell Console Admin via telnet  that I created recently.

       

      Kind Regards,
      Hemanth

      Author's profile photo Jill Diesman
      Jill Diesman

      Hello,

      I am trying to uninstall two SCAs as part of my SAP Maintenance Planner process.  However it shows there is no such component.  Can anyone provide some help?  Here are screenshots of the component name and the telnet UNDEPLOY result:

      Thanks in advance and best regards,

      Jill Diesman

      Author's profile photo Hemanth Kumar
      Hemanth Kumar
      Blog Post Author

      Dear Jill,

      Hope you are doing good.

      These SCAs that you mentioned are core SCA; you should not be undeploying them at any cost.

      Anyways, it looks like your server is SAP Application Server JAVA 7.00; please use the SDM for any undeployment on such old releases. More help:

      https://blogs.sap.com/2016/06/02/undeploying-software-development-component-on-netweaver-java-release-70x/

       

      If the issue persists, please raise a SAP Answers thread.

      If you have created an OSS incident, please let me know and I can check your server.

       

      Hope this helps.
      _ _ _ _ _ _ _ __ _ _
      Kind Regards,
      Hemanth Kumar
      SAP Product Support
      _ _ _ _ _ _ _ _ _ _ _
      Join me online: https://people.sap.com/hemanth.kumar

      P.S. SAP is now offering Expert Chat support for specific product components.
      Please check the following link to get more information about chat support
      and steps on how to start an Expert Chat session:

      https://launchpad.support.sap.com/#/notes/2213344/E
      https://www.youtube.com/watch?v=Eh-EgqsMgGE
      *****************************************************************************

      Author's profile photo Jill Diesman
      Jill Diesman

      Hi Hemanth,

      Thank you for your reply. I am running a NetWeaver 7.4 Java system and am preparing for updates to NW 7.4 SP 17. However when verifying the system in the SAP Maintenance Planner, I ran into the following:

      Ignore the software component SAP J2EE ENGINE 7.00[0(0)] from the planning activity?

      Yes (recommended)

      Ignore the software component SAP JAVA TECH SERVICES 7.00[0(0)] from the planning activity?

      Yes (recommended)

       

      I selected Yes for both, then the following was displayed:

      Manual steps to correct the system

      You chose to ignore the software component version (SCV) from planning. Please…

      1. You can choose to un-install this SCV as mentioned in SAP Note 2011192, if it can be uninstalled.

        1. If you choose to uninstall this SCV on the technical system first, please do not generate stack XML by using "Plan" functionality.
        2. Perform the un-installation of this SCV on the technical system.
        3. Upload the technical system data to Maintenance Planner again, and start a new Maintenance Transaction.
      2. Alternatively, if you do not wish to uninstall the SCV,

        1. In SUM execution, choose to keep the same version as the IS_SELECT phase of SUM execution.

        2. You would need a proper attribute change package for this.

       

      Do you have any advice on how to proceed?

       

      Best regards,

      Jill