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: 

How to check existence of Local Drive (or Network Drive)..

Former Member
0 Kudos

Dear ABAP Guru,

I need to download file from SAP to Local Drive or Network Shared Drive that are mapped in my computer

eg.
SharedDrive\MyFolder\ is mapped as drive G:\ in my computer. (use information of this example for below..)

I've try to download file from SAP using FM 'GUI_DOWNLOAD' and the file path is using path of mapped drive

eg. G:\test_data.XLS

I see it's worked.

But, for each location on network shared drive, users on difference client computer may map them to difference drive name. such as user A map as drive F:/ or user B map as drive I:/ for
SharedDrive\MyFolder\

My program is have selection screen field for input mapped drive name, but I worry about human errors

So.. I need to know how to check existence of Local Drive or Network Drive and File Path before execcute FM GUI_DOWNLOAD.

Best Regard & Thank you all

nattapash

Edited by: Nattapash Changpant on Dec 11, 2008 4:34 AM

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

You can try methods DIRECTORY_EXIST / FILE_EXIST of class CL_GUI_FRONTEND_SERVICES.

Search the forum for sample code.

Regards

Karthik D

2 REPLIES 2

Former Member
0 Kudos

Hi,

You can try methods DIRECTORY_EXIST / FILE_EXIST of class CL_GUI_FRONTEND_SERVICES.

Search the forum for sample code.

Regards

Karthik D

Former Member
0 Kudos

Thanks a lot, Karthik D.

Your answer is solve my problem.