SAP Function Modules

ARCHIV_CREATE_CARA_REQUEST SAP Function module - SAP ArchiveLink: Generate CARA request







ARCHIV_CREATE_CARA_REQUEST 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_CARA_REQUEST 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_CARA_REQUEST - ARCHIV CREATE CARA REQUEST





CALL FUNCTION 'ARCHIV_CREATE_CARA_REQUEST' "SAP ArchiveLink: Generate CARA request
* EXPORTING
*   archiv_id = SPACE           " toaar-archiv_id
*   del_date = SPACE            " toav0-del_date  Expiry Date
*   document_type = SPACE       " sapb-sapdoktyp
*   mandant = SPACE             " toaom-mandt   Client
*   note = SPACE                " sapb-sapnotiz
*   path = SPACE                " sapb-sappfad
*   path_to_archive = SPACE     " sapb-sappfad  Relative path including file name
*   poolinfo = SPACE            " sapb-sappoolinf
*   res = SPACE                 " toav0-reserve  Reserve field
*   sign = SPACE                " sapb-sapbzz   ReferenceFlag
*   no_arc_delete = SPACE       " toaom-ar_status  No deletion by archive system
*   icc_id = SPACE              " toa_arcas-anschl_id
*   protocol = SPACE            " toa_arcas-protokoll
*   rpc_partner = SPACE         " toa_arcas-rpc_host
*   rpc_service = SPACE         " toa_arcas-rpc_servic
*   version = SPACE             " toa_arcas-version
*   ar_object = SPACE           " toa_arcas-object_art
*   sap_object = SPACE          " toa_arcas-applic_id
*   request_id = SPACE          " toar7-request_id
  EXCEPTIONS
    ERROR_ARCHIV = 1            "
    ERROR_COMMUNICATIONTABLE = 2  "
    ERROR_KERNEL = 3            "               Error from SAP Kernel
    ERROR_SPOOL = 4             "
    ERROR_REQUEST = 5           "
    .  "  ARCHIV_CREATE_CARA_REQUEST

ABAP code example for Function Module ARCHIV_CREATE_CARA_REQUEST





The ABAP code below is a full code listing to execute function module ARCHIV_CREATE_CARA_REQUEST 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).

 

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


DATA(ld_del_date) = 20210129

DATA(ld_document_type) = some text here

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


DATA(ld_note) = some text here

DATA(ld_path) = some text here

DATA(ld_path_to_archive) = some text here

DATA(ld_poolinfo) = some text here

DATA(ld_res) = some text here

DATA(ld_sign) = some text here

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


DATA(ld_icc_id) = some text here

DATA(ld_protocol) = some text here

DATA(ld_rpc_partner) = some text here

DATA(ld_rpc_service) = some text here

DATA(ld_version) = some text here

DATA(ld_ar_object) = some text here

DATA(ld_sap_object) = some text here

SELECT single REQUEST_ID
FROM TOAR7
INTO @DATA(ld_request_id).
. CALL FUNCTION 'ARCHIV_CREATE_CARA_REQUEST' * EXPORTING * archiv_id = ld_archiv_id * del_date = ld_del_date * document_type = ld_document_type * mandant = ld_mandant * note = ld_note * path = ld_path * path_to_archive = ld_path_to_archive * poolinfo = ld_poolinfo * res = ld_res * sign = ld_sign * no_arc_delete = ld_no_arc_delete * icc_id = ld_icc_id * protocol = ld_protocol * rpc_partner = ld_rpc_partner * rpc_service = ld_rpc_service * version = ld_version * ar_object = ld_ar_object * sap_object = ld_sap_object * request_id = ld_request_id EXCEPTIONS ERROR_ARCHIV = 1 ERROR_COMMUNICATIONTABLE = 2 ERROR_KERNEL = 3 ERROR_SPOOL = 4 ERROR_REQUEST = 5 . " ARCHIV_CREATE_CARA_REQUEST
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 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_archiv_id  TYPE TOAAR-ARCHIV_ID ,
ld_del_date  TYPE TOAV0-DEL_DATE ,
ld_document_type  TYPE SAPB-SAPDOKTYP ,
ld_mandant  TYPE TOAOM-MANDT ,
ld_note  TYPE SAPB-SAPNOTIZ ,
ld_path  TYPE SAPB-SAPPFAD ,
ld_path_to_archive  TYPE SAPB-SAPPFAD ,
ld_poolinfo  TYPE SAPB-SAPPOOLINF ,
ld_res  TYPE TOAV0-RESERVE ,
ld_sign  TYPE SAPB-SAPBZZ ,
ld_no_arc_delete  TYPE TOAOM-AR_STATUS ,
ld_icc_id  TYPE TOA_ARCAS-ANSCHL_ID ,
ld_protocol  TYPE TOA_ARCAS-PROTOKOLL ,
ld_rpc_partner  TYPE TOA_ARCAS-RPC_HOST ,
ld_rpc_service  TYPE TOA_ARCAS-RPC_SERVIC ,
ld_version  TYPE TOA_ARCAS-VERSION ,
ld_ar_object  TYPE TOA_ARCAS-OBJECT_ART ,
ld_sap_object  TYPE TOA_ARCAS-APPLIC_ID ,
ld_request_id  TYPE TOAR7-REQUEST_ID .


SELECT single ARCHIV_ID
FROM TOAAR
INTO ld_archiv_id.


ld_del_date = 20210129

ld_document_type = some text here

SELECT single MANDT
FROM TOAOM
INTO ld_mandant.


ld_note = some text here

ld_path = some text here

ld_path_to_archive = some text here

ld_poolinfo = some text here

ld_res = some text here

ld_sign = some text here

SELECT single AR_STATUS
FROM TOAOM
INTO ld_no_arc_delete.


ld_icc_id = some text here

ld_protocol = some text here

ld_rpc_partner = some text here

ld_rpc_service = some text here

ld_version = some text here

ld_ar_object = some text here

ld_sap_object = some text here

SELECT single REQUEST_ID
FROM TOAR7
INTO ld_request_id.

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