In every SAP system, managing IDocs effectively is crucial—not only for performance but also for long-term data governance. Recently, I worked on IDoc Archival (write & delete only) for a client doing this for the first time. Here's the complete, detailed process I followed—including handling issues like undeleted IDocs, restricted statuses, and tips on using SARA .
Whether you're a consultant, admin, or BASIS team member, this guide is designed to help you implement IDoc archival without missing critical steps.
IDoc (Intermediate Document) archival is the process of transferring IDocs from the SAP database to an archive file and then deleting them from the system to improve performance and reduce storage costs. Archiving ensures compliance with data retention policies while keeping historical data accessible if needed.
Writing eligible IDocs into archive files: Identifies and extracts data that meets archiving criteria, then stores it in archive files for long-term retention.
Deleting those IDocs : After successful archiving, "delete" them from the database, effectively moving them to an external storage system, improving system performance.
This improves DB performance, frees up space, and helps meet compliance rules.
- IDoc archiving is not just about deletion. You must first archive (write) before you can delete.
- You must define a path for archive files ( FILE or AL11 ).
- Get authorization for SARA, WE47, WE09.
Navigate to transaction code SARA (Archive Administration) and enter the archiving object IDOC.
Choose the "WRITE" function for starting the archiving process.
Create or use an existing variant, as the variant defines the selection criteria and parameters for which IDocs will be archived.
Outcome: IDocs are now stored in the archive but still exist in the SAP database.
Note: The program behind this Write step is RSEXARCA.
Back in SARA, Choose the "DELETE" function for removing the archived IDocs from the SAP database.
Select the appropriate archive file created from the write program execution ,it specifies the source of the IDocs to be deleted.
Specify the start date and spool parameters , you can use the same when u executed "WRITE" step.
Execute the deletion process fro the remove of IDocs from the database and leaves them in the archive files.
Done! IDocs are now deleted from the database.
You can also directly run the report RSEXARCA to write IDocs to archive or the report RSEXARCD to delete them from the database.
If SE16N shows entries still in EDIDC after deletion, it’s usually due to status restrictions in WE47.
Certain statuses (e.g., error status) are not eligible for deletion unless explicitly allowed.
This should now remove those unwanted IDocs.
Sometimes you may want more control via report programs:
RSEXARCA | Archive IDocs |
RSEXARCD | Delete archived IDocs |
RSEXARCR | Read archive file |
RSEXARCL | Reload IDocs from archive |
IDoc archiving is a crucial piece of keeping your SAP system lean and efficient. This guide should help any consultant or admin confidently implement it, even on the first try. If you found this useful or have questions about specific issues, feel free to drop a comment below!
I hope this helps! Let me know your thoughts or if you have any questions.
Thanks,
Akshay Anil Linkedin Profile
Technical Consultant, SAP ABAP | BTP | Fiori | Ui5
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
12 | |
9 | |
8 | |
8 | |
7 | |
7 | |
5 | |
5 | |
5 | |
5 |