How to get file from FTP Server using File Control
Hi,
Any one did getting file from FTP Server?
Please let me know any one help me.
I would need to get file from FTP Server.
Thanks,
Madhu
Yes I have done that. But In FTP Server I cannt read file, because no previliges. Only I need to copy file from FTP Server to local server then only I can read that file.
I tried all options using FileConrol(getFiles(),read()).
getFiles() - It wont copy the file, it give information about file.
read() - I dont have previliges to read the file.
Please tell me any other procedure would be there for getting file from FTPServer.
Thanks,
Madhu
Similar Messages
-
Process TIFF file from FTP server using File/FTP adapter
Hi,
I have a requirement to process a scanned document TIFF file from a directory on an FTP server using the File/FTP adapter and process through XI into a Web Service via a receiver SOAP adapter.
My question is can the file/FTP adapter be used to process the TIFF file into XI from an FTP server ? Also, what settings need to be made on the file adapter to allow this file to be processed into XI ?
Thanks in advance
Colinhi colin,
TIFF is type of image file, it can be converted to binary using java mapping
refer this pdf
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/10dd67dd-a42b-2a10-2785-91c40ee56c0b
regards
Ramesh P -
Zip files from FTP server using BODS 4.1
HI Friends,
My requirement: Move zip files from FTP server to Target server using Data services.
The zip files( variable) are loaded daily into a directory in an FTP server, I need to establish a connection to the FTP server and get the zip files into BODS Environment. Can anyone please list out the steps to get the connection from FTP to BODS?
My Environment : BODS 4.1 SP1
Thanks and Regards
AnilHi Anil,
We have done similar kind of requirement
1. Connect FTP server
2. call Exec command
3. write simple script move file to whatever your location
Please let me know
FYI.. Let me check if get same ATL for you.
Regards,
Manoj. -
How to get folders from your server using IMAP and push, 3G.
After looking all over this forum looking for an answer, I found out on my own. here's how:
Step 1: Login to your email server.
- If you can, log into your email server via webmail. This ensures that you are in fact connected to your email server and your folders are being created. If your email server doesn't have webmail, then create the folders using whatever email app you have on your PC or Mac.
Step 2: Creating the folders.
- All the folders you want to have show up on your iphone must be created as sub-folders under your Inbox folder on the server. Here's what mine looks like for example.
Mailbox
-Inbox
++-Sent Messages
++-Deleted Messages
++-Friends
++-Work
++-Others
-Drafts
-Sent
-Deleted
-Junk Email
*you may be wondering why I have 2 sent and Deleted folders. I have it set up so that the folders in the inbox are for the iphone, and the ones outside are from Outlook.
Step 3: Getting the folders to show up on the iphone.
- Once you set up your IMAP account on the iphone 3g, simply log into the account, wait for it to finish checking for emails, then tap the Inbox button. Give it a few seconds to load if it's loading something. After it finishes, back out by tapping the 'Mailboxes' in the top-left corner, and your folders should be there.So you'd use Java to send the WebDAV protocol. Since this is a Java forum, it would help if you provided the WebDAV part of the equation and we can help with the Java part. Okay? Let us know when you have the WebDAV information.
-
How to read XL file from FTP server
Hi all,
I have a requirement like to read file from FTP server using path
ftp:
10.212......\DTR\DTR_ Accounted_Out
and again save other file in same location ,
to doing this RFC connection is required?
give a procedure or program to do this requirement ..
To create rfc for FTP which connection type can i use ?
Give complete settings to create rfc destinationHi Rakhi,
Use the below code to check if you have received the proper data.
call function 'FTP_SERVER_TO_R3' "Get data as character instead of BLOB
exporting
handle = hdl
fname = docid
character_mode = 'X'
tables
text = chardata.
If the data is incorrect, it is possible that you are in the wrong directory.
Use
call function 'FTP_COMMAND'
exporting
handle = hdl
command = 'cd mydir\mysubdir' "cd <space> your path
tables
data = result
exceptions
tcpip_error = 1
command_error = 2
data_error = 3.
Regards,
Jovito. -
How to read .xls file from FTP server t oInternal table
Hi
am using the FTP_SERVER_TO_R3 to read xls file from FTP server to internal table
but the data i get in LT_TEXT is special characters.
CALL FUNCTION 'FTP_SERVER_TO_R3'
EXPORTING
handle = hdl
fname = f_name "ProdDataFromCRM.xls.
* CHARACTER_MODE = 'X'
* IMPORTING
* BLOB_LENGTH =
TABLES
BLOB = lt_text
* TEXT = lt_text
EXCEPTIONS
TCPIP_ERROR = 1
COMMAND_ERROR = 2
DATA_ERROR = 3
OTHERS = 4
can any one help me out to get the exact data..
Really appreciate your quick response..
Thank YouHi, if you really retrieve an excel file, you can not see the data in ABAP. You may see them in Excel. For this you may use
CALL METHOD document->open_document_from_table
of the interface i_oi_document_proxy for OLE objects. You can access the data with reference to the interface i_oi_spreadsheet.
Please check [Desktop Office Integration (BC-CI)|http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCCIOFFI/BCCIOFFI.pdf] for details.
But, who knows, perhaps you want "And Now For Something Completely Different".
Regards
Clemens -
Problem in download file from FTP server
Hi
I want to download a file from FTP server for that i am using the apache FTP module but i am not getting how to download a file with that api i can dispaly the list of files and folders but not able to download the file or folder can any one help me in this
Thanks
NinadHi
I think you miss understood something I am writing a program to download the file in Java where i have used the jakarta.apache api for that and getting problem in that bellow is the code where I have written to print the directory & file names but I don't know how to download the file
FTPClient ftpConnection = new FTPClient();
ftpConnection.connect(host);
ftpConnection.login(FTPConnection.userName,FTPConnection.password);
FTPFile fileList[] = ftpConnection.listFiles();
for(int i=0;i<fileList.length;i++)
System.out.println(fileList.getName());
thanks
Ninad -
Copy file from FTP server to sap application server
Hi,
I am able to copy a particular file from FTP server to sap application server using FTP_CONNECT, FTP_COMMAND and FTP_DISCONNECT. But here my problem is, it copies into default application server path(DIR_HIOME). I want to copy into specified folder in the application server. How can I specify the required destination path.
Can you please suggest how to achieve this.
Thanks,
Shiva Kankanalatry something like this:
data: user(30) type c value 'ftpuser', "ftp username
pwd(30) type c value 'ftppass', "ftp password
host(64) type c value '255.255.255.255', "ftp server IP
cmd1(80) type c value 'lcd /dump', "location on app server where you want to copy the file
cmd2(80) type c value 'get', "specifies you are going to get the file from ftp server
dest like rfcdes-rfcdest value 'SAPFTPA',
file(15) type c value 'file.txt'. "specifies file that you want to get from ftp server
data: hdl type i,
key type i value 26101957,
slen type i.
slen = strlen( pwd ).
call function 'HTTP_SCRAMBLE'
EXPORTING
source = pwd
sourcelen = slen
key = key
IMPORTING
destination = pwd.
call function 'FTP_CONNECT'
EXPORTING
user = user
password = pwd
host = host
rfc_destination = dest
IMPORTING
handle = hdl.
call function 'FTP_COMMAND'
EXPORTING
handle = hdl
command = cmd1
TABLES
data = result
EXCEPTIONS
command_error = 1
tcpip_error = 2.
loop at result.
write at / result-line.
endloop.
CONCATENATE cmd2 file INTO cmd2 SEPARATED BY SPACE.
call function 'FTP_COMMAND'
EXPORTING
handle = hdl
command = cmd2
TABLES
data = result
EXCEPTIONS
command_error = 1
tcpip_error = 2.
loop at result.
write at / result-line.
endloop.
refresh result. -
Hi Friends,
We are loading some files from FTP server into the BW (Datasource)
In the infopackage we have given the setting as 'Load from application server' and have given the file path as it is in application server. No routine has been created.
Files are successfully loading from FTP server to the BW datasource.
My question is:
In the infopackage we have only maintained that it should be loaded from application server and the file path.
But how the system(infopackage) gets to know that from which server(FTP) it should pick. Is there any table to maintain these entries. i.e when infopackage is scheduled it only pings the required server and picks the file with the help of given file path.But how does it know which server it should ping.
Pls help.
Thanks & Regards,
NikuHello Niku,
It seems in your case you have only one FTP, and the system is pointing by default to that FTP and picking the required files fro your Info Package.
Normally a Standard ABAP Program RSFTP002 is used to communicate to the FTP Server with the help of RFC . In the Same program you can maintain the credentials ( USerName and password) along with the Source and Destination related properties .
Back to your query , you can check the same in above program ( RSFTP002 ) through SE38 and cross verify your FTP .
Hope this helps !
Regards
YN -
Reading a file from ftp server
Hi
I am able to put file on ftp server using ftp adapter.But same settings are not working while polling file on ftp.
Do i need to do some settings for get operation??Hi,
Check the file permissions and for testing give all read/write/execute permissions to the file to be read from FTP. Also check the file modification date of the file.
Check for the logs at 2 places for any error messages:
- SOA server diagnostics logs
- FTP server logs
You can also enable the FINEST level of Adapter logs for adapters and see for the detailed errors in the diagnostic logs.
FMW Console > right click soa-infra > Logs > Log Configuration > expand oracle.soa > set Trace32 : FINEST for oracle.soa.adapter
Regards,
Neeraj Sehgal -
[HELP] Download file from FTP server
hi,
I want to write a java program that can download and upload files from ftp server. Currently I only manage to upload a file to ftp server but i cant download file from ftp server. Here is the source code that only allow user to upload file. Anyone can give me some guidelines so that my program can download and also upload file? thx.
import java.io.*;
import java.net.*;
public class FTPUpload {
private static final int CTRLPORT = 21;
private static Socket ctrlSocket;
private static PrintWriter ctrlOutput;
private static BufferedReader ctrlInput;
private static byte[] localHostAddress;
public final static String DIR = "C:\\zip\\";
public static void main(String[] args) {
try {
String host = "192.168.1.1";
String loginName = "testuser";
String password = "password";
String dirName = "/home/testuser";
String fileName = "hello.zip";
ctrlSocket = new Socket(host, CTRLPORT);
localHostAddress = ctrlSocket.getLocalAddress().getAddress();
ctrlOutput = new PrintWriter(ctrlSocket.getOutputStream());
ctrlInput = new BufferedReader(new InputStreamReader(ctrlSocket.getInputStream()));
ctrlOutput.println("USER " + loginName);
ctrlOutput.flush();
ctrlOutput.println("PASS " + password);
ctrlOutput.flush();
ctrlOutput.println("CWD " + dirName);
ctrlOutput.flush();
ctrlOutput.println("TYPE I");
ctrlOutput.flush();
FileInputStream fis = new FileInputStream(DIR + fileName);
Socket dataSocket = dataConnection("STOR " + fileName);
OutputStream outstr = dataSocket.getOutputStream();
int n;
byte[] buff = new byte[1024];
while ((n = fis.read(buff)) > 0) {
outstr.write(buff,0,n);
dataSocket.close();
fis.close();
ctrlOutput.close();
ctrlInput.close();
ctrlSocket.close();
}catch (Exception e) {
e.printStackTrace();
private static Socket dataConnection(String ctrlcmd)
throws IOException,UnknownHostException {
String cmd = "PORT ";
ServerSocket serverDataSocket = new ServerSocket(0,1);
for (int i=0;i<4;i++) {
cmd = cmd + (localHostAddress[i] & 0xff) + ",";
cmd = cmd + (((serverDataSocket.getLocalPort())/256) & 0xff)
+ ","
+ (serverDataSocket.getLocalPort() & 0xff);
ctrlOutput.println(cmd);
ctrlOutput.flush();
ctrlOutput.println(ctrlcmd);
ctrlOutput.flush();
Socket dataSocket = serverDataSocket.accept();
serverDataSocket.close();
return dataSocket;
}Or just use a java.net.URL("ftp://...) ..., get its input stream, and away you go ...
-
Upload XL file from FTP server
Hi All,
Can anybady help me, how to upload Excel file from FTP server.
Thanks
Sri
Edited by: srikanthn on Apr 14, 2010 6:31 PMHello
How about using SAPFTP?
I hope SAP note 130106 will guide you on this.
Thanks
koju -
Downloading file from ftp server
hii
how do i download the file from ftp server. plz suggest wat are the function modules for tht.. and plz do give the values of the parameters used in the fn modules
points guranteed:-)<i><b>*--> Scramble the password.</b></i>
CALL FUNCTION 'SCRAMBLE_STRING'
EXPORTING
source = password
key = 26101957
IMPORTING
target = password.
<i><b>*--> Connect to the FTP server.</b></i>
<i>* user is the logon user for the FTP server.
password is the password you have just scrambled.
host is the ip address of the FTP server.
rfc_destination is 'SAPFTPA'.</i>
CALL FUNCTION 'FTP_CONNECT'
EXPORTING
user = user
password = password
host = host
rfc_destination = rfc_destination
IMPORTING
handle = wa_handle
EXCEPTIONS
not_connected = 1
OTHERS = 2.
<i><b>*--> Carry out the command on the FTP server</b></i>
<i>* wa_command is the command you wish to carry out on the FTP server (e.g.
wa_command = 'ascii' will specify ascii mode). Result_itab will contain the
result of your commands.</i>
CALL FUNCTION 'FTP_COMMAND'
EXPORTING
handle = wa_handle
command = wa_command
TABLES
data = result_itab
EXCEPTIONS
tcpip_error = 1
command_error = 2
data_error = 3
OTHERS = 4.
<b>*--> Disconnect from the target host.</b>
CHECK NOT wa_handle IS INITIAL.
CALL FUNCTION 'FTP_DISCONNECT'
EXPORTING
handle = wa_handle
EXCEPTIONS
OTHERS = 1.
<u><i><b>Hope this helps :)</b></i></u> -
Oracle read files from FTP Server
Hi,
Somebody knowns Oracle how to read files from FTP Server ? Which package I can use?Duplicate post
Oracle read files from FTP Server -
Problem while reading the file from FTP server
Hi Friends,
I have a problem while fetching files from FTP server.
I used FTP_Connect, FTP_COMMAND function modules. I can able to put the files into FTP server.
but I cant able to pick the files from FTP server.
anyone have faced similar issues kindly let me know.
Thanks
GowrishankarHi,
try this way..
for reading the file using FTP you need to use different unix command ..
Prabhuda
Maybe you are looking for
-
Return records from Stored Procedure to Callable Statement
Hi All, I am createing a web application to display a students score card. I have written a stored procedure in oracle that accepts the student roll number as input and returns a set of records as output containing the students scoring back to the JS
-
Hi, I have problem in my Portal Page, i want to create a form for an application i've created, when i click on 'form' the server cannot find the page for creating the form. How can i find the missing page?
-
Hi Everyone, I am currently working on a module pool program where one of the requirements is to have hyperlink on the values in one of the columns in a table control. As far as I know it is not possible, I have already done my research and also sear
-
I'm so frustrated!!! Just a few days ago I calibrated my monitor with my new Huey Pro. Today in the middle of the computer being on for hours, at some point, without my knowing it, the ICC profile shifted from the new, calibrated setting BACK to the
-
Assigning Privilege Level Thru RADIUS
I'm using Microsoft IAS as my RADIUS server. We have a number of Cisco 2800 routers running the latest IOS which are also acting as VPN servers for our remote user connecting using their laptops via IPSec and Cisco VPN Client. How can I set the privi