Archiving Data in SAP Systems
Data archiving in SAP systems removes mass data from the that is no longer required in the system but should remain available for future analyses. The Automation Engine provides for centrally controlled data archiving.
Data to be archived is pooled in "archiving objects" (e.g. the archiving object SD_VBAK contains all data concerning sales records). Archiving runs are integrated using the Archive Development Kit (ADK). ADK provides the technical basis for the archiving transaction (SARA).
Usually, a separate program flags data to be archived based on configurable residence periods. Flags are often used in two steps: After the end of residence period 1 (e.g. 6 months), a deletion annotation is set and after the end of residence period 2, the deletion annotation becomes a deletion flag. Now the object can be archived.
The archiving process is basically divided into four steps:
- Pre-run (deletion annotation):
Flags data that should be archived. A pre-run can also be performed regardless of the time frame specified for the archiving run.
- Creating archive files:
During the archiving process, the data to be archived is sequentially written into newly created archive files.
- Starting the deletion program:
Based on the generated archive files, the deletion program removes the archived data from the database.
- Storing the archived files:
The newly created archive files can finally be stored in a filing system or manually stored on tape. The storing process can be initiated automatically or manually.
Transaction SARA provides for a manual or a semi-automatic (deletion, storage) archiving process. AE fully automates archiving runs in all SAP releases.
For archiving data outside transaction SARA please adhere to the following notes:
- 458670 Data archiving with an external job scheduler
- 133707 Data archiving outside transaction SARA
Controlling with AE
From the technical point of view and regardless of the object to be archived, archiving runs in SAP systems always consist of four steps:
- Writing program (WRI)
The write program deals with pre-runs and the creation of archive files. It is capable of running in the background, parameters can be set using a variant.
- Deletion program (DEL)
The writing program automatically creates a deletion (DEL) job for each archiving file, if this has been specified in the relevant archiving object's customizing. The DEL job contains the deletion program.
- Storing the archived files (STO)
The deletion program creates a storing (STO) job. The STO job contains the storing program.
- Possible post processing (END)
Post processing jobs are also automatically created. They are not available for all archiving objects.
Requirements in the SAP System
- Automatic deletion program
Specify in the archiving object's customizing that the deletion program starts automatically.
- DEL, STO and END jobs must not start automatically in SAP.
For controlling these jobs with AE, their automatic start in the SAP system must be prevented. The function "Job Interception" serves this purpose as of release 4.6C. Activate it with the ABAP program INITXBP2. The interception table must contain the job names of the DEL, STO and END jobs of all archiving runs.
Objects
The entire process is handled with a workflow which contains 3 steps:
- Starting and monitoring the writing program
The AE function "Submit ABAP program" creates a WRI job in SAP and monitors it until it ends.
- Starting and monitoring deletion jobs
The AE function "Select and start intercepted jobs" starts and monitors DEL jobs created by the WRI job.
- Starting and monitoring storing jobs
The AE function "Select and start intercepted jobs" also starts and monitors storing jobs created by the DEL jobs.
Procedure
- Workflow activation
Use the :READ mask to query the name of the archiving object.
- Workflow Monitor
Select or specify the archiving object and the workflow automatically starts and is displayed in the monitor. It only ends when all processing steps ended successfully.
- Monitoring and control
The entire procedure can be traced within Automation Engine and SAP. AE provides all logs for automatic analyses. In SAP, the procedure can also be traced in the administration function of the relevant archiving object (transaction SARA).
Conclusion
SAP data archiving is easily implemented using AE's standard functions and offers various advantages:
- Complete automation
The entire SAP system management can be automated using the Automation Engine for controlling the data archiving processes. Manual interference is not necessary. Mutual dependencies to other processes are easily implemented.
- Cost reduction
Archiving data on a regular basis provides for optimized database dimensions, improves performance and saves memory. With AE, these advantages are centrally controlled and automatically processed without the accumulation of additional costs.
- Optimum resource balance
Resources can optimally be used due to the central and automated control, thereby avoiding conflicts and shortfalls. Smooth SAP operation is guaranteed.
- High reliability
Automation considering all system parameters significantly reduces the number of possible error sources.
- Work relief for staff
SAP experts are relieved from cumbersome manual tasks and can apply their expertise in areas of significant benefit: in improving systems and service levels.
- Central control and overview
All processes in the SAP system are centrally monitored and controlled. Potential problems are immediately noticed which reduces troubleshooting times to an absolute minimum.