How to reinstall the Support Package Manager from the command line in SAP Basis

1. Introduction
As of SAP Basis Release 3.0D, SAP delivers Support Packages to remove any error that appears in important transactions. A Support Package is a bundle of corrections that fixes errors in the ABAP repository. They are available for download through the Software Distribution Centre at the SAP Service Marketplace (http://service.sap.com/PATCHES).

Support Packages are installed using the so-called Support Package Manager (transaction SPAM). As with all software components, newer versions of the Support Package Manager are made available on a regular basis. Their installation processes might look strange at first sight. The old Support Package Manager, available in the system is used to install the new. During the procedure, the old one is replaced with the newer version.

What if something went seriously wrong during the installation of the Support Package Manager? In a best-case-scenario, SPAM offers the option to re-start the installation. In a worst-case-scenario, the failure occurred during a critical phase of the installation process. The installation cannot be repeated, as the tool to install it is no longer there. A full database restore is an option, but not realistic. A database restore just to retrieve the Support Package Manager is a little bit too much to ask for.

As an alternative, the Support Package Manager might be installed from the command line. This is what this tip is all about.

2. Upload and disassemble the SPAM upgrade
During the upload, the support package archive is copied to the transport directory. It is converted to a transport request during the disassemble process. The disassembling is automatically done when the support package is being installed. This cannot be done on the target system because transaction SPAM is no longer there.

However, SAP systems which reside in the same system landscape share the transport directory. Another system can be used to upload and disassemble the SPAM package.
1. Connect to one of the other SAP systems in your landscape. Remember, SPAM is operated from within client 000.
2. From within the Support Package Manager, upload the SPAM archive from the front-end (in the menu 'Support Package' --> 'Load' -- > 'From the front-end').
3. Disassemble the Support Package. In the menu, go to 'Utilities', 'Disassemble Support Package'. Choose the SPAM archive and confirm.


Figure 1: Transaction SPAM, disassemble the archive manually

3. Install the Support Package Manager manually
Install the Support Package Manager using the command line.

1. As user adm, connect to the server.

2. Open a DOS box or Telnet session.

3. Go the transport directory:
# cd H:\usr\sap\trans\bin

4. Use tp to add the transport to the buffer:

# H:\usr\sap\trans\bin>tp addtobuffer SAPKD62018  U1 pf=TP_DOMAIN_.PFL
sapparam: sapargv( argc, argv) has not been called.
sapparam(1c): No Profile used.
sapparam: SAPSYSTEMNAME neither in Profile nor in Commandline
This is tp version 340.15.01 (release 640)
Warning: Parameter DBHOST is no longer used.
Warning: Parameter DBNAME is no longer used.
Addtobuffer successful for SAPKD62018
tp finished with return code: 0
meaning:
Everything OK

NOTE: The in TP_DOMAIN_.PFL is the of the Transport Domain Controller. This is not necessarily the same as the system into which you wish to import the SPAM transport request.

5. Import the transport request:

H:\usr\sap\trans\bin>tp import SAPKD62018  U26 pf=TP_DOMAIN_.PFL
sapparam: sapargv( argc, argv) has not been called.
sapparam(1c): No Profile used.
sapparam: SAPSYSTEMNAME neither in Profile nor in Commandline
This is tp version 340.15.01 (release 640)
Warning: Parameter DBHOST is no longer used.
Warning: Parameter DBNAME is no longer used.
This is R3trans.exe version 6.09 (release 640 - 03.12.04 - 10:34:00).
R3trans.exe finished (0004).
sapevt.exe=>sapparam(1c): No Profile used.
sapevt.exe=>sapparam(1c): No Profile used.
sapevt.exe=>sapparam(1c): No Profile used.
This is R3trans.exe version 6.09 (release 640 - 03.12.04 - 10:34:00).
R3trans.exe finished (0004).
sapevt.exe=>sapparam(1c): No Profile used.
sapevt.exe=>sapparam(1c): No Profile used.
sapevt.exe=>sapparam(1c): No Profile used.
sapevt.exe=>sapparam(1c): No Profile used.
tp finished with return code: 4
meaning:
A tool used by tp produced warnings
6. In SAP, try transaction SPAM. Voila, after a few compiles the Support Package Manager reappears!

2 comments:

rust said...

good job

Jenice said...

You have made an excellent blog. Whenever I find any difficult I just visit it and got the respective solution to my problem related to SAP. Thanks for writing and sharing information.
sap support packs

topics