Show TOC

Creating Archive FilesLocate this document in the navigation structure

Context

Archiving begins with the creation of an archive file. This includes the following steps:

  1. Creating an archive file with the write program

  2. Reading the data to be archived from the database (in background processing)

  3. Writing the data to the archive file

The creation of an archive creations continues until archiving is complete or until a restriction defined in archiving object-specific Customizing (maximum size or an archive file or maximum number of objects in archive file) has been reached. If archiving is not completed due to a restriction, the write program creates an additional archive file for the data that has not been archived.

If a restriction defined in Customizing is reached during archiving, Archive Administration continues with the deletion phase (if none of the following checkboxes have been selected in archiving object-specific Customizing. Start Automatically and Deletion Phase before Storage).

Note

It is always possible to schedule a write job, even outside of Archive Administration (transaction SARA), by using an external Job Scheduler. This enables an improved reconciliation of the data archiving processes with the other processes in your system environment.

More information: Scheduling Write Jobs Outside of Archive Administration.

Virus Scan

When you write archive files, you can run a virus scan on the data to be archived. The virus scan checks all data objects, which contain records with XSTRING fields (length of Byte sequence variable) or X fields (Byte sequence). Only these byte sequences or date types potentially contain viruses.

The ADK virus scan is integrated in the virus scan interface for SAP NetWeaver. You can activate and implement it as described there. The virus scan profile is called /SARC/ARCHIVING_ADK. It is deactivated when delivered. When the profile is active, the message " Virus Scan with Virus Scan Profile/SARC/ARCHIVING_ADK Active" appears in the job log of a write job. This message is always issued, even if no suspicious data objects has been detected.

If a virus is found, the ADK issues the message as follows: Virus <Name> found in Object <Structure Type> <Component>. The write program terminates with a system exception. The relevant session is handled the same as other terminated session (for example, technical reasons) in Archive Administration. Non-infected archive files that were written and completed correctly before the termination, remain intact.

Write Run Followed by Event

After the creation of all archive files for an archiving session has been completed, the Archive Development Kit (ADK) triggers the system event SAP_ARCHIVING_WRITE_FINISHED. As a result of the reaction to the system event, you have the option of scheduling subsequent archiving jobs automatically. These include refilling indexes or value help as well as saving archive files prior to deletion. The event parameter is always the number of the archiving session.

For additional automation of the archiving process, you can transfer the archiving session number to the function module ARCHIVE_GET_FILES_OF_SESSION. This determines the platform-independent name and path of the archive files that were written for an archiving session.

To define new jobs, use transaction SM36. To maintain events, use transaction SM62.

Procedure


  1. Call Archive Administration (transaction SARA).

  2. On the initial screen, enter the name of the archiving object in the Object Name field.

  3. Choose Write.

    A new screen, on which you can schedule a background job for the write program, appears.

    If archiving for the archiving object was executed or interrupted and if archiving files that have not yet been processed by the relevant deletion program still exist for the archiving session, the systems points this out.

    Caution

    Multiple archiving of data can lead to problems. For this reason, some archiving objects required that data does not exist multiple times this could lead to incorrect results, for example, in totals formation.

    Make sure that:

    • The new write job you want to plan does not select any data contained in the archived files that have not yes been processed by the deletion program.

    • No variants with overlapping selection values are used at the same time.

      Note

      If the variant you have chosen is already being used in another jobs, display these with the Jobs with Selected Variant pushbutton and delete if necessary.

  4. Use the F4 help to choose a variant. If there is no variant available, choose Variant and enter the relevant variant. For more information about variant maintenance, see Variant Maintenance for Archiving Jobs.

    Caution

    If, in archiving object-specific Customizing for the deletion program, the Start Automatically checkbox is selected and you have chosen a product variant for the write program, the deletion program then starts its product variant. This means that after archiving, the data is deleted from the database.

  5. Enter the Start Date and the Spool Parameter.

    Note

    Before you start archiving, you can use the Archive Directory pushbutton to determine the amount for available storage space in the current object-specific archive directory. However, this function is not suitable for HSM system.

Results

You have now entered all data required for the background job. To create the job, choose Execute.

Note

After all archive files have been completely written for a run, ADK starts the system event SAP_ARCHIVING_WRITE_FINISHED. This triggers subsequent processes, such as file backup using external tools.

The Goto menu offers access to the following: