Fonction SAP ARCHIVE_GET_RECORD_INFO - Transfer Information for a Specific Data Record

Paramètre Reférence Type Long. Valeur par déf. Facultatif Description
ARCHIVE_HANDLE SYST-TABIX I 4 Handle to the Open Archive Files
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_FLAGS ARCH_FLAGS u 8 Flag Bar per Data Record
RECORD_STRUCTURE ARC_BUFFER-RNAME C 30 Structure Name

Exception Description
INTERNAL_ERROR Internal error
WRONG_ACCESS_TO_ARCHIVE Incorrect Access to the Archive
WRONG_CURSOR Wrong Value in Record Pointers

Functionality
This function module was developed for simple implementation of readoperations on archives in logical databases. It can of course also beused in other programs.
Since you do not have access to the additional information on a datarecord when logical databases are used, this function module allowsthis information to be read from your program.

Example
Extract from a program that uses a logical database to read FIdocuments.
TABLES: BKPF, BSEG, BSET, BVOR, BSEC, BSED.
DATA: BEGIN OF COMMON PART X,
ARCHIV LIKE SY-TABIX,
OBJECT_CURSOR LIKE SY-TABIX,
END OF COMMON PART X,
FLAGS LIKE ARC_BUFFER-FLAGS.
...
GET BSEG.
CALL FUNCTION 'ARCHIVE_GET_RECORD_INFO'
EXPORTING
ARCHIVE_HANDLE = ARCHIV
RECORD_CURSOR = OBJECT_CURSOR
IMPORTING
RECORD_FLAGS = FLAGS
EXCEPTIONS
INTERNAL_ERROR = 01
WRONG_ACCESS_TO_ARCHIVE = 02
WRONG_CURSOR = 03.
IF SY-SUBRC NE 0.
MESSAGE A123.
ENDIF.
IF FLAGS(1) EQ 'X'
...
ENDIF.

Notes
Since you also do not have access to the handle and the record cursorwhen using logical databases, they need to be made accessible via aCommon Part. It is also possible to pass the informationrequired directly via the Common Part.

Description
INCLUDE 'ARCHIVE_PARAM_FLAGS_GET' OBJECT DOKU ID TX
INCLUDE 'ARCHIVE_PARAM_STRUCTURE_GET' OBJECT DOKU ID TX
INCLUDE 'ARCHIVE_PARAM_CURSOR' OBJECT DOKU ID TX
Here you use the record cursor to specify the data record of the objectwhich was last read for which you would like to have information.