SAP Archiving Process and Configuration Steps - SAP Blogs
SAP Archiving Process and Configuration Steps - SAP Blogs
Community
Technical Articles
Shashidhar Thumma
October 7, 2020 | 17 minute read
Follow 8 33 61,034
Hello All,
Like
SAP HANA (In fact Any DB which implies with SAP), SAP’s in-memory database
system is extremely rich in features and has the capacity to process several
RSS Feed terabytes of data without a sweat. As data volumes and size is growing
exponentially, customers/corporate ITs are now in various stages of considering
migrating to SAP on HANA.
While building the business case for such migration, we need to most definitely
consider implementing some proven best practices to bring down the overall cost
of such migration. One such best practice is the archiving of SAP data before the
migration. With the larger size of structured and unstructured data, the need to
archive SAP data is very critical but not often discussed best practice.
There are several reasons why this is a best practice to implement now:
https://blogs.sap.com/2020/10/07/sap-archiving-process-and-configuration-steps/ 1/30
2/24/23, 4:03 PM SAP Archiving Process and Configuration Steps | SAP Blogs
>SAP Charges on HANA based on volume: The more data you’ve got to process,
the more expensive it’s going to be.
>Data supposed to grow will be a certain intrinsic value. Any data that is seldom
used should be archived to have a good performance for SAP HANA. Therefore,
one needs to create a plan to archive old, not often used data that is not critical to
on-going real-time operations. A spare system always brings down costs at the
time of SAP migration.
SAP HANA stores data on a persistence layer (data and logs). When you start
your database the data is loaded into the physical memory. Not all the data is
loaded into the memory at this moment. Only those tables that have the
PRELOAD flag enabled will be loaded into the memory. It is also possible to
enable the PRELOAD flag just for some columns of the table.
The SAP HANA database will load tables and columns into memory when those
are required. This could happen because of explicit access, explicit load, index
load/recreation after optimizing compression, etc. For example, if I execute a
SELECT * FROM TABLE and I have enough memory that table will be fully loaded
into memory in case it wasn’t. If it is a huge table (like tens or hundreds of GB)
then OOM situations could appear.
On the contrary, HANA unloads tables from memory in certain situations. For
example, when the SAP HANA database runs low on memory, on
MERGE/SHRINK situations or when the UNLOAD of the table was explicit. A high
number of loads/unloads could affect the performance of the system since the
database have to bring the table/columns before the process using it can access
it. You can read a lot about LOAD/UNLOAD operations in SAP HANA in the SAP
Note 2127458 – FAQ: SAP HANA Loads and Unloads.
If we don’t archive or delete data from our database sooner or later we will run
out of memory. When HANA runs of memory when OOM situations start to
appear and people scream because the process is being canceled. Also, if we run
Calculation Views on the SAP HANA database (for example from a BW Load
Chain) the number of rows managed by the calculations views will increase. This
means that the calculation view will take more memory to be processed, more
time to finish, etc.
https://blogs.sap.com/2020/10/07/sap-archiving-process-and-configuration-steps/ 2/30
2/24/23, 4:03 PM SAP Archiving Process and Configuration Steps | SAP Blogs
Data Archiving, in general means moving huge volumes of the data that is no
longer required in the database to some file system or any third-party storage
system. It is functionality provided within SAP applications for the consistent
removal of data objects from database tables of the SAP database, where all
table entries that characterize a data object are written to an archive file outside
the database.
Data Archiving only “frees up” space in the database during the archive delete job
Index Reorganization
Tablespace Reorganization
“Archiving” refers to the process associated with copying data and supporting
documents from an active system (SAP) to an external source (Open Text) for the
purpose of deletion and/or storage for later retrieval.
Here in my blog post will be covering only ‘Classical Data Archiving’ at present
scenario:
https://blogs.sap.com/2020/10/07/sap-archiving-process-and-configuration-steps/ 3/30
2/24/23, 4:03 PM SAP Archiving Process and Configuration Steps | SAP Blogs
Note: The logical file name must already have been maintained with the
transaction FILE (Definition of logical file paths).
https://blogs.sap.com/2020/10/07/sap-archiving-process-and-configuration-steps/ 4/30
2/24/23, 4:03 PM SAP Archiving Process and Configuration Steps | SAP Blogs
Delete Jobs
> Do Not Schedule
The delete jobs are not started automatically.
https://blogs.sap.com/2020/10/07/sap-archiving-process-and-configuration-steps/ 5/30
2/24/23, 4:03 PM SAP Archiving Process and Configuration Steps | SAP Blogs
Note: If Start Automatically is selected in the delete program settings, the delete
program is called after saving the file. It makes no difference whether the delete
program is in test or production mode. Analogously, the delete jobs are
scheduled and started automatically after the event, if After Event is selected.
Save your entries and go back to the initial screen of the transaction AOBJ.
Important settings to set
Max size in MB or the max objects
Check the variants (some variants for production have still deliberately the
test tick box as on: you have to change it)
Best to leave the delete jobs to Not scheduled (large archiving runs can create
many files and many deletion jobs to kick in at the same time): best to do this
manually in a controlled way
Start storage automatically or manually is a choice for you
Best to store before deletion. This is the most conservative setting.
Best to delete only from the storage system: if file is not stored properly in any
way, deletion will not have. This is the most conservative setting.
https://blogs.sap.com/2020/10/07/sap-archiving-process-and-configuration-steps/ 6/30
2/24/23, 4:03 PM SAP Archiving Process and Configuration Steps | SAP Blogs
Tx. DB02:
Tx. DB15:
https://blogs.sap.com/2020/10/07/sap-archiving-process-and-configuration-steps/ 7/30
2/24/23, 4:03 PM SAP Archiving Process and Configuration Steps | SAP Blogs
1. Structure Definition
The Structure definition contains the list of the database tables from which the
data will be archived. This is pre-configured for the Standard SAP Archive
Objects.
https://blogs.sap.com/2020/10/07/sap-archiving-process-and-configuration-steps/ 8/30
2/24/23, 4:03 PM SAP Archiving Process and Configuration Steps | SAP Blogs
https://blogs.sap.com/2020/10/07/sap-archiving-process-and-configuration-steps/ 9/30
2/24/23, 4:03 PM SAP Archiving Process and Configuration Steps | SAP Blogs
https://blogs.sap.com/2020/10/07/sap-archiving-process-and-configuration-steps/ 10/30
2/24/23, 4:03 PM SAP Archiving Process and Configuration Steps | SAP Blogs
Archive Programs
The mentioned programs in the SAP system should be assigned to the Archiving
Objects.
1. Preprocessing (Optional)
This program prepares the data for archiving making the data setting for deletion
indicator to X, but it does not delete any data from database. It just operates with
database.
2. Write
https://blogs.sap.com/2020/10/07/sap-archiving-process-and-configuration-steps/ 11/30
2/24/23, 4:03 PM SAP Archiving Process and Configuration Steps | SAP Blogs
It creates new archive file and writes the data in them. At this point, no data is
been deleted from the database. The write programs can be executed in two
processing modes.
Test mode
Production mode
In Test mode, no archive files will be created whereas in Production mode, Archive
files will be created.
3. Delete
This program reads the data from the archived files and deletes the data from the
database. The delete programs can be executed in processing modes:
Test Mode
Production Mode
In the Test Mode, the log after the execution shows the entries of the data to be
deleted from the database, whereas in the Production Mode it shows the
statistics of the deleted data from the database.
Check Archivability
Checking the Archivability of the Business objects precedes the actual archiving
process. This should ensure that the data is not archived if some other
application still needs it. The business objects are considered to be archivable if
it:
https://blogs.sap.com/2020/10/07/sap-archiving-process-and-configuration-steps/ 12/30
2/24/23, 4:03 PM SAP Archiving Process and Configuration Steps | SAP Blogs
3. Does not serve as the basis for business objects for later updating in
database.
Residence Time: Amount of data which will be available in online before it meets
Archivability criteria.
Retention Time: It is the entire time where data spends in Archive format before it
gets deleted from the actual database.
https://blogs.sap.com/2020/10/07/sap-archiving-process-and-configuration-steps/ 13/30
2/24/23, 4:03 PM SAP Archiving Process and Configuration Steps | SAP Blogs
If an Archive file is created by the write program, then it’s a physical file name is
derived from a logical file name.
In the same way, the physical pathname is derived from a logical pathname. The
logical file name and the logical path should be maintained to get an appropriate
physical file name and physical pathname.
https://blogs.sap.com/2020/10/07/sap-archiving-process-and-configuration-steps/ 14/30
2/24/23, 4:03 PM SAP Archiving Process and Configuration Steps | SAP Blogs
First, determine the target directory in which you want to create the archive files
of a certain archiving object. The physical name of the directory is stored in a
logical pathname.
https://blogs.sap.com/2020/10/07/sap-archiving-process-and-configuration-steps/ 15/30
2/24/23, 4:03 PM SAP Archiving Process and Configuration Steps | SAP Blogs
Suppose, You have created a subdirectory called “archiving” for archive files in
the global directory. The physical pathname should be defined as follows:
https://blogs.sap.com/2020/10/07/sap-archiving-process-and-configuration-steps/ 16/30
2/24/23, 4:03 PM SAP Archiving Process and Configuration Steps | SAP Blogs
https://blogs.sap.com/2020/10/07/sap-archiving-process-and-configuration-steps/ 17/30
2/24/23, 4:03 PM SAP Archiving Process and Configuration Steps | SAP Blogs
2. Give the variant and click on the maintain button. Next screen is displayed.
4. This is the selection screen for Preprocessing. Provide the selection criteria as
per the requirements and click on “Attributes”.
https://blogs.sap.com/2020/10/07/sap-archiving-process-and-configuration-steps/ 18/30
2/24/23, 4:03 PM SAP Archiving Process and Configuration Steps | SAP Blogs
5. Give the meaning for the variant here and click on “save”
https://blogs.sap.com/2020/10/07/sap-archiving-process-and-configuration-steps/ 19/30
2/24/23, 4:03 PM SAP Archiving Process and Configuration Steps | SAP Blogs
https://blogs.sap.com/2020/10/07/sap-archiving-process-and-configuration-steps/ 20/30
2/24/23, 4:03 PM SAP Archiving Process and Configuration Steps | SAP Blogs
11. Repeat the same procedure from 2 to 10 for Archiving object MM_EKKO
(Purchase Documents) using write program by maintaining the Variant ‘TEST2’
along with same selection criteria as given for preprocessing program and click
on ‘Execute’ button.
ARV_MM_EKKO_SUB*******
ARV_MM_EKKO_WRI*******
For remaining storing and deleting jobs are performing with the same process as
did for preprocessing and write programs. Below are the jobs where it is triggered
for remaining programs for various Archive objects MM_EBAN, MM_MATBEL and
completed successfully.
13. Select the Job and Click on the Spool to view the output.
https://blogs.sap.com/2020/10/07/sap-archiving-process-and-configuration-steps/ 21/30
2/24/23, 4:03 PM SAP Archiving Process and Configuration Steps | SAP Blogs
Users can check the Archive Information system by clicking on the ‘Information
System’ button in the Archive Administration (Tx. SARA).
https://blogs.sap.com/2020/10/07/sap-archiving-process-and-configuration-steps/ 22/30
2/24/23, 4:03 PM SAP Archiving Process and Configuration Steps | SAP Blogs
Creating an Infostructure
Every Archive file accessed using Archive Information System is through
Infostructure. Every Infostructure belongs to a unique Archiving objects and also
refers to the field catalog. A field catalog is the collection of fields suitable for
indexing the archive files of Archiving object concerned. All the data related to
Infostructure is maintained in database tables.
https://blogs.sap.com/2020/10/07/sap-archiving-process-and-configuration-steps/ 23/30
2/24/23, 4:03 PM SAP Archiving Process and Configuration Steps | SAP Blogs
Activating an Infostructure:
To use an Infostructure, the user must activate the Infostructure. All the standard
Infostructure will be already activated. Only after activating the Infostructure it
can be filled with data from an archive file and evaluated.
Evaluating an Infostructure:
https://blogs.sap.com/2020/10/07/sap-archiving-process-and-configuration-steps/ 24/30
2/24/23, 4:03 PM SAP Archiving Process and Configuration Steps | SAP Blogs
The data from the archive files can be retrieved using “Archive explorer” by Tx.
SARE, or by clicking on “Archive Explorer” button in the Archive Information
System.
Conclusion
This blogs gives detail process flow “Strategy” and configuration steps
“Approach” which overall portrays designing part of Data Archiving.
You can recover the archived data using reload programs. During the process, the
reload program reads the data from the archive files and then reinserts it into the
operational database. However, this is only permitted in an emergency (for
example, if the Customizing settings are incorrect or there are technical
problems). To avoid misuse of these functions and the risk of inconsistencies
occurring through bringing old data into the operational system, you can only
reload archived data to the operational database within a period of five days after
successful archiving.
“Archiving your SAP Data” by Ahmet Türk, a reference book by SAP Press.
Alert Moderator
Assigned Tags
SAP HANA
SAP NetWeaver
SAP R/3
View more...
SAP BTP Data & Analytics Showcase – Load data into SAP HANA Cloud using SAP Data Intelligence
By Wei Han May 27, 2021
Related Questions
Data Tiering Optimization and Data Archiving for SAP S/4HANA
By Shruti Mishra Nov 30, 2021
https://blogs.sap.com/2020/10/07/sap-archiving-process-and-configuration-steps/ 26/30
2/24/23, 4:03 PM SAP Archiving Process and Configuration Steps | SAP Blogs
8 Comments
Roland Kramer
March 12, 2021 at 9:32 am
nice an comprehensive Blog about the SAP Archiving Process and the Configuration.
In case you are not aware, you can also use the SAP IQ Database for various data targets as well.
Like 0 | Share
Abhilash Pradhan
June 14, 2021 at 8:12 pm
I have a question, We want to archive deliveries and all associated documents along with it . We have
checked individual objects and all are working. Is there a process where we can run all the archiving objects
at once ?
Similar for Sales order , we want to run a single program or tcode and archiving everything for the sales
order, deliveries, shipment, GI , Invoices . Is there something in standard for the same .
https://blogs.sap.com/2020/10/07/sap-archiving-process-and-configuration-steps/ 27/30
2/24/23, 4:03 PM SAP Archiving Process and Configuration Steps | SAP Blogs
Regards,
Abhilash
Like 0 | Share
Philippe Pfleger
September 16, 2021 at 7:45 am
I was told that it CANNOT and therefore we became very conservative and keep a longer period of data in
the database until we have upgraded to S4HANA and tested those applications.
Thanks
Philippe
Like 0 | Share
Ahmed Amer
December 14, 2021 at 12:10 pm
Does the Sandbox contain table data that can be archived for testing?
Like 0 | Share
B. Groot
December 24, 2021 at 9:11 am
Can archived data be moved to another SAP system, e.g. in case of selling part of a company?
In sap note 460620 it is mentioned that a DM< service can be performed for this. Also, an "archive
migration for archive files" can be used using the ADK. However, no additional information can be found on
this, except for some specific PI archiving object:
https://blogs.sap.com/2020/10/07/sap-archiving-process-and-configuration-steps/ 28/30
2/24/23, 4:03 PM SAP Archiving Process and Configuration Steps | SAP Blogs
https://help.sap.com/viewer/0158596e99ae4f7386f5c302d343368c/7.5.22/en-
US/45e42d7265b66976e10000000a1553f6.html
Bart
Like 0 | Share
Ron Buchanan
April 19, 2022 at 8:51 pm
Can an infostrucuture be migrated to another environment or does it need to be created in the new
environment?
Like 0 | Share
Martin Steger
April 20, 2022 at 7:38 am
Hi Shashidhar,
after archiving is finalized - what is the best approach to get rid of archived data which has reached the
retention time?
Can i simply delete the archive files from the archiving file sytem?
Like 0 | Share
https://blogs.sap.com/2020/10/07/sap-archiving-process-and-configuration-steps/ 29/30
2/24/23, 4:03 PM SAP Archiving Process and Configuration Steps | SAP Blogs
Troy DesBarres
February 10, 2023 at 4:55 pm
Hi Shashidhar,
This is a very good article thank you so very much for putting it all together. I have one question that I can't
seem to get my head wrapped around.
Once the Store is done and I see the archived document in a directory structure and its given a document
id. Where is that document id then stored in SAP. Will they all reside in ADMI_FILES under the
ARCH_DOCID column or is it a different table depending on the Archive Object?
Like 0 | Share
Find us on
Newsletter Support
https://blogs.sap.com/2020/10/07/sap-archiving-process-and-configuration-steps/ 30/30