Sometimes you need to delete some specific data from a data provider. As it is specific, you just can’t delete a package as this package might contain more data then you want to delete. Of course, you can use the “selective deletion” option within the “Contents” part (while managing the data provider),

blog0

but this is error prone and not easily reproducible…or schedulable within a process chain.

Luckily SAP created transaction DELETE_FACTS which is able to generate a deletion ABAP program for which its selection criteria can be saved as a variant and the generated ABAP program can be scheduled/embedded in a process chain.

  • Step 1: Execute transaction DELETE_FACTS
  • Step 2: Fill the data target for which you selectively want to delete data and check radio button “Generate deletion program”. Do not forget to enter the name of the program which needs to be generated, eg ZDELETE_DSO
  • blog2
  • Step 3: Fill the deletion criteria and store them as a variant (by pressing F11)
  • blog3
  • Step 4: Check, via transaction SE38 or SA38, if the ABAP program has been successfully generated
  • blog4
  • Step 5: Optional: Execute ABAP ZDELETE_DSO, schedule it or embed it in a process chain

Hopefully this small tip will make your life a bit more easier….