2008 May 21 12:40 PM
Hello, everyone.
While activating FM HTTP_CONNECT I get an error message that my user has no authorization for the remote ftp computer althogh via cmd I'm connecting the same ftp computer successfully.
Does anyone know why ??
Here's my code:
*--> Scramble ftp password
SET EXTENDED CHECK OFF.
LV_LEN = STRLEN( FTP_PSS ).
CALL FUNCTION 'HTTP_SCRAMBLE'
EXPORTING
SOURCE = FTP_PSS
SOURCELEN = LV_LEN
KEY = '26101957'
IMPORTING
DESTINATION = FTP_PSS.
*--> Connect to FTP server
CALL FUNCTION 'FTP_CONNECT'
EXPORTING
USER = FTP_USR
PASSWORD = FTP_PSS
HOST = FTP_ADR
RFC_DESTINATION = ''SAPFTP'
IMPORTING
HANDLE = LV_HDL
EXCEPTIONS
NOT_CONNECTED.
2008 May 21 12:47 PM
Hi,
Check out this , may be helpful to you
CALL FUNCTION 'FTP_CONNECT'
EXPORTING
user = user
password = pwd
host = host
rfc_destination = dest
IMPORTING
handle = hdl
EXCEPTIONS
not_connected = 8.
CASE sy-subrc.
WHEN 0.
WHEN OTHERS.
RAISE connection_error.
ENDCASE.
CALL FUNCTION 'FTP_COMMAND'
EXPORTING
handle = hdl
command = transfer_type
TABLES
data = data
EXCEPTIONS
command_error = 1
tcpip_error = 2
data_error = 3.
CASE sy-subrc.
WHEN 0.
WHEN 1.
RAISE command_error.
WHEN 2.
RAISE tcpip_error.
WHEN 3.
RAISE data_error.
WHEN OTHERS.
RAISE other_error.
ENDCASE.
CALL FUNCTION 'FTP_COMMAND'
EXPORTING
handle = hdl
command = ftp_command
compress = compress
verify = verify
TABLES
data = data
EXCEPTIONS
command_error = 1
tcpip_error = 2
data_error = 3.
CASE sy-subrc.
WHEN 0.
WHEN 1.
RAISE command_error.
WHEN 2.
RAISE tcpip_error.
WHEN 3.
RAISE data_error.
WHEN OTHERS.
RAISE other_error.
ENDCASE.
CALL FUNCTION 'FTP_DISCONNECT'
EXPORTING
handle = hdl.
Thanks
Aditya
Hello, everyone.
While activating FM HTTP_CONNECT I get an error message that my user has no authorization for the remote ftp computer althogh via cmd I'm connecting the same ftp computer successfully.
Does anyone know why ??
Here's my code:
*--> Scramble ftp password
SET EXTENDED CHECK OFF.
LV_LEN = STRLEN( FTP_PSS ).
CALL FUNCTION 'HTTP_SCRAMBLE'
EXPORTING
SOURCE = FTP_PSS
SOURCELEN = LV_LEN
KEY = '26101957'
IMPORTING
DESTINATION = FTP_PSS.
*--> Connect to FTP server
CALL FUNCTION 'FTP_CONNECT'
EXPORTING
USER = FTP_USR
PASSWORD = FTP_PSS
HOST = FTP_ADR
RFC_DESTINATION = ''SAPFTP'
IMPORTING
HANDLE = LV_HDL
EXCEPTIONS
NOT_CONNECTED.
2008 May 21 12:47 PM
Hi,
Check out this , may be helpful to you
CALL FUNCTION 'FTP_CONNECT'
EXPORTING
user = user
password = pwd
host = host
rfc_destination = dest
IMPORTING
handle = hdl
EXCEPTIONS
not_connected = 8.
CASE sy-subrc.
WHEN 0.
WHEN OTHERS.
RAISE connection_error.
ENDCASE.
CALL FUNCTION 'FTP_COMMAND'
EXPORTING
handle = hdl
command = transfer_type
TABLES
data = data
EXCEPTIONS
command_error = 1
tcpip_error = 2
data_error = 3.
CASE sy-subrc.
WHEN 0.
WHEN 1.
RAISE command_error.
WHEN 2.
RAISE tcpip_error.
WHEN 3.
RAISE data_error.
WHEN OTHERS.
RAISE other_error.
ENDCASE.
CALL FUNCTION 'FTP_COMMAND'
EXPORTING
handle = hdl
command = ftp_command
compress = compress
verify = verify
TABLES
data = data
EXCEPTIONS
command_error = 1
tcpip_error = 2
data_error = 3.
CASE sy-subrc.
WHEN 0.
WHEN 1.
RAISE command_error.
WHEN 2.
RAISE tcpip_error.
WHEN 3.
RAISE data_error.
WHEN OTHERS.
RAISE other_error.
ENDCASE.
CALL FUNCTION 'FTP_DISCONNECT'
EXPORTING
handle = hdl.
Thanks
Aditya
2008 May 21 12:55 PM
To connect to the other FTP server
U need to use FTP_Connect
thats the FM whts HTTP_CONNECT?
2008 May 28 3:47 PM
Hi Rebeka,
I have the same issue, I am able to connect through desktop/command window, but not able to connect through 'FTP_CONNECT' function module. I get a message 'User has no access authorization for computer XYZ'
Let me know if you find a solution.
Thanks,
Sudhakar
2008 May 28 7:54 PM
Hi,
I found out the issue, use key while you use 'HTTP_SCRAMBLE' function. If you have made a mistake in the key value, it screws up the password!
key type i value 26101957.
Good Luck.
Sudhakar
2008 Jun 09 4:07 PM
hi Sudhakar.
I have exactly that problem, but even when i use the key you gave (key type i value 26101957), I still have the same error message (mu user has no authorization).
here is my code:
CALL FUNCTION 'HTTP_SCRAMBLE'
EXPORTING
SOURCE = source
SOURCELEN = sourcelen
KEY = key
IMPORTING
DESTINATION = pwd
.
CALL FUNCTION 'FTP_CONNECT'
EXPORTING
USER = user
PASSWORD = pwd
* ACCOUNT =
HOST = 'server_name'
RFC_DESTINATION = dest
* GATEWAY_USER =
* GATEWAY_PASSWORD =
* GATEWAY_HOST =
IMPORTING
HANDLE = handle
* EXCEPTIONS
* NOT_CONNECTED = 1
* OTHERS = 2What is wrong with that?
thanks a lot for your help.
pierre
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |