Skip to content

ABAP Keyword Documentation →  ABAP - Reference →  Processing External Data →  ABAP File Interface 

Physical and Logical File Names

Files are addressed in all the statements of the file interface by using the physical file name by which they are known in the particular platform. This is why a file cannot be opened more than once in the same program. The physical name of a file is usually made up of a path description and the file name itself. File names with blank spaces are permitted where the blanks are part of the file name. The actual notation depends on the operating system of the application server. If a file name is declared without a path description, the directory that is stored in profile parameter DIR_HOME is used automatically.

To write platform-independent and secure programs, we recommend that you create logical file names and logical paths that can be associated with the actual physical file names for every platform.

  • Non-client-specific logical file names with transaction FILE.
  • Client-specific logical file names with Customizing activity SF01.

The following function modules and methods are available for the use of logical file names in programs:

  • Using the FILE_GET_NAME function module you can, for a logical file name, ascertain the physical file name valid for the current platform and use it in statements of the file interface.
  • Input fields for logical file names in SAP GUI are supported by the function modules FILE_LOGFILE_ALIAS_PBO, FILE_LOGFILE_ALIAS_PAI, and FILE_LOGFILE_ALIAS_F4. These modules create an appropriate list box, check the value entered, and produce a suitable input help.

Other versions: 7.31 | 7.40 | 7.54


Notes

  • For more information about logical file names and logical paths, see Logical File Names.

  • The class CL_FS_PATH contains methods to analyze, transform, or generate file names and path entries.