The installed system license of your AS ABAP is invalid because the installation or system number has been changed. This situation usually occurs if you are using a system copy. To install a license key with a new installation number or a new system number, you must delete the old license keys first. Since these old license keys are invalid, you can only log on with the automatic user SAP*. However, user SAP* is not allowed to delete licenses and you face the following message:
"... Only the administrator is allowed to delete licenses. When the valid system license has expired, only the user SAP* can log on to the system. In this case, it would be dangerous to delete a license.
This is why the user SAP* is never allowed to delete a license. ..."
As result you cannot delete the licenses via T-Code SLICENSE.
Environment
As of SAP BASIS 700 and as of the availability of OS level program saplikey according to SAP Note 1227762
Resolution
As no other user than the automatic user SAP* can login to the system the deletion of the license keys has to be made via command line tool saplikey.
The following SAP Help documentation provides the necessary steps for deleting license keys with OS level program saplikey:
Log on to the host on which the central SAP instance is running at operating system level as user <sid>adm.
First display a list of installed licenses. To do this, enter the command saplikey pf=<profile> -show.
Example
Example of a list of installed license keys
1. License Key:
------------------------------------------
System : TST
Hardware Key : A0123456789
Software Product : NetWeaver_ADA
Software Product Limit: 2147483647
Type of License Key : permanent
Installation Number : 0123456789
System Number : 012345678901234567
Begin of Validity : 20070101
End of Validity : 99991231
Last successful check : 20070921
Validity : valid
2. License Key:
------------------------------------------
System : TST
Hardware Key : Q2034602170
Software Product : NetWeaver_ADA
Software Product Limit: 2147483647
Type of License Key : temporary
Installation Number : 0123456789
System Number : 012345678901234567
Begin of Validity : 20070926
End of Validity : 20071024
Last successful check : 00000000
Validity : valid
3. License Key:
------------------------------------------
System : PRD
Hardware Key : G0016202933
Software Product : NetWeaver_ADA
Software Product Limit: 2147483647
Type of License Key : permanent
Installation Number : 0123456789
System Number : 111111111111111111
Begin of Validity : 20061018
End of Validity : 99991231
Last successful check : 20070919
Validity : invalid (wrong SID)
------------------------------------------
3 license keys listed.
In the above example, you can see that three license keys (two requested and one temporary) are installed in the system. Under the system names, notice that two license keys have been installed for the system TST and one license key has been installed for the system PRD. This could be the case if the you copied system PRD to the name TST and a requested license was then installed for the copied system TST. However, the old license key of system PRD still exists. You can no longer use this old license key in the new system and can therefore be deleted.
Delete the license key with the command saplikey pf=<profile> -delete <SID> <hardware key> <product>.
To delete all license keys, use the placeholder asterisk (*).
For example, to delete all license keys for NetWeaver_ORA, enter the following command: saplikey pf=<profile> -delete '*' '*' NetWeaver_ORA.
massap29:bhdadm 73> saplikey pf=BHD_D00_massap29 -delete BHP '*' '*' '*' SAP License Key Administration - Copyright (C) 2003 - 2016 SAP AG
Additional parameters ignored. 2 license key(s) were deleted.
IMPORTANT: License deletion was successful. In order to trigger the automatic systemwide license buffer refresh, please open/refresh transaction SLICENSE once. massap29:bhdadm 74> saplikey pf=BHD_D00_massap29 -show SAP License Key Administration - Copyright (C) 2003 - 2016 SAP AG
List of installed License Keys: ==========================================