SAP Archiving Transaction Codes by Stage: From Table Analysis to Retrieval

Key Points

  • SARA is the central SAP archiving tcode: it schedules the write, store and delete runs for each archiving object, such as FI_DOCUMNT.
  • Sizing comes first: DB02 shows the largest tables, DB15 maps each table to its archiving object, and TAANA counts records by field value.
  • An archiving object bundles tables with write, delete and read programs; AOBJ defines it, while FILE and SF01 decide where archive files land.
  • Archived documents stay visible in FB03 or VA03 only after SARJ fills the matching infostructure, a step that is easy to miss.
  • Document archiving runs on ArchiveLink codes such as OAC0 and OAC2, while DART codes such as FTW1A produce data extracts for tax audits.
  • Archon keeps archived SAP data readable through prebuilt screens for most transaction codes, even after the system that ran SARA is retired.

An aerospace and aviation group had an S/4HANA migration deadline and an SAP ECC database that had never been archived. There was no archiving configuration and no retention policy. The database was adding 80 GB of new data every month. More than 100 custom development objects needed individual assessment before anything could move.

Every month of delay made the migration larger.

No single SAP archiving tcode could fix that. The way out was a sequence of transactions, each one answering a single question:

  • Which tables are growing, and how fast?
  • Which archiving object owns each table?
  • How will archive runs be configured, stored and monitored?
  • How will users find documents once they leave the database?

Archon built that sequence from scratch, across standard and custom archiving objects. The group cut its SAP database by 35% and unblocked the S/4HANA migration.

Every transaction in that sequence belongs to one of five stages: analyze, configure, run, access, and retain. Most tcode lists give you the codes. Few explain the order, or what happens to archived data once the SAP system that wrote it is switched off.

What Is an SAP Archiving Tcode?

An SAP archiving tcode is a transaction code that runs one step of data archiving inside an SAP system. Some codes measure database growth. Others configure archiving objects, run archive sessions, or read archived data back.

Most of them orbit one transaction. SARA, Archive Administration, is where archive runs are scheduled, monitored, and managed. The other codes either prepare for SARA or deal with what it leaves behind.

Five terms explain how the codes fit together:

Term What It Means Where You Meet It
Archiving object The unit SAP archives. An archiving object describes which database objects must be bundled to form a complete business object, such as an FI document or a sales order. AOBJ, DB15, SARA
Archive Development Kit (ADK) The SAP framework that writes archive files and reads them back Behind every SARA run
Archive file The file a write run creates. Standard archiving produces ADK files that are read back through SAP. SARA, AS_AFB
Residence time The minimum time a record must spend in the database before it can be archived Archiving object customizing
Archive infostructure An index over archive files that lets SAP find archived documents SARJ, SARI

These codes are the hands-on layer of a wider discipline. SAP archiving also covers strategy, tool choice and compliance, and the transactions are where those decisions turn into jobs.

Why the Archiving Sequence Matters Before S/4HANA

SAP keeps every document unless someone decides otherwise. On SAP HANA, that history sits in memory the business pays for. It slows backups and system copies. It also inflates the volume an S/4HANA conversion has to move.

The deadline is fixed. SAP’s mainstream maintenance for Business Suite 7 core applications ends in 2027. Optional extended maintenance runs to the end of 2030, at a premium. Teams planning around ECC end of maintenance have a shrinking window to decide how much history moves with them.

The conversion path raises the stakes further. A brownfield conversion carries existing data into S/4HANA. Every terabyte left unarchived adds runtime, downtime and HANA sizing.

The growth rate tells you how urgent the work is. A practical rule of thumb for SAP database growth control uses three bands of monthly growth:

Monthly Database Growth Suggested Response
Under 1 GB No action needed
1 to 5 GB Technical cleanup of logs and temporary data
Over 5 GB Technical cleanup plus an evaluation of functional archiving

The aerospace group was growing at 80 GB a month, sixteen times the top threshold. At that rate, each year of delay adds close to a terabyte. That is why archiving before an S/4HANA move works best as a sequence, not a single job.

Growing more than 5 GB a month? Your S/4HANA conversion is growing too.

SAP Archiving Tcodes by Stage

Each stage answers one question. The tables below list the SAP archiving tcodes a Basis or archiving team uses at that stage, in the order a project reaches them. The fifth stage, retention, runs on its own toolsets, DART and SAP ILM.

Stage 1: Analyze and Size

Start with facts about the database, not a list of objects.

Tcode What It Is When You Use It
DB02 Tables and Indexes Monitor Rank the largest tables and indexes and track growth. Newer releases route database monitoring through DBACOCKPIT.
DB15 Data Archiving: Database Tables Enter a table to see which archiving objects remove its data or enter an object to see its tables.
TAANA Table Analysis Count records by field value, such as company code or fiscal year, to see how much data would qualify.

