SAP Function Modules

ARCHIV_GET_CONNECTIONS_INT SAP Function module







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

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


Pattern for FM ARCHIV_GET_CONNECTIONS_INT - ARCHIV GET CONNECTIONS INT





CALL FUNCTION 'ARCHIV_GET_CONNECTIONS_INT' "
* EXPORTING
*   objecttype =                " toav0-sap_object  Business object type
*   object_id =                 " toav0-object_id  Business object type ID
*   client =                    " sy-mandt      Client
*   archiv_id =                 " toav0-archiv_id
*   arc_doc_id =                " toav0-arc_doc_id  Document ID
*   documenttype =              " toav0-ar_object
*   from_ar_date =              " toav0-ar_date  Start date for search
*   until_ar_date = SY-DATUM    " toav0-ar_date  End date for search
*   documentclass =             " toadd-doc_type  Technical document class
*   del_date =                  " toav0-del_date
*   limited =                   " toaom-ar_status
*   no_auth_check =             " sy-datar      No authorization check
*   limit =                     " simple
  IMPORTING
    count =                     " sy-index      Number of connections found
    reducedbylimit =            " saestatus
    reducedbyauthority =        " saestatus
* TABLES
*   connections =               " toav0         Relationship Entries
*   parameter =                 " toarange_d
  EXCEPTIONS
    NOTHING_FOUND = 1           "
    ERROR_AUTHORITHY = 2        "
    ERROR_PARAMETER = 3         "
    .  "  ARCHIV_GET_CONNECTIONS_INT

ABAP code example for Function Module ARCHIV_GET_CONNECTIONS_INT





The ABAP code below is a full code listing to execute function module ARCHIV_GET_CONNECTIONS_INT 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_count  TYPE SY-INDEX ,
ld_reducedbylimit  TYPE SAESTATUS ,
ld_reducedbyauthority  TYPE SAESTATUS ,
it_connections  TYPE STANDARD TABLE OF TOAV0,"TABLES PARAM
wa_connections  LIKE LINE OF it_connections ,
it_parameter  TYPE STANDARD TABLE OF TOARANGE_D,"TABLES PARAM
wa_parameter  LIKE LINE OF it_parameter .


DATA(ld_objecttype) = some text here

DATA(ld_object_id) = some text here
DATA(ld_client) = 'Check type of data required'.

DATA(ld_archiv_id) = some text here

DATA(ld_arc_doc_id) = some text here

DATA(ld_documenttype) = some text here

DATA(ld_from_ar_date) = 20210129

DATA(ld_until_ar_date) = 20210129

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


DATA(ld_del_date) = 20210129

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

DATA(ld_no_auth_check) = 'some text here'.
DATA(ld_limit) = 'some text here'.

"populate fields of struture and append to itab
append wa_connections to it_connections.

"populate fields of struture and append to itab
append wa_parameter to it_parameter. . CALL FUNCTION 'ARCHIV_GET_CONNECTIONS_INT' * EXPORTING * objecttype = ld_objecttype * object_id = ld_object_id * client = ld_client * archiv_id = ld_archiv_id * arc_doc_id = ld_arc_doc_id * documenttype = ld_documenttype * from_ar_date = ld_from_ar_date * until_ar_date = ld_until_ar_date * documentclass = ld_documentclass * del_date = ld_del_date * limited = ld_limited * no_auth_check = ld_no_auth_check * limit = ld_limit IMPORTING count = ld_count reducedbylimit = ld_reducedbylimit reducedbyauthority = ld_reducedbyauthority * TABLES * connections = it_connections * parameter = it_parameter EXCEPTIONS NOTHING_FOUND = 1 ERROR_AUTHORITHY = 2 ERROR_PARAMETER = 3 . " ARCHIV_GET_CONNECTIONS_INT
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 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_count  TYPE SY-INDEX ,
ld_objecttype  TYPE TOAV0-SAP_OBJECT ,
it_connections  TYPE STANDARD TABLE OF TOAV0 ,
wa_connections  LIKE LINE OF it_connections,
ld_reducedbylimit  TYPE SAESTATUS ,
ld_object_id  TYPE TOAV0-OBJECT_ID ,
it_parameter  TYPE STANDARD TABLE OF TOARANGE_D ,
wa_parameter  LIKE LINE OF it_parameter,
ld_reducedbyauthority  TYPE SAESTATUS ,
ld_client  TYPE SY-MANDT ,
ld_archiv_id  TYPE TOAV0-ARCHIV_ID ,
ld_arc_doc_id  TYPE TOAV0-ARC_DOC_ID ,
ld_documenttype  TYPE TOAV0-AR_OBJECT ,
ld_from_ar_date  TYPE TOAV0-AR_DATE ,
ld_until_ar_date  TYPE TOAV0-AR_DATE ,
ld_documentclass  TYPE TOADD-DOC_TYPE ,
ld_del_date  TYPE TOAV0-DEL_DATE ,
ld_limited  TYPE TOAOM-AR_STATUS ,
ld_no_auth_check  TYPE SY-DATAR ,
ld_limit  TYPE SIMPLE .


ld_objecttype = some text here

"populate fields of struture and append to itab
append wa_connections to it_connections.

ld_object_id = some text here

"populate fields of struture and append to itab
append wa_parameter to it_parameter.
ld_client = 'Check type of data required'.

ld_archiv_id = some text here

ld_arc_doc_id = some text here

ld_documenttype = some text here

ld_from_ar_date = 20210129

ld_until_ar_date = 20210129

SELECT single DOC_TYPE
FROM TOADD
INTO ld_documentclass.


ld_del_date = 20210129

SELECT single AR_STATUS
FROM TOAOM
INTO ld_limited.

ld_no_auth_check = 'some text here'.
ld_limit = 'some text here'.

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