Application Development and Automation 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: 
Read only

Get logical file name

Former Member
0 Likes
4,572

Hi Gurus,

I know the physical path of a file. Can anyone tell me how do I view this file? I do not know the logical file name, hence cannot use AL11 to view the file.

Regards,

Rishi

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,674

Hi,

There are some function modules, Can you please check:

FILE_GET_NAME_USING_PATH : Generate a complete file name with file name and logical path

FILE_GET_NAME : Assign the Physical File Name Using a Logical File Name

FILE_GET_NAME_AND_LOGICAL_PATH: Assign physical file names and get logical path

Below link also helpfull.

[http://help.sap.com/saphelp_nw04/helpdata/EN/8d/3e4ec2462a11d189000000e8323d3a/frameset.htm]

Regrads,

Lokesh.

Edited by: Lokesh Tarey on Apr 20, 2010 12:53 PM

7 REPLIES 7
Read only

Former Member
0 Likes
2,675

Hi,

There are some function modules, Can you please check:

FILE_GET_NAME_USING_PATH : Generate a complete file name with file name and logical path

FILE_GET_NAME : Assign the Physical File Name Using a Logical File Name

FILE_GET_NAME_AND_LOGICAL_PATH: Assign physical file names and get logical path

Below link also helpfull.

[http://help.sap.com/saphelp_nw04/helpdata/EN/8d/3e4ec2462a11d189000000e8323d3a/frameset.htm]

Regrads,

Lokesh.

Edited by: Lokesh Tarey on Apr 20, 2010 12:53 PM

Read only

Former Member
0 Likes
2,674

Hi Regal,

See following code.

Hope this will help you.


DATA LV_FIELDNAME TYPE CHAR50.

* Get the physical file path for logical file path imported
  CALL FUNCTION 'FILE_GET_NAME_USING_PATH'
    EXPORTING
      LOGICAL_PATH               = IM_FPATH
      FILE_NAME                  = IM_FILENAME
    IMPORTING
      FILE_NAME_WITH_PATH        = CH_PHY_PATH
    EXCEPTIONS
      PATH_NOT_FOUND             = 1
      MISSING_PARAMETER          = 2
      OPERATING_SYSTEM_NOT_FOUND = 3
      FILE_SYSTEM_NOT_FOUND      = 4
      OTHERS                     = 5.

Regards,

Pravin

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
2,674

>

> I know the physical path of a file. Can anyone tell me how do I view this file? I do not know the logical file name, hence cannot use AL11 to view the file.

In AL11 the physical file paths are displayed & not the logical file-path.

Read only

Former Member
0 Likes
2,674

Hi Rishi,

First of whole what does the physical path of a file refer to? Is it server physical path or a physical path on your own computer (client side), or an AL11 path?

I always use for handling server physical path files the OPEN DATASET statement. For data on my computer (client side) I use GUI_UPLOAD combined with class for frontend services.

Hope it helps,

Florin

Read only

Former Member
0 Likes
2,674

Thanks, for your replies.

Let me make the query simpler. I have this server physical address /usr/sap/trans/bin/. How do I view the file in this location?

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
2,674

Looks like you want to look at the transport files (co & data files) stored in the app server

If i remember correctly i have a folder DIR_TRANS in my app server.

Read only

Former Member
0 Likes
2,674

Suhas,

What is the solution you are trying to suggest?