On SAP HANA systems, SE16H offers similar grouping and counting. One DB15 detail is easy to miss. It lists only archiving objects that delete data from the table. Objects that only read a table, or archive it indirectly through views, do not appear.

Stage 2: Configure

Tcode What It Is When You Use It
AOBJ Archiving Object Definition Display archiving objects and their settings or define custom objects for Z-tables.
SAR_OBJ_IND_CUS Cross-Archiving-Object Customizing Maintain settings that apply across all archiving objects.
FILE Cross-client file names and paths Define the logical file names and paths for archive files.
SF01 Client-specific file names Define logical file names that apply to one client only.
AL11 SAP directories Confirm the target directory exists on the application server.
OAC0 CMS Customizing Content Repositories Define the content repository where archive files will be stored.
ACLA Define Archiving Classes Maintain archiving classes for data that several objects share, such as long texts.

Stage 3: Run and Monitor

Tcode What It Is When You Use It
SARA Archive Administration Build variants, schedule write, delete and store runs, and review archive sessions.
SM37 Background job overview Watch the jobs each archive run starts and read their logs.
FB99 FI archivability check Check why individual FI documents cannot be archived yet.

Stage 4: Access Archived Data

Tcode What It Is When You Use It
SARI Archive Information System Search archived data through infostructures and check their status.
SARJ Archive Retrieval Configurator Create, activate and fill infostructures and their field catalogs.
SARE Archive Explorer Browse archived data object by object.
AS_AFB Archive File Browser Look inside archive files at table level.
FB03, VA03 Application display transactions Display archived FI and sales documents directly once the matching infostructure is filled.

Inside an Archiving Object: Tables, Programs and Settings

Every run in SARA executes an archiving object. Knowing what sits inside one explains many archiving errors before they happen.

FI_DOCUMNT archiving object linking SAP tables to write, delete and read programs

An archiving object has four parts:

  • Tables: The database tables that make up one business object. FI_DOCUMNT covers BKPF headers, BSEG line items and the cleared item indexes. In S/4HANA, it also covers the ACDOCA Universal Journal table.
  • Programs:
  • A write program creates archive files without deleting anything.
  • A delete program reads those files and removes the archived rows.
  • A read program displays archived data.
  • Some objects add preprocessing, postprocessing, or reload programs.
  • Customizing: Residence times, logical file names, the content repository, and store and delete settings.
  • Archiving classes: Shared data, such as long texts and change documents, archived together with the object and maintained in ACLA.

The main archiving object tcode in SAP is AOBJ, where objects are defined and displayed. DB15 tells you which object owns a table. SARA runs it. For FI documents, the programs follow a naming pattern: FI_DOCUMNT_WRI writes, FI_DOCUMNT_DEL deletes, and FI_DOCUMNT_PST handles postprocessing.

Common archiving objects and their main tables:

Archiving Object Business Data Main Tables
FI_DOCUMNT Financial accounting documents BKPF, BSEG, BSAS, BSAK, BSAD (ACDOCA in S/4HANA)
SD_VBAK Sales documents VBAK, VBAP
MM_EKKO Purchasing documents EKKO, EKPO
MM_MATBEL Material documents MKPF, MSEG (MATDOC in S/4HANA)
IDOC Intermediate documents EDIDC, EDID4, EDIDS
BC_SBAL Application logs BALHDR, BALDAT
WORKITEM Workflow work items SWWWIHEAD

Table lists shift between releases, so DB15 is the final word for your own system.

Custom Z-tables have no standard archiving object at all. Covering them means defining a custom object in AOBJ, with its own write, delete and read programs. The aerospace group had more than 100 custom objects to assess, and each one needed its own decision.

How an Archiving Run Works in SARA

SARA is the SAP archiving tcode that does the actual moving. Each run is a session with a fixed order, and the order protects you from deleting data that was never safely stored.

SARA archiving session moving data through write, store, delete and infostructure indexing steps

  1. Check prerequisites: Documents must be complete and past their residence time. For FI documents, FB99 shows why a document still fails the check, such as open items. Activate the matching infostructure in SARJ now, so this run gets indexed.
  2. Create a variant and run the write job: In SARA, select the archiving object, choose Write and build a variant by company code, fiscal year or another selection. Run it in test mode first. The write program creates archive files and deletes nothing.
  3. Store the archive files: The files move to the content repository defined in OAC0, such as SAP Content Server or certified storage. With store before delete switched on, this step finishes before any row is removed.
  4. Run the delete job: The delete program reads the data back from the archive file, then deletes it from the database.
  5. Check the index: In SARI, confirm the new archive files appear in the infostructure. Activation applies to future archive runs only, so files from earlier runs must be filled separately in SARJ.
  6. Monitor and close out. SM37 shows each background job and its log. SARA’s management view shows every session and its status.

