Sending file using FTP
Hi Friends,
I have developed a abap program that download a excel file to a application server.
i need to send the file to a shared folder or share point using FTP.
How can i send the file which is in Application server thru FTP?
Can anybody guide me on this?
Thanks in Advance
Suganya
Hi,
U need to use the stsndard FTP function modules to achieve it..
The following FM are useful --
FTP_CONNECT
FTP_COPY
Thanks,
Arun
Similar Messages
-
Not able to send file Using FTP in SSIS 2005
I am using SSIS 2005
I am trying to send file to ftp server using FTP task in SSIS but i am getting following error.
Error Message-:An error occurred in the requested FTP operation.
Detailed Description-:550 /FileName.txt: Access is denied.
RemotefilePath is /
I need a advice.
Thanks in advance.I got this error recently from the FTP task in SSIS:
Unable to send files using "FTP".
I had everything correct, by the book. I was trying to send a file, but I got the same error when trying to receive a file.
I already verified that I could send the file via command line FTP, so the FTP was not "secure FTP" (which wouldda required FileZilla or WinSCP or something similar) and my credentials were fine.
But I still got the above error. Heck, I was beginning to thing that the FTP task in SQL Server 2008 was broken and just couldn't send files.
Well, this issue is now resolved. The problem was in the
destination folder. I was assuming that the root folder for my FTP account held the files.
So I entered the destination folder as this:
/data_in/
But... the FTP task sees the root folder as one up from that.
So I had to use my account name in the path... meaning I had to change the destination folder to this:
/myaccountname/data_in/
(where "myaccountname" was my login to the FTP site.)
I hope this post helps someone else.
Donna -
Using wildcards (*) in sender file adapter - FTP type
Hi guys!
Dooes it work using wildcards in sender file adapter (FTP type(!) (filesystem obviously work))? I tried it and it failed. it works only for exact name..
I read some articles about FTP and the result is, that ftp work always only with 1 file, so I'm wondering, if this is possible.
Thanks for info!
OlianThanks for all replies..
I know of course, that * can be used, I use it in many scenarios too. But on a FileSystem. It is not working if the sender type is FTP.
*, ., *.dat, ... nothing like that works.. Just exact file name.
I am able to pick up file, if I specify it's exact name, so there should be no problem with permissions..
Please, I'd appreciate one reply with comfirmation: yes, we are using asterisk (*) , we access source files via FTP and they are processed.
Is there anybody with this experience, that it works?
Thank you!
Olian -
How to Create a Flat File using FTP/File Adapter
Can any body done workaround on creating the Flat file using FTP/File Adapter?.
I need to create a simple FlatFile either using of delimiter/Fixed length. using the above said adapters we can create XML file, i tried concatinating all the values into a single String and writing into a file, but it does not have proper structure
Can any body help me out on this..
Thanks
RamYou can create a text schema while creating a File Adapter. If schema is specified for File Adapter, it takes care of converting XML into fixed length or delimited format.
Thanks,
-Ng. -
HOW to read file using ftp???
Hi to all,
I have problem with reading file using ftp connection, i want to read only 1024 bytes for one time, and i have
next code wich read this:
byte buffer[] = new byte[1024];
while( (readCount = input.read(buffer)) > 0) {
bos.write(buffer, 0, readCount);
but I dont know how to put all read data in one byte[] if i dont know length of file.
I can't do some like: byte file[] = new file[1000000];
Thanks for all sugestions!* Download a file from a FTP server. A FTP URL is generated with the following syntax:
* <code>ftp://user:password@host:port/filePath;type=i</code>.
* @param ftpServer FTP server address (incl. optional port ':portNumber').
* @param user Optional user name to login.
* @param pwd Optional password for <i>user</i>.
* @param fileName Name of file to download (with optional preceeding relative path, e.g. one/two/three.txt).
* @param destination Destination file to save.
* @throws MalformedURLException, IOException on error.
public void download(String ftpServer, String user, String pwd, String fileName, File destination) throws MalformedURLException, IOException {
if (ftpServer != null && fileName != null && destination != null) {
StringBuffer sb = new StringBuffer("ftp://");
if (user != null && pwd != null) { //need authentication?
sb.append(user);
sb.append(':');
sb.append(pwd);
sb.append('@');
}//else: anonymous access
sb.append(ftpServer);
sb.append('/');
sb.append(fileName);
sb.append(";type=i"); //a=ASCII mode, i=image (binary) mode, d= file directory listing
BufferedInputStream bis = null;
BufferedOutputStream bos = null;
try {
URL url = new URL(sb.toString());
URLConnection urlc = url.openConnection();
bis = new BufferedInputStream(urlc.getInputStream());
bos = new BufferedOutputStream(new FileOutputStream(destination.getName()));
int i;
while ((i = bis.read()) != -1) { //read next byte until end of stream
bos.write(i);
}//next byte
} finally {
if (bis != null) try { bis.close(); } catch (IOException ioe) { /* ignore*/ }
if (bos != null) try { bos.close(); } catch (IOException ioe) { /* ignore*/ }
}//else: input unavailable
}//download()If you don't want to strore the data into a file, use ByteArrayOutputStream instead of a FileOutputStream. -
How to download file using ftp in bash script
Hi! I'm runnig a bash script in solaris i want within the script to dowload file using ftp
How can i do it?
Tanks a lothello,evgchech
please try this way:
1. In the bash script, try following command:
ftp -n < ftpcmdfile2 in the ftpcmdfile (which is a file),coding the interactive commands of FTP such as:
user anonymous [email protected]
cd /var/sun/download
bi
mget *.*
bye
try it and good luck!
Wang Yu
Developer Technical Support
Sun Microsystems
http://sun.com/developers/support -
Dowload file using ftp in bash script
Hi! I'm runnig a bash script in solaris i want within the script to dowload file using ftp
How can i do it?
Tanks a lothello,evgchech
please try this way:
1. In the bash script, try following command:
ftp -n < ftpcmdfile2 in the ftpcmdfile (which is a file),coding the interactive commands of FTP such as:
user anonymous [email protected]
cd /var/sun/download
bi
mget *.*
bye
try it and good luck!
Wang Yu
Developer Technical Support
Sun Microsystems
http://sun.com/developers/support -
How can I send files by FTP with Oracle Portal?
I want to send some file by FTP.
How can I send files by FTP with Oracle Portal?
Any ideas?Enrique,
Are you trying to transfer more content from remote locations to expose as items within a portal page? By itself, the Oracle Portal runs within the context of the database so I'm not sure how FTP at the OS level will help. However, if you're attempting to transfer files from a remote PC to upload within the Portal, here are a couple of suggestions.
Option 1:
A. Create a portal page.
B. Convert a region to Items.
C. When you're challenged to upload a file from the local OS, ensure you've a drive mapped to your remote location and pick the file to upload into the Oracle9iAS Portal.
Option 2:
Alternatively, the Oracle9iAS Portal 9.0.2 supports the WebDAV protocol(Web-based Distributed Authoring and Versioning Protocol) allowing endusers with a WebDAV client to upload content into the Portal seamlessly from their desktop.
Pls. check out:
http://portalcenter.oracle.com/pls/ops/docs/FOLDER/COMMUNITY/OTN_CONTENT/MAINPAGE/PUBLISH_CONTMGMT/TECHNOTE_WEBDAV.HTML
Hope that helps!
Thanks,
Sudi Narasimhan
Oracle9iASPortal Partner Management/Development
I want to send some file by FTP.
How can I send files by FTP with Oracle Portal?
Any ideas? -
To download a file using Ftp.
I am making a web application using struts framework . now on one jsp page i'll have to give the list of files on the ftp server and link to download those files using ftp from the ftp server.
I have made functions using jakarta commons.net library by which i m able to show the list of files on jsp page but i m not able to give download link bcos using the function the file is downloaded on the server on which my application is running . and not from which i am accessing through the browser.........
If any one have any idea pls let me know...........?
Regards,
Neeraj.If it's anonymouse FTP to download from the server, just make the page have a link to the FTP site..
some file -
How to upload a file using FTP tin JSP
Hello friends ,
I m actually looking to upload a file using FTP to a server(webserver) in JSP . If there any tags available to accomplish this r any information regading this plzz let me no.
Thanks in advance
P.SatishNot sure exactly what you're trying to do but you set the content type a stream it to the browser from a servlet
-
File format while sending a file using FTP Process
Hi,
I am facing a formatting problem when i send a file from SAP application server to a different sever using FTP process.
The problem is like this:
Lets say I have a file with 10 records on the application server. When i am downloading this file to a pc, the file is showing 10 lines.
But when i open the same file on the other server it is showing 10 records as 1 line.
The file i am sending is a text file.(ex: acc_payable.txt)
If i open the same file on the other server using word pad it is showing 10 records in 10 different lines.
I want the file to be opened using notepad and want to see the each record in a different line
Can anybody help me on this issue
Regards,
RadhakrishnaAnother stab at "simplest": can you avoid embedding
newline characters in the strings
your write and reply on PrintWriter's
println() methods instead?But, if I understand the OP, this will cause the same problem. He is running on Unix but wants to generate a DOS type eol. The println() method will use the OS default; therefore, he needs to explicitly specify the DOS eol. -
Sender File Adapter (FTP Protocol)
Hi Every Body,
I have a problem in using Sender File Adapter of (FTP Protocol Type)
I have given all required settings to get connected to the FTP Server.
When i give ( Source Directory and Exact File Name ex : MDMERP.xml)
File gets picked up.
But When i give (Source Directory and Exact File Name ex : *.xml)
it gives below exception
Error occurred while connecting to the FTP server "mdmerp6:21": java.net.ConnectException: Connection refused: connect
Strange any guess !! :(((
Regards
SrinivasHi,
If that is connection error then it should have not allowed to pick up when i have given the specifif file name ,
.xml is too not working
my problem all starts if i use other than file name declarartion it throws error
of below kind
Error occurred while connecting to the FTP server "mdxxxp6:21": java.net.ConnectException: Connection refused: connect
Can i use " Advanced Selection of Source File" and make it run\
With regards
Srini -
XI is picking up While File is being written in the Specified Directory. XI uses File adapter ( FTP transport Protocal ) . If file being written is very large ( It may take couple of minutes ) XI picks it up in parts for every 1 minute ( It was configured like that ) and try to send over Which is not correct. Is there any workaround to this issue. In PI 7.0, for NFS file system, SAP included modification check but it doesn't work for ftp file adpater. Basically XI should wait to pickup file until the file written completely in the Source System.
Anyone have any Idea how to overcome this issue ?Hi,
You could use the Advanced mode checkbox in the file adapter, to specify the time the adapter has to wait, before it checks if the file has been modified.
In case, the file has been modified, after the adapter read the file, the data in the adapter cache is discarded and the updated/modified file is taken from the source path specified.
This would work, only if you have not specified "recordsets per message" during content conversion.
Regards,
Smitha. -
File format conversion of Target file using FTP adapter
Hi All,
I am using FTP adapter to create the file on the Target side. But file needs to below format : How do i conver the XML File fomat( Default generate by XI ) to be generat to below file format;
000000000000154162,
CWC1A,,,,
CWC1B,,,,
CWC2A,,,,
CWC2B,,,,
Please provide your suggestion;
thanks;
MKHi Mohan,
I have a collection of Blogs (links) which Specify the File content conversion parameters.
File content conversion, I am Not sure as which Link will Match Your Requirement exactly...
/people/shabarish.vijayakumar/blog/2006/02/27/content-conversion-the-key-field-problem
/people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter
/people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion
http://help.sap.com/saphelp_nw04/helpdata/en/d2/bab440c97f3716e10000000a155106/content.htm
Please see the below links for file content conversion..
/people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter - FCC
/people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter - FCC
File Content Conversion for Unequal Number of Columns
/people/jeyakumar.muthu2/blog/2005/11/29/file-content-conversion-for-unequal-number-of-columns - FCC
Content Conversion (Pattern/Random content in input file)
/people/anish.abraham2/blog/2005/06/08/content-conversion-patternrandom-content-in-input-file - FCC
Regards,
Sainath chutke -
Unable to send file to FTP server
Hi All,
I am using a File to File scenario. In that i am using FTP. The file is not reaching the target side. It is displaying the following error. I have checked the Target directory, it is correct.I am able to send manually FTP File to the same target directory.
Delivery of the message to the application using connection File_http://sap.com/xi/XI/System failed, due to: com.sap.aii.af.ra.ms.api.RecoverableException: An error occurred while connecting to the FTP server 'acmxrtdb:21'. The FTP server returned the following error message: 'com.sap.aii.adapter.file.ftp.FTPEx: 550 C:\BankFiles\FromSAP\Wells: The filename, directory name, or volume label syntax is incorrect. '. For details, contact your FTP server vendor..
Please help me in solving this. It would be very helpful to me.
Thanks & Regards,,
Raju.DHi,
the path specified is not correct.
The value "0 C:\BankFiles\FromSAP\Wells" is not valid if the protocol is FTP. This is the physical directory on the operating system.
If you're using an FTP server you need to know the path to the file on the FTP.
To do this I suggest to connect to the FTP using Internet Explorer and navigating the FTP folders until reaching the right one.
Then on the url bar you should got something like this: "ftp://server:21/path/to/file/". Use "/path/to/file" as value for the file adapter configuration.
Hope this help
Francesco
Maybe you are looking for
-
It's not letting me use iMessage and I turned it off but it won't let me turn it back on. What do I do?
-
View change log for crm : opportunity management, activity management
hello can anyone help me, i have been tracking down someone who changed an opportunity in crm but i cannot find in scu3. thanks.
-
Has anyone tried QTVRs in Keynote 3 to see if there is any interactivity? Ian
-
I am having problem with a podcasting feed not pulling the channel icon into itunes. It is 600x600 as apple recommends and you can see it by just putting the URL below into a browser. Here is my XML for the channel, if anyone has any suggestions I wo
-
I have just purchased Adobe Acrobat XI Standard. I received all the appropriate emails with serial numbers etc. I go into my Adobe account so I can download the content and I cannot read the page as all the page content is in symbols. I obviously