cancel
Showing results for 
Search instead for 
Did you mean: 

USER HOST RAISING NOT_CONNECTED From function module FTP_CONNECT

Former Member
0 Kudos

Hi,

I am getting the Following Error from the function module FTP_CONNECT

"Failed to Connect to the FTP server xxxxx.xx.xxx".Inside the function module at the statement

SET EXTENDED CHECK OFF.
CALL FUNCTION 'FTP_CONNECT' DESTINATION RFC_DESTINATION
     EXPORTING USER = USER PWD = PASSWORD ACCT = ACCOUNT HOST = HOST
               TRACE = FTP_TRACE GUSER = GATEWAY_USER
               GPWD = GATEWAY_PASSWORD GHOST = GATEWAY_HOST
     IMPORTING HANDLE = HANDLE ERROR = CERROR
     EXCEPTIONS SYSTEM_FAILURE = 1 COMMUNICATION_FAILURE = 2.
SET EXTENDED CHECK ON.

ERROR = CERROR iam getting value as 3
CASE CERROR.
 WHEN 1. MESSAGE E200 RAISING NOT_CONNECTED.
 WHEN 2. MESSAGE E201 WITH HOST RAISING NOT_CONNECTED.
 WHEN 3. MESSAGE E202 WITH USER HOST RAISING NOT_CONNECTED.
 WHEN 4. MESSAGE E203 WITH HOST RAISING NOT_CONNECTED.
 WHEN 5. MESSAGE E215 RAISING NOT_CONNECTED.
ENDCASE.

I have reffred the below theards

http://forums.sdn.sap.com/click.jspa?searchID=35902988&messageID=7748144

http://forums.sdn.sap.com/click.jspa?searchID=35902988&messageID=3952960

Regards

Anu

Accepted Solutions (0)

Answers (2)

Answers (2)

prasenjit_sharma
Active Contributor
0 Kudos

Hi,

You need to check your SM59 RFC Destination. Enter the name of the RFC Destination and click on 'test connection'. And see the if it is connected.

Regards

Prasenjit

brad_bohn
Active Contributor
0 Kudos

In this case, an RFC destination check is not very helpful. That only verifies that the sapftp.exe program is installed and reachable (either on the local GUI installation for SAPFTP or on the app server for SAPFTPA) but it does not identify or troubleshoot a user host connection issue which is being raised by FTP_CONNECT.

To the OP, check your credentials using Wim's suggestion or by using the command prompt from your PC. Also, if this is your first attempt at FTP from SAP, you will benefit from setting up a local FTP server on your PC and running tests to that location first. This will verify that your program is working correctly before trying to hit a remote server and determining whether other factors are involved such as a firewall. Make sure you are running in passive mode as well.

Former Member
0 Kudos

Hello,

It means that there is something wrong with the FTP user (wrong password, missing authorisations, case sensitive, ...).

What I do when I have FTP problems with FTP_CONNECT and FTP_COMMAND is performing some tests with the standard SAP test programs for FTP.

Example program : RSFTP002

This program uses all the FTP_ functions, you can first test them with your FTP server, if successfull check how this program passes its parameters to the function modules.

Success.

Wim