cancel
Showing results for 
Search instead for 
Did you mean: 

Unix path..need to find file or directory

Former Member
0 Kudos

HI

User enters path in the selection screen. He might include file name or just specify upto the directory.

i need to find out whether it's file or directory. Please let me know..if there's a function module

thanks

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi All

please send me sample code. for example..user enters

/pw/data/erp/D5S/sd/up/mass/wcs.

then i need to find out it's file or directory.

i'm getting exception. please help.

Thanks

Former Member
0 Kudos

HI,

TRY FM EPS_GET_FILE_ATTRIBUTES

THANKS,

PRIYA.

Former Member
0 Kudos

Hi priya and vijay

please send me sample code. for example..user enters

/pw/data/erp/D5S/sd/up/mass/wcs.

then it should say...it's not file.

i'm getting exception. please help.

Thanks

Former Member
0 Kudos

I am not sure we can check this. but i am proposing you another solution.

give 2 parameters to the user.

1 for File path

2 for file name.

this is useful if you are asking for more than 1 input/output file name from the user.

in the first field he will enter only FILE PATH

& in all other fields only related FILENAMES.

regards

srikanth

Former Member
0 Kudos

Hi Ramakrishna,

To know whether file exists, use method

<b>FILE_EXIST</b> of class <b>CL_GUI_FRONTEND_SERVICES</b>.

To know whether directory exists, use method <b>DIRECTORY_EXIST</b> of class <b>CL_GUI_FRONTEND_SERVICES</b>.

Under both methods filename is of type STRING and will retutn a boolean variable which states whether (Directory/File) exists or not.

Thanks,

Vinay

Message was edited by: Vinaykumar Gorrela

Former Member
0 Kudos

Hi,

check the parameter FILE_TYPE in the

FM - EPS_GET_FILE_ATTRIBUTES .

Best Regards,

Vijay

NB : pls award with points, if it is helpful.