The package cannot be deleted because it still contains objects

Recently i was making a cleansing project for ABAP codes in the system. Firstly i wanted to delete unused packages in the system. I have discovered some packages that does not contain any object. However when i tried to delete the package SAP gave “The package cannot be deleted because it still contains objects” error. Searching web, i have noticed that there can be orphaned objects which had beed deleted or exposed to package assignment change but has still an existing object direct entry in TADIR.

The prosedure for deleting this package has a few steps.

  • Find orphaned object that has still object directory entry, in order to achieve this give your target package to DEVCLASS of TADIR table. This will give you all orphaned objects.
  • Then according to object type either should you delete the entry from TADIR or should you change package assignment from TADIR.

Now what if you want to find out all orphaned objects in the system. SAP has provided STDR for this purpose. Below steps are required to determine these objects.

  • Schedule each job to scan ABAP development environment and find out the objects for each category.
  • Then clean up each categories objects by manualy with “Display Results” button or in mass with “Clean Up Object Directory” button

stdr

You may also like