SAP Function SREL_ARCHIVE_RELATIONS - Enter Internal Table in a Data Object

Parameter Reference Type Length Default Optional Text
ARCHIVE_HANDLE SYST-TABIX I 4 Handle to the Open Archive Files
MAX_HOPS RELHOPS N 2 1 X Maximum Number of Jumps
OBJECT BORIDENT u 90 BOR Object ID
RELATIONTYPE BINRELTYP C 4 X Relationship Type
ROLETYPE ROLETYPE C 10 X Role Type

Parameter Reference Length Optional Text
LINKS RELGRAPHLK 282 X Object Relationship: Link of Network for Links
ROLES RELROLES 130 X Object Relationship Service: Roles

Exception Text
INTERNAL_ERROR Internal Error
INVALID_RECORD_STRUCTURE Structure of the Data Record Is Unknown
NO_LOGSYS Logical System Is Not Maintained
WRONG_ACCESS_TO_ARCHIVE Incorrect Access to the Archive

Functions
Mit diesem Funktonsbaustein übergeben Sie eine interne Tabelle an daszuvor mit dem Funktionsbaustein ARCHIVE_NEW_OBJECT angeforderteDatenobjekt. Jede Zeile der internen Tablelle wird dabei als separaterDatensatz in das Datenobjekt gestellt. All of the data records that youtransferred to the data object are written together in the archive fileif you call the function module ARCHIVE_SAVE_OBJECT.

  • Example 1

  • Statement 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 = 'DELETE '
    RECORD_STRUCTURE = 'BSEG'
    TABLES
    TABLE = BSEG_TAB
    EXCEPTIONS
    INTERNAL_ERROR = 01
    WRONG_ACCESS_TO_ARCHIVE = 02.
    • Example 2

    • You can find an extended example in program RSARCH10.

      Further information
      In complex data objects, you may find that you first have to read andevaluate all data records before you can decide whether this dataobject should be archived.
      It not necessary for you to note the databases or even read the datarecords again from the database. From the start, you can transfer thedata records with this function module to the data object.
      If you determine that the data records that you transferred should notbe archived, then simply call the function moduleARCHIVE_NEW_OBJECT. This ensures that the data transferred byyou is rejected. Data that you have forwarded to the archiving classfor archiving is also rejected.
      INCLUDE 'ARCHIVE_PARAM_HANDLE_WRITE' OBJECT DOKU ID TX