Show TOC

Process documentationData Archiving with the SAP Application Interface Framework

 

Data Archiving – a service provided by SAP NetWeaver – removes mass data that the system no longer needs online, but which must still be accessible at a later date, if required, from the database. In the SAP Application Interface Framework, archiving applies to the messages of the persistence layer. When a message from the persistence is archived, all related index table entries and application logs are archived as well. Proxy messages are not archived.

Prerequisites

Data in the database can only be archived using archiving objects, which describe the data structure and context. To set up Data Archiving (transaction code SARA) for the SAP Application Interface Framework persistence layer, you enter the name of the SAP Application Interface Framework-specific archiving object /AIF/PERSX in the Object Name field on the Archive Administration: Initial Screen.

The archiving for the persistency layer uses the Archive Development Kit (ADK) to provide the archiving object /AIF/PERSX, which includes all the necessary archiving programs and defines the structure of the archive file to be written. To maintain the archiving object, use transaction AOBJ.

All archiving programs maintained in the archiving object are started using Archive Administration (transaction code SARA).

Process

In the SAP Application Interface Framework, the archiving process for the persistence layer is divided into the following main steps, some of which are optional:

  1. Creation of archive files

    In the write phase, the data to be archived is written sequentially into newly created archive files.

    In the SAP Application Interface Framework, the Archiving of the AIF Persistence: Write Program report controls the writing process of the archive files produced by the archiving object /AIF/PERSX. You can decide which data should be archived using a variant and a selection screen.

    On the selection screen, you can choose to load data messages with one or more of the following statuses:

    • Processed Successfully

    • Processed with Warning

    • Canceled

    You can restrict the selection using dates, users, or message GUIDs. The parameter Residence Time is the number of days a message has to stay in persistence before it can be archived. The parameter Package Size for Selection specifies the package size that is used by the main SELECT-Loop while collecting the data for archiving.

    You can run the write program of the archiving object in test mode, which means that the program simulates the creation of an archive, based on your selection criteria and other archiving object-specific checks that test the data's suitability for archiving. The program does not create an archive file but does generate statistics about which table entries would be written to the archive and the size and number of archive files that would be created in production mode.

    Once you schedule the write process, you can monitor the corresponding job on the Job Overview screen.

  2. Deletion from the database

    The delete program reads the data from the archive files and deletes the data from the database.

    In the SAP Application Interface Framework, you can use the Archiving of the AIF Persistence: Delete Program report to control the deletion of persistence entries that have been written successfully to an archive file and to generate statistics about the table entries that were deleted.

    If you run the delete program of the archiving object in test mode, data is not deleted from the database as the deletion is only simulated.

    Once you schedule the deletion process, you can monitor the corresponding job on the Job Overview screen.

  3. Optional: Display of archive files

    You can use the Archiving of the AIF Persistence: Sequential Read Program report to display the data stored in archive files of the archiving object /AIF/PERSX. If you double click on a line, more details about the corresponding entry is displayed.

  4. Optional: Reloading of archive files

    You can use the Archiving of the AIF Persistence: Reload Program report to reload successfully archived data, produced by the archiving object /AIF/PERSX, to the SAP Application Interface Framework persistence layer.

    You can also run the reload program in test mode. The reload is only simulated and there are no changes made to the database.

    To start the reload program, on the Archive Administration: Initial Screen, choose Start of the navigation path Goto Next navigation step Reload End of the navigation path. Once you select a successfully deleted archiving session, maintain the variant, and schedule the reload process, the corresponding job is displayed on the Job Overview screen.

    Recommendation Recommendation

    We recommend that you use this feature in exceptional circumstances only.

    End of the recommendation.

More Information

For more information about archiving, see the SAP Library for Introduction to Data Archiving (CA-ARC).