Fonction SAP ARCHIVE_GET_WITH_CURSOR - Archiving Object: Read Data Record from Data Object at Pointer

Paramètre Reférence Type Long. Valeur par déf. Facultatif Description
ARCHIVE_HANDLE SYST-TABIX I 4 Handle to the Open Archive Files
AUTOMATIC_CONVERSION 0 'X' X Automatic Conversion of the Data Record
GET_REAL_STRUCTURE_NAME 0 'X' X Conversion of the Structure Name
RECORD_CURSOR SYST-TABIX I 4 Pointer to Data Record

Paramètre Reférence Type Long. Description
RECORD 0 Data Record
RECORD_FLAGS ARC_BUFFER-FLAGS C 8 Flag Bar per Data Record
RECORD_LENGTH ARCH_INT-INT4 I 4 Length of the Archive Record in Parameter RECORD
RECORD_REF REF TO DATA 0 Reference to Data Record
RECORD_STRUCTURE ARCH_DEF-SON C 30 Name of Returned Structure

Exception Description
INTERNAL_ERROR Internal Error
WRONG_ACCESS_TO_ARCHIVE Incorrect Access to the Archive
WRONG_CURSOR Incorrect Value in Cursor

Functionality
This function module can be used to read the data records of anarchiving object directly. The record cursor required can be obtainedby accessing the data records of a data object sequentially via theparameter RECORD_CURSOR.
TABLES: BKPF, BSEG, BSET, BVOR, BSEC, BSED.
DATA: HANDLE LIKE SY-TABIX,
BUFFER_REF TYPE REF TO data,
CURSOR LIKE SY-TABIX.
...
CALL FUNCTION 'ARCHIVE_GET_WITH_CURSOR'
EXPORTING
ARCHIVE_HANDLE = HANDLE
RECORD_CURSOR = CURSOR
IMPORTING
RECORD_REF = BUFFER_REF
EXCEPTIONS
INTERNAL_ERROR = 01
WRONG_ACCESS_TO_ARCHIVE = 02
WRONG_CURSOR = 03.

Notes
You can use this function module when you want to collect particulardata records in order to be able to make decisions. It is therefore nolonger necessary to make a note of the entire data record, you onlyneed to make a note of the record cursor for this data record. Thisreduces the resources used by the application.
You do not need to read the data records of a data object sequentiallybeforehand if you know that the record you require always has the samerecord cursor. You could, for example, always read the second record ofan archived data object if you simply assign the parameterRECORD_CURSOR the value 2.

Description
INCLUDE 'ARCHIVE_PARAM_RECORD_REF_GET' OBJECT DOKU ID TX
INCLUDE 'ARCHIVE_PARAM_HANDLE' OBJECT DOKU ID TX
INCLUDE 'ARCHIVE_PARAM_AUTOMATIC_CONV' OBJECT DOKU ID TX