In step one, the write program creates an archive file. The data to be archived is then read from the database and is written to the archive file in the background. This process continues until one of following three events occurs:
1. All the data is written to an archive file
2. Archiving is not complete, but the archive file reaches the maximum size specified in archiving object-specific Customizing
3. The archiving is not yet finished, but the archive file contains the maximum number of data objects specified in Customizing.
If in cases 2 and 3 there is still data to be archived, the system will create another archiving file.
If event 2 or 3 occurs, then archive management continues with the delete step (assuming that the following indicators are marked in archiving object-specific Customizing: Start Automatically and Delete Before Storage).
Write jobs can be scheduled outside Archive Administration (transaction SARA) using an external job scheduler. This enables you greater flexibility when coordinating data archiving processes with the other processes in your system environment. For more information, see Scheduling Write Jobs Outside Archive Administration.
After all archive files have been completely created for an archiving session, the Archive Development Kit (ADK) triggers the system event SAP_ARCHIVING_WRITE_FINISHED. By reacting to this system event, you have the option of scheduling archiving jobs automatically. This includes the rebuilding of indexes or input help, archive file backup before deletion, and so on. The event parameter is, in each case, the number of the archiving session.
To further automate the archiving process, you can transfer the archiving session number to function module ARCHIVE_GET_FILES_OF_SESSION. This determines, on a platform-independent basis, the names and paths of the archive files that were written in an archiving session.
You can define new jobs in transaction SM36. You maintain events in transaction SM62.