2008 Jul 15 1:13 PM
Hi all,
I want to put a file from SAP to another server. Im trying with FTP I tried with the following FM's in sequence,
'HTTP_SCRAMBLE'
'FTP_CONNECT'
'FTP_R3_TO_SERVER'
'FTP_DISCONNECT'
'RFC_CONNECTION_CLOSE'
Here the FM FTP_CONNECT is returning me the following error
User <xxxx> has no access authorization for <server I requested>, but I was able to connect to the same server using the same user id from Command prompt of my desktop. Kindly advise me on this...
Thank you,
Sarath.C
2008 Jul 15 1:22 PM
Hi,
i think it is RFC Destination problem.
did u created the RFC Destination in sm59 type TCP/IP
Check this one .
Reward Points If Useful.
Thanks&Regards,
srinivas
Hi all,
I want to put a file from SAP to another server. Im trying with FTP I tried with the following FM's in sequence,
'HTTP_SCRAMBLE'
'FTP_CONNECT'
'FTP_R3_TO_SERVER'
'FTP_DISCONNECT'
'RFC_CONNECTION_CLOSE'
Here the FM FTP_CONNECT is returning me the following error
User <xxxx> has no access authorization for <server I requested>, but I was able to connect to the same server using the same user id from Command prompt of my desktop. Kindly advise me on this...
Thank you,
Sarath.C
2008 Jul 15 1:22 PM
Hi,
i think it is RFC Destination problem.
did u created the RFC Destination in sm59 type TCP/IP
Check this one .
Reward Points If Useful.
Thanks&Regards,
srinivas
2008 Jul 15 2:37 PM
The RFC dest Im using is SAPFTP which is standard one and is created with TCP/IP.
Edited by: Sarath kumar Chandrasekharan on Jul 15, 2008 3:58 PM
2008 Jul 15 3:31 PM
Hello Sarath
You need to create a TCP/IP connection (type='T') to your FTP server and use this one.
Regards
Uwe
2008 Jul 15 1:30 PM
Hi,
functionality on OS level is executed with user from SAP system start.
Does that help?
regards
Walter Habich
2008 Jul 16 8:16 AM
Walter,
Should we create a separate user id of R/3 type to connect thru FTP from ABAP code..
2010 May 07 9:18 AM
2008 Jul 15 3:40 PM
hi check this..
REPORT ZFTPSAP LINE-SIZE 132.
DATA: BEGIN OF MTAB_DATA OCCURS 0,
LINE(132) TYPE C,
END OF MTAB_DATA.
DATA: MC_PASSWORD(20) TYPE C,
MI_KEY TYPE I VALUE 26101957,
MI_PWD_LEN TYPE I,
MI_HANDLE TYPE I.
START-OF-SELECTION.
Your SAP-UNIX FTP password (case sensitive)
MC_PASSWORD = 'password'.
DESCRIBE FIELD MC_PASSWORD LENGTH MI_PWD_LEN.
FTP_CONNECT requires an encrypted password to work
CALL 'AB_RFC_X_SCRAMBLE_STRING'
ID 'SOURCE' FIELD MC_PASSWORD ID 'KEY' FIELD MI_KEY
ID 'SCR' FIELD 'X' ID 'DESTINATION' FIELD MC_PASSWORD
ID 'DSTLEN' FIELD MI_PWD_LEN.
CALL FUNCTION 'FTP_CONNECT'
EXPORTING
Your SAP-UNIX FTP user name (case sensitive)
USER = 'userid'
PASSWORD = MC_PASSWORD
Your SAP-UNIX server host name (case sensitive)
HOST = 'unix-host'
RFC_DESTINATION = 'SAPFTP'
IMPORTING
HANDLE = MI_HANDLE
EXCEPTIONS
NOT_CONNECTED = 1
OTHERS = 2.
CHECK SY-SUBRC = 0.
CALL FUNCTION 'FTP_COMMAND'
EXPORTING
HANDLE = MI_HANDLE
COMMAND = 'dir'
TABLES
DATA = MTAB_DATA
EXCEPTIONS
TCPIP_ERROR = 1
COMMAND_ERROR = 2
DATA_ERROR = 3
OTHERS = 4.
IF SY-SUBRC = 0.
LOOP AT MTAB_DATA.
WRITE: / MTAB_DATA.
ENDLOOP.
ELSE.
do some error checking.
WRITE: / 'Error in FTP Command'.
ENDIF.
CALL FUNCTION 'FTP_DISCONNECT'
EXPORTING
HANDLE = MI_HANDLE
EXCEPTIONS
OTHERS = 1.
2008 Jul 15 3:54 PM
Hi Sarath Kumar.
I would like to suggest to you some references, it is quite similar to your issue,
[SDN - Reference for Transfering data from SAP to other systems using FTP|https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/5564] [original link is broken] [original link is broken] [original link is broken];
[SDN - Reference for Transfering file from one application server to another|;
Hope that's usefull.
Good Luck & Regards.
Harsh Dave
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |