Fonction SAP ARCHIVE_SAVE_OBJECT - Write Data Object to the Archive File

Paramètre Reférence Type Long. Valeur par déf. Facultatif Description
ARCHIVE_HANDLE SYST-TABIX I 4 Handle to the Open Archive File

Paramètre Reférence Type Long. Description
ARCHIVE_NAME HEADA-ARKEY C 20
OBJECT_OFFSET ARCH_IDX-OFFSET I 4

Exception Description
DATA_OBJECT_NOT_SAVED The Data Object was not Written to the Archive
FILE_IO_ERROR Error Writing to Archive File
INTERNAL_ERROR Internal Error
OPEN_ERROR Error When Opening the Archive File
TERMINATION_REQUESTED Termination of Archiving Was Requested
WRONG_ACCESS_TO_ARCHIVE Incorrect Access to the Archive

Functionality
This function module writes a data object to the archive file. Inaddition to the data which was passed with the function moduleARCHIVE_PUT_RECORD, the data which was passed via the archivingclasses is also included.
If the data object no longer fits into the current archive file, thearchive file is closed and a new archive file opened. The deletionprogram is then called automatically if this option was not deactivatedin the transaction AOBJ "Customizing Settings ".
The function module checks whether an interruption request was receivedfor the running write program. If yes, the current data object is nolonger written to the archive file, and the exceptionTERMINATION_REQUESTED is raised.

  • Example 1

  • CALL FUNCTION 'ARCHIVE_SAVE_OBJECT'
    EXPORTING
    ARCHIVE_HANDLE = HANDLE
    EXCEPTIONS
    TERMINATION_REQUESTED = 1.
    IF sy-subrc = 1.
    session_interrupted = 'X'.
    EXIT. " no further data object
    ENDIF.
    • Example 2

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

      Additional Notes
      Please refer to the documentation on the function moduleARCHIVE_OPEN_FOR_WRITE.
      INCLUDE 'ARCHIVE_PARAM_HANDLE_WRITE' OBJECT DOKU ID TX