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 in using FTP_CONNECT

Former Member
0 Likes
601

Hi,

I have to copy a file from Application server to a specified folder in Presentation server . For this I tried the following FM's.

FTP_CONNECT

FTP_COMMAND

FTP_DISCONNECT

But i am unable to establish a connection using the FM FTP_CONNECT. Exactly what parameters needs to pass to this FM?

I have gone thorugh the forum but unable to get an idea. Here in my case the source will be APP Server and Destination will be Presentation Server . What will be the host i need pass exactly. While i was trying i am getting CERROR (while Debugging the FM)parameter as 2 and because of this the connection was not being established . Please suggest me how can i pass the parameters to this FM.

Thanks,

Bhanu

3 REPLIES 3
Read only

Former Member
0 Likes
500

try this

you have to encrypt your password

CALL FUNCTION 'HTTP_SCRAMBLE'

EXPORTING

SOURCE = p_pwd

sourcelen = gv_slen

key = gv_key

IMPORTING

destination = p_pwd.

p_dest is the SAPFTP Connection, p_host your destination ftp

CALL FUNCTION 'FTP_CONNECT'

EXPORTING

user = p_user

password = p_pwd

host = p_host

rfc_destination = p_dest

IMPORTING

handle = gv_hdl.

Read only

0 Likes
500

Hi Oliver thanks for the quick reply.

I have given destination IP (i.e 157.227.111.24) and the password also scrambled one, but still i am getting the same message like "Attempt to connect to the host 157.227.111.24 is failed". Again CERROR is 2 only.

Do i need to do any configurations for the destination IP .

Thanks,

Bhanu

Read only

0 Likes
500

I think it depends much on your environment

We have for example the user like name@destination@target-IP-Adress , g.. tom@dhl@ 80.121.150.24

And for destination a ip in our environment , from there this package is forwardet to the above ip u2013 but these infos you should get from your system-guys