Tcodes for SAP Document Archiving

SAP archives two different kinds of content.

  • Data archiving moves structured records, such as FI documents, out of database tables through SARA.
  • Document archiving stores files, such as scanned invoices, outgoing forms and attachments, through SAP ArchiveLink.

There is no single tcode for document archiving in SAP. Each step has its own:

Tcode What It Is When You Use It
OAC0 CMS Customizing Content Repositories Define where documents are stored, such as SAP Content Server or a certified storage system.
OAC2 SAP ArchiveLink: Global Document Types Define document types, such as incoming PDF invoices.
OAC3 SAP ArchiveLink: Links Link business objects and document types to a content repository.
OAWD SAP ArchiveLink: Store Documents Store incoming documents and assign them to business objects.
OAAD ArchiveLink Administration Documents Search, display and manage documents already stored.

OAC0 matters for more than archive files. Unless a content repository is configured there, every document attached through Generic Object Services lands in SOFFCONT1, a table inside the SAP database itself.

That table can grow large. A global logistics company carried 45+ TB across ECC, BW and SOFFCONT1. Archon moved 27 TB of SOFFCONT1 content to the archive and preserved every document link. Another 10 TB left through archiving objects. Teams working to reduce SOFFCONT1 table size see a smaller HANA memory footprint, shorter backups, and faster system copies.

Chart compares database size before and after archiving: ~45 TB total before, ~8 TB after, ~37 TB removed.

In one landscape, attachments made up 27 of the 37 TB removed.

Retention and Audit: DART and SAP ILM

Archiving decides where data lives. Retention decides how long it must stay, and when it may go. Two SAP toolsets handle that work.

DART for tax and audit extracts

DART, the Data Retention Tool, extracts tax-relevant data into files that auditors can review. It reads both active data and data already archived through ADK. Teams planning a SAP DART implementation work with this family of codes:

Tcode What It Is When You Use It
FTWP Settings for data extraction Configure what DART extracts and where the files go.
FTW1A Extract Data Run a DART data extract.
FTWD Verify data extract checksums Confirm an extract has not changed since it was created.
FTWF Data extract browser Browse the contents of an extract.
FTWH Data view queries Define views and queries over extract files.

SAP ILM for retention rules and destruction

In S/4HANA, information lifecycle management attaches retention rules to archiving objects.

Tcode What It Is When You Use It
IRMPOL ILM Policies Set retention rules per object and condition, such as company code or document type.
ILM_DESTRUCTION Data Destruction Destroy archived data once its retention period has expired.

SAP ILM also manages legal holds, which block destruction while a matter is open. Holds and destruction together form the basis of defensible deletion. Each destruction run should trace back to a written data retention policy, and each block to a specific legal hold.

Both toolsets share one limit. They run inside the SAP system, so the retention rules in IRMPOL live in the same system a decommissioning project plans to switch off.

Retention rules should outlive the system that set them.

Where SARA-Based Archiving Breaks Down

SARA itself is rarely the problem. Projects stall in the work around it.

Challenge Why It Happens What to Do
Archived documents vanish from FB03 or VA03 The infostructure was never activated or filled. Activation covers future runs only. Activate infostructures before the first productive write run, then fill them for older files.
Runs stop on dependencies SAP will not archive an object while its preceding objects are still in the database. Check the network graphic in SARA and archive in sequence.
Custom Z-tables have no object Standard archiving objects cover standard tables only. Define custom objects in AOBJ, or use a tool that extracts custom tables directly.
Technical tables keep growing IDocs, application logs and work items get left for later. Schedule IDOC, BC_SBAL and WORKITEM alongside functional objects.
A previous project left partial data Abandoned tools leave half-ingested archives and no retention framework. Re-ingest with validation against the source before new runs begin.
The archive depends on the system that wrote it SARI, SARE and FB03 read ADK files only through a running SAP system. Plan long-term archive access before the decommissioning date is set.

A global apparel group hit several of these at once. A previous vendor’s archiving project had been abandoned. It left partially ingested data, broken ingestion pipelines and no coherent retention framework. Archon re-ingested the data with validation and archived FI and CO, MM, SD and PP alongside IDocs, logs and work items. It also built a repeatable archival factory for future acquisitions.

Best Practices for Using Archiving Tcodes in SAP

Each step below applies general data archiving best practices to the SAP toolset.

  1. Measure before you pick objects. Rank tables by size and growth in DB02 and TAANA. Then use DB15 to find the object that owns each one.
  2. Let the business set residence times. Finance, tax and legal decide how long records stay online. Basis configures what they decide.
  3. Start with technical data. IDocs, application logs and work items rarely need business sign-off, so they make a good first wave.
  4. Switch on store before delete. No row should leave the database before its archive file is safe in the repository.
  5. Activate infostructures before the first productive run. Filling them later for older files works, but it adds a separate job.
  6. Test every variant in a quality system. Run write jobs in test mode first and compare record counts.
  7. Archive in dependency order. The network graphic in SARA shows which objects must go first.
  8. Schedule recurring runs. A one-time project shrinks the database once. A cadence keeps it lean.
  9. Decide on long-term access early. Using each SAP archiving tcode correctly still leaves ADK files tied to SAP. Settle how they will be read before the system retires.

