SAP Data Archiving Strategy
SAP Data Archiving Strategy
Approach
Moving data out of the SAP online database via an archive file to a
storage medium
SAP Data Archiving Strategy
Document Control Information
Document Information
Name Organization/Title
1. Introduction
Performance Improvements:
o Reduced database growth rates
o Improved system performance
o Improve storage and capacity
o Reduced back-up and recovery times
o Reduced data management costs
Legal Requirements:
o Many countries require companies to adhere to paperless tax audits
o Auditors may require direct access to a system to analyze all relevant system data
o Data archiving flexibility enables custom programs to meet the legal requirements of various
countries and industries
o Compliance with Records Managements retention requirements
Archiving within the context of a SAP system refers to the removal of data that is no longer required
on the production database. Yet, in order to fulfill business and legal retention requirements, some
form of retrieval will be necessary.
Correct archiving procedures ensure that:
o Disk space and performance problems caused by the growth in the volume of transaction data
do not become critical.
o Statutory data retention rules are observed.
o Archiving processes do not interrupt business flow.
o System maintenance is very efficient
To meet the needs of the SAP system, three forms of archiving are possible: data archiving, data
purge, and document imaging.
R/3 system
DB
DB Interface
L Archiving
D ABAP/4 program class
B
Conversion of:
ADK: Codepage, record structures,
number formats
ArchiveLink Archive
file
The ADK also contains the selection variants, start time and date settings, spool parameters, object
dependencies, and object customization fields necessary to build the archiving solution.
The benefits of using the ADK are compression (optimally five times), ability to archive while the
system is active, dependency graphics, and access to individual data objects in the archive. It also
provides the means to Reload, Analyze, or Read data that has been removed from the database.
2.3.1 Reload
The Reload program provided in the ADK reads the archive file and repopulates the SAP online
database with the archived data. This method of retrieval is not recommended by SAP and may
cause data integrity problems. Therefore, while this option may be available for some archiving
objects, it should not be implemented as a retrieval solution.
By answering yes, a temporary structure for the data is created, and the user can display the data in
the same display screens as online data. As the name states, it is only possible to use this method of
retrieval on one document at a time. Furthermore, this feature is available for only a few objects
e.g. FI_DOCUMNT.
The user creates two objects for AS: 1) the Information Structure where some archived data will be
stored, and 2) the Field Catalog that will help define which data is stored in the Information
Structure.
First, the user creates the field catalog. The field catalog lists the SAP table fields that can be used as
key indexing fields and search criteria for the archived data. After the field catalog is created, the
user defines the info structure. The info structure will become a SAP table that contains data for
the fields specified by the associated field catalog.
As data is being archived (deleted) from SAP, the info structure (table) is being populated with the
archived data that corresponds to the fields listed in the field catalog. This data will act as an index
to retrieve archived data.
After the archiving job is complete, the user may use the info structure’s contents as search criteria
to retrieve archived data. The user can then drills down into a particular line item in the info
structure and view all archived data associated with the key fields. Currently SAP provides two
views – technical and business views of the data. Technical views break the data down into tables
and fields (as shown above). Business views list the data in a formatted display. It is only possible to
Page 10 SAP Data Archiving Strategy and
18-Nov-21 Approach
SAP Data Archiving Strategy
view a single document at a time.
At the time of printing, the outgoing document is sent to the print spool. From here the
document’s information will be sent in two directions. First, the document will be printed. If there
is no printing error, the document is sent through the SAP Archive Link where it is processed and
made available to the third-party document-imaging tool. The third-party tool stores and manages
the image.
When the document is processed in the Archive Link, information pertaining to the document is
indexed. Therefore, the user is able to retrieve the image through the SAP client.
There are several methods for storing and administering archive files:
1. Hierarchical Storage Management (HSM) systems: An HSM system simulates an infinitely large
file system. The archive file system created by the archiving process is included in the HSM
system. It is sufficient to maintain the relevant file path in archiving Customizing.
Communication using Archive Link is not necessary.
2. Storage system using SAP Archive Link: If an external storage system is connected using SAP
Archive Link, this storage system is instructed to store processed archive files at the end of a
successful deletion run.
3. Manual management: If you do not want to store the archive files in an external storage
system, the files can be managed independently by the IT department.
3. Technical Developer(s)
This is an optional role required in case of archival strategy is required on custom objects
In this phase/cycle, Archiving Schedule is finalized and executed. This schedule is based on every
object. Based on volume daily / weekly or monthly strategy is applied.
2. Archiving Administrator
Scheduling and executing archiving jobs
This is an ongoing phase where online storage and performance is monitored and modifications are
made to existing archiving objects if necessary.
2. Storage Administrator
Review backup and recovery procedures
Review storage allocation, hardware assessment, and directory structures
Milestone Deliverable(s)
5 Archiving Design for Standards & Templates Archiving object requirements specification
template
Archiving process design documentation
Performance metrics requirements
10 Volume & Performance Testing Completed VPT test templates per object
Completed VPT test case per object
Archiving Architect:
Responsible for the overall technical orchestration of the effort in support of the Client X project
leader. The specific value this role brings to the project is the depth of experience in orchestrating
the involvement of all the disparate technical and process teams associated with the archiving
project.
Responsible for understanding the archiving interdependencies between the functional aspects and
SAP basis requirements to support the archiving processes. This role will help outline the
requirements for designing the SAP Basis requirements for archiving.
Business Resources:
Run Support:
o Apps Management may need to provide research information regarding existing application
environment
o Basis may need to provide research information regarding existing database environment
Current SAP configuration knowledge may be required to provide insight on object configuration
and data structures.
o Responsible for understanding the archiving interdependencies between the functional aspects
and SAP basis requirements to support the archiving process.
o Experience of SAP archiving
o Responsible for primarily archiving targeted functional / application areas, second responsibility
for supporting another administrator. At this stage the workload for archiving has not been
clearly defined, however, initially a target of one administrator per application is recommended.
o Archive Management (write, delete, post-processing, read, index management)
Archive Monitoring (Incorrect and incomplete sessions, completed sessions and sessions to be
archived)
7. Archiving Procedure
7.1 Objective
In this exercise we will archive two FI Documents and will retrieve them from standard reports.
Archiving objects instruct the SAP archiving system to get the right tables when archiving specific
R/3 business objects. They are defined using transaction AOBJ.
The archiving objects are defined for different modules of a SAP system. For example, financial
accounting documents are archived via the archiving object FI_DOCUMNT, which comprises the
document header, company-code-dependent postings, change documents, SAP script texts and
other elements. Some archiving objects with their basic functionality are listed in the table below.
The archive files can be created using the write program for each Archiving object.
Use Transaction AOBJ to find out the Write, Delete, reload and other program for a particular
archiving object.
The archive files for FI_DOCUMNT can be created using the write program SAPF048. Create a variant
with an appropriate data for program SAPF048.
Once the variant is created, run the write program from transaction SARA
Choose the ‘Write’ option which will take you to below screen:
Use the variant created in SAPF048 program. Ensure to maintain the start date and Spool
Parameters for the background job to be triggered.
From the below spool list which is the output of the write program scheduled in background, you
can find the Archive File key, File session number, number of documents archived etc. parameters:
In transaction SARA, choose option ‘Delete’ and press ‘Archive Selection’ option:
Also mention the ‘Start Date’ and ‘Spool Parameters’ to schedule the program in background. Once
the program is scheduled in background it will delete the same records from the related FI tables.
Check the spool of the scheduled background job, you can find the number of deleted document as
‘2’.
Now check the documents in BKPF table and you can find the entries do not exists as they were
archived.
Page 22 SAP Data Archiving Strategy and
18-Nov-21 Approach
SAP Data Archiving Strategy
The name of the Archive info Structure might change as per the configuration settings.
Enter the required data and execute to see the archived data.
Use other transaction such as FBL3N, FBL5N to fetch the cleared Archived documents:
A list of transaction codes along-with the short description required for SAP Archiving can be found
in the dynamic menu. Go to transaction SDMO and enter search for the text as ‘Archive’.
Transaction DB02 is used to identify tables with high growth in data volumes and to compare
the table size after archiving and thus to monitor growth of the database tables.
Transaction DB15 is used to identify the Archive Objects, if you know the Database tables or if
you know the Archiving Object it displays the list of associated database tables for that
particular Archiving Object as Shown in the below figure.
* ---------------------------------------------------------*
* Purpose: This is a test program to demonstrate*
* the retrieval of archived data *
*----------------------------------------------------------*
REPORT ztest_arch NO STANDARD PAGE HEADING.
*----------------------------------------------------------*
* TYPE POOLS *
*----------------------------------------------------------*
TYPE-POOLS: rsds.
*----------------------------------------------------------*
* TYPE DECLARATION *
*----------------------------------------------------------*
TYPES: BEGIN OF ty_final,
archkey TYPE aind_arkey-archivekey, "Archive Key
bukrs TYPE bukrs, "Company code
belnr TYPE belnr_d, "Document Number
gjahr TYPE gjahr, "Fiscal Yr
END OF ty_final.
*----------------------------------------------------------*
* INTERNAL TABLE DECLARATION *
*----------------------------------------------------------*
DATA: t_final TYPE TABLE OF ty_final,
t_bkpf TYPE TABLE OF bkpf,
t_archptr TYPE TABLE OF aind_arkey,
t_frange TYPE rsds_frange_t.
*----------------------------------------------------------*
* WORKAREA DECLARATION *
*----------------------------------------------------------*
DATA: wa_final TYPE ty_final,
wa_bkpf TYPE bkpf,
wa_archptr TYPE aind_arkey,
wa_frange TYPE rsds_frange,
wa_rsdsselopt LIKE rsdsselopt.
*----------------------------------------------------------*
* WORK VARAIBLES *
*----------------------------------------------------------*
DATA: v_handle TYPE sy-tabix.
*----------------------------------------------------------*
* SELECTION SCREEN *
*----------------------------------------------------------*
SELECT-OPTIONS: s_bukrs FOR wa_bkpf-bukrs,
s_belnr FOR wa_bkpf-belnr,
s_gjahr FOR wa_bkpf-gjahr.
REFRESH t_bkpf[].
ENDLOOP.
SORT t_final.
DELETE ADJACENT DUPLICATES FROM t_final.
*----------------------------------------------------------*
* END-OF-SELECTION *
*----------------------------------------------------------*
END-OF-SELECTION.
LOOP AT t_final INTO wa_final.
WRITE:/5 wa_final-archkey,
30 wa_final-bukrs,
38 wa_final-belnr,
*----------------------------------------------------------*
* TOP-OF-PAGE *
*----------------------------------------------------------*
TOP-OF-PAGE.
WRITE:/5 'Archive Key' COLOR 5,30 'C.Code' COLOR 5,38
'Document No.' COLOR 5,53 'F.Year' COLOR 5.
WRITE:/5 sy-uline(55).
Selection Screen:
Output:
Volume is not just few gigabytes of data; we're talking about terabytes and petabytes in some cases.
When stored traditionally, gleaning insights from the massive amounts of data stored on hard disks
takes time - and it can lead to bandwidth issues. With SAP HANA, a business's data - even multiple
terabytes of it - is stored on in a memory where it can be accessed instantly. The ability to gather
information in real time is one of SAP HANA's biggest selling points. However, storing big data on
memory rather than on low-cost, high capacity hard disks is costly. Data archiving from HANA is a
technique used to lower the overall cost of SAP HANA. After all, if you no longer need data, why pay
to store it on one of the most expensive forms of storage. While controlling costs is certainly an
important factor when considering data archiving from HANA, it's not the only one. Data archiving
can improve business information and help ensure that your most critical information is readily
available.
Archiving from HANA improves business information by categorizing and indexing it. Whether you
need to look up a sales order from ten years ago or want to view the latest real time sales
information, integrating a data archive with SAP HANA is a winning combination. You'll be able to
quickly find old data (without having to pay a premium to store it in memory) and you'll have more
in-memory space available for current information. In addition, moving non-essential data from
HANA can improve the performance of other applications that may not be as capable as HANA is at
sorting through terabytes of data.