Application Development 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: 

FTP_connect

Former Member
0 Kudos

Hi All,

I am using FTP_connect FMto connect to the ftp site but i am getting the error :-

Attempt to set up a connection to FTP ftp.pcbnetworx.com (this is the host ftp) failed .

anybody help please....

Ruchi

12 REPLIES 12

Former Member
0 Kudos

Hi,

Are you able to connect to the FTP from OS level and also for the authorization.

[Check this | http://abap-gallery.blogspot.com/2007/07/ftp.html];

[http://wiki.sdn.sap.com/wiki/display/Snippets/ABAPsolutiontoimplementFTP+transactions]

Shiva

0 Kudos

i can connet to ftp on command prompt

0 Kudos

Hi

Please go through the below thread, it is having the solution for the same kind of problem

Shiva

0 Kudos

Any Help.....still struggling with the same...

0 Kudos

Hi

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.

Shiva

0 Kudos

Thanks Shiva...tried that one but still error is ther...

0 Kudos

Please check for authorization and also have a look into the thread mentioned in earlier.

Shiva

0 Kudos

Hi, I can see FTP works using a command prompt. Is that from SAP application server or from frontend ? When using FTP_CONNECT then RFC destionation SAPFTP or SAPFTPA is used. Can you test these RFC destionations in SM59 ? RFC destionation SAPFTP corresponds to FTP from frontend. SAPFTPA corresponds to FTP from SAP application server.

Regards Jack

0 Kudos

Thanks Jack, RFC destination in sm59 works fine....

0 Kudos

Hi,

You need to use below before using FTP_Connect FM

call function 'HTTP_SCRAMBLE'
exporting
source = pwd
sourcelen = slen
key = key
importing
destination = pwd.

Now after getting scrablled possword becomes lengthier then originally what it is.

So declare parameter PWD of type c length 40.

Also as per the error there is a possibility that IP which you have used may be wrong.

Give exact IP address and not any web link.

0 Kudos

Thnaks Umang....i tried http_scramble .....but no luck so far

0 Kudos

Hi,

HTTP_SCRAMBLE is must but as I said dont forgrt to use variable PWD of type c length 40.

Also check your parameters RFC destination as SAPFTPA

User ID as same user ID through which you are doing ftp from OS e.g. ROOT or "<SYSTEMID>ADM"

Password : scramble password using "HTTP_scramble" FM

IP of your Host : e.g 100.11.23.11 and not like ftp.host.net

Here possibility what I see is either you are not getting scramble password correctly, means if characters are of variable PWD is laser than what it requires to be then password getting scramble can be wrong

User ID though which you are trying to login: as if you are connecting from OS though root and in program using some other system adm ID then there can be a problem

other possibility is IP what you have given can be wrong, check with your networking guy if there are two IP, one internal and other public IP. in this case through OS you can connect the host server using link og the server but though SAP program you need to give exact internal or public IP.