Fonction SAP ARCHIVE_OPEN_FOR_READ - Open an Existing Archive File for Reading

Paramètre Reférence Type Long. Valeur par déf. Facultatif Description
ARCHIVE_DOCUMENT ADMI_RUN-DOCUMENT N 6 '000000' X Archive Name According to Archive Management
ARCHIVE_NAME ADMI_FILES-ARCHIV_KEY C 20 SPACE X Archive File Name According to Archive Management
MAINTAIN_INDEX 0 SPACE X Indicator for Index Build
OBJECT ARCH_OBJ-OBJECT C 10 Archiving Object Name

Paramètre Reférence Type Long. Description
ARCHIVE_HANDLE SYST-TABIX I 4 Handle to the Open Files

Paramètre Reférence Long. Facultatif Description
ARCHIVE_FILES RNG_ARCHIV 43 X Table of the Required Archive Files
SELECTED_FILES ADMI_FILES 512 X Table with the Selected Entries

Exception Description
ARCHIVING_STANDARD_VIOLATION Violation of the Archiving Standard
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_READ
NO_FILES_AVAILABLE No Files Exist for Object
OBJECT_NOT_FOUND Object Unknown
OPEN_ERROR Could not open file

Functionality
This function module is required to open archives which are to be read.
You can open several archive files at the same time which can bemanipulated by one archive handle. This handle is passed via theparameter ARCHIVE_HANDLE. Only the handle is required in allfurther operations on the archive files so that the archiving knowswhich files it should read.
Each additional call of this function module generates a new handle. Itis therefore possible to access several archives of different archiveobjects at the same time. It is irrelevant whether you have opened thearchives to read or write.

  • Example 1

  • In this example, the parameter ARCHIVE_NAME is not assigned avalue. From the resulting dialog with the archive management, it ispossible to choose several archives simultaneously.
    DATA: HANDLE LIKE SY-TABIX.
    ...
    CALL FUNCTION 'ARCHIVE_OPEN_FOR_READ'
    EXPORTING
    OBJECT = 'BELEG'
    IMPORTING
    ARCHIVE_HANDLE = 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

    • A detailed example can be found in the program RSARCH05.

      Notes
      All function modules which read an archive using a handle regard allfiles opened for this handle as a single file.
      INCLUDE 'ARCHIVE_PARAM_HANDLE_READ' OBJECT DOKU ID TX

      Description
      Name of the archiving run according to archive management. The nameis a 6-digit number.
      INCLUDE 'ARCHIVE_PARAM_ARCHIVE_NAME' OBJECT DOKU ID TX

      Description
      Name of the archive file according to archive management. The name ofthe archive file consists of the number of the archiving run, asequential number and the name of the archiving object.
      INCLUDE 'ARCHIVE_PARAM_ARCHIVE_NAME' OBJECT DOKU ID TX

      Description
      With this dlag you can control which archive files you are offered in adialog box. If the flag is set you are offered the archive files withwhich you can construct an index for single access. If the flag isempty then you are offered all readable files.

      Default
      MAINTAIN_INDEX = ' '
      INCLUDE 'ARCHIVE_PARAM_OBJECT_OPEN' OBJECT DOKU ID TX

      Description
      This table contains the selected entries from the table ADMI_FILES.

1033222Various probs when removing data w/ data archiving process