2007 Jan 03 9:07 PM
Hi,
I have used FTP_CONNECT and then FTP_COMMAND. FTP_CONNECT is successfully executed but FTP_COMMAND fails.
CALL FUNCTION 'FTP_COMMAND'
EXPORTING HANDLE = HDL COMMAND = CMD1
TABLES DATA = RESULT
EXCEPTIONS TCPIP_ERROR = 1 COMMAND_ERROR = 2.
IF SY-SUBRC <> 0.
WRITE:/ 'Cannot execute ',CMD1 ,/ 'error = ', SY-SUBRC.
ENDIF.
I am getting sy-subrc as 1.
Could anyone please under what all conditions do we get TCPIP_ERROR.
Thanks,
Priya
2007 Jan 03 9:25 PM
Hi Priya,
What is the command you are passing in the variable CMD1? Also tell me
1. how have you declared the variable?
2. Is the handle HDL same you have imported from FTP_CONNECT.
- Guru
2007 Jan 03 9:28 PM
Hi Guru,
This code was working fine till 22-Dec. It is suddenly started giving problem.
The command I am passing is PUT with file name. and HDL is declared
Thanks,
Priya
2007 Jan 03 9:31 PM
2007 Jan 04 3:12 AM
Can you post your code, i guess that can help.
As Guru mentioned, check that HDL you are passing to FTP_COMMAND is having the value imported from FM: FTP_CONNECT.
i.e when we execute FTP_CONNECT we get value for Handle. Pass the same value for FTP_COMMAND.
As you were saying, the command executed is for PUT. Is it with reference to two servers. In this case we need to connect to both servers, then execute this command with handle of the destination server.
Regards
Eswar