Wednesday, July 18, 2018

Trouble Removing a Custom Package and Add-On from your SAP System...

So I recently came across this issue with a friend and colleague:

A customer requested that we remove a 3rd party SAP add-on they were no longer using from their SAP system. The package was causing unnecessary complexity each time they applied service packs or performed an upgrade. Normally an add-on can just be excluded from the upgrade or update and it will no longer exist in the newly updated system, however this particular package would not cooperate. The original vendor said they would not help with removal because it was not designed to be uninstalled, so the customer asked if we could take care of it.  As a side note, I think it is pretty bad form for a 3rd party software developer to design and sell an SAP add-on product that cannot be removed or not provide a method to do so.

After the usual process of identifying and deleting the objects within the package, we continued to find remnants of the product in the system.  To make a very long story short, after much head-scratching and research, we were finally able to get the add-on removed.  Here are the things we had to do in order to get the more difficult pieces out of the system:

First off, after deletion go to SE80 and display the package. Right-click the package, choose Others>Rebuild Object List in the context menu. Here you can check whether there are other objects which are not yet deleted. If there are no objects shown in the package, then release the change request. Then try to delete the package. (note: the entry in table TADIR will not be deleted until you release the change request)

Secondly, you may run into some orphaned object entries. To find objects that still have object directory entries, you can search the TADIR table for your package (DEVCLASS) and see what entries are there.  If there are objects listed that truly do not exist in the system, the entries can be removed from this table. 

CAUTION: only remove TADIR entries if you are absolutely sure they do not exist, otherwise you will create orphaned objects in the system.

To find orphaned objects in your system, run transaction STDR. Here you can also clean up the object directory manually or en masse.

After all of this, you may also run into some OTR entries that still prevent you from deleting the package. The way to get rid of these is with report BTFR_DELETE_HEADERS.

Finally, the package contents were all gone and we were able to successfully remove it from the system.

Hope this helps...