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

Network file path validation

Former Member
0 Likes
506

how to validate file path which is on the network, weather given file exists in the given path or not.

kindly suggest Function modules or any method.

method FILE_EXIST in the class CL_GUI_FRONTEND_SERVICES is taken care only for the local path which is there in the local system. I need it for the network path.

After that, i would like to read excel file from the network.

Kindly suggest any method.

i am using F4 function module to take input to the file name parameter. if user didn't used those options and directly entered the file path then i have to validate that path.

2 REPLIES 2
Read only

Former Member
0 Likes
456

Hi,

Try open dataset for output, if sy-subrc <> 0 then network is invalid.

Cheers.

...Reward if useful.

Read only

Former Member
0 Likes
456

When you say "on the network" do you mean that you are able to see it in Windows Explorer from your PC i.e. is it drive mapped already? If so, then the methods in CL_GUI_FRONTEND_SERVICES should work just fine. Or is it a network server that is going to be accessible from your SAP application server (via FTP for example)?

Jonathan