Keeping Archived SAP Data Readable After the System Is Retired

SAP’s retrieval codes all need a running SAP system. SARI, SARE and FB03 read ADK files through SAP itself. That works while the system runs. Once a SAP system decommissioning project switches it off, the archive goes dark with it.

Archived SAP data access compared while SAP runs, after retirement and with Archon

Archon is built for that point. It works alongside SAP’s standard archiving instead of replacing it. Archon’s SAP archiving solution adds:

  • ADK file access: Archon reads the ADK archive files that SARA produced, so their data stays accessible outside SAP.
  • Familiar screens: Prebuilt screens give users access to data from most transaction codes. Predefined ECC transaction screens keep archived data accessible after the source system is decommissioned.
  • Custom objects without guesswork: AI-powered discovery identifies custom objects and tables and maps them for extraction.
  • Search across systems: Metadata-driven search and the Query Visualizer cover archived SAP and non-SAP data.
  • Retention in one view: A compliance dashboard shows retention policies, legal holds and regulatory obligations.

The results come from real SAP landscapes:

Organization Starting Point Result
Aerospace and aviation group No archiving baseline, 80 GB monthly growth, 100+ custom objects 35% smaller database, S/4HANA migration unblocked
Global logistics company 45+ TB across ECC, BW and SOFFCONT1 About 37 TB removed, zero data loss, delivered on deadline
Global apparel and accessories enterprise Historical data from acquisitions and divestitures across FI and CO, MM, SD and PP 40% smaller database, $1.3M saved in storage, 65% less audit preparation time

The choice between SAP ADK and Archon for ECC decommissioning comes down to one question: does the archive need SAP to stay readable?

SARA moves the data. Whether anyone can still read it in ten years depends on what happens after the last SAP system is switched off.

Retiring ECC? Make sure your archive does not retire with it. See how Archon reads ADK files and keeps archived SAP data searchable through familiar ECC screens after decommissioning. Schedule a Call → https://www.archondatastore.com/contact/

Frequently Asked Questions

The main tcode for archiving in SAP is SARA, Archive Administration. In SARA, you select an archiving object such as FI_DOCUMNT, create a variant, and schedule the write, delete and store runs. Related codes support it: DB15 and TAANA for analysis, AOBJ for object settings, and SARI for finding archived data afterward.

You view archived data through the Archive Information System, transaction SARI, once an archive infostructure is active and filled. SARE, the Archive Explorer, browses archived objects, and AS_AFB shows archive file contents. Display transactions such as FB03 and VA03 can also show archived documents when the matching infostructure exists. All of these need the SAP system that wrote the archive to be running.

Use transaction DB15. Enter the table name in the Object for Table field to see which archiving objects archive and delete its data. You can also enter an archiving object to list its tables. DB15 does not show objects that only read a table or archive it indirectly through views, so check the object documentation for those cases.

SARA archives data, and SARI finds it again. SARA, Archive Administration, schedules and manages the write, delete and store runs for archiving objects. SARI, the Archive Information System, searches archived data through infostructures that index archive files. SARJ configures those infostructures. Without an active, filled infostructure, SARI cannot return archived documents.

Document archiving runs through SAP ArchiveLink, so it uses several tcodes rather than one. OAC0 defines content repositories, OAC2 defines document types and OAC3 links business objects to repositories. OAWD stores incoming documents, and OAAD manages stored ones. Archon can act as the content repository through a configuration change in OAC0, which keeps new attachments out of SOFFCONT1.

DART, the Data Retention Tool, uses a family of FTW transaction codes. FTWP holds the extraction settings, FTW1A runs a data extract and FTWD verifies extract checksums. FTWF browses extract contents, and FTWH defines data view queries. DART exports tax-relevant data from active and ADK-archived records into files that auditors can review.

Not with SAP’s own retrieval tools. SARI, SARE and FB03 read ADK archive files through the SAP system that wrote them, so switching that system off locks the archive. The data stays reachable only if it first moves into an archive that can read it independently. Archon processes ADK files and keeps the data accessible through predefined ECC transaction screens.

You archive a custom Z-table by creating a custom archiving object in AOBJ, with its own write, delete and read programs written in ABAP. Standard archiving objects cover standard SAP tables only. Each custom object then needs customizing and testing before SARA can run it. Archon supports custom objects and tables directly, using AI-powered discovery to find and map them for extraction.

Archon © 2026, All rights reserved.