2008 Jul 10 3:30 AM
Dears ,
I have connect FTP server and want to delete one file on FTP server,
But when I use:
data lv_command(50) type c.
lv_command = 'DELETE test.txt'.
CALL FUNCTION 'FTP_COMMAND'
EXPORTING
handle = p_handle
command = lv_command
TABLES
data = lt_ftp_result
EXCEPTIONS
tcpip_error = 1
command_error = 2
data_error = 3
OTHERS = 4.
The sy-subrc = 2, callled 'Invalid Comand'
I also try other command for example:
DELE test.txt
MDELETE test.txt
all the above commands are have a result : Invalid command.
So how can I delete FTP file use ABAP?
Thanks
2008 Jul 10 11:35 AM
Dears ,
I have connect FTP server and want to delete one file on FTP server,
But when I use:
data lv_command(50) type c.
lv_command = 'DELETE test.txt'.
CALL FUNCTION 'FTP_COMMAND'
EXPORTING
handle = p_handle
command = lv_command
TABLES
data = lt_ftp_result
EXCEPTIONS
tcpip_error = 1
command_error = 2
data_error = 3
OTHERS = 4.
The sy-subrc = 2, callled 'Invalid Comand'
I also try other command for example:
DELE test.txt
MDELETE test.txt
all the above commands are have a result : Invalid command.
So how can I delete FTP file use ABAP?
Thanks
2008 Jul 10 11:35 AM
2008 Jul 10 1:42 PM
I found this in some of my old code:
*Delete the existing file
CONCATENATE 'del' ftpfile1 INTO delfile1 SEPARATED BY SPACE.
CALL FUNCTION 'FTP_COMMAND'
EXPORTING
handle = hdl
command = delfile1
TABLES
data = result
EXCEPTIONS
command_error = 1
tcpip_error = 2.
*End of deleting the existing file
I think it's just 'del' to delete the file.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |