SAP Function Modules

ARCHIVOBJECT_APPEND SAP Function module







ARCHIVOBJECT_APPEND is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name ARCHIVOBJECT_APPEND into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: ARCHIVOBJECT
Released Date: Not Released
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM ARCHIVOBJECT_APPEND - ARCHIVOBJECT APPEND





CALL FUNCTION 'ARCHIVOBJECT_APPEND' "
  EXPORTING
    archive_id =                " toaar-archiv_id
    archivedoc_id =             " toav0-arc_doc_id
    documentclass =             " toadd-doc_type
*   length = 0                  " sapb-length
    compid =                    " http_api-compid
*   signature = 'X'             " toaom-ar_status
*   vscan_profile = '/SCMS/KPRO_CREATE'  " vscan_profile
* TABLES
*   archiveobject =             " docs
*   binarchivobject =           " tbl1024       Buffer Table for Storing Table Data up to Length 1024
  EXCEPTIONS
    ERROR_ARCHIV = 1            "
    BLOCKED_BY_POLICY = 2       "
    .  "  ARCHIVOBJECT_APPEND

ABAP code example for Function Module ARCHIVOBJECT_APPEND





The ABAP code below is a full code listing to execute function module ARCHIVOBJECT_APPEND including all data declarations. The code uses the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the original method of declaring data variables up front. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8).

DATA:
it_archiveobject  TYPE STANDARD TABLE OF DOCS,"TABLES PARAM
wa_archiveobject  LIKE LINE OF it_archiveobject ,
it_binarchivobject  TYPE STANDARD TABLE OF TBL1024,"TABLES PARAM
wa_binarchivobject  LIKE LINE OF it_binarchivobject .


SELECT single ARCHIV_ID
FROM TOAAR
INTO @DATA(ld_archive_id).


DATA(ld_archivedoc_id) = some text here

SELECT single DOC_TYPE
FROM TOADD
INTO @DATA(ld_documentclass).


DATA(ld_length) = Check type of data required

DATA(ld_compid) = some text here

SELECT single AR_STATUS
FROM TOAOM
INTO @DATA(ld_signature).

DATA(ld_vscan_profile) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_archiveobject to it_archiveobject.

"populate fields of struture and append to itab
append wa_binarchivobject to it_binarchivobject. . CALL FUNCTION 'ARCHIVOBJECT_APPEND' EXPORTING archive_id = ld_archive_id archivedoc_id = ld_archivedoc_id documentclass = ld_documentclass * length = ld_length compid = ld_compid * signature = ld_signature * vscan_profile = ld_vscan_profile * TABLES * archiveobject = it_archiveobject * binarchivobject = it_binarchivobject EXCEPTIONS ERROR_ARCHIV = 1 BLOCKED_BY_POLICY = 2 . " ARCHIVOBJECT_APPEND
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 2. "Exception "Add code for exception here ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.

DATA:
ld_archive_id  TYPE TOAAR-ARCHIV_ID ,
it_archiveobject  TYPE STANDARD TABLE OF DOCS ,
wa_archiveobject  LIKE LINE OF it_archiveobject,
ld_archivedoc_id  TYPE TOAV0-ARC_DOC_ID ,
it_binarchivobject  TYPE STANDARD TABLE OF TBL1024 ,
wa_binarchivobject  LIKE LINE OF it_binarchivobject,
ld_documentclass  TYPE TOADD-DOC_TYPE ,
ld_length  TYPE SAPB-LENGTH ,
ld_compid  TYPE HTTP_API-COMPID ,
ld_signature  TYPE TOAOM-AR_STATUS ,
ld_vscan_profile  TYPE VSCAN_PROFILE .


SELECT single ARCHIV_ID
FROM TOAAR
INTO ld_archive_id.


"populate fields of struture and append to itab
append wa_archiveobject to it_archiveobject.

ld_archivedoc_id = some text here

"populate fields of struture and append to itab
append wa_binarchivobject to it_binarchivobject.

SELECT single DOC_TYPE
FROM TOADD
INTO ld_documentclass.


ld_length = Check type of data required

ld_compid = some text here

SELECT single AR_STATUS
FROM TOAOM
INTO ld_signature.

ld_vscan_profile = 'Check type of data required'.

Contribute (Add Comments)

Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name ARCHIVOBJECT_APPEND or its description.