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: 

when T -code FILE is used ???

Former Member
0 Kudos

hi ,

can anybody tell me when T code : FILE is used. what is meant my logical file.

please let me know.

thank you.

madhu

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

You can maintain the same path irrespective of the server/ system:

eg : you have file named :file1 in dev in path:

/unix/root/<b>dev</b>/file1

to

/unix/root/<b>qa</b>/file1

the file is automatically places in directory called qa in qa server as described above

Thanks

Dany

Award points if helpful..

4 REPLIES 4

Former Member
0 Kudos

FILE Transaction - if you want to use file name dynamically then we use File Transaction.

Define logical path,physical path,physical file,logical file then use FM FILE_GET_NAME FM in program.

check the below link :

http://help.sap.com/saphelp_nw04s/helpdata/en/8d/3e4ec2462a11d189000000e8323d3a/content.htm

Thanks

Seshu

ferry_lianto
Active Contributor
0 Kudos

Hi,

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 <FILENAME> 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,

Ferry Lianto

Former Member
0 Kudos

Hi,

You can maintain the same path irrespective of the server/ system:

eg : you have file named :file1 in dev in path:

/unix/root/<b>dev</b>/file1

to

/unix/root/<b>qa</b>/file1

the file is automatically places in directory called qa in qa server as described above

Thanks

Dany

Award points if helpful..

Former Member
0 Kudos

Hi,

As the name suggest, it is not the actual file name, it can be used dynamically where you need the name of the file.. rather than hardcoding the name or adding the current date and time to the file name and generate it dynamically you will go with the logical file names....

in simple words.....

File tcode is used to create the logica file names and file paths for the given physical file. Especially when you are uploading the data from different systems or when your are uploading data with DI method u need these logical file name