Start of Content Area

Background documentation Defining Logical File Names  Locate the document in its SAP Library structure

The conversion of a logical file name into a platform-specific file name is controlled by multilevel definitions that are stored in tables.

Definition of the Logical File Name

      Logical File Name

Platform-independent descriptive name of a file. The system creates this name on a cross-client basis, but you can also define client-specific logical file names. Logical file names allow, on the one hand, platform-independent programming, and on the other hand, validation of file names.

      Physical File Name

Platform-dependent name of a file. Precisely one physical file name is stored for each operating system syntax group for each logical file name.

      Data Format

Describes the format of the data.

Note

In addition to the usual data formats such as ASCII or binary data format, you can also select the format DIR. By selecting the format DIR, you specify that the associated logical file name does not refer to a standard file, but rather to a check directory for validating file names. For more information about working with the DIR format, see the section about the import parameter INCLUDING_DIR in Function Module FILE_VALIDATE_NAME.

      Work Area

Describes the content assignment of the affected file.

      Logical Path

A logical path is a descriptive platform-independent name for a path. A logical file name usually has a logical path; only then can different physical paths be created for the logical file names, depending on the operating system platform.

Definition of the Logical Path

      Physical Path

Platform-dependent name of a logical path for a specific syntax group. Platform-specific physical paths are specified for one or more syntax groups for a logical path.

      Operating Systems and Syntax Groups

All operating systems used in a system configuration are assigned to syntax groups. A syntax group is the collective term for a set of operating systems with the same syntax for file names and paths. The definition of a syntax group specifies, for instance, how long file names may be, and whether file name extensions are permitted or not.

The graphic below shows the relationships between these objects, which convert a logical file name into a physical file name:

This graphic is explained in the accompanying text

 

Parameters in Physical File Names and Paths

Physical file names and paths can contain the following reserved words, enclosed in angle brackets, as placeholders. The system replaces the placeholders with current values at runtime.

Reserved Words

Reserved Word

Replacement Value

<OPSYS>

Operating system in accordance with function module parameter (see below)

<INSTANCE>

Application instance

<SYSID>

Application name in accordance with system field SY-SYSID.

<DBSYS>

Database system in accordance with system field SY-DBSYS

<SAPRL>

Release in accordance with system field SY-SAPRL

<HOST>

Host name in accordance with system field SY-HOST

<CLIENT>

Client in accordance with system field SY-MANDT

<LANGUAGE>

Logon language in accordance with system field SY-LANGU

<DATE>

Date in accordance with system field SY-DATUM

<YEAR>

Year in accordance with system field SY-DATUM,  four characters

<SYEAR>

Year in accordance with system field SY-DATUM, two characters

<MONTH>

Month in accordance with system field SY-DATUM

<DAY>

Day in accordance with system field SY-DATUM

<WEEKDAY>

Weekday in accordance with system field SY-FDAYW

<TIME>

Time in accordance with system field SY-UZEIT

<STIME>

Hour and minute in accordance with system field SY-UZEIT

<HOUR>

Hour in accordance with system field SY-UZEIT

<MINUTE>

Minutes in accordance with system field SY-UZEIT

<SECOND>

Seconds in accordance with system field SY-UZEIT

<PARAM_1>

External parameter 1 passed in function call

<PARAM_2>

External parameter 2 passed in function call

<PARAM_3>

External parameter 3 passed in function call

<P=name>

Value of a profile parameter in the current system

<V=name>

Value of a variable in the variable table

<F=name>

Return value of a function module

Note

All physical paths must contain the reserved word <FILENAME> as a placeholder for the physical file name.

If you include parameters of this type in physical file or path names, you are supporting differentiated but standardized file names. For example, the parameter <TIME> can be useful if you save a logical file more than once in a short time. IN addition to the system field values, you can assign names flexibly, especially if you use the last parameters listed:

      You can use <PARAM_1> to <PARAM_3> to put values in file or path names that are passed explicitly when the application program calls the function module FILE_GET_NAME.

      You can use <P=name> to include the values of profile parameters in the current system. If you execute the report RSPARAM, you receive a list of profile parameters and their values.

      You can use <V=name> to include the values of variables that you defined in the control tables with transaction FILE.

      You can use <F=name> to include return values from function modules. The name of a function module used here must have the prefix “FILENAME_EXIT_”. Note that the function module in the reserved word is only addressed with the part of its name after this prefix. For example, if you use the function module FILENAME_EXIT_EXAMPLE, the placeholder is <F=EXAMPLE>. The function module must have the export parameter OUTPUT, and you must not specify a reference type for it. Import parameters must have default values. Table parameters are not supported.

 

 

End of Content Area