SAP ARCHIV_GET_ASYNCHRON_META Function Module for Retrieving archiving objects via meta-table









ARCHIV_GET_ASYNCHRON_META is a standard archiv get asynchron meta SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Retrieving archiving objects via meta-table processing and below is the pattern details for this FM, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.


See here to view full function module documentation and code listing for archiv get asynchron meta FM, simply by entering the name ARCHIV_GET_ASYNCHRON_META into the relevant SAP transaction such as SE37 or SE38.

Function Group: OPTS
Program Name: SAPLOPTS
Main Program: SAPLOPTS
Appliation area: S
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function ARCHIV_GET_ASYNCHRON_META pattern details

In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.
CALL FUNCTION 'ARCHIV_GET_ASYNCHRON_META'"Retrieving archiving objects via meta-table
EXPORTING
* ARCHIV_DOC_INDEX = ' ' "Direct access to document part
* ARC_DOC_ID = "Document ID
* REQUEST_ID = ' ' "Unique number of request
* VSCAN_PROFILE = '/SCMS/KPRO_CREATE' "
AR_OBJECT = "Object type to be archived
* CREATE_FLAG = 2 "1: always, 2: only if requested by archive (def.)
* DELETE_FLAG = ' ' "1:delete when processed (def.),2:do not delete
NAME_FUB = "Name of function module to be called
OBJECT_ID = "Unique object key of application
* PATH = ' ' "
SAP_OBJECT = "Calling application
* ARCHIV_ID = "Storage System

IMPORTING
REQUEST_ID = "Unique number of request
REPATH = "

EXCEPTIONS
ERROR_ARCHIV = 1 ERROR_COMMUNICATIONTABLE = 2 ERROR_CONNECTIONTABLE = 3 ERROR_KERNEL = 4 ERROR_PARAMETER = 5 NOT_UNIQUE = 6 NO_REQUEST = 7 BLOCKED_BY_POLICY = 8
.



IMPORTING Parameters details for ARCHIV_GET_ASYNCHRON_META

ARCHIV_DOC_INDEX - Direct access to document part

Data type: SAPB-SAPADOKID
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

ARC_DOC_ID - Document ID

Data type: TOAV0-ARC_DOC_ID
Optional: Yes
Call by Reference: No ( called with pass by value option)

REQUEST_ID - Unique number of request

Data type: TOAR7-REQUEST_ID
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

VSCAN_PROFILE -

Data type: VSCAN_PROFILE
Default: '/SCMS/KPRO_CREATE'
Optional: Yes
Call by Reference: No ( called with pass by value option)

AR_OBJECT - Object type to be archived

Data type: TOAOM-AR_OBJECT
Optional: No
Call by Reference: No ( called with pass by value option)

CREATE_FLAG - 1: always, 2: only if requested by archive (def.)

Data type:
Default: 2
Optional: Yes
Call by Reference: No ( called with pass by value option)

DELETE_FLAG - 1:delete when processed (def.),2:do not delete

Data type:
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

NAME_FUB - Name of function module to be called

Data type: RS38L-NAME
Optional: No
Call by Reference: No ( called with pass by value option)

OBJECT_ID - Unique object key of application

Data type: SAPB-SAPOBJID
Optional: No
Call by Reference: No ( called with pass by value option)

PATH -

Data type: SAPB-SAPPFAD
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

SAP_OBJECT - Calling application

Data type: TOAOM-SAP_OBJECT
Optional: No
Call by Reference: No ( called with pass by value option)

ARCHIV_ID - Storage System

Data type: TOAV0-ARCHIV_ID
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for ARCHIV_GET_ASYNCHRON_META

REQUEST_ID - Unique number of request

Data type: TOAR7-REQUEST_ID
Optional: No
Call by Reference: No ( called with pass by value option)

REPATH -

Data type: SAPB-SAPPFAD
Optional: No
Call by Reference: No ( called with pass by value option)

EXCEPTIONS details

ERROR_ARCHIV - Error from ArchiveLink interface

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

ERROR_COMMUNICATIONTABLE - Table TOAAR

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

ERROR_CONNECTIONTABLE - Error from link tables

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

ERROR_KERNEL - SAP kernel error

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

ERROR_PARAMETER - Invalid transfer parameters

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

NOT_UNIQUE - Object contains several archive objects

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

NO_REQUEST - Not possible to create request

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

BLOCKED_BY_POLICY -

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for ARCHIV_GET_ASYNCHRON_META Function Module

The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than 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 newer method of declaring data variables on the fly. 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), which i why i have stuck to the origianl for this example.

DATA:
lv_request_id  TYPE TOAR7-REQUEST_ID, "   
lv_error_archiv  TYPE TOAR7, "   
lv_archiv_doc_index  TYPE SAPB-SAPADOKID, "   SPACE
lv_arc_doc_id  TYPE TOAV0-ARC_DOC_ID, "   
lv_request_id  TYPE TOAR7-REQUEST_ID, "   SPACE
lv_vscan_profile  TYPE VSCAN_PROFILE, "   '/SCMS/KPRO_CREATE'
lv_repath  TYPE SAPB-SAPPFAD, "   
lv_ar_object  TYPE TOAOM-AR_OBJECT, "   
lv_error_communicationtable  TYPE TOAOM, "   
lv_create_flag  TYPE TOAOM, "   2
lv_error_connectiontable  TYPE TOAOM, "   
lv_delete_flag  TYPE TOAOM, "   SPACE
lv_error_kernel  TYPE TOAOM, "   
lv_name_fub  TYPE RS38L-NAME, "   
lv_error_parameter  TYPE RS38L, "   
lv_object_id  TYPE SAPB-SAPOBJID, "   
lv_not_unique  TYPE SAPB, "   
lv_path  TYPE SAPB-SAPPFAD, "   SPACE
lv_no_request  TYPE SAPB, "   
lv_sap_object  TYPE TOAOM-SAP_OBJECT, "   
lv_blocked_by_policy  TYPE TOAOM, "   
lv_archiv_id  TYPE TOAV0-ARCHIV_ID. "   

  CALL FUNCTION 'ARCHIV_GET_ASYNCHRON_META'  "Retrieving archiving objects via meta-table
    EXPORTING
         ARCHIV_DOC_INDEX = lv_archiv_doc_index
         ARC_DOC_ID = lv_arc_doc_id
         REQUEST_ID = lv_request_id
         VSCAN_PROFILE = lv_vscan_profile
         AR_OBJECT = lv_ar_object
         CREATE_FLAG = lv_create_flag
         DELETE_FLAG = lv_delete_flag
         NAME_FUB = lv_name_fub
         OBJECT_ID = lv_object_id
         PATH = lv_path
         SAP_OBJECT = lv_sap_object
         ARCHIV_ID = lv_archiv_id
    IMPORTING
         REQUEST_ID = lv_request_id
         REPATH = lv_repath
    EXCEPTIONS
        ERROR_ARCHIV = 1
        ERROR_COMMUNICATIONTABLE = 2
        ERROR_CONNECTIONTABLE = 3
        ERROR_KERNEL = 4
        ERROR_PARAMETER = 5
        NOT_UNIQUE = 6
        NO_REQUEST = 7
        BLOCKED_BY_POLICY = 8
. " ARCHIV_GET_ASYNCHRON_META




ABAP code using 7.40 inline data declarations to call FM ARCHIV_GET_ASYNCHRON_META

The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.

"SELECT single REQUEST_ID FROM TOAR7 INTO @DATA(ld_request_id).
 
 
"SELECT single SAPADOKID FROM SAPB INTO @DATA(ld_archiv_doc_index).
DATA(ld_archiv_doc_index) = ' '.
 
"SELECT single ARC_DOC_ID FROM TOAV0 INTO @DATA(ld_arc_doc_id).
 
"SELECT single REQUEST_ID FROM TOAR7 INTO @DATA(ld_request_id).
DATA(ld_request_id) = ' '.
 
DATA(ld_vscan_profile) = '/SCMS/KPRO_CREATE'.
 
"SELECT single SAPPFAD FROM SAPB INTO @DATA(ld_repath).
 
"SELECT single AR_OBJECT FROM TOAOM INTO @DATA(ld_ar_object).
 
 
DATA(ld_create_flag) = 2.
 
 
DATA(ld_delete_flag) = ' '.
 
 
"SELECT single NAME FROM RS38L INTO @DATA(ld_name_fub).
 
 
"SELECT single SAPOBJID FROM SAPB INTO @DATA(ld_object_id).
 
 
"SELECT single SAPPFAD FROM SAPB INTO @DATA(ld_path).
DATA(ld_path) = ' '.
 
 
"SELECT single SAP_OBJECT FROM TOAOM INTO @DATA(ld_sap_object).
 
 
"SELECT single ARCHIV_ID FROM TOAV0 INTO @DATA(ld_archiv_id).
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!