Fonction SAP ARCHIVE_GET_STATISTICS - Transfer Statistical Data Gathered by ADK

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

Paramètre Reférence Type Long. Description
ARCHIVE_DOCUMENT ADMI_RUN-DOCUMENT N 6 Archiving Session Number
BINARY_STAT_DATA XSTRING y 0 ADK Statistics

Paramètre Reférence Long. Facultatif Description
STATISTICS_DATA ARCH_STATI 56 X Table with Statistical Data

Exception Description
INTERNAL_ERROR Internal error
WRONG_ACCESS_TO_ARCHIVE Incorrect Access from the Archive

Function
The function module ARCHIVE_GET_STATISTICS is used in write, delete,reload, and read programs for data archiving to transfer the statisticsthat have been collected by the Archive Development Kit (ADK).

Purpose
The statistics that are received from ADK by function moduleARCHIVE_GET_STATISTICS can be further processed as required, forexample, they can be used to produce a specific log as an alternativeto the ADK standard log.

Use
Function module ARCHIVE_GET_STATISTICS can be used in all write,delete, reload, and read programs in data archiving and it should becalled immediately before function module ARCHIVE_CLOSE_FILE. In reloadprograms, it must be called each time with the read handle. In allother programs, such as the conversion, preprocessing andpostprocessing programs, this function module must not be used.

Example
The correct use of function module ARCHIVE_GET_STATISTICS isillustrated in the programs of archiving object BC_SFLIGHT.

Description
BINARY_STAT_DATA can be used to transfer the ADK statistical data to thewrite and delete programs, which in turn use the function moduleARCHIVE_WRITE_STATISTICS_EXT to output the statistics in print lists.This parameter can be used when the ADK statistics are to be issued at apoint in time, when the archive handle is not known, which would be thecase, for example, when the statistics are to be output outside of theactual write and delete programs.
In the case of reload and delete programs BINARY_STAT_DATA is empty.

Value range
The data is available in a compressed format (type XSTRING) and can beinterpreted by the function module ARCHVE_WRITE_STATISTICS_EXT.
INCLUDE 'ARCHIVE_HANDLE' OBJECT DOKU ID TX
Function module ARCHIVE_GET_STATISTICS can however only be called withthe read handle.

Description
Parameter STATISTICS_DATA contains the statistical data in the form ofan internal table of type ARCH_STATI. The internal table is sorted by"Archive file key" (ARCHIV_KEY) and "Structure name". (TABNAME).