File Archive in FTP Server
I'm using odiscpget to extract file from remote FTP server and i have a requirement to archive the file after successful extraction into archive directory in the same server.
Do i have an utility to perform a file move in remote server from ODI?
Thanks in Advance
odiscpput will look for a file in local directory to move to remote server isn't it?Yes .. it is.
If you want to do file operation on the remote server only then you need to write your own code for it.
Similar Messages
-
How to archive files in another ftp server?
Hi,gurus:
My scenario is file to file and my sender adapter is ftp adapter.
Now I want to archive the send file in another ftp server,how can I implement it?
There is a parameter "Archive files on FTP server" when I choose the processing mode "archive".What's it's use?Thanks in advance.Hi,Santhosh:
Thanks for your reply.
I have checked your blog before,and it is very useful for me.
I still have a problem about command line.
In an sap note,I found the principle of the execution of the command line is like below code:
import java.util.*;
import java.io.*;
public class test {
public static void main(String args[]) {
try {
Runtime rt = Runtime.getRuntime();
Process proc = rt.exec("C:/data/test.bat <param1> <param2>");
} catch (Exception e) {
e.printStackTrace();
But you know this method has restriction.If my bat file has many commands,it only execute a part of commands(sometimes 8,sometimes 9 ).
My bat file is like below:
echo open 192.168.67.149 >c:
data
copyResult.txt
echo <username> >>c:
data
copyResult.txt
echo <password> >>c:
data
copyResult.txt
echo cd /receive>>c:
data
copyResult.txt
echo get %2>>c:
data
copyResult.txt
echo cd /ok>>c:
data
copyResult.txt
echo put %2>>c:
data
copyResult.txt
echo cd /archive>>c:
data
copyResult.txt
echo delete send.txt>>c:
data
copyResult.txt
echo quit >>c:
data
copyResult.txt
ftp -s:c:
data
copyResult.txt
del %2
I wanna merge all the "echo" in one command,so it may execute successfully,but I don't know the method.Any ideas? -
Polling of the current file from multiple files in the FTP Server
Hello Experts
I am working on a file to file scenario.We have to poll the file from the FTP server which may contain multiple files with different creation dates.The requirement is to poll only the file created in the current date.Could anyone throw some light on this.
Thanks & Regards
SabyasachiHi Sabyasachi,
You can archive the files that you do not need into another folder manually for the first time.
Later you can schedule the file adapter to poll the folder only once in a day (Poll INterval = 86400 secs)
Do not forget to set the option to archive/delete the file that are already processed.
Regards,
Ravi Kanth Talagana -
Strange Problem in File Archiving - Sender FTP Adapter
Hi,
The scenario is file to IDOc. XI has to read the input file from client FTP server and archive it to XI local file server.
File is archived properly without FCC (for xml files). But with FCC, the sender FTP adapter is archiving empty files (0 kb files) not the original file with data.
I've checked SXMB_MONI, even there I can see the file data and the IDoc is getting posted with proper data. But, the archived file is empty. Not sure about the problem.
Please suggest. Thanks in advance.
Regards,
Joe.Hi,
I've already tried archiving the file to the FTP server itself, it's working fine (even with FCC). But, when I try to archive it to the XI server (read from FTP and archive at XI server), it's writing empty file to the XI archive directory. I'm using PI 7.0 SP 14. My sender FTP adapter dtls follow
Data Connection: Passive
Timeout Secs: 500
Connect Mode: Permanently
Transfer Mode: text and binary tried both
File type: text and binary tried both..
Looking out for a solution.
Thanks,
Joe.
Edited by: Joe on Jun 19, 2008 8:07 AM
Edited by: Joe on Jun 19, 2008 8:08 AM -
ESB FTP Adapter Not Archiving to FTP Server
I have a FTP adapter in which I have pointed a logical archive directory to a directory on the FTP server. However, the file is not getting archived to that folder. If I point the logical directory to a shared folder on the server it archives the file. Can I not archive a file on the FTP server? I have checked permissions on the FTP folder and they are correct.
Thanks.I found the solution to this issue. There is a property named UseRemoteArchive that needs to be set in the WSDL in the <jca:operation> element. See below for details.
<jca:operation
FileType="ascii"
LogicalDirectory="incomingDirectory"
ActivationSpec="oracle.tip.adapter.ftp.inbound.FTPActivationSpec"
LogicalArchiveDirectory="archiveDirectory"
DeleteFile="true"
IncludeFiles="*\.xml"
PollingFrequency="100"
MinimumAge="0"
OpaqueSchema="false"
UseRemoteArchive="true" >
</jca:operation> -
Help Fetching files from an FTP server into a DBase or local folder
Hello Gurus!
I need help to automate or design/write an app capable of (replace a manual process) reading log files in an ftp server folder, this log files are called CDR (Call Detail Record) and named as follow cdr.txt.20020221010000 meaning that this log file was created on 2002/02/21 at 01:00:00.
This CDR log files are generated every hour by a Lucent telephone switch using a software/program called EXS ExchangePlus in ASCII format (fixed length delaminated, Char data type). EXS ExchangePlus writes a record in this CDR/log files after the call is completed, i.e. Calling_Number, Called_Number, Date_connect (yyyymmdd), Time_connect (hhmmss), Charged_time (hhmmss, duration of the call), and so on.
The manual process I am using now is:
1. Log in the ftp server into the folder where the CDRs log files are, located the latest generated CDRs log files and downloaded them into a local folder/directory. Normally I download the CDR for full day or 24 CDRs log files.
1a. Optionally sometimes I used a program called VEdit compiled/gather all 24 CDRs into a single file.
2. Once I have downloaded the CDRs I want to process (normally I process a full day 24 CDRs) I imported then into a Data Base temp table, where then I do the conversion of data types (i.e. Dates and times fields from char type -> to ->Date type) and calculations for billing purposes.
So if somebody can help with this, I would really appreciated ideas or any kind of information on how to automated this process.
I�m familiar with Java2 platform (using JDeveloper ) so if somebody has done something like this before using java, this would very helpful. Or Maybe using Visual Basic 6.0 would help too.
Thanks Gurus, and I look forward to hear from you soon!
Alf Pathros!Thanks for the idea, even though an example would help me more.
I already found the FTPClient class.
I also would like to knwo if there is a away Ican append/merged various files CDRs into a single/one to then dump/import it into the database -
Posting an Excel file to a FTP Server
Hi,
I have a requirement, where I have to convert the contents of an internal table to an excel file, along with header details and put that file to a FTP Server.
I am able to create an excel file in FTP server, using function module FTP_R3_TO_SERVER and transfer contents of my internal table. But the contents of my internal table are getting copied to one column. How do I get the contents in different columns?
Also how do I get the header details?Hi,
you can simply create a comma-separated text file on your SAP application server, line by line, each column separated by a semicolon (;). That file can later easily be opened with Excel. Afther the file has been created you can send it to the remote FTP server.
HTH! -
Sender File Adapter - remote FTP server program execution
Hi all,
I have a scenario
X12 -> XI -> File
where sender File adapter is used. The input file is X12 txt document which needs to be converted into X12 xml format. I have created astylus studio XSLT mapping which uses Convertor to convert this txt file to X12 XML.
I don't know how to configure sender file adpater to run this mapping on the source file before picking it up. have created a windows batch file on the FTP server which runs tis XSLT mapping on the txt file and replaces it with X12 format xml. This batch file uses command line parameters of stylus studio to run XSLT mapping on input txt file and generates an xml.
I am not sure how to run this mapping on the input file before processing starts in PI file adapater.
I tried running command line parameters of Sender file adapter but that didn't worked.
Please help.
Thanks
-KulwantHi, Kulwant:
Looks like you would like to execute your mapping program before file adapter pick it up.
Right ? for one interface, it seems out of the XI scope, however if this is your requirement, you can separate into two interfaces:
The first interface is file to file scenario, it is used to execute your mapping program:
The file sender just pick up the txt file, send to integration engine.
Your Message Mapping program need to specify your XSLT mapping, after the mapping, the message is XML format,
then you will use file receiver to send it to certain directory.
Now the XML format file is your input of your second interface.
Regards.
Liang -
Regarding receiver FILE adapter, REMOTE FTP server
Hi All,
The scenario was to get XML file from a local FTP server and to place that XML file in REMOTE FTP server, which we dont have any control over that REMOTE FTP,
While executing the scenario it is successfully picked the file and processed and it was success in SXMB_MONI, but when we see the Communication Chaneel of the receiver adapter it is generating the following error..
Error when getting an FTP connection from connection pool: com.sap.aii.af.service.util.concurrent.ResourcePoolException: Unable to create new pooled resource: ConnectException: Connection timed out: connect
Message processing failed. Cause: com.sap.aii.af.ra.ms.api.RecoverableException: Error when getting an FTP connection from connection pool: com.sap.aii.af.service.util.concurrent.ResourcePoolException: Unable to create new pooled resource: ConnectException: Connection timed out: connect
clarifications needed ASAP
regards,
Kishore.Hi,
Verify the Host details of the Remote FTP.
Try to ping the Remote host as below
Goto > start>Run --->type cmd and give the command as below
c:\>ping <host details or IP address> press enter and see if you get the successful communication response.
If its not it indicates that the connection is not setup.
Ask you FTP administrators to look into connectivity issue for it.
Thanks
Swarup -
Hai,
I want to read the files present in FTP server without downloading.
Using (org.apache.commons.net.ftp.*); this package I can view the files and directories present in particular host and can even download.
But I want to read the files in directories without downloading them for displaying the file contents in my JApplet.
How can I achieve this?
Waiting for reply...
DhuraiDHURAI wrote:
How I have to specify the path (user name,password) for reading?If you are using the Apache Commons FTP package, as you said, then you don't specify a path. And the path you don't specify wouldn't contain a user name and password because you use those when you make the connection to the server. All of this is covered in the documentation. -
Transfer Excel file to external FTP server via PGP
Hi SDN!
I have build an scheduled report to generated an Excel-file from an internal table and saved it in the database. Now my task is to upload it to an external FTP Server of a partner company. The File contains sensible data and shall be encrypted via PGP.
How can i upload to an external FTP server and before that, encrypt the file with PGP? I appreciate any help and look forward to reward some great posts.
Thanks for your help!
Edited by: Steffen Wieprecht on Aug 7, 2008 1:00 PMI found a solution myself, maybe someone is interrested:
I installed a WS FTP Professional on a Server.
Onto this server I wrote the files that have to be ftp-uploaded into one specific folder.
A Perl Script in the scheduled tasks of the machine checks if a new file is in the folder and starts the upload.
In WS FTP the site upload is defined with all PGP Keys so they are store secure.
This solution can be used by any programming language that is able to write files in the upload folder.
Best Regards,
Steffen -
How to schedule Adapter to Pickup File on external FTP Server
Any solution is very much appreciated for the following Problem.
My Scenarios are File to XI to FIle
My problem is XI is picking up file on FTP Server while file is being written by Webservice ( This Webservice can not write .tmp file or movie file from one directory to another. So these options are ruled out )
These are proposed steps:
1. Job Scheduler creates Dummy File on XI File System
2. XI Picks up File on XI File System and Invokes External Webservice and receives Response that a File "MadFile" has been written to external FTP Server.
3. After XI receives response from webservice, XI should get "MadFile" from FTP Server
How Can I implement step 3 above.
( Please do not suggest executing scripts as the the application where webservice running do not want to write it )ST,
At times one has to take a stand and using a BPM like this is actually complicating things. Using the script option is the best solution!
Menahwile, even BPM solution doesn't make sense to me as like you correctly told, your Second Receive Step can poll over the file and pick up the temporary file! Even if you can handle this using Adapter Scheduling, you would need Correlation and I am pretty sure that as you are using a dummy file, this also cannot be achieved!
Would suggest that another option would be to ask the webservice to send a call directly to XI after writing the file. The moment XI receives the Webservice request, XI can invoke a java proxy to collect the file ( polling using File adapter is not going to help ) and then pass this file to the integration engien and so on.
Even my solution is not a very good one, but, if nothing works out, it is something atleast. But, I would ask you to push for the tmp folder plus script.
Regards
Bhavesh -
Need Help to locate a file on a FTP server using MediaLocator class
Hi Friends,
This is Venkat. Iam currently working on a Multimedia J2EE web project. Iam working on a requirement to
show Thumbnail view for uploaded media. For this i have downloaded a standalone code from the following site.
http://www.exactfutures.com/index02.htm.
This code converts frames of a media files to jpg images which i can use them to show as Thumbnails.
The code takes file name which is present in project folder as parameter. But in my web project iam using a FTP server to store my media files.
The above code uses Java Media Framework along with another API Fobs4JMF. The media file name is passed to MediaLocator class constructor which is located in the project folder. Iam talking about a standalone application here.
But my project is a J2EE web application.
Now my problem is that, how can i refer a file which is located on a external FTP server and pass it to MediaLocator or some other class.
Say the ftp file URL is mms://wm.testuser.net/12365741/testvideo.wmv
Guys hope you are clear abt my problem. Please help me ASAP.
Below is the part of code
* Constructor
public vid2jpg(String path) {
MediaLocator ml;
String args = path;
if ((ml = new MediaLocator(args)) == null) {
System.out.println("Cannot build media locator from: " + args);
if (!open(ml)) {
System.out.println("Failed to open media source");
* Given a MediaLocator, create a processor and start
private boolean open(MediaLocator ml) {
System.out.println("Create processor for: " + ml);
try {
p = Manager.createProcessor(ml);
} catch (Exception e) {
System.out.println("Failed to create a processor from the given media source: " + e);
return false;
p.addControllerListener(this);
// Put the Processor into configured state.
p.configure();
if (!waitForState(p.Configured)) {
System.out.println("Failed to configure the processor.");
return false;
// Get the raw output from the Processor.
p.setContentDescriptor(new ContentDescriptor(ContentDescriptor.RAW));
Thanks in Advance for your time.
Venkat
Edited by: VenkataGuru on Jul 23, 2008 5:30 PMHi Mani,
Below is code that ran successfully on a cRIO-9002. It looks much the same as yours, please double-check the formatting of your string controls. If things still do not work, let's look at the cRIO more closely.
Message Edited by Pie56694 on 06-30-2008 09:45 AM
Attachments:
FTPDELE3.jpg 28 KB
FTPDELE.jpg 24 KB
FTPDELE2.jpg 18 KB -
Receiver File Adapter - Dynamic FTP Server Address
Hi, I would like to pass the FTP Server address to the Receiver File Adapter as an parameter. Is this possible and if so what Name Space / Parametr Names add to the Product to define these values.
Thanks
AndreHi Andre,
If you have your server as a part of your payload, thendynamic file server generation concept can be done is as follows.
In your server name field. just give a variable with % symbols. (eg: %file% ).
Now, under the option Variable Name Substitution, you can give how the value has to be created.
It can be your interface name, sender service name, etc or it can be some value dynamically from your payload.
For the former, your give
message:interface_name ,etc
and for the payload part you give,
Payload: "your element root which u wanna acecss"
Just check this link out,
http://help.sap.com/saphelp_nw04/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/content.htm
And read the contents under variable substitution and it will help you understand the concepts better.
If you have any clarifications, do get back,
Regards,
Bhavesh -
Rename and move files on remote FTP server
Hello,
We have a scenario where XI transfers a file to a remote FTP server at partner end using File Receiver Communication channel.
These files are huge,so there is a risk of picking up incomplete files at their end when XI is still writing the file on their server.
Hence,we have decided to follow the approach which is already mentioned a number of times on SDN that XI would place a file with different name and in a different folder on partner's FTP server.
This would then be renamed and moved to the required folder on the same server.
This could easily be managed using a script at partner end but there are some problems when they are not able to do this.
Is there a possibility to achieve this using 'Run OS command after Message Processing' in XI when Source and target folders both are on partner's FTP server?
If yes,can anybody please provide code for such a script and corresponding setting for this parameter in XI Communication channel?
Thanks a lot in advance.
Best Regards,
ShwetaHello,
Thanks for the reply.
But this has to be done in FTP session because the source and target directory both are on remote FTP server.
Instead,in SAP documentation,I found a parameter :
ftp.putSafe=YES|NO
Use this specification to define whether a transferred file is first created with a temporary name and only renamed once the transfer is complete (YES), or whether it is created with its final name at the start of the transfer (NO). The latter case can lead to problems if an application on the FTP server accesses the file before the transfer is complete. If you specify YES, this problem is avoided because the file only becomes visible with the search name when the transfer is complete.
The default value is NO.
Doesn't it serve the same purpose?Do we still need to write scripts?
I have tried to include this in Additional Parameters in Advanced Mode as:
ftp.putSafe YES
but I can't check in test system whether it is really working or not.I would like to confirm if it helps.
First of all,I would like to know if this setting works for XI3.0 SP17.
Can anyone please help.
Thanks.
Regards,
Shweta
Maybe you are looking for
-
How do I access the EC Embedded Controller firmware level with wmi win32?
Hi I have used the Win32 classes to access the Bios level, model, serial and asset number The only data I cannot find is the EC firmware level I cannot find it in any of the WIN32 classes WIN32_BIOS WIN32_BASEBOARD etc Does anyone know if this access
-
I purchased Adobe photoshop elements II and Adobe premiere elements II. They are both on one disc. My computer crasded and I had to reload Windows. I only have one serial number and it only works with photoshop II. The same serial number will not wor
-
Upgraded to Windows 8 can't find my photos
I re-installed elements 6 due to an upgrade to Windows 8 and now I can't find my photos
-
I am not able to open my Apps in IE
Hi All, I am using to open Apps 11i in Mozilla, but i can't able to open IE could any one suggest me how to open or how configure Apps to open in IE. Thanks, Red.
-
Authorizations, hierarchy, ZAUTH table
Hi, I am having a problem with authorizations, and I was wondering if anyone could recommend the way to go on this. 1. We created a hier based on 0sales_off and 0sales_grp. 0sales_grp is the postable node. 2. We have a table that has the user ids and