Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

difference between logical file path and physical file path

Former Member
0 Kudos

Hi,

Can anyone tell me why logical file path is required and why physical file path is required? What exactly is the difference bet them?

Thanks in advance.

Regards,

PS.

3 REPLIES 3

amit_khare
Active Contributor
0 Kudos

Logical path is for downloading file to application Server.

Physical path is for Local Drive.

Regards,

Amit

Reward all helpful replies.

Former Member
0 Kudos

Hi,

The function module FILE_GET_NAME convert a logical path into its corresponding physical path.

The advantage of using logical pathes within your applications is obivous:

If you need to change the physical path you just adjust it within transaction FILE yet no changes are required to your application.

http://help.sap.com/saphelp_erp2005vp/helpdata/en/25/ab3a57df3b11d189fc0000e829fbbd/frameset.htm

The file names that you use in ABAP statements for processing files are physical names. This means that they must be syntactically correct filenames for the operating system under which your R/3 System is running. Once you have created a file from an ABAP program with a particular name and path, you can find the same file using the same name and path at operating system level.

Since the naming conventions for files and paths differ from operating system to operating system, ABAP programs are only portable from one operating system to another if you use the tools described below.

To make programs portable, the R/3 System has a concept of logical filenames and paths. These are linked to physical files and paths. The links are created in special tables, which you can maintain according to your own requirements. In an ABAP program, you can then use the function module FILE_GET_NAME to generate a physical filename from a logical one.

Maintaining platform-independent filenames is part of Customizing. For a full description, choose Tools ® Business Engineer ® Customizing, followed by

Implement. projects ® SAP Reference IMG. On the next screen, choose Basis Components System Administration ® Platform-independent File Names.

For a more detailed description of the function module FILE_GET_NAME, enter its name on the initial screen of the Function Builder and choose Goto Documentation. On the next screen, choose Function module doc.

Another way of maintaining platform-independent filenames is to use the Transaction FILE. The following sections provide an overview of the transaction.

To create a logical filename, choose Logical filename definition, client-independent from the Navigation group box in Transaction FILE, then choose New entries. You define logical filenames

You can either define a logical filename and link it to a logical path (as displayed here), or you can enter the full physical filename in the Physical file field. In the latter case, the logical filename is only valid for one operating system. The rules for entering the complete physical filename are the same as for the definition of the physical path for the logical file. To display further information and a list of reserved words, choose Help.

If you link a logical path to a logical file, the logical file is valid for all syntax groups that have been maintained for that logical path. The filename specified under Physical file replaces the reserved word in the physical paths that are assigned to the logical path. To make the name independent of the operating system, use names that begin with a letter, contain up to 8 letters, and do not contain special characters.

Save your changes.

regards,

Omkar.

former_member194152
Contributor
0 Kudos

Hi,

When u use FM FILE_GET_NAME then u have to pass logical file name which is maintainained in TCode FILE in this transaction mapping between physical and logical filename has been assigned for example parameters for file name creation and path for store file etc..

Please reward if helpful.

Regards

Gagan