Fonction SAP ARCHIVE_WRITE_STATISTICS - Output Statistical Data Collected by ADK (Standard Log)

Paramètre Reférence Type Long. Valeur par déf. Facultatif Description
ARCHIVE_HANDLE SYST-TABIX I 4 Handle to the Open Archive Files
STATISTICS_ONLY_PER_FILE 0 SPACE X Do not Output Statistics for Complete Session
STATISTICS_ONLY_PER_RUN 0 SPACE X Do not Output Statistics for Single Files

Exception Description
INTERNAL_ERROR Internal Error
WRONG_ACCESS_TO_ARCHIVE Incorrect Access from the Archive

Function
Function module ARCHIVE_WRITE_STATISTICS is used in write, delete,reload, and read programs in Data Archiving to display in a standardlog the statistics collected by the Archive Development Kit (ADK).

Purpose
The standard log that is produced by function moduleARCHIVE_WRITE_STATISTICS displays the statistics collected by the ADKfor the relevant context (write, delete, reload, or read).

Use
Function module ARCHIVE_WRITE_STATISTICS can be used in all write,delete, reload, and read programs in Data Archiving. It should becalled immediately before the function module ARCHIVE_CLOSE_FILE. Inreload programs, it must be called using the read handle. In all otherprograms, such as conversion, preprocessing and postprocessingprograms, this function module cannot be used.

Example
Correct use of function module ARCHIVE_WRITE_STATISTICS is illustratedin programs in archiving object BC_FLIGHT.
INCLUDE 'ARCHIVE_HANDLE' OBJECT DOKU ID TX
In reload programs, function module ARCHIVE_WRITE_STATISTICS can onlybe called with the read handle.

Description
The parameter STATISTICS_ONLY_PER_FILE is used to control how thestandard log is displayed.

  • If the parameter is not initial, no statistics are given for the whole
  • archiving session.
    • If the parameter is initial, the statistics are listed per archive file
    • and, additionally, for the whole archiving session.

      Note
      The parameter STATISTICS_ONLY_PER_FILE is related to the parameterSTATISTICS_ONLY_PER_RUN:
      If the parameter STATISTICS_ONLY_PER_RUN is not initial, thestatistical data per archive file is suppressed, regardless of theparameter STATISTICS_ONLY_PER_FILE.

      Description
      With STATISTICS_ONLY_PER_RUN = 'X' statistics are generated onlyfor the complete archiving session.
      With STATISTICS_ONLY_PER_RUN = ' ' detailed statistics areprovided for each archive file and statistics for the completearchiving session are also generated.
      However, if STATISTICS_ONLY_PER_FILE = 'X' is given then thesystem will not output statistics for the complete archiving session.

      Value range
      STATISTICS_ONLY_PER_RUN = 'X'
      STATISTICS_ONLY_PER_RUN = ' '

      Default
      STATISTICS_ONLY_PER_RUN = ' '