The purpose of this page is to detail how to define logical path, logical file names, and also physical paths and physical file names required for when you archive application data. When you archive application data, you need to change the names and target directories of the archive files.
Archived data is stored in archive files in the file system. If an archive file is created by the write program, then it's physical file name is derived from a logical file name. In the same way, the physical path name is derived from a logical path name. The logical file name and the logical path should be maintained to get an appropriate physical file name and physical path name.
Defining a Logical Path Name
First determine the target directory in which you want to create the archive files of a certain archiving object. The physical name of this
directory is stored in a logical path name.
Call Transaction FILE.
Select 'Logical file path definition'. Select an already existing logical path or select 'New entries' to enter a new logical path.
Now select the option 'Assignment of physical paths to logical path':
Double-click on this line 'Assignment of Physical Paths to Logical Path' in order to select a syntax group. You can also create a new entry for a syntax group if the one your require is not yet available.
Double-click on the appropriate syntax group to branch into it:
Assign a physical path to this logical path. Parameters are available to you that are filled with values during runtime. This enables you to generate
different physical paths from a logical path name. You will get a list of all the available parameters by clicking the 'F1' button while in the 'Physical path' field:
When you assign the physical path to the logical path name, the <FILENAME> symbol must always be at the end of the physical path name. This symbol is replaced during runtime by the physical file name.
Example: You have created a subdirectory called 'archiving' for archive files in the global directory. The physical path name should be defined as follows:
<P=DIR_GLOBAL>/archiving/<FILENAME> (syntax group UNIX)
<P=DIR_GLOBAL>\archiving\<FILENAME> (syntax group WINDOWS NT)
If your system contains servers from various syntax groups (for example, consisting of NT and UNIX servers), then every syntax group should be maintained. Make sure that the definitions for the different syntax groups point to the same directory.
IMPORTANT: The extension '.ARCHIVE' should not appear at the end of the physical path definition. File name extensions such as '.ARCHIVE' should be
specified in the definition of the physical file name only.
Defining a Logical File Name
After creating the logical path name, you need to create a logical file name. Select the menu option 'Logical File Name Definition, Cross-Client' and an existing Logical file:
You can also create a new entry by selecting 'New Entries' at the top of the screen.
Double-click on the selected Logical file (in this case 'ARCHIVE_DATA_FILE'). This enables you to enter the definition of the physical file name. Both the 'Physical file' and 'Logical path' fields need to be maintained here.
In the 'Logical path' field you need to enter the logical path name that you have already defined to the existing logical file name.
Define the required physical file names in the 'Physical file' field. The available parameters can be seen by clicking the 'F1' key when the cursor is positioned in the field. The parameters chosen for this Physical file field are analyzed and fillled at runtime.
The most commonly used parameters are the following:
<PARAM_1> = Application ID (BC, FI, HR, ...)
<PARAM_2> = One-digit alphanumerical number (0-9, A-Z)
<PARAM_3> = Name of the archiving object
Parameter <PARAM_2> is increased within an archiving run. with an existing file of the same name would otherwise occur. This parameter should always be part of the physical file name definition in order to avoid running out of available file names. To ensure that you have a large amount of available names for any one archive session, the following entry is recommended in this 'Physical file' field:
Assign a Logical File Name to the Archiving Object
The logical file name must now be assigned to the archiving object.
Go to transaction SARA and enter the name of the archive object and click on 'Customizing' button:
Select 'Technical settings':
Now assign the logical file name to the archive object by entering the appropriate logical file name in the 'Logical file name' field:
Related SAP Notes/KBAS:
SAP Note 1257638 Input field for logical file name is too short