Skip to Content
author's profile photo Former Member
Former Member

FTP_CONNECT to Windows based server

Hi Experts,

I am using FM <b>'FTP_CONNECT'</b> to send a file from local pc to <b>Windows based server</b>.

I am using the parameters: username, pwd, hostname, rfc destination (when I test the RFC destination SAPFTP in SM59, it connects OK)

I connected to the HOSTNAME from <b>command prompt</b> and it connects OK with same parameters.

But when we try to connect with FM <b>'FTP_CONNECT'</b>, it gives error:

'User has no access authorization for computer HOSTNAME'.

Please advise,

Regards,

FS

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • Posted on Oct 04, 2007 at 06:24 AM

    r u giving user, pwd correctly?

    try giving the ipaddress instead of name to the HOST.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 04, 2007 at 06:34 AM

    Yes, the username, pwd are correctly given and I also tried to give IP instead of HOST Name but still in error of authorization.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 04, 2007 at 11:50 PM

    hi guys,

    can you guys send some sample code for FM 'FTP_CONNECT'. Thanks.

    regards,

    FS

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 05, 2007 at 12:35 AM

    Following is the code we have used and it is working without any problems..

    Password encryption

    data : v_password(20),

    v_key type i value 26101957,

    v_slen type i.

    • --- ENCRYPT PASSWORD

    The password is entered by the user on the selection screen in the parameter p_pswd.

    clear v_password.

    set extended check off.

    v_password = p_pswd.

    translate v_password to lower case.

    v_slen = strlen( v_password ).

    call 'AB_RFC_X_SCRAMBLE_STRING'

    id 'SOURCE' field v_password

    id 'KEY' field v_key

    id 'SCR' field 'X'

    id 'DESTINATION' field v_password

    id 'DSTLEN' field v_slen.

    FTP Connect

    data v_hdl type i.

    call function 'FTP_CONNECT'

    exporting

    user = p_usrid (User id used to connect)

    password = v_password

    host = p_ip_add (IP of the server to be connected)

    rfc_destination = p_sapftp (value is normally SAPFTP or SAPFTPA)

    importing

    handle = v_hdl

    exceptions

    not_connected = 1

    others = 2.

    From your msg it looks that the FTP connection is not the problem.. The problem is with the permissions for the user, with which you are doing the ftp, has..

    This user does not have write permissions in the directory in which it is trying to write the file..

    Try doing the FTP manually.. If this works then the FTP Command u r using after the FTP Connect should also work..

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 22, 2007 at 03:34 AM

    The issue was related to user getting locked. Thanks for your assistance.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.