2009 Sep 30 7:11 AM
Dear Friends,
I know there are lots of thread for FTP_Connect but still my query is not resolved so I thought I should post a new query.
I am trying to use FTP_Connect FM for doing FTP to another server. I am passing all the requisite parameters to this function module i.e. User Name, Password, Hots name and FRC destination but still not able to connect to the server.
When I try to connect from the OS level or from command prompt I am able to login onto the FTP server and do the operation but not from SAP.
I would request If anyone has done this in thepast and someone can sincerely advise me on this.
Many thanks.
Regards,
Sushil Pathak
Dear Friends,
I know there are lots of thread for FTP_Connect but still my query is not resolved so I thought I should post a new query.
I am trying to use FTP_Connect FM for doing FTP to another server. I am passing all the requisite parameters to this function module i.e. User Name, Password, Hots name and FRC destination but still not able to connect to the server.
When I try to connect from the OS level or from command prompt I am able to login onto the FTP server and do the operation but not from SAP.
I would request If anyone has done this in thepast and someone can sincerely advise me on this.
Many thanks.
Regards,
Sushil Pathak
2009 Sep 30 7:15 AM
2009 Sep 30 7:21 AM
Hello -
Use the following:
CALL FUNCTION 'FTP_CONNECT'
EXPORTING
user = lv_user
password = lv_passwd
host = lv_host
rfc_destination = lc_dest
IMPORTING
handle = lv_handle
EXCEPTIONS
not_connected = 1
OTHERS = 2.Make sure Username, Password and RFC destination are given correctly.
Thanks,
2009 Sep 30 7:25 AM
I tried doing the same thing but I am getting sy-subrc as 1.
Regards,
Sushil
2009 Sep 30 7:26 AM
Hello -
Check if the RFC destination is maintained in RFCDES table.
2009 Sep 30 7:33 AM
2009 Sep 30 7:42 AM
Is the RFCTYPE in RFCDES table set to 'T' (Start an external program via TCP/IP) for the RFC destination you are giving?
2009 Sep 30 7:44 AM
2009 Sep 30 7:49 AM
Hello -
Try using the following before you call the FTP_CONNECT
slen = strlen( pwd ).
call function 'HTTP_SCRAMBLE'
exporting
source = pwd
sourcelen = slen
key = key
importing
destination = pwd.Now use this password which you get from the above FM in the FTP_CONNECT. Guess you are facing the problem due to some kind of password encryption.
Thanks,
2009 Sep 30 7:56 AM
for Creating RFC Destination for FTP.
Run program: RSFTP005.
The RFC destinations SAPFTP and SAPFTPA will be created automatically.
SAPFTP (for local system)
SAPFTPA (for running in Application server)(This is used for file transfer in background.
Code sample for developing FTP programs can be got from report program
RSFTP002
RSFTP007
RSFTP008
2009 Sep 30 8:00 AM
Thanks Vijay, I will try it out and will let you know.
Regards,
Sushil
2009 Nov 16 2:24 AM
Hi,
Do you have how to handle Chinese character in text file by using SAPFTP and SAPFTPA ?
Because we found there is no problem to read Chinese character by SAPFTP.
But when we use schedule job and read file from FTP server in background by SAPFTPA, same file, same Chinese characters cannot read normally ....
Can anyone help ?
Thanks.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |