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 validate the file path when downloading.

Former Member
0 Kudos

Hi

How to validate the file path when downloading to Presentation or application Server.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi ,

Pls check the link below:

http://www.saptechnical.com/Tips/ABAP/ValidateFilePath.htm

Hope this will be usefull..

Regards,

Sharath

3 REPLIES 3

Former Member
0 Kudos

Hi ,

Pls check the link below:

http://www.saptechnical.com/Tips/ABAP/ValidateFilePath.htm

Hope this will be usefull..

Regards,

Sharath

Former Member
0 Kudos

CALL METHOD cl_gui_frontend_services=>directory_exist

EXPORTING

directory = l_file

RECEIVING

result = l_rc

EXCEPTIONS

cntl_error = 1

error_no_gui = 2

wrong_parameter = 3

not_supported_by_gui = 4

OTHERS = 5.

where l_file is only the path....

Reward point if helpful

Former Member
0 Kudos

hiii

you can validate file path by following way

REPORT zvalidate.
TYPE-POOLS: abap.
DATA: w_direc TYPE string.
DATA: w_bool TYPE abap_bool.
w_dir = 'c:\Myfolder\'.
CALL METHOD cl_gui_frontend_services=>directory_exist
EXPORTING
directory = w_direc
RECEIVING
result = w_bool
EXCEPTIONS
cntl_error = 1
error_no_gui = 2
wrong_parameter = 3
not_supported_by_gui = 4
OTHERS = 5.

IF NOT w_bool IS INITIAL.
WRITE:/ 'Directory exists.'.
ELSE.
WRITE:/ 'Directory does not exist.'.
ENDIF.

regards

twinkal