Fonction SAP ARCHIVE_OPEN_FOR_CONVERSION - Write Data Objects to a New Archive File (for Conversions)

Paramètre Reférence Type Long. Valeur par déf. Facultatif Description
OBJECT ARCH_OBJ-OBJECT C 10 Archiving Object Name
TEST_MODE 0 SPACE X Conversion Program Runs as Test Run

Paramètre Reférence Type Long. Description
ARCHIVE_READ_HANDLE SYST-TABIX I 4 Handle to the Open Files for Reading
ARCHIVE_WRITE_HANDLE SYST-TABIX I 4 Handle to the Files Open for Writing

Paramètre Reférence Long. Facultatif Description
ARCHIVE_RUNS RNG_RUN 15 X Range Table with the Sessions to Be Processed

Exception Description
FILE_ALREADY_OPEN The System Tried Repeatedly to Open a File
FILE_IO_ERROR Archive File Access Error
INTERNAL_ERROR Internal Error
NOT_AUTHORIZED No Authorization for ARCHIVE_OPEN_FOR_MOVE
NO_FILES_AVAILABLE No Files Exist for Object
OBJECT_NOT_FOUND Object Unknown
OPEN_ERROR Could not open file

Function
This function module supports the system during application-specificconversion of archived data. It opens an existing archiving session toread and creates a new archiving session into which the data objectsthat have been converted by the application-specific program aretransferred.
After the function module has been called, two archive handles arereturned:

  • The contents of the existing archiving session is read by parameter
  • ARCHIVE_READ_HANDLE.
    • The archive handle that is returned in parameter
    • ARCHIVE_WRITE_HANDLE points to the newly created archivingsession that contains the converted data objects.

      Notes
      Data that was archived using archiving classes is not automaticallytransferred from the existing archiving session to the newly createdarchiving session.
      After successful conversion of the existing archiving session, thissession is no longer offered for further data archiving actions.

      • Example 1

      • DATA: READ_HANDLE LIKE SY-TABIX,
        SAVE_HANDLE LIKE SY-TABIX.
        ...
        CALL FUNCTION 'ARCHIVE_OPEN_FOR_CONVERSION'
        EXPORTING
        OBJECT = 'EXAMPLE'
        IMPORTING
        ARCHIVE_READ_HANDLE = READ_HANDLE
        ARCHIVE_WRITE_HANDLE = SAVE_HANDLE
        EXCEPTIONS
        FILE_ALREADY_OPEN = 01
        FILE_IO_ERROR = 02
        INTERNAL_ERROR = 03
        NO_FILES_AVAILABLE = 04
        OBJECT_NOT_FOUND = 05
        OPEN_ERROR = 06.
        • Example 2

        • For a comprehensive example, refer to program RSARCH12.
          The parameter ARCHIVE_READ_HANDLE returns the archive handlethat points to the converted archiving session.
          The parameter ARCHIVE_WRITE_HANDLE returns the archive handlethat points to the newly created archiving session.
          INCLUDE 'ARCHIVE_PARAM_OBJECT_OPEN' OBJECT DOKU ID TX

          Description
          This parameter controls whether the conversion is to be carried out intest mode.

          Value range
          SPACE: The conversion program converts the selected archiving session.
          'X': The conversion program runs in test mode.

          Description
          This table contains the number of the archiving session that is to beconverted.

          Value range
          For technical reasons, only one archiving session is converted perprogram run. The table ARCHIVE_RUNS can therefore only containone entry. The content of the entry must be in the following form:

          • Field SIGN = 'I'

          • Field OPTION = 'EQ'

          • The field LOW contains the number of the archiving session for
          • conversion.
            • The field HIGH must be initial.