2012 Nov 15 10:27 AM
Hi Gurus,
I'm having some problems by using standard function FTP_CONNECT. This is a sample program that I'm using to check the ftp connection.
DATA: l_dhdl TYPE i,
l_user(30) TYPE c VALUE 'user',
l_pswd(30) TYPE c VALUE 'password',
l_host(64) TYPE c VALUE 'xxx.xxx.xxx.xxx',
l_dest LIKE rfcdes-rfcdest VALUE 'SAPFTP'.
CALL FUNCTION 'FTP_CONNECT'
EXPORTING
user = l_user
password = l_pswd
host = l_host
rfc_destination = l_dest
IMPORTING
handle = l_dhdl
EXCEPTIONS
not_connected = 1
OTHERS = 2.
By debugging the function I noticed that returns CERROR = 3, so a E202 error. The connection with the parameters I export to the function is available by command line, so I think is not a problem with ftp server.
Could anyone help me, or give me some advices?
Thanks and Regards,
Francesco
2012 Nov 15 10:40 AM
Hi Francesco,
I would advise you to first use program RSFTP002. This program uses all the FTP_ function modules. You test them with your FTP server first and if successful check how this program passes its parameters to the FTP_ function modules.
The error you are getting normally comes when there is something wrong with the FTP user like auth issues, incorrect password, case sensitive letters etc.
Thanks,
Anubhav
Hi Gurus,
I'm having some problems by using standard function FTP_CONNECT. This is a sample program that I'm using to check the ftp connection.
DATA: l_dhdl TYPE i,
l_user(30) TYPE c VALUE 'user',
l_pswd(30) TYPE c VALUE 'password',
l_host(64) TYPE c VALUE 'xxx.xxx.xxx.xxx',
l_dest LIKE rfcdes-rfcdest VALUE 'SAPFTP'.
CALL FUNCTION 'FTP_CONNECT'
EXPORTING
user = l_user
password = l_pswd
host = l_host
rfc_destination = l_dest
IMPORTING
handle = l_dhdl
EXCEPTIONS
not_connected = 1
OTHERS = 2.
By debugging the function I noticed that returns CERROR = 3, so a E202 error. The connection with the parameters I export to the function is available by command line, so I think is not a problem with ftp server.
Could anyone help me, or give me some advices?
Thanks and Regards,
Francesco
2012 Nov 15 10:40 AM
Hi Francesco,
I would advise you to first use program RSFTP002. This program uses all the FTP_ function modules. You test them with your FTP server first and if successful check how this program passes its parameters to the FTP_ function modules.
The error you are getting normally comes when there is something wrong with the FTP user like auth issues, incorrect password, case sensitive letters etc.
Thanks,
Anubhav
2012 Nov 15 1:08 PM
Thanks Anubhav,
now, by watching the code RSFTP002 and adding function HTTP_SCRAMBLE, it works.
Thanks for your advice.
Best Regards,
Francesco
2012 Nov 15 3:57 PM
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |