Procedure documentationArchiving Correspondence Objects with TRTM_CO

 

You use the archiving object Correspondence Object TRTM_CO to archive correspondence objects in the Correspondence Framework.

Note Note

As part of the archiving of financial transactions, correspondence objects relating to financial transactions are also archived using TRTM_FTR.

If you only create correspondence objects for your financial transactions, these correspondence objects are also archived when the financial transactions are archived.

Consequently, you need archiving object TRTM_CO only to archive correspondence objects that have been created outside of financial transactions or if you want to archive correspondence objects independently of the financial transaction.

Example: To prevent the database tables from overflowing, you can regularly archive correspondence objects with status Invalidated in advance.

End of the note.

Correspondence objects are archived using the Archive Development Kit (ADK). For more information, see the documentation on Data Archiving in SAP NetWeaver Library, in particular the section relating to archiving using the Archive Development Kit (ADK).

Technical Data

Size of archiving file: Max. 500 MB

Programs

Program

Function

Note

RTCOR_CO_ARCHIVE_WRITE

Write Program

On the basis of your entries, the write program selects the correspondence objects to be archived.

RTCOR_CO_ARCHIVE_READ

Read Program

RTCOR_CO_ARCHIVE_DELETE

Deletion Program

The deletion program deletes all archived correspondence objects because data deletion cannot be executed by the write program (for security reasons).

Tables

The archiving object TRTM_CO is used to archive data from various tables.

Authorization Object

Authorization Object

Notes

S_ARCHIVE

The write program checks the authorization for archiving object TRTM_CO and activity 01 (Create or Generate).

Prerequisites

For each company code, you specify the minimum retention period in days for correspondence objects. You do this in Customizing for the Transaction Manager under Start of the navigation path General Settings Next navigation step Correspondence Next navigation step General Settings Next navigation step Maintain Retention Period to Archive Correspondence Object End of the navigation path. The minimum retention period specifies the minimum number of days that a correspondence object needs to remain in the system before it can be archived.

Procedure

  1. Creating Archive Files

    1. You are on the Archive Administration: Initial Screen (transaction SARA), and the name of the archiving object TRTM_CO is entered in the Object Name field.

    2. Choose Write.

      A screen appears on which you can schedule the write program to be run in the background.

      If archiving has already been performed for an archiving object and there are still archive files from that archiving run that have not yet been processed by the relevant deletion program, the system informs you of this in a separate window.

      The same applies for interrupted archiving runs.

      Caution Caution

      Archiving data more than once can lead to various problems. Hence some archiving objects require that data is not replicated in the archive, because this can lead to incorrect results (such as using archived data to produce totals). Ensure the following:

      • The new write job that needs to be scheduled does not select the same data that is contained in archive files that have not yet been processed by the deletion program

      • No variants with overlapping selection values are used in parallel

      End of the caution.

      Note Note

      If the variant that you have selected is already being used in other jobs, you can choose the Jobs with Selected Variant pushbutton to display the variant and delete it if necessary.

      End of the note.
    3. Use the input help to select a variant. If no variant is available, choose Maintain and create the variant that you require.

    4. Enter the start date and the spool parameters.

      Note Note

      With the Archive Directory pushbutton, you can determine how much storage space is free in the current object-specific archive directory before you start to archive.

      End of the note.

    Now you have entered all of the data required for the background job. To run the job, choose Execute.

    Note Note

    After all archive files of a session have been written completely, the system event SAP_ARCHIVING_WRITE_FINISHED is triggered by the ADK. In reaction to this event, processes that occur downstream from archiving (such as automated file storage) can be triggered by external tools.

    End of the note.

    Furthermore, you can navigate to the following menu options:

    • Customizing

    • Job Overview: Here you find an overview of all archiving jobs as well as functions for processing them.

    • Administration

    • DB Tables

    • Information System

    Note Note

    You can display the logs documenting processing by choosing Logs from the Archive Administration initial screen.

    End of the note.
  2. Deleting Archived Data from the Database

  3. In Archive Administration (transaction SARA), you can call up the read program RTPMARCHIVE_READ_BY_INDEX.