‎2006 Dec 05 5:12 AM
Hi all,
Please do answer to my question's regarding FTP.
1.What is difference between 'FTP_COMMAND' AND 'FTP_COMMAND_LIST'.
2.Why do we use these commands.
3.Iam using the directory path as 'D:\FTPROOT\' in the ftp_command_list. But iam getting an error.
iam using the following code.
data: begin of l_i_data occurs 0,
line(100),
end of l_i_data.
data: begin of l_i_commands occurs 0,
line(100),
end of l_i_commands.
if p_rem_dir <> ''.
concatenate 'cd' D:\FTPROOT\' into l_i_commands-line
separated by space.
append l_i_commands. clear l_i_commands.
endif.
call function 'FTP_COMMAND_LIST'
exporting
handle = p_handle "1
importing
command_index = l_cmd_index "0
tables
data = l_i_data
commands = l_i_commands "'cd' D:\FTPROOT\' "
exceptions
tcpip_error = 1
command_error = 2
data_error = 3
others = 4.
Please send your suggestions,
Rajesh.
‎2006 Dec 05 7:29 AM
Hi,
look documentation to fm 'FTP_COMMAND' and
sample report rsftp002 and other rports of device class SFTP
A.
‎2006 Dec 05 7:51 AM
the ftp commands are used to execute FTP commands on the FTP server... u need to login to the FTP first and then execute the command..the commands will be of the kind GET , LS etc.. In case u need to execute only a single command, you can use the firstfunc module..else if number of commands needs to be executed ... use the other one...
u can also use
SXPG_COMMAND_EXECUTE