FILE_GET_NAME SAP Function module - Assign the Physical File Name Using a Logical File Name
Pattern for FM FILE_GET_NAME - FILE GET NAME
Associated Function Group:
SFIL
Released Date: 05.09.1996
CALL FUNCTION 'FILE_GET_NAME' "Assign the Physical File Name Using a Logical File Name
EXPORTING
* client = SY-MANDT " sy-mandt Client for reading the file name t
* client = SY-MANDT " sy-mandt Client for reading the file name table
logical_filename = " filename-fileintern Logical file name
* operating_system = SY-OPSYS " sy-opsys Operating system
* parameter_1 = SPACE " Parameter for variable
SAP Documentation for FM FILE_GET_NAME FUNCTIONALITY R/3 applications run on various platforms with various file systems. This function module enables you to use platform-independent logical file names in your application programs. Based on definitions maintained in customizing tables for platform-independent file names, the function module converts a logical file name to the corresponding physical file name and path for the hardware platform concerned. For this conversion to work for different platforms, the definition of a logical file name must include a logical file path, which in turn isconverted to different physical file paths, depending on the particular platform. The platform-specific file name returned by the function module is composed of the physical file path for the current platform and the physical file name associated with the logical file name. Placeholders in physical file and path names are substituted at runtime by the corresponding current values. EXAMPLE logical file name:,,MONTHLY_SALES_FILE physical file name:,,VALUES logical path:,,SALES_DATA_PATH physical path (UNIX):,,/usr/ physical path (Windows):,,C:\SALES\ Get file name for UNIX platform (current system: K11) CALL FUNCTION 'FILE_GET_NAME' EXPORTING LOGICAL_FILENAME = 'MONTHLY_SALES_FILE' IMPORTING FILE_NAME = FILE FILE_FORMAT = FORMAT. Get file name for UNIX platform, passing a parameter (current system: K11) CALL FUNCTION 'FILE_GET_NAME' EXPORTING LOGICAL_FILENAME = 'MONTHLY_SALES_FILE' PARAMETER_1 = '_TST' IMPORTING FILE_NAME = FILE FILE_FORMAT = FORMAT. Get file name for WINDOWS platform, with file name extension CALL FUNCTION 'FILE_GET_NAME' EXPORTING LOGICAL_FILENAME = 'MONTHLY_SALES_FILE' WITH_FILE_EXTENSION = 'X' IMPORTING FILE_NAME = FILE FILE_FORMAT = FORMAT. HINTS All definitions needed for the platform-independent assignment of file names are maintained client-independently with transaction The following concepts are used in the platform-independent assignment of file names: A descriptive name for a file which is associated with these values: If no logical file path is specified, the function module returns the physical file name only; placeholders are substituted by current values. The physical file name may contain placeholders. A descriptive name for a path which is associated with these values: The physical file path is defined for a particular syntax group. It must contain the reserved wordname. It may also contain other placeholders. Presentation server and application server can run under different operating systems. The current value for the application server can beobtained from the system field SY-OPSYS, the value for the presentation server by calling function module WS_QUERY. Both operating systems must be defined and assigned to a syntax group. Group of operating systems with a common syntax for file and path names (e.g. HP-UX and SINIX). Reserved words, set in angle brackets, which can be included in physical file and path names (e.g.information on possible reserved words in the online help (F1 help) for the fields If the logical path associated with a logical file name does not specify a physical path for the current operating system (syntax group), the path stored in the profile parameter DIR_GLOBAL of the current system is used for generating a complete platform-specific file name. Documentation extract taken from SAP system, Copyright (c) SAP AG
|
||||||||||