Currently we use FTP, but there is a requirement to use SFTP. According to our Basis guys SFTP will not work. We have a couple of alternatives:
- Use PI
- Use a Unix script to move the files
However, is there something we are missing that would enable us to use SFTP in a similar way to FTP?
Example of code calling FTP:
CALL FUNCTION 'HTTP_SCRAMBLE'
EXPORTING
SOURCE = i_password
sourcelen = dstlen
key = c_key
IMPORTING
destination = lw_password.
CLEAR: ftp_hdl, o_file.
CALL FUNCTION 'FTP_CONNECT'
EXPORTING
user = i_user
password = lw_password
host = i_host
rfc_destination = c_rfcdest_sapftp
IMPORTING
handle = ftp_hdl
EXCEPTIONS
not_connected = 1
OTHERS = 2.
RFC Destination c_rfcdest_sapftp
is defined as follows in SM59:
Connection Type: T (TCP/IP)
Activation Type: Start on Front-end Work Station
Program: sapftp (Is there a SFTP variant of the program?)
Start Type: Default Gateway