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

Getting physical path name from logical path name

Former Member
0 Likes
10,866

Hi experts,

I need to develop an inbound interface, wherein I have a requirement in which I need to get physical path name from logical path name. Also, the constraint is that I need to retrieve only files having a particular extension *.txt.

Is there any FM/table through which this can be achieved?

Thanks,

Mohit.

Hi experts,

I need to develop an inbound interface, wherein I have a requirement in which I need to get physical path name from logical path name. Also, the constraint is that I need to retrieve only files having a particular extension *.txt.

Is there any FM/table through which this can be achieved?

Thanks,

Mohit.

3 REPLIES 3
Read only

Former Member
0 Likes
4,312

Hi,

Use function module "FILE_GET_NAME" to get the physical file path based on logical file name.

Regards

Vinod

Read only

GauthamV
Active Contributor
0 Likes
4,312

You can use FILE_GET_NAME FM.

Also the same can be maintained using FILE transaction.

Read only

Former Member
0 Likes
4,312

Hi,

U can get the physical path from the logical path using the FM "FILE_GET_NAME_USING_PATH".

CALL FUNCTION 'FILE_GET_NAME_USING_PATH'

EXPORTING

CLIENT = SY-MANDT

LOGICAL_PATH = C_logical_path

OPERATING_SYSTEM = SY-OPSYS

FILE_NAME = l_filename

ELEMINATE_BLANKS = 'X'

IMPORTING

FILE_NAME_WITH_PATH = l_physical_path

EXCEPTIONS

PATH_NOT_FOUND = 1

MISSING_PARAMETER = 2

OPERATING_SYSTEM_NOT_FOUND = 3

FILE_SYSTEM_NOT_FOUND = 4

OTHERS = 5.

Here, c_logical_path is of type FILEPATH-PATHINTERN and will hold the logical path name.

Regards,

Vaibhav