Insights · SAP Basis

Cleaning up technical tables: SAP housekeeping for production and copies

Application logs, IDocs, work items and other logs grow for years in many SAP systems without anyone needing them. In SAP HANA, this dead weight occupies main memory, in production and often in every copy too. This article explains which technical tables are typical, which standard reports and housekeeping jobs you can use to clean them up and where deleting is not enough.

Last updated: 7 October 2026 · By Tobias Foltermann, Founder

Why technical SAP tables grow

Technical tables store what the system writes for communication, logging, administration and analysis: interface messages, logs, job logs, spool requests. After a short time, hardly anyone needs them for day-to-day business. However, they only disappear from the database if a job regularly deletes or archives them.

SAP has long described the problem in SAP Note 706478: Basis administration tables grow considerably if entries that are no longer needed are not regularly deleted or archived, or if the configuration is not correct. The note mentions application logs, IDocs, work items, change pointers and table logs, among others. SAP Note 2388483 provides a continuously maintained overview of tables, responsible areas, SAP Notes and clean-up methods.

In SAP HANA, this weighs more heavily than before. Less data there means less main memory, CPU and disk space. And because QA, test and sandbox systems are usually copies of production, each of them pays for the dead weight again. More on this on the page Reducing HANA memory in QA, test and sandbox.

Finding the largest tables

Measure before you clean up. Transaction DB02 shows the largest tables. For SAP HANA, the sizing report /SDF/HDB_SIZING also provides an overview (SAP Note 1872170). Compare the list with SAP Note 2388483: for each technical table, it lists the relevant SAP Notes and the clean-up method. SAP itself recommends this approach as a quick win, long before a full archiving project takes effect.

Look not only at the size but also at the age of the entries. An IDoc table with the messages of the last few weeks is normal. One with ten years of history shows that a job is missing or the retention period is wrong.

Typical candidates and how to clean them up

The following selection is based on SAP Notes 706478 and 2388483. Which tables stand out in your system depends on interfaces, workflows and custom developments.

AreaTables (selection)ToolApproach
Application logBALHDR, BALDATSLG2 or report SBAL_DELETE, archiving via BC_SBALDelete after expiry date
IDocsEDIDC, EDID4, EDIDSArchiving object IDOC (SARA), WE11 (RSETESTD) deletes without archivingArchive or delete after consultation
WorkflowSWWWIHEAD, SWWLOGHIST, SWWCNTP0Archiving object WORKITEM, RSWWWIDE not in productionArchive
Change pointers (ALE)BDCP2, BDCP, BDCPSTransaction BD22Delete processed and obsolete ones
Table logsDBTABLOGSCU3, report RSTBPDELAgree with internal audit
Change documentsCDHDR, CDPOSArchiving objects of the application or CHANGEDOCUBusiness-relevant, only after consultation
SpoolTSP01RSPO0041 or RSPO1041Delete after retention period
Background jobsTBTCO, TBTCPRSBTCDEL2Delete after retention period

Setting up SAP Basis housekeeping jobs

Standard jobs take care of the basic clean-up. According to SAP Help, they should run regularly in every production system. The most important reorganisation jobs:

JobReportTask
SAP_REORG_JOBSRSBTCDEL2deletes obsolete background jobs
SAP_REORG_SPOOLRSPO0041deletes obsolete spool data
SAP_REORG_ABAPDUMPSRSSNAPDLdeletes obsolete ABAP short dumps
SAP_REORG_BATCHINPUTRSBDCREOdeletes obsolete batch input sessions
SAP_REORG_UPDATERECORDSRSM13002deletes obsolete update requests
SAP_REORG_JOBSTATISTICRSBPSTDEdeletes obsolete job runtime statistics data

For spool requests, report RSPO1041 offers more selection options than RSPO0041 and is intended as its replacement (SAP Note 130978).

In SAP S/4HANA, the ‘Standard Jobs’ function in SM36 has been replaced for technical jobs. The technical job repository schedules them automatically. In transaction SJOBREPO, you can see which job definitions SAP delivers and schedules, and change or deactivate them within limits (SAP Note 2190119). Which jobs are included depends on the release.

So check three things in every system: do the jobs actually run, which retention periods do their variants use, and what is missing? The reorganisation jobs above concern Basis administration. For application logs, IDocs, work items and change pointers, check whether a job exists and, if not, schedule one with your own variant. Application logs, for example, are deleted by report SBAL_DELETE, which you can schedule in the background via SLG2. Only expired logs are deleted, unless a log has been released for deletion before expiry.

Delete, archive or coordinate

Not every technical table can simply be emptied. Three cases can be distinguished.

  • Delete only: Spool requests, job logs, short dumps, old batch input sessions, processed change pointers and expired application logs lose their value after a retention period. The deletion reports are sufficient here. Define the retention period once, together with those who analyse errors.
  • Archive: In production systems, you delete work items via archive administration with the archiving object WORKITEM. Report RSWWWIDE deletes without archiving and, according to SAP, should not be used there. IDocs can serve as evidence of business transactions. You archive them via the object IDOC after defining in WE47 which statuses can be archived. Application logs that have to be retained are archived via BC_SBAL.
  • Coordinate with the business: Change documents (CDHDR, CDPOS) record who changed which field and when. Applications write them for legal or technical reasons, and some have to be retained for a long time. They belong in the archiving concept, not in a housekeeping job. The same applies to table logs (DBTABLOG), which record changes to logged tables, especially in Customizing. Here, the business department and internal audit decide.

Clarify retention periods. How long data has to be retained is determined by law, contracts and internal requirements. Clarify this with the business department, internal audit and data protection before the first deletion run. This article is not a substitute for a legal review.

What housekeeping means for every copy

Whatever has been cleaned up in production no longer ends up in any copy. A system copy transfers the entire database, so every clean-up has an effect here. A client copy transfers the client-specific tables, including IDocs, work items, change pointers and change documents. Fewer entries there mean a shorter copy and a smaller target system.

How strongly data volume determines the runtime is shown in the article Speeding up an SAP client copy. The basics, from the transactions to the follow-up tasks, are covered in the article SAP client copy.

Housekeeping is not a substitute for archiving. It concerns technical data. Documents, postings and master data remain untouched. How to reduce the volume of application data for good is described in the article SAP archiving in S/4HANA.

Not copying dead weight in the first place

Housekeeping reduces the source. For the copy, there is a second lever: not transferring tables that nobody needs in the test system at all. The Data Refresh Operator excludes them using exception lists down to table level. DRO copies application data as a time slice, for example the last 90 days, plus all dependent objects from earlier years. The system measurement in the control system shows the database sizes of all connected systems and thus where cleaning up and excluding pays off. DRO runs on SAP S/4HANA from release 2023.

–75%
HANA RAM in non-production
–60%
Storage & backup

Guideline values from reference scenarios. The actual effects depend on system size, history and refresh cycles.

Would you like to hand over housekeeping as a clearly defined task, from setting up the jobs to monitoring the retention periods? We take care of this as part of our SAP Basis operations.

Sources

How big are your test systems?

In a free demo, we show you DRO live using your own use cases – remotely and with no obligation. We discuss where the benefits lie for memory, refresh time and operating costs, and how you can try DRO in your own landscape.

  • Benefits specific to your use cases
  • A live look at time slice, dependency resolution, export and import
  • Answers directly from the team behind DRO

We use your details solely to arrange the appointment. Details in our privacy policy.