Fonction SAP ARCHIVE_OPEN_FOR_DELETE - Open Achive File to Delete Records in the Database

Paramètre Reférence Type Long. Valeur par déf. Facultatif Description
AINDFLAG C C 0 'X' X
ARCHIVE_NAME ADMI_FILES-ARCHIV_KEY C 20 SPACE X Archive File Name According to Archive Management
NO_STATISTICS C C 0 SPACE X Switch for Statistics
OBJECT ARCH_OBJ-OBJECT C 10 Archiving Object Name
OUTPUT_SEL_SCREEN_WHEN_BATCH C C 0 SPACE X If in Background, Output Selection Screen
OUTPUT_SEL_SCREEN_WHEN_DIALOG C C 0 SPACE X If in Dialog Mode, Output Selection Screen
TEST_MODE 0 SPACE X Test Mode Switch

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
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_DELETE
NO_FILES_AVAILABLE No Files Exist for Object
OBJECT_NOT_FOUND Object Unknown
OPEN_ERROR Could not open file

Functionality
This function module opens archives to delete their data in thedatabase. If required, the function module ARCHIVE_CLOSE_FILEwill pass these archive files to ArchiveLink for optical archiving. Thestatus of the archive files is adjusted accordingly in the archivemanagement.
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 further call of this function module generates a new handle. It istherefore possible to access several archives of different archiveobjects at the same time. It is irrelevant whether you have openedarchives to read or write.

  • Example 1

  • PARAMETERS: ARCHIVE LIKE HEADA-ARKEY, " name of archive file
    TESTRUN DEFAULT 'X' AS CHECKBOX, " test flag
    DATA: HANDLE LIKE SY-TABIX.
    ...
    CALL FUNCTION 'ARCHIVE_OPEN_FOR_DELETE'
    EXPORTING
    ARCHIVE_NAME = ARCHIVE
    OBJECT = 'BELEG'
    TEST_MODE = TESTRUN
    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 programm RSARCH06.

      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 archive file according to archive management.
      The name of the archive file consists of the number of the archivingrun, a sequential number and the name of the archiving object.
      INCLUDE 'ARCHIVE_PARAM_ARCHIVE_NAME' OBJECT DOKU ID TX

      Description
      Parameter NO_STATISTICS controls whether, in a delete program,statistical data can be gathered using function module ARCH
      IVE_GIVE_STATISTICS and displayed using function moduleARCHIVE_WRITE_STATISTICS or ARCHIVE_GET_STATISTICS .

      Value range
      If parameter NO_STATISTICS is initial (SPACE), statistical data can becollected and displayed using the above-mentioned function modules.

      Default
      SPACE

      Description
      This parameter controls whether the selection screen of the archivingprogram is displayed or not, when the archiving program is running inthe background.

      Value range
      ' ' = No Output 'X' = Output

      Default
      ' '

      Description
      This parameter controls whether the selection screen of the archivingprogram is displayed or not, when the archiving program is running inthe background.

      Value range
      ' ' = No Output 'X' = Output

      Default
      ' '

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

1033222Various probs when removing data w/ data archiving process