Problem solve Get help with specific problems with your technologies, process and projects.

How to delete processed IDocs

One of your earlier responses indicates that "In nearly most cases it is safe to delete IDoc that come from an...

ALE scenario (like BW) as soon as they are sent out or processed successfully." My question is, how can we delete them? Is this a simple process or do we have to configure everything for archiving? We are on 4.6C. Thanks! There is no regular housekeeping utility to delete the IDocs. The official way is to archive the IDocs via transaction SARA. However, a simple ABAP that deletes the IDocs from the three tables and cleans up the log files will do. Deleting IDocs only is done like this:

Select-options: s_docnum for edidc-docnum. Data: tedidc type standard table of edidc with header line. Select * from edidc Into table tedidc where docnum in s_docnum. Loop at tedidc. Delete edid4 where docnum eq edidc-docnum. Delete edids where docnum eq edidc-docnum. Endloop. Delete from table tedidc. .

Some IDoc handlers write application logs, so it would be neat to kill those entries also, unless the app log is not cleaned on a regular basis.

Dig Deeper on SAP ABAP

Join the conversation


Send me notifications when other members comment.

Please create a username to comment.

IDocs are generally considered technical objects. Whether you need them to archive or delete, it depends upon your corporate retention policy.
Another thing that you should consider is custom reports. Are there any reports out there where you need to read historical data? If so then you may have to archive the IDOC instead of deleting it.

WE11 is a good SAP standard tool to delete IDOC but here are few issues:
1. IDoc selection is based upon some Dates and Message Type. So no way to restrict based upon IDoc numbers.
2. Program does not check the status. It will delete all the IDOCs that are selected based upon selection criteria entered.
3. No details provided as to which IDoc is deleted?

Hi experts,
i want to know if i am deleting Idocs then there is any impact on other modules? ex. HR module?