‎2008 Mar 03 6:03 AM
Hi folks,
i have one file in directory1 . i want to move that file from directory1 to directory2 using FTP command.
what r the FTP commands i need to use to achieve this in SAP ?
Regards
‎2008 Mar 04 4:12 AM
Hi,
For single files you can use EPS_FTP_PUT or EPS_FTP_GET (depending on whether you push or pull your files).
For multiple files
EPS_FTP_MPUT and EPS_FTP_MGET.
CALL FUNCTION 'EPS_FTP_PUT'
Import parameters Value
RFC_DESTINATION = NONE
LOCAL_FILE = filename
LOCAL_DIRECTORY = /dir1/dir2
REMOTE_FILE = filename
REMOTE_DIRECTORY = /dir1
OVERWRITE_MODE = F " force -> overwrite existing file
TEXT_MODE = B " binary
TRANSMISSION_MONITOR X " display transmission monitor
*RECORDS_PER_TRANSFER 10
*REQUESTED_FILE_SIZE 0
*MONITOR_TITLE
*MONITOR_TEXT1
*MONITOR_TEXT2
*PROGRESS_TEXT
*OBJECT_NAME [/code]
‎2008 Mar 04 1:15 AM
Have a look at the functions in group SFTP, e.g. FTP_COMMAND, and some of the sample code for these e.g.
RSFTP002 Execute FTP Command
RSFTP003 FTP put / get Test
RSFTP004 FTP Copy
RSFTP007 Test FB:FTP_SERVER_TO_R3 / FTP_R3_TO_SERVER
RSFTP008 Test FB:FTP_CLIENT_TO_R3 / FTP_R3_TO_CLIENT
RSFTP009 Test FTP put with Verify
RSFTP011 FTP Copy
Jonathan
‎2008 Mar 04 4:12 AM
Hi,
For single files you can use EPS_FTP_PUT or EPS_FTP_GET (depending on whether you push or pull your files).
For multiple files
EPS_FTP_MPUT and EPS_FTP_MGET.
CALL FUNCTION 'EPS_FTP_PUT'
Import parameters Value
RFC_DESTINATION = NONE
LOCAL_FILE = filename
LOCAL_DIRECTORY = /dir1/dir2
REMOTE_FILE = filename
REMOTE_DIRECTORY = /dir1
OVERWRITE_MODE = F " force -> overwrite existing file
TEXT_MODE = B " binary
TRANSMISSION_MONITOR X " display transmission monitor
*RECORDS_PER_TRANSFER 10
*REQUESTED_FILE_SIZE 0
*MONITOR_TITLE
*MONITOR_TEXT1
*MONITOR_TEXT2
*PROGRESS_TEXT
*OBJECT_NAME [/code]