Fonction SAP ARCHIVE_GET_INFORMATION - Archive Object Information Is Transferred Due to a Handle

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

Paramètre Reférence Type Long. Description
ADK_VERSION HEADA-SAPRL C 4
ARCHIVE_CODE_PAGE TCP00-CPCODEPAGE N 4 Name of Codepage
ARCHIVE_CREATION_DATE HEADA-DATUM D 8 Date on Which the Archive Was Created
ARCHIVE_CREATION_RELEASE HEADA-SAPRL C 4 Release Uner Which the Archive Was Created
ARCHIVE_CREATION_SYSTEM HEADA-SYSID C 8 SAP System Uder Wich the Archive Was Created
ARCHIVE_DOCUMENT ADMI_RUN-DOCUMENT N 6 Archiving Session According to Archive Management
ARCHIVE_NAME HEADA-ARKEY C 20 Archive Key According to Archive Management
ARCHIVE_NUMBER_FORMAT TCP00-CPCODEPAGE N 4 Number Format Name
ARCHIVING_CLASS ARCH_CLAS_ C 10 Archiving Class
OBJECT ARCH_OBJ-OBJECT C 10 Name of the Object Edited with the Handle
OBJECT_NUMBER_IN_FILE ADMI_COUNT I 4 Number of objects in an archive file
OBJECT_NUMBER_IN_RUN ADMI_COUNT I 4 Number of Objects in an Archiving Session

Paramètre Reférence Long. Facultatif Description
USED_CLASSES ADK_CLASSES 0 X

Exception Description
INTERNAL_ERROR Internal Error
WRONG_ACCESS_TO_ARCHIVE Incorrect Archive Access


INCLUDE 'DOCU_HAS_TO_BE_ELABORATED' OBJECT DOKU ID TX

Functionality
This function module gets current information for a handle. Since someinformation can change at runtime, you should read the documentation onthe individual parameters.
DATA: HANDLE LIKE SY-TABIX.
...
DATA: DATE LIKE HEADA-DATUM,
RELEASE LIKE HEADA-SAPRL,
SYSTEM LIKE HEADA-SYSID,
ARCHIV LIKE HEADA-ARKEY,
OBJECT LIKE ARCH_OBJ-OBJECT.
TYPE-POOLS: ADK.
DATA: TAB_CLASS TYPE ADK_CLASSES,
CLASS_WA TYPE ADK_CLASS.
...
CALL FUNCTION 'ARCHIVE_GET_INFORMATION'
EXPORTING
ARCHIVE_HANDLE = HANDLE
IMPORTING
ARCHIVE_CREATION_DATE = DATE
ARCHIVE_CREATION_RELEASE = RELEASE
ARCHIVE_CREATION_SYSTEM = SYSTEM
ARCHIVE_NAME = ARCHIV
OBJECT = OBJECT
TABLES
USED_CLASSES = TAB_CLASS
EXCEPTIONS
INTERNAL_ERROR = 01
WRONG_ACCESS_TO_ARCHIVE = 02.
LOOP AT TAB_CLASS INTO CLASS_WA.
EXDLOOP.

Notes
You will generally not use the parameter OBJECT since thearchive object for which you want to perform archiving will already beknown to you. This parameter may be useful when you want to writegeneral programs which operate simultaneously on an unlimited number ofarchiving objects.
To obtain information on a particular data record from the data object,you can use the function module ARCHIVE_GET_RECORD_INFO.

Description
Identification of the codepage with which the archive file was written.
The codepage is required to convert data records to the currentcodepage using the ABAP/4 command TRANSLATE. This usually happensautomatically in all function modules that read data records. Only ifthe parameter AUTOMATIC_CONVERSION is set to ' ' in thesefunction modules is the conversion not performed automatically. Inthis case, conversion to the current codepage is required using theABAP command TRANSLATE or in Unicode programs using the ABAP conversionclass CL_ABAP_CONV_IN_CE.
The parameter ARCHIVE_CREATION_DATE displays the date on whichthe archive was created.
INCLUDE 'ARCHIVE_PARAM_INFO_FILE' OBJECT DOKU ID TX

Description
Identification of the number format used for writing the archive file.
The number format is required to convert data records to the currentnumber format using the ABAP command TRANSLATE.
This is usually performed automatically in all function modules thatread data records. Only if in these function modules the parameterAUTOMATIC_CONVERSION is set to ' ', no automatic conversiontakes place. In this case records must be converted to the currentnumber format using the TRANSLATE command or for Unicode programs theABAP conversion classes CL_ABAP_CONV_IN_CE and CL_ABAP_CHAR_UTILITIES.

Description
The ARCHIVING_CLASS parameter issues the calling context for thehandle. If the calling context lies within an archiving class, the nameof the calling archiving class is issued. Otherwise the parametercontinous as initial.
INCLUDE 'ARCHIVE_PARAM_OBJECT' OBJECT DOKU ID TX
In this case you receive the name of the object which is processed withthe handle via this parameter.

Description
The parameter OBJECT_NUMBER_IN_FILE returns the number of dataobjects contained in the archive file that is currently being processedby the handle. The meaning of the value depends on the type of archivingprogram:

  • Write program: Number of data objects that have been written to the
  • archive file up to the point of the parameter call
    • Read program: Total number of data objects contained in the archive file

    • Delete program: Total number of data objects contained in the archive
    • file
      • Reload and conversion program:

      • Call using write handle: Number of objects that have been written to thenew archive file up to the point of the parameter call
        Call using read handle: Total number of data objects contained in thearchive file

        Description
        You can use the parameter OBJECT_NUMBER_IN_RUN to obtain thenumber of data objects included in the archiving session currently beingprocessed by the handle. The meaning of the returned value depends onthe type of program:

        • Write program: Number of data objects written in this session up to the
        • point the parameter was called
          • Read program: Total number of data objects contained in the archive
          • files that belong to the archiving session
            • Delete program: Total number of data objects contained in the archive
            • file that belongs to the archiving session
              • Reload program and conversion program:

              • Call with write handle: Number of objects written to the new archivingsession up to the point the parameter is called
                Call with read handle: Total number of data objects contained in thearchive files that belong to the archiving session
                INCLUDE 'ARCHIVE_PARAM_HANDLE' OBJECT DOKU ID TX
                In this case the handle is used to specify for which archive theinformation is needed.