Application Development Blog Posts
Learn and share on deeper, cross technology development topics such as integration and connectivity, automation, cloud extensibility, developing at scale, and security.
Showing results for 
Search instead for 
Did you mean: 

Problem Description

When we have a Package which contains a "lot" of sub objects and we want to delete entire Package or bunch of objects under the package.

The problems we might face are:

A) Manual Deletion of objects requires lot of time and we need to delete all the sub objects, release the transport and then delete the Package .

B) Deletion of package in a non development system becomes a problem as we need to delete them in the development system manually

and  then move the transport across the landscape. And if we want to delete only in a Q system requires complex strategy.

So these problems can be simplified if we have a Deletion transport which would just delete the objects where we want.

Definition of a Deletion Transport:

Basically the definition of a deletion transport in our context is a transport in which all the objects are listed and marked for deletion & When we import this transport into any system the listed objects are deleted.


When we talk about situations , it could be of a need when we are implementing a short term 3rd party solutions ( e.g smartShift's smartUpgrade tool) , System Maintenance or a POC project etc.

Lets say

1) You have done a POC in a system and at the end you want to delete all those objects ( say from an IDES system ) .

2) You want to delete the objects in a quality system for some reason, but you dont want these objects to be deleted in the development system .

3) You are doing a maintenance of the development system and want to clean up the list of test objects.

Solution :

There is a field OBJFUNC in E071 table ( Object list of a Transport ). When OBJFUNC is 'D' the activity of the transport on this object would be "Deletion".

But mere setting of this flag in the transport data wont convert a transport into a deletion transport.  The D indicator works only when the objects are not present in the system ( See below screen shot and short text of the field ) .

So we need a dummy system where our objects are not present and we create a transport in that system with Deletion indicator . This is explained in detail in further section.

What you need :

1) First thing you need is "The problem" itself, Only when you really have this problem then this post makes some sense to you.

2) A Dummy system where none of these to-be-deleted-objects  exist. ( Say IDES or any Other development system than your main development system )

3) Some basis authorization who can help you in Create / Release / Download the K , R files ( In case you dont have the authorization ) .

Steps :

A) From the main system,( Where the objects actually exist) Download the object header data from TADIR into a tab delimited text file   , The first 3 fields are the only required data ( i.e The fields PGMID , OBJECT , OBJ_NAME of the TADIR table ) .

We use this data to create the  TADIR entries in the dummy system. A TADIR entry is mandatory to add the object to a transport.

Caution: Review your object list once it is downloaded. Make sure only those objects which you wanted to delete are present

B) Create the below report program in the Dummy System where we Generate the transport.

Program specification is as below:

B1)  Create a Selection screen parameter P_FILE to read the object list file.

Create a Selection screen parameter P_TRKORR , for the "Deletion Transport"

Create a Selection screen parameter P_DEVC for entering a Z dummy devclass

B2) Read the file into an internal table IT_TADIR

B3) Process the IT_TADIR to 1) Create a Dummy entry into TADIR 2) Create an entry into the transport

B4) Sample Code snippet




            W_TABIX = W_TABIX + 1.

     *Step1 Create a Dummy Entry into TADIR ,

            W_TADIR-DEVCLASS = P_DEVC.   " Any dummy development class other than $TMP


     *Step2 Create an entry into the transport object list , E071

            W_E071-TRKORR = P_TRKORR.     " The input deletion transport

            W_E071-AS4POS = W_TABIX .        "Sequence of the object within the transport

            MOVE-CORRESPONDING W_TADIR TO W_E071. " Header data of the object

            MODIFY E071 FROM W_E071.         " Update the standard table E071 for transport


C) Once the program is ready, then Create a Workbench transport with a Target System ( Can be a Virtual System, just to get the transport files ) and a Dummy Development Class.

Execute the program in the dummy system with mandatory input as object list file , deletion transport , and the dummy devclass.

After the execution is complete, The transport will be loaded with the objects with Deletion Indiactor and the object list looks like below :

D) Release the transport and Download the K (\usr\sap\trans\cofiles\ ) and R (\usr\sap\trans\data\ ) files of the transport.

E) Your "Terminator" transport is Ready!!!  Import the deletion transport into the required system where you wanted those objects to be deleted.

Sample Diagram of the Steps and Process


The development class you use in the Dummy system doesn't have any affect . And it need not be same as the original development class in which the real objects are in.

The deletion transport should have a target assigned so that it generates the K and R files when it is released.

!caution! Make sure you are Importing this transport into "Required" systems and remove it in the import Q once it is imported.!!