Fonction SAP ARCHIVE_PUT_TABLE - Place Records in Current Data Object by Structure

Paramètre Reférence Type Long. Valeur par déf. Facultatif Description
ARCHIVE_HANDLE SYST-TABIX I 4 Handle to the Open Archive Files
RECORD_FLAGS ARC_BUFFER-FLAGS C 8 SPACE X Flag Bar per Archive Record
RECORD_STRUCTURE ARC_BUFFER-RNAME C 30 Name of the Structure to Be Written

Paramètre Reférence Long. Facultatif Description
RECORD_FLAGS_TABLE ARCH_FLAGS 8 X Flag Bar for All Data Records in the Table
TABLE 0 internal Table for Data Object

Exception Description
INTERNAL_ERROR Internal Error
INVALID_RECORD_STRUCTURE Structure of the Data Record Is Unknown
WRONG_ACCESS_TO_ARCHIVE Incorrect Access to the Archive

Funktion
This function module transfers an internal table to the data objectthat was previously requested by function moduleARCHIVE_NEW_OBJECT . Each line ofthe internal table is placed in the data object as a separate datarecord. All data records that are transferred to the data object arewritten together to the archive file when function moduleARCHIVE_SAVE_OBJECT is called.
The function module belongs to the general functions of the ADKinterface - that is, it can be called from the write program in anarchiving object or from an archiving class. If it is called from anarchiving class, it must be called within subroutine <(>
<<)>CLASS>_GET_DATA: Here, the records are transferred by structure,including control information (RECORD_FLAGS or RECORD_FLAGS_TABLE) forthe current class depending on the handle for the current data object.

  • Example 1

  • Extract from a program for archiving FI documents.
    TABLES: BKPF, BSEG, BSET, BVOR, BSEC, BSED.
    DATA: HANDLE LIKE SY-TABIX.
    DATA: BEGIN OF BSEG_TAB OCCURS 10.
    INCLUDE STRUCTURE BSEG.
    DATA: END OF BSEG_TAB.
    ...
    CALL FUNCTION 'ARCHIVE_PUT_TABLE'
    EXPORTING
    ARCHIVE_HANDLE = HANDLE
    RECORD_FLAGS = FLAGS
    RECORD_STRUCTURE = 'BSEG'
    TABLES
    TABLE = BSEG_TAB
    ...
    • Example 2

    • For a comprehensive example, refer to program RSARCH10 (write programfor an archiving object) or the subroutine BC_DEMO_GET_DATA inarchiving class BC_DEMO (function group DEMOCLASS)

      Further Notes
      (Only valid if the function module is called from an archiving object:)In the case of complex data objects, you may have to read and evaluateall data records before you can decide whether this data object is tobe archived.
      It is not necessary to note the data records or even the read the datarecords again from the database. You can, from the start, transfer thedata records to the data object with this function module.
      If you realize that you do not want to archive the data records thatyou have transferred, simply call function module
      ARCHIVE_NEW_OBJECT. This ensures that the data that you havetransferred is discarded. Even the data that you have forwarded to thearchiving classes for archiving is discarded.
      INCLUDE 'ARCHIVE_PARAM_FLAGS' OBJECT DOKU ID TX
      You use this parameter in function moduleARCHIVE_PUT_TABLE to include controlinformation in all data records that are passed by TABLE.
      However, the indicators that are passed on a record-by-record basisusing table parameter RECORD_FLAGS_TABLE take precedence. IfRECORD_FLAGS_TABLE is not empty, that is, IMPORT parameter RECORD_FLAGSis ignored if RECORD_FLAGS_TABLE contains at least one line.
      Syntactically, parameter RECORD_FLAGS has type CHAR08 (LIKEARC_BUFFER-FLAGS for "historical reasons"); the passed actualparameter can - and should - have type ARCH_FLAGS to illustrate the re
      lationship with the parameter of the same name in function moduleARCHIVE_GET_TABLE . With thecommand "#EC* you can hide the CALL FUNCTION error in the extendedprogram check.
      INCLUDE 'ARCHIVE_PARAM_STRUCTURE' OBJECT DOKU ID TX
      In this case, you use this parameter to assign the name of thestructure of the data record to the data record. The record passedusing RECORD must be of the specified RECORD_STRUCTURE or theRECORD_STRUCTURE assigned to the alias.

      Description
      Table with indicator bar for all data records that are to betransferred to TABLE.
      Record TABLE[i] belongs to the indicator bar RECORD_FLAGS_TABLE[i]. Forinformation on the use of the indicator, refer to the parameterRECORD_FLAGS.

      Description
      The table lines of this internal table are all passed as individualdata records to the data object. The RECORD_FLAGS are savedidentically for all data records. RECORD_STRUCTURE must specifythe structure of the internal table.

1569172How to search archived deliveries by ERP document number