Show TOC

Using Logical File Names in ProgramsLocate this document in the navigation structure

Use

To use logical file names in your application programs, execute the following steps:

Procedure
  1. Use transaction FILE to check whether definitions are stored in the system for the logical file names. These definitions convert the logical file names to platform-specific file names. If necessary, create new definitions with transaction FILE.

    For more information, see the Implementation Guide under Start of the navigation path SAP NetWeaver Next navigation step Application Server Next navigation step System Administration Next navigation step Platform-Independent Filenames End of the navigation path.

  2. Ensure that the physical paths specified in these definitions exist in the runtime environment file system. If necessary, create the required directories, or contact your system administration.

  3. Test the file name conversion by calling the function module in the individual test of transaction SE37.

    Note

    When performing the individual test in transaction SE37, set the Uppercase/Lowercase indicator, since the field OPERATING_SYSTEM, in particular, is case-sensitive. Correspondingly, you need to specify the logical file name entirely in uppercase characters.

  4. Add a call of the function module to your program. To do this, you can choose Start of the navigation path Edit Next navigation step Pattern End of the navigation path in the ABAP Editor.

For more information about saving files on the application and presentation servers, see Using Files in the ABAP User Guide.

Note

Note that creating a syntactically correct logical file name does not in itself guarantee the successful saving of a file. The physical path must also actually exist in the file system at runtime.

Recommendation

Do not allow the user to enter any available logical file name on the user interface during execution. Store the logical file name in the program logic, or follow the instructions for using logical file names in the user interface. For more information, see Secure Programming - ABAP.