Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

problem connecting to FTP server

Former Member
0 Likes
724

Hi,

While calling the function module FTP_CONNECT, i am getting the error 'FTP_CONNECTION_FAILED'.

I called like below and i passed values for userid, password, host, and rfc_destination.

CALL FUNCTION 'FTP_CONNECT'

EXPORTING

user = userid

password = password

host = host

rfc_destination = rfc_destination

IMPORTING

HANDLE = l_ftp_handle

EXCEPTIONS

NOT_CONNECTED = 1

OTHERS = 2.

IF sy-subrc <> 0.

raise ftp_connection_failed.

ENDIF.

Could you please tell me cause for the error.

Thanks,

venkatesh.

Hi,

While calling the function module FTP_CONNECT, i am getting the error 'FTP_CONNECTION_FAILED'.

I called like below and i passed values for userid, password, host, and rfc_destination.

CALL FUNCTION 'FTP_CONNECT'

EXPORTING

user = userid

password = password

host = host

rfc_destination = rfc_destination

IMPORTING

HANDLE = l_ftp_handle

EXCEPTIONS

NOT_CONNECTED = 1

OTHERS = 2.

IF sy-subrc <> 0.

raise ftp_connection_failed.

ENDIF.

Could you please tell me cause for the error.

Thanks,

venkatesh.

4 REPLIES 4
Read only

Former Member
0 Likes
679

Hi,

Are using the correct authontication?

if you are connecting the FTP server from offshore sometime you face this problem..

Thanks,

Raghav

Read only

former_member206396
Active Participant
0 Likes
679

Hi,

Call FM, 'HTTP_SCRAMBLE' before connecting to ftp connect.

Are u doing it.

Please check the sample code.

slen1 = strlen( p_sappwd ).

CALL FUNCTION 'HTTP_SCRAMBLE'

EXPORTING

SOURCE = p_sappwd

SOURCELEN = slen1

KEY = mi_key

IMPORTING

DESTINATION = p_sappwd.

*} REPLACE

CALL FUNCTION 'FTP_CONNECT'

EXPORTING

user = p_sapusr

password = p_sappwd

host = dhost

rfc_destination = dest

IMPORTING

handle = dhdl.

Ram

Read only

Former Member
0 Likes
679

You need to scramble the password before passing it on to the FM.

Use FM 'HTTP_SCRAMBLE' to scramble the password and then pass on to the FTP_CONNECT FM.

Read only

andreas_mann3
Active Contributor
0 Likes
679

try reports like rsftp* - e.g. rsftp004

A.