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: 

File unable to create in AL11. Using FM FTP_COPY

former_member196331
Active Contributor
0 Kudos

hi,

Need Small information.
As per my requirement i need to Copy Data from 1 file to and then Create new file in the Same directory.
Using below FM : CALL FUNCTION 'FTP_COPY'

In the Results i am getting error message like 553 Could not create file. ( i am unable to upload the image)

I want to Create the Data1 file in the Same path. (file not exists) it should create automatically.

in the above FM. below are the lines coming in the Return message.

PORT Command Destination

200 PORT command successful. Consider using PASV.
PORT Command Source
200 PORT command successful. Consider using PASV.
Source: ---> RETR /usr/sap/Q2A/xfer/data.csv
150 Opening ASCII mode data connection for /usr/sap/Q2A/xfer/data.csv (4406379 bytes).
Dest: ---> STOR /usr/sap/Q2A/xfer/data1.csv
553 Could not create file.

Any information please update me.

4 REPLIES 4

michael_piesche
Active Contributor
0 Kudos

553 is a permission denied error from the FTP Server.

Did you check whether you can upload a file with Trx. CG3Z to the same folder?
You most likely will have to ask a Basis administrator for the file system of the application server.

Another option could be to download, 'copy' and upload the file again with FTP_R3_TO_CLIENT and FTP_CLIENT_TO_R3.

Abinathsiva
Active Contributor
0 Kudos

Hi,

Through open dataset start writing the file directly in AL11 folder, if it's ftp folder then FTP_SCRAMBLE, FTP_CONNECT file path write the file FTP_CLOSE can help.

Sandra_Rossi
Active Contributor
0 Kudos

I think what is important here is "Consider using PASV."

Call the command 'set passive on' with FTP_COMMAND before FTP_COPY.

michael_piesche
Active Contributor
0 Kudos

newb, did you solve your problem or are same or other issues still occurring?