ABAP---SAP Data Archiving

来源:互联网 发布:python 短信报警脚本 编辑:程序博客网 时间:2024/04/30 22:35
SAP Data Archiving
Overview

Currently, a large number of enterprises use SAP R/3 as a platform for integration of business processes. The continuous usage of SAP results in huge amounts of enterprise data, which is stored in SAP R/3. With passage of time, the new and updated data is entered into the system while the old data still resides in the SAP enterprise system.

Since some of the old data is critical, it cannot be deleted. The difficulty is keeping the data you want, and deleting the data you do not want. Hence, a SAP database keeps on expanding rapidly and enterprise systems, which have limited data retention abilities for a few years, suffer from problems such as data overflow, longer transaction processing times, and performance degradation.

The solution of this problem has led to the concept of Data Archiving in SAP. Data Archiving removes out-of-date data from the SAP database that the R/3 system does not need online, but can be retrieved on a later date, if required. This data is known as archived data and is stored at an offline location. Data Archiving not only consistently removes data from the database but also ensures data availability for future business requirements.

One rule of thumb is that in a typical SAP enterprise system, the ratio of data required to be online and instantly accessible to old data, which could be archived, and stored offline is 1:6. For example, if an enterprise has 2100 GB of SAP database, the online data, which is frequently used by SAP users will be 300 MB and the rest (1800 MB) will be scarcely used and hence can be archived.   

1.1 Data Archiving – Features

  • It provides a protection layer to the SAP database and resolves underperformance problems caused by huge volumes of data. It is important that SAP users should keep only minimal data to efficiently work with database and servers. Data archiving ensures that the SAP database contains only relevant and up-to-date data that meet your requirements.  
  • Data archiving uses hardware components such as hard disks and memory. For efficient data archiving, minimum number of disks and disk space should be used.  
  • It also reduces the system maintenance costs associated with the SAP database. In the SAP database there are various procedures such as, data backup, data recovery, and data upgrade. 
  • SAP data archiving complies with statutory data retention rules that are common and well-proven techniques.  

SAP data archiving can be implemented in two ways. In the next section both options will be discussed in detail.

2.0 SAP Data Archiving – Basic Components

SAP Data Archiving is the SAP supported method for data archiving in SAP enterprise systems. SAP Data Archiving enables the user to keep the size of sensitive enterprise database under control. Archiving capabilities in SAP R/3 are provided across all modules by a built-in, centralized component (SAP ADK, Archive Development Kit) and add-on components such as ArchiveLink®. Both these components deal with SAP data in form of special objects, known as Archiving Objects. 

This paper discusses in detail the basic process used by Archive Development Kit (ADK) and ArchiveLink® for data archiving. But before understanding ADK, it is important to understand the concept of Archiving objects.  

2.1 Archiving Objects

Archiving objects are the essential ingredients for archiving SAP data. An archiving object can be defined as a logical unit, which is obtained from SAP data objects. When data objects are combined on the basis of requirements, a business object is formed, which then can be archived.

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, SAPscript texts and other elements. Some archiving objects with their basic functionality are listed in the table below.

Archiving Object

Type of Archiving Object

Details

SD_AGREEM

Sales and Distribution

Through this you can archive arrangements and the associated conditions

W_PROMO

Retail

Using this object you can remove old promotion data from your system

MM_EKKO

Material Management

Using this object you can archive purchasing documents

SD_VBRK

Sales and Distribution

Using this object you can archive customer billing documents

FI_DOCUMNT

Finance

Using this object you can archive credit memo documents

PP_ORDER

Production

Using this object you can archive production orders

 Each archiving object has automated associated methods. The table given below describes these methods in brief. These methods are the functions or subroutines, which work with archived objects.

Access Type

Method

Description

ALL

ARCHIVE_OPEN_FOR_WRITE

Open archive file for writing.

 

ARCHIVE_OPEN_FOR_READ

Open archive file for reading

ARCHIVE_OPEN_FOR_MOVE

Open archive file to reload.

ARCHIVE_OPEN_FOR_DELETE

Open archive file to delete.

ARCHIVE_CLOSE_FILE

Close all archive files

Write access

ARCHIVE_NEW_OBJECT

Get new data object

 

ARCHIVE_SAVE_OBJECT

Write data object from data container to the archive file.

Read access

ARCHIVE_GET_NEXT_OBJECT

Read next data object into the data container from the archive file.

2.2 The Archive Development Kit (ADK) 

SAP provides the Archive Development Kit (ADK) for realization of secure and efficient archiving procedures, to support and simplify the development of archiving programs. ADK provides a development environment where programming code is written to call archiving objects. When the program is executed, the corresponding archiving files are created. Figure 1 illustrates this relationship.  

Figure1: Archive Development Kit

Image Source: SAP® white paper: Data Archiving and Archive Development Kit 

ADK creates the archiving files from archive objects. It acts as an interface layer between archiving objects and the archived files. To reduce the space consumed by the archived files, ADK compresses the data 5 times the normal data. Only data in clustered tables is left from being archived and stored, as it is, in the database.     

ADK is central to creating, opening, writing, reading and closing archive files, plus all administrative issues, from scheduling jobs to communicating with external storage systems.  

Another major function of ADK is to retrieve archived files. Archived files normally have an outdated database structure. ADK checks for the file format and encounters all potential problems, which may evolve due to such files. The major functions of ADK are shown in Figure 2.

Figure 2: Archive Development Kit Functions

The ADK is designed to use in client/server architecture. and provides an appropriate way of using system resources efficiently.  

2.3 ArchiveLink® - The Optical Archiving Method

ArchiveLink® is a SAP product that enables data archiving for business documents in an optical storage system. Through ArchiveLink® , one can store scanned original documents, outgoing documents, or print lists in optical systems. It is not possible to analyse them with R/3 tools or load them into R/3, without the help of third party software. Archive files created by R/3 data archiving, can be removed, analysed and reloaded through ArchiveLink ®. The Complimentary Software Providers (CSP) [or Third Party Software Providers] can also provide these solutions, which are integrated with the SAP system to archive data from the database. Their capabilities include:  

  • Scanning Documents
  • Conversion of documents to electronic form
  • Storing images on optical media
  • Data searching and retrieving functionalities    

3.0 The Archiving Procedure

3.1 Right Retrieval Strategy

An important challenge for SAP administrators is to find out the appropriate data for archiving. It is important to have knowledge of the business processes involved in the enterprise, prior to data archiving, so that appropriate archive objects are created. This helps in identifying database table growth and simplifies the process of identifying objects for archiving. 

3.2 Three Phase Archiving Process

Data archiving process comprises three major phases. They are:  

  • Creating an archive file
  • Removing the archived data from the database
  • Transferring the archived files to a location outside the SAP database 

Phase I - Creating Archive Files

The archived files of data are created in the SAP database by the Archiving Management system. The Management system reads the data from the database and writes it to the archive files in the background. In instances of archived files exceeding the maximum specified limit, or if the number of data objects exceed the stipulated limit in the system, then the system automatically creates new archive files. 

At the end of the process of saving data into archive files, ADK triggers the system event SAP_ARCHIVING_WRITE_FINISHED, which is an indicator to the system to start next phase of archiving process.

Phase II - Deleting files from the Database

While archiving management system writes data on the archive files, another program deletes it from the database permanently. The program checks whether the data has been transferred to the archive. It is quite important too as it is the last check performed by the system before deleting data permanently from the database. Several deletion programs run simultaneously, because the archiving program is much more faster than the deletion programs. This is important as it increases the efficiency of archiving process.

Phase III - Transferring Archive Files

Once the Archive management system has finished archiving the data, the next step is to save the archived files at a different location other than the SAP database. This can be accomplished by an automated process in the system or by a manual process. This step is optional since many enterprises may wish to keep the archived files within the current database. However, large enterprises transfer their data periodically as a part of their data archiving processes.

4.0 SAP Data Archiving - Support Tools

4.1 SAP Archive Administration (SARA)

All data archiving activities commence with Archive administration (transaction SARA). SARA provides the overall administration of archiving schedules and manages the archiving sessions. The process includes customization of objects, their conversion to archived sequential archived files and most importantly, their overall management. In addition to these, the archive administration process also retrieves the archived files and converts the data through an automated process, if there is a change in software, hardware or the data structure. The data archiving process is streamlined and simplified through the Central command of archiving administration. 

4.2 DART (Data Retention Tool)

A data retention strategy is required for retaining enterprise information for long periods of time. The Data Retention Tool (DART) provides this functionality. It is capable of extracting data, which is period-specific as well as any supporting information. DART transforms database objects into flat files that can be read by any third-party software designed for flat files. It is available as an add-on for older versions of SAP R/3, but is an integrated feature of the recent versions of SAP R/3.  

4.3 SAP Archive Information System (SARI)

SARI provides much-needed retrieval capabilities against previously archived data. It requires the archive files be loaded into new tables in the database. In this approach, AS requires detailed, technical knowledge of the database table structure and field layouts. Database structure of an enterprise needs to be flexible and dynamic to be able to quickly adapt to organisational changes. It might happen that the current database structure is not compatible with the structure of database when archive files were initially generated. Archive Information System is a standard tool delivered by SAP that facilitates customized access to the archived data.

 http://www.thespot4sap.com/SAP_Data_Archiving.pdf



Trackback: http://tb.blog.csdn.net/TrackBack.aspx?PostId=1623504


原创粉丝点击