2008 Jan 02 8:25 AM
Hi,
I have requirement to upload file from FTP server
Using the function module FTP_CONEECT but it is getting failed
Is there any other way to do it Or any parameters I am missing
Thanks in advance
Sachin
Hi,
I have requirement to upload file from FTP server
Using the function module FTP_CONEECT but it is getting failed
Is there any other way to do it Or any parameters I am missing
Thanks in advance
Sachin
2008 Jan 02 9:30 AM
Hi Sachin,
The FM FTP_CONNECT is only connect to a ftp server by specifying RFC destination, user name and password. It will not help u upload file from ftp location...
-Muktar
2008 Jan 02 9:37 AM
Use the FM's in this order
1. CALL FUNCTION 'FTP_CONNECT'
2. CALL FUNCTION 'FTP_COMMAND'
3. CALL FUNCTION 'FTP_DISCONNECT'
Usage:
CALL FUNCTION 'FTP_CONNECT'
EXPORTING
user = user
password = password
host = host
rfc_destination = rfc_destination
IMPORTING
handle = wa_handle
EXCEPTIONS
not_connected = 1
OTHERS = 2.
CALL FUNCTION 'FTP_COMMAND'
EXPORTING
handle = wa_handle
command = 'ASCII'
TABLES
data = result_itab
EXCEPTIONS
tcpip_error = 1
command_error = 2
data_error = 3
OTHERS = 4.
CALL FUNCTION 'FTP_DISCONNECT'
EXPORTING
handle = wa_handle
EXCEPTIONS
OTHERS = 1.
-Muktar
2008 Jan 02 9:51 AM
Thanks for reply
But I am getting error "Attempt to set up connection to ftp://.........failed"
parameters I am passing to 'FTP_CONNECT' are
USER ABC.
PASSWORD *****
HOST ftp://..................................
RFC_DESTINATION SAPFTPA
But if i try to log on by IE i can log into the server with same user ID and password
Is there any issue with RFC_DESTINATION?
2008 Jan 02 9:57 AM
Hi Sachin...
Go to Tcode SM59 and check the rfc destination...
-Muktar
2008 Jan 02 10:02 AM
Do we need to create new RFC destination ? if yes how should we create new one
I am using the same that is available in SAP
2008 Jan 02 10:10 AM
Hi Sachin,
Go to SM59-> select the rfc destination you are using and test connection... you will know if the rfc is working fine..
-Muktar
2008 Jan 02 9:53 AM
hi,
go thro this link
http://www.sap-basis-abap.com/sapac008.htm
hope it helps..
Regards,
Vijayalakshmi B
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |