Example: Archiving Data in SAP Systems

Data archiving in SAP systems removes mass data from the database that is no longer required in the system but should remain available for future analysis. 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:

  1. 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.
  2. Creating archive files:
    During the archiving process, the data to be archived is sequentially written into newly created archive files.
  3. Starting the deletion program:
    Based on the generated archive files, the deletion program removes the archived data from the database.
  4. 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:

  1. 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.
  2. 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.
  3. Storing the archived files (STO)
    The deletion program creates a storing (STO) job. The STO job contains the storing program.
  4. Possible post processing (END)
    Post processing jobs are also automatically created. They are not available for all archiving objects.

Requirements in the SAP System

  1. Automatic deletion program
  2. Specify in the archiving object's customizing that the deletion program starts automatically.

  3. DEL, STO and END jobs must not start automatically in SAP.
  4. 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:

  1. Starting and monitoring the writing program
    The AE function "Submit ABAP program" creates a WRI job in SAP and monitors it until it ends.
  2. Starting and monitoring deletion jobs
    The AE function "Select and start intercepted jobs" starts and monitors DEL jobs created by the WRI job.
  3. 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

  1. Workflow activation
    Use a request to query the name of the archiving object. For more information, see :READ and Requests .
  2. 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.
  3. Monitoring and control
    The entire procedure can be traced within Automation Engine and SAP. AE provides all logs for automatic analysis. 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.