SAP Function Modules

ARCHIV_CREATE_ASYNCHRON_META SAP Function module







ARCHIV_CREATE_ASYNCHRON_META 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 ARCHIV_CREATE_ASYNCHRON_META into the relevant SAP transaction such as SE37 or SE80.

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


Pattern for FM ARCHIV_CREATE_ASYNCHRON_META - ARCHIV CREATE ASYNCHRON META





CALL FUNCTION 'ARCHIV_CREATE_ASYNCHRON_META' "
  EXPORTING
    ar_object =                 " toaom-ar_object  Document type
*   create_flag = 2             "               1: always, 2: only if requested by archive (def.)
*   delay =                     "               Delayed start in seconds
*   delete_flag =               "               1:delete when processed (def.),2:do not delete
*   del_date =                  " toav0-del_date  Expiration date of archived document
*   mandant =                   " toaom-mandt   Client
    name_fub =                  " rs38l-name    Name of function module to be called
*   note =                      " sapb-sapnotiz
*   note =                      " sapb-sapnotiz  Note (not used any longer)
    object_id =                 " sapb-sapobjid  Unique object key of SAP object
    path =                      " sapb-sappfad  Absolute path including file name
    path =                      " sapb-sappfad
*   res =                       " toav0-reserve  Reserve field
    sap_object =                " toaom-sap_object  Object type of SAP object
*   no_arc_delete =             " toaom-ar_status  If 'X' file will not be deleted from archive
*   request_id = SPACE          " toar7-request_id  Request ID
*   vscan_profile = '/SCMS/KPRO_CREATE'  " vscan_profile
  IMPORTING
    request_id =                " toar7-request_id  Request ID
  EXCEPTIONS
    ERROR_ARCHIV = 1            "               Archive system error
    ERROR_COMMUNICATIONTABLE = 2  "             Archive table error (customizing archives)
    ERROR_CONNECTIONTABLE = 3   "               No link table created
    ERROR_KERNEL = 4            "               SAP kernel error
    ERROR_PARAMETER = 5         "               Invalid transfer parameters
    ERROR_REQUEST = 6           "               Error creating request (TOAR7)
    BLOCKED_BY_POLICY = 7       "
    .  "  ARCHIV_CREATE_ASYNCHRON_META

ABAP code example for Function Module ARCHIV_CREATE_ASYNCHRON_META





The ABAP code below is a full code listing to execute function module ARCHIV_CREATE_ASYNCHRON_META 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:
ld_request_id  TYPE TOAR7-REQUEST_ID .


SELECT single AR_OBJECT
FROM TOAOM
INTO @DATA(ld_ar_object).

DATA(ld_create_flag) = 'some text here'.
DATA(ld_delay) = 'some text here'.
DATA(ld_delete_flag) = 'some text here'.

DATA(ld_del_date) = 20210129

SELECT single MANDT
FROM TOAOM
INTO @DATA(ld_mandant).


DATA(ld_name_fub) = some text here

DATA(ld_note) = some text here

DATA(ld_note) = some text here

DATA(ld_object_id) = some text here

DATA(ld_path) = some text here

DATA(ld_path) = some text here

DATA(ld_res) = some text here

SELECT single SAP_OBJECT
FROM TOAOM
INTO @DATA(ld_sap_object).


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


SELECT single REQUEST_ID
FROM TOAR7
INTO @DATA(ld_request_id).

DATA(ld_vscan_profile) = 'Check type of data required'. . CALL FUNCTION 'ARCHIV_CREATE_ASYNCHRON_META' EXPORTING ar_object = ld_ar_object * create_flag = ld_create_flag * delay = ld_delay * delete_flag = ld_delete_flag * del_date = ld_del_date * mandant = ld_mandant name_fub = ld_name_fub * note = ld_note * note = ld_note object_id = ld_object_id path = ld_path path = ld_path * res = ld_res sap_object = ld_sap_object * no_arc_delete = ld_no_arc_delete * request_id = ld_request_id * vscan_profile = ld_vscan_profile IMPORTING request_id = ld_request_id EXCEPTIONS ERROR_ARCHIV = 1 ERROR_COMMUNICATIONTABLE = 2 ERROR_CONNECTIONTABLE = 3 ERROR_KERNEL = 4 ERROR_PARAMETER = 5 ERROR_REQUEST = 6 BLOCKED_BY_POLICY = 7 . " ARCHIV_CREATE_ASYNCHRON_META
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 ELSEIF SY-SUBRC EQ 3. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 4. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 5. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 6. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 7. "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_request_id  TYPE TOAR7-REQUEST_ID ,
ld_ar_object  TYPE TOAOM-AR_OBJECT ,
ld_create_flag  TYPE STRING ,
ld_delay  TYPE STRING ,
ld_delete_flag  TYPE STRING ,
ld_del_date  TYPE TOAV0-DEL_DATE ,
ld_mandant  TYPE TOAOM-MANDT ,
ld_name_fub  TYPE RS38L-NAME ,
ld_note  TYPE SAPB-SAPNOTIZ ,
ld_note  TYPE SAPB-SAPNOTIZ ,
ld_object_id  TYPE SAPB-SAPOBJID ,
ld_path  TYPE SAPB-SAPPFAD ,
ld_path  TYPE SAPB-SAPPFAD ,
ld_res  TYPE TOAV0-RESERVE ,
ld_sap_object  TYPE TOAOM-SAP_OBJECT ,
ld_no_arc_delete  TYPE TOAOM-AR_STATUS ,
ld_request_id  TYPE TOAR7-REQUEST_ID ,
ld_vscan_profile  TYPE VSCAN_PROFILE .


SELECT single AR_OBJECT
FROM TOAOM
INTO ld_ar_object.

ld_create_flag = 'some text here'.
ld_delay = 'some text here'.
ld_delete_flag = 'some text here'.

ld_del_date = 20210129

SELECT single MANDT
FROM TOAOM
INTO ld_mandant.


ld_name_fub = some text here

ld_note = some text here

ld_note = some text here

ld_object_id = some text here

ld_path = some text here

ld_path = some text here

ld_res = some text here

SELECT single SAP_OBJECT
FROM TOAOM
INTO ld_sap_object.


SELECT single AR_STATUS
FROM TOAOM
INTO ld_no_arc_delete.


SELECT single REQUEST_ID
FROM TOAR7
INTO ld_request_id.

ld_vscan_profile = 'Check type of data required'.

SAP Documentation for FM ARCHIV_CREATE_ASYNCHRON_META


This function module is used for asynchronous archiving of objects in an optical archive. ...See here for full SAP fm documentation















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 ARCHIV_CREATE_ASYNCHRON_META or its description.