SAP ARCHIVFILE_TY_SERVER_TO_SERVER Function Module for ArchiveLink: Document class dependent file transfer SERVER TO SERVER









ARCHIVFILE_TY_SERVER_TO_SERVER is a standard archivfile ty server to server SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for ArchiveLink: Document class dependent file transfer SERVER TO SERVER 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 archivfile ty server to server FM, simply by entering the name ARCHIVFILE_TY_SERVER_TO_SERVER into the relevant SAP transaction such as SE37 or SE38.

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



Function ARCHIVFILE_TY_SERVER_TO_SERVER 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 'ARCHIVFILE_TY_SERVER_TO_SERVER'"ArchiveLink: Document class dependent file transfer SERVER TO SERVER
EXPORTING
PHYS_SOURCEPATH = "
PHYS_TARGETPATH = "
DOCUMENT_TYPE = "
PHYS_FILENAME = "
* PAGES = "

EXCEPTIONS
ERROR_FILE = 1
.



IMPORTING Parameters details for ARCHIVFILE_TY_SERVER_TO_SERVER

PHYS_SOURCEPATH -

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

PHYS_TARGETPATH -

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

DOCUMENT_TYPE -

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

PHYS_FILENAME -

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

PAGES -

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

EXCEPTIONS details

ERROR_FILE -

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

Copy and paste ABAP code example for ARCHIVFILE_TY_SERVER_TO_SERVER 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_error_file  TYPE STRING, "   
lv_phys_sourcepath  TYPE SAPB-SAPPFAD, "   
lv_phys_targetpath  TYPE SAPB-SAPPFAD, "   
lv_document_type  TYPE TOADD-DOC_TYPE, "   
lv_phys_filename  TYPE SAPB-SAPPFAD, "   
lv_pages  TYPE SOFX-PAGES. "   

  CALL FUNCTION 'ARCHIVFILE_TY_SERVER_TO_SERVER'  "ArchiveLink: Document class dependent file transfer SERVER TO SERVER
    EXPORTING
         PHYS_SOURCEPATH = lv_phys_sourcepath
         PHYS_TARGETPATH = lv_phys_targetpath
         DOCUMENT_TYPE = lv_document_type
         PHYS_FILENAME = lv_phys_filename
         PAGES = lv_pages
    EXCEPTIONS
        ERROR_FILE = 1
. " ARCHIVFILE_TY_SERVER_TO_SERVER




ABAP code using 7.40 inline data declarations to call FM ARCHIVFILE_TY_SERVER_TO_SERVER

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 SAPPFAD FROM SAPB INTO @DATA(ld_phys_sourcepath).
 
"SELECT single SAPPFAD FROM SAPB INTO @DATA(ld_phys_targetpath).
 
"SELECT single DOC_TYPE FROM TOADD INTO @DATA(ld_document_type).
 
"SELECT single SAPPFAD FROM SAPB INTO @DATA(ld_phys_filename).
 
"SELECT single PAGES FROM SOFX INTO @DATA(ld_pages).
 


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!