2007 Oct 04 7:20 AM
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
The issue was related to user getting locked. Thanks for your assistance.
2007 Oct 04 7:24 AM
r u giving user, pwd correctly?
try giving the ipaddress instead of name to the HOST.
2007 Oct 04 7: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.
2007 Oct 05 12:50 AM
hi guys,
can you guys send some sample code for FM 'FTP_CONNECT'. Thanks.
regards,
FS
2007 Oct 05 1: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..
2007 Nov 22 3:34 AM
The issue was related to user getting locked. Thanks for your assistance.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |