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

Error while downloading file

Former Member
0 Likes
1,642

Hi all,

I am facing some problem while downloading the data to presentation server.In the program they are using the FM 'WS_DOWNLOAD' to download the file.But its not working and setting the sy-subrc eq 2 which means 'Cannot Write to File'.wat could be the possible reasons?

Thanks..

4 REPLIES 4
Read only

Manohar2u
Active Contributor
0 Likes
1,111

Might be the file name is already exitings? or the path is invalid

Regds

Manohar

Read only

LucianoBentiveg
Active Contributor
0 Likes
1,111

Check if you have rights to create files in the folder folder.

Regards.

Read only

0 Likes
1,111

Hi,

That error pops up if you donot have authorizations in creating/writing a file on the presentation server ...and also if the file path that you have given is incorrect......

* download report to file
  CALL FUNCTION 'WS_DOWNLOAD'
    EXPORTING
      filename = 'C:tempreport.txt'
      filetype = 'ASC'
    TABLES
      data_tab = it_report.

Check whether you have passed the parameters as per this

http://www.sapdevelopment.co.uk/reporting/rep_capturerep.htm

Else please paste your code here

Read only

Former Member
0 Likes
1,111

Hi,

The data could not be loaded into the front end file. Possible reasons:

- File name has the wrong format

- Error in operating system or network

- No authorization to create or write to this file

- Data locked by another user