SAP ARCHIVE_ADMIN_GET_FILE_INFO Function Module for Determine Information on Archive File
ARCHIVE_ADMIN_GET_FILE_INFO is a standard archive admin get file info SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Determine Information on Archive File 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 archive admin get file info FM, simply by entering the name ARCHIVE_ADMIN_GET_FILE_INFO into the relevant SAP transaction such as SE37 or SE38.
Function Group: ARCH
Program Name: SAPLARCH
Main Program: SAPLARCH
Appliation area:
Release date: 08-Mar-2000
Mode(Normal, Remote etc): Normal Function Module
Update:

Function ARCHIVE_ADMIN_GET_FILE_INFO 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 'ARCHIVE_ADMIN_GET_FILE_INFO'"Determine Information on Archive File.
EXPORTING
ARCHIVE_NAME = "Identification of an Archive File
* WEBDAV_DEST = "HTTP Connection to XML DAS for WebDAV
* URI = "URI of a Resource or a Collection
* ARCHIVE_SYSTEM_ONLY = ' ' "ADK Internal: Check for File in Storage System Only
* FILESYSTEM_ONLY = ' ' "ADK Internal: Check for File in File System Only
* CONTENT_REPOSITORY = ' ' "ADK Internal: Content Repository Containing the File
* DOCUMENT_ID = ' ' "ADK Internal: Document ID for the File in the Archive System
* PHYSICAL_FILENAME = ' ' "ADK Internal: Physical Name of the File (Without Path)
* LOGICAL_PATHNAME = ' ' "ADK Internal: Logical Path for File
* EXCEPTION_ON_ACCESS_ERROR = 'X' "ADK Internal: Raise an Exception When Access Error
* WEBDAV_SYSTEM_ONLY = ' ' "ADK Internal: Only Check File in WebDAV System
IMPORTING
VALUES_CONSISTENT = "Compatibility of Management Data in File and SAP System
ARCHIVE_CODE_PAGE = "Code Page of the Archive File
ARCHIVE_NUMBER_FORMAT = "Number Format of the Archive File
PHYSICAL_FILE_WITH_PATH = "File Name of Archive File
STORED_IN_CONTENT_REPOSITORY = "ADK Internal: Content Repository Containing the File
STORED_AS_DOCUMENT_ID = "ADK Internal: Document ID for File in Storage System
WEBDAV_SYSTEM = "Availability of the Archive File in the WebDAV System
STORED_IN_WEBDAV_DEST = "ADK Internal: WebDAV Connection Used to Store the File
STORED_AS_URI = "ADK Internal: URI of the File in the WebDAV System
INVALID = "Indicates Whether the Archive File Is Invalid: TRUE (='X') and FALSE (=' ')
FILESYSTEM = "Accessibility of the Archive File in the File System
ARCHIVE_SYSTEM = "Accessibility of Archive File in Storage System
OBJECT = "Archiving Object According to File
ARCHIVE_KEY = "Identification of the Archive File According to File
ARCHIVE_CREATION_CLIENT = "Client in Which the Archive File Was Created
ARCHIVE_CREATION_DATE = "Creation Date for Archive File
ARCHIVE_CREATION_RELEASE = "Release Status of SAP System at time of Archiving
ARCHIVE_CREATION_SYSTEM = "Name of SAP System at Time of Archiving
EXCEPTIONS
NO_ARCHIVE_FILE = 1 FILE_NOT_FOUND = 2 OPEN_ERROR = 3 FILE_IO_ERROR = 4
IMPORTING Parameters details for ARCHIVE_ADMIN_GET_FILE_INFO
ARCHIVE_NAME - Identification of an Archive File
Data type: ADMI_FILES-ARCHIV_KEYOptional: No
Call by Reference: Yes
WEBDAV_DEST - HTTP Connection to XML DAS for WebDAV
Data type: ADMI_WEBDAV_DESTINATIONOptional: Yes
Call by Reference: Yes
URI - URI of a Resource or a Collection
Data type: ADMI_URI_ADKOptional: Yes
Call by Reference: Yes
ARCHIVE_SYSTEM_ONLY - ADK Internal: Check for File in Storage System Only
Data type: CDefault: SPACE
Optional: Yes
Call by Reference: Yes
FILESYSTEM_ONLY - ADK Internal: Check for File in File System Only
Data type: CDefault: SPACE
Optional: Yes
Call by Reference: Yes
CONTENT_REPOSITORY - ADK Internal: Content Repository Containing the File
Data type: ARCH_USR-CREPDefault: SPACE
Optional: Yes
Call by Reference: Yes
DOCUMENT_ID - ADK Internal: Document ID for the File in the Archive System
Data type: ADMI_FILES-ARCH_DOCIDDefault: SPACE
Optional: Yes
Call by Reference: Yes
PHYSICAL_FILENAME - ADK Internal: Physical Name of the File (Without Path)
Data type: ADMI_FILES-FILENAMEDefault: SPACE
Optional: Yes
Call by Reference: Yes
LOGICAL_PATHNAME - ADK Internal: Logical Path for File
Data type: ADMI_FILES-PATHINTERNDefault: SPACE
Optional: Yes
Call by Reference: Yes
EXCEPTION_ON_ACCESS_ERROR - ADK Internal: Raise an Exception When Access Error
Data type: CDefault: 'X'
Optional: Yes
Call by Reference: Yes
WEBDAV_SYSTEM_ONLY - ADK Internal: Only Check File in WebDAV System
Data type: CDefault: SPACE
Optional: Yes
Call by Reference: Yes
EXPORTING Parameters details for ARCHIVE_ADMIN_GET_FILE_INFO
VALUES_CONSISTENT - Compatibility of Management Data in File and SAP System
Data type: COptional: No
Call by Reference: Yes
ARCHIVE_CODE_PAGE - Code Page of the Archive File
Data type: TCP00-CPCODEPAGEOptional: No
Call by Reference: Yes
ARCHIVE_NUMBER_FORMAT - Number Format of the Archive File
Data type: TCP00-CPCODEPAGEOptional: No
Call by Reference: Yes
PHYSICAL_FILE_WITH_PATH - File Name of Archive File
Data type: ADMI_FILES-FILENAMEOptional: No
Call by Reference: Yes
STORED_IN_CONTENT_REPOSITORY - ADK Internal: Content Repository Containing the File
Data type: ADMI_FILES-CREPOptional: No
Call by Reference: Yes
STORED_AS_DOCUMENT_ID - ADK Internal: Document ID for File in Storage System
Data type: ADMI_FILES-ARCH_DOCIDOptional: No
Call by Reference: Yes
WEBDAV_SYSTEM - Availability of the Archive File in the WebDAV System
Data type: COptional: No
Call by Reference: No ( called with pass by value option)
STORED_IN_WEBDAV_DEST - ADK Internal: WebDAV Connection Used to Store the File
Data type: ADMI_WEBDAV_DESTINATIONOptional: No
Call by Reference: Yes
STORED_AS_URI - ADK Internal: URI of the File in the WebDAV System
Data type: ADMI_URI_ADKOptional: No
Call by Reference: Yes
INVALID - Indicates Whether the Archive File Is Invalid: TRUE (='X') and FALSE (=' ')
Data type: BOOLE_DOptional: No
Call by Reference: Yes
FILESYSTEM - Accessibility of the Archive File in the File System
Data type: COptional: No
Call by Reference: No ( called with pass by value option)
ARCHIVE_SYSTEM - Accessibility of Archive File in Storage System
Data type: COptional: No
Call by Reference: No ( called with pass by value option)
OBJECT - Archiving Object According to File
Data type: HEADA-OBJECTOptional: No
Call by Reference: Yes
ARCHIVE_KEY - Identification of the Archive File According to File
Data type: ADMI_FILES-ARCHIV_KEYOptional: No
Call by Reference: Yes
ARCHIVE_CREATION_CLIENT - Client in Which the Archive File Was Created
Data type: HEADA-CLIENTOptional: No
Call by Reference: Yes
ARCHIVE_CREATION_DATE - Creation Date for Archive File
Data type: HEADA-DATUMOptional: No
Call by Reference: Yes
ARCHIVE_CREATION_RELEASE - Release Status of SAP System at time of Archiving
Data type: HEADA-SAPRLOptional: No
Call by Reference: Yes
ARCHIVE_CREATION_SYSTEM - Name of SAP System at Time of Archiving
Data type: HEADA-SYSIDOptional: No
Call by Reference: Yes
EXCEPTIONS details
NO_ARCHIVE_FILE - The File is not an Archive File
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
FILE_NOT_FOUND - Data Access Not Possible Due to Lack of Management Information
Data type:Optional: No
Call by Reference: Yes
OPEN_ERROR - Error when opening file
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
FILE_IO_ERROR - Error when reading file
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for ARCHIVE_ADMIN_GET_FILE_INFO 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_archive_name | TYPE ADMI_FILES-ARCHIV_KEY, " | |||
| lv_no_archive_file | TYPE ADMI_FILES, " | |||
| lv_values_consistent | TYPE C, " | |||
| lv_webdav_dest | TYPE ADMI_WEBDAV_DESTINATION, " | |||
| lv_archive_code_page | TYPE TCP00-CPCODEPAGE, " | |||
| lv_uri | TYPE ADMI_URI_ADK, " | |||
| lv_archive_number_format | TYPE TCP00-CPCODEPAGE, " | |||
| lv_physical_file_with_path | TYPE ADMI_FILES-FILENAME, " | |||
| lv_stored_in_content_repository | TYPE ADMI_FILES-CREP, " | |||
| lv_stored_as_document_id | TYPE ADMI_FILES-ARCH_DOCID, " | |||
| lv_webdav_system | TYPE C, " | |||
| lv_stored_in_webdav_dest | TYPE ADMI_WEBDAV_DESTINATION, " | |||
| lv_stored_as_uri | TYPE ADMI_URI_ADK, " | |||
| lv_invalid | TYPE BOOLE_D, " | |||
| lv_filesystem | TYPE C, " | |||
| lv_file_not_found | TYPE C, " | |||
| lv_archive_system_only | TYPE C, " SPACE | |||
| lv_open_error | TYPE C, " | |||
| lv_archive_system | TYPE C, " | |||
| lv_filesystem_only | TYPE C, " SPACE | |||
| lv_object | TYPE HEADA-OBJECT, " | |||
| lv_file_io_error | TYPE HEADA, " | |||
| lv_content_repository | TYPE ARCH_USR-CREP, " SPACE | |||
| lv_archive_key | TYPE ADMI_FILES-ARCHIV_KEY, " | |||
| lv_document_id | TYPE ADMI_FILES-ARCH_DOCID, " SPACE | |||
| lv_physical_filename | TYPE ADMI_FILES-FILENAME, " SPACE | |||
| lv_archive_creation_client | TYPE HEADA-CLIENT, " | |||
| lv_logical_pathname | TYPE ADMI_FILES-PATHINTERN, " SPACE | |||
| lv_archive_creation_date | TYPE HEADA-DATUM, " | |||
| lv_archive_creation_release | TYPE HEADA-SAPRL, " | |||
| lv_exception_on_access_error | TYPE C, " 'X' | |||
| lv_webdav_system_only | TYPE C, " SPACE | |||
| lv_archive_creation_system | TYPE HEADA-SYSID. " |
|   CALL FUNCTION 'ARCHIVE_ADMIN_GET_FILE_INFO' "Determine Information on Archive File |
| EXPORTING | ||
| ARCHIVE_NAME | = lv_archive_name | |
| WEBDAV_DEST | = lv_webdav_dest | |
| URI | = lv_uri | |
| ARCHIVE_SYSTEM_ONLY | = lv_archive_system_only | |
| FILESYSTEM_ONLY | = lv_filesystem_only | |
| CONTENT_REPOSITORY | = lv_content_repository | |
| DOCUMENT_ID | = lv_document_id | |
| PHYSICAL_FILENAME | = lv_physical_filename | |
| LOGICAL_PATHNAME | = lv_logical_pathname | |
| EXCEPTION_ON_ACCESS_ERROR | = lv_exception_on_access_error | |
| WEBDAV_SYSTEM_ONLY | = lv_webdav_system_only | |
| IMPORTING | ||
| VALUES_CONSISTENT | = lv_values_consistent | |
| ARCHIVE_CODE_PAGE | = lv_archive_code_page | |
| ARCHIVE_NUMBER_FORMAT | = lv_archive_number_format | |
| PHYSICAL_FILE_WITH_PATH | = lv_physical_file_with_path | |
| STORED_IN_CONTENT_REPOSITORY | = lv_stored_in_content_repository | |
| STORED_AS_DOCUMENT_ID | = lv_stored_as_document_id | |
| WEBDAV_SYSTEM | = lv_webdav_system | |
| STORED_IN_WEBDAV_DEST | = lv_stored_in_webdav_dest | |
| STORED_AS_URI | = lv_stored_as_uri | |
| INVALID | = lv_invalid | |
| FILESYSTEM | = lv_filesystem | |
| ARCHIVE_SYSTEM | = lv_archive_system | |
| OBJECT | = lv_object | |
| ARCHIVE_KEY | = lv_archive_key | |
| ARCHIVE_CREATION_CLIENT | = lv_archive_creation_client | |
| ARCHIVE_CREATION_DATE | = lv_archive_creation_date | |
| ARCHIVE_CREATION_RELEASE | = lv_archive_creation_release | |
| ARCHIVE_CREATION_SYSTEM | = lv_archive_creation_system | |
| EXCEPTIONS | ||
| NO_ARCHIVE_FILE = 1 | ||
| FILE_NOT_FOUND = 2 | ||
| OPEN_ERROR = 3 | ||
| FILE_IO_ERROR = 4 | ||
| . " ARCHIVE_ADMIN_GET_FILE_INFO | ||
ABAP code using 7.40 inline data declarations to call FM ARCHIVE_ADMIN_GET_FILE_INFO
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 ARCHIV_KEY FROM ADMI_FILES INTO @DATA(ld_archive_name). | ||||
| "SELECT single CPCODEPAGE FROM TCP00 INTO @DATA(ld_archive_code_page). | ||||
| "SELECT single CPCODEPAGE FROM TCP00 INTO @DATA(ld_archive_number_format). | ||||
| "SELECT single FILENAME FROM ADMI_FILES INTO @DATA(ld_physical_file_with_path). | ||||
| "SELECT single CREP FROM ADMI_FILES INTO @DATA(ld_stored_in_content_repository). | ||||
| "SELECT single ARCH_DOCID FROM ADMI_FILES INTO @DATA(ld_stored_as_document_id). | ||||
| DATA(ld_archive_system_only) | = ' '. | |||
| DATA(ld_filesystem_only) | = ' '. | |||
| "SELECT single OBJECT FROM HEADA INTO @DATA(ld_object). | ||||
| "SELECT single CREP FROM ARCH_USR INTO @DATA(ld_content_repository). | ||||
| DATA(ld_content_repository) | = ' '. | |||
| "SELECT single ARCHIV_KEY FROM ADMI_FILES INTO @DATA(ld_archive_key). | ||||
| "SELECT single ARCH_DOCID FROM ADMI_FILES INTO @DATA(ld_document_id). | ||||
| DATA(ld_document_id) | = ' '. | |||
| "SELECT single FILENAME FROM ADMI_FILES INTO @DATA(ld_physical_filename). | ||||
| DATA(ld_physical_filename) | = ' '. | |||
| "SELECT single CLIENT FROM HEADA INTO @DATA(ld_archive_creation_client). | ||||
| "SELECT single PATHINTERN FROM ADMI_FILES INTO @DATA(ld_logical_pathname). | ||||
| DATA(ld_logical_pathname) | = ' '. | |||
| "SELECT single DATUM FROM HEADA INTO @DATA(ld_archive_creation_date). | ||||
| "SELECT single SAPRL FROM HEADA INTO @DATA(ld_archive_creation_release). | ||||
| DATA(ld_exception_on_access_error) | = 'X'. | |||
| DATA(ld_webdav_system_only) | = ' '. | |||
| "SELECT single SYSID FROM HEADA INTO @DATA(ld_archive_creation_system). | ||||
Search for further information about these or an SAP related objects