2010 Dec 03 1:49 PM
Hi,
I need to transfer my file from sap server directory to a location at ftp.
I just cant figure out how to reach that directory. I wrote to that directory with open dataset but cant transfer it.
I am trying this program to test my command lines
RSFTP002
my sap server directory is when i check al11 it shows
E:\usr\sap\PDD
How should i write this in that program as parameter command
i tried
lcd /usr/sap/PDD
it says invalid directory
Also in my code
CONCATENATE 'lcd' w_file_path INTO command SEPARATED BY space.
CALL FUNCTION 'FTP_COMMAND'
EXPORTING
handle = mi_handle
command = command
TABLES
data = mtab_data
EXCEPTIONS
tcpip_error = 1
command_error = 2
data_error = 3
OTHERS = 4.
CHECK sy-subrc = 0.
i just get same error please help me what to write for the file path
Thank you
Hi,
I need to transfer my file from sap server directory to a location at ftp.
I just cant figure out how to reach that directory. I wrote to that directory with open dataset but cant transfer it.
I am trying this program to test my command lines
RSFTP002
my sap server directory is when i check al11 it shows
E:\usr\sap\PDD
How should i write this in that program as parameter command
i tried
lcd /usr/sap/PDD
it says invalid directory
Also in my code
CONCATENATE 'lcd' w_file_path INTO command SEPARATED BY space.
CALL FUNCTION 'FTP_COMMAND'
EXPORTING
handle = mi_handle
command = command
TABLES
data = mtab_data
EXCEPTIONS
tcpip_error = 1
command_error = 2
data_error = 3
OTHERS = 4.
CHECK sy-subrc = 0.
i just get same error please help me what to write for the file path
Thank you
2010 Dec 03 2:53 PM
2010 Dec 14 8:56 AM
Hi,
First you have to connect to the ftp using FTP_connect which ask for the id, password and HOST name , which return the handle.
Then pass the command either binary or ascii , the type of file you want to trasfter as in ftp_command along with the handle.
then again make one more command
put /usr/tmp/abc.txt /home/td_F/abc.txtand again call the ftp_command with the handle you get during the ftp connect.
it will transfer the file.
Note: It will recognize the local commands or file path .
for eg put c:\test to /home/td_F/abc.txtfor this you have to require the put it into the application server then FTP it.
2010 Dec 14 9:52 AM
Hi,
Thank you for answers.
I solved it. The problem was the ftp connection options from sm59. SAPFTP from aplication server solved it.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |