XI File Adapter sending/receiving zip files

Can the XI File Adapter create a zip file to send outbound from XI and/or can it also translate a zip file inbound into XI?

Hi Kirk.
What you can do is use the OS command option on the adapter in order to unzip the file after the File\FTP adapter completes its file transfer to the specified path.One of my colleagues used a freeware zip app. that excepts an os command actions.
I know it works for file receiver but not sure about the sender. check SAP Note 801926 for more sender adapter parameters.
Regards
Nimrod Gisis

Similar Messages

  • File Adapter to read Zip file and send it as input to another webservice

    Hi,
    I have the below requirement:
    1. A service will generate 3 attachments and place it in a particular directory.
    2. SOA service has to pick those 3 files and send those files as input to another custom application which will email.
    Design :
    1. First SOA will create an archive file of those 3 attachements and then file adapter will poll for that zip file in that location and send that file as a whole to the custom application.
    Query:
    Now my question, is the above design feasible? If so, how to configure the file adapter to pass the file as input to that custom application?
    Kindly do the needful
    Thanks,
    Priya

    You can accomplish this via java embedding activity...Create a java embedding, which will create a zip file.. this java code is easy to implement..
    You can also do away with un-necessary polling file adapter.. and you can use "Synchronous File Read" operation of File Adapter.. For Sync Read, you'll have to pass the zip file name, which you can easily fetch from java embedding activity..
    Let me know, if this doesn't work.

  • File Adapter - Sender/Receiver

    We may have scenario where XI will be using File adapter to deliver messages to Application X  in the landscape.
    As part of Load balancing of Application X, there are multiple servers running. Say, If Iam delivering the  file to one location, If that server is down I should send files to different location.  How can I achive that ?

    Hi ST,
    I guess your 10 receivers are physically different. So they will have different IPs.
    I do not know if you can adress a receiver dynamic. As far as I know it is not possible.
    Maybe one solution is to write your own adapter.
    On the other hand, thinking about a webService that pings the receiver systems and gives a message back to XI, which servers are online.
    Than first call the WebService. In BPM you receive a list/ a message which servers are online. In a fork you could decide with a condition, which branch to use.
    Sorry, that I cant give you a better solution.
    Regards Mario

  • Zipping multple files and sending the Zipped folder to target location using Biztalk

    Hi all,
    I have requirement like
    Seperate Xml files will be coming as incoming message to Biztalk
    Biztalk need to send a zipped folder contining all these xml to target location
    any link or component i can use to meet this requiremant  plese help
    regards,
    Vineeth

    Create or use the publicly available custom component for unzipping the received message and for send use another component to replace all attachments of a multi-part message
    (multiple parts to multiple files to zip) for its zipped equivalent. If not multiple message use any zipping API to zip the multiple 
    files to zip file and send the zipped file in send port.
    BizTalk Pipeline Custom Component Message Unzippper
    Zip Files in a Custom Pipeline Component
    Multi-Part Message Attachments Zipper Pipeline Component
    BizTalk Multipart Message Attachments Zipper is a pipeline component
    List of custom Pipeline component you can use
    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.

  • File access parameter in file adapter at receiver side

    Hi Experts,
    1- i am using file adapter at receiver side. i want to create my file with time stamp for that i have given the file construction    mode = add time stamp and put file directly .but it is showing time in file name????????
    2. i want my file name as  TimeSheet_Country_Date_time.csv so for this what value i have to give in file Name Scheme parameter.
    Regards

    1- i am using file adapter at receiver side. i want to create my file with time stamp for that i have given the file construction mode = add time stamp and put file directly .but it is showing time in file name????????
    The addtime stamp will add timestamp as the last part of the filename before the extension.
    2. i want my file name as TimeSheet_Country_Date_time.csv so for this what value i have to give in file Name Scheme parameter.
    You can achieve this using dynamic file naming UDF in mapping and using ASMA in file adapter.
    Use current date function and generate the current date. Then use substring to pick date,time from it and format it according to your requirement (TimeSheet_Country_Date_time).Else you can write a UDF to generate the file name as per your requirement and then pass it to the dynamic filenaming UDF in the mapping.
    Search SDN for dynamic file naming.

  • Sender File adapter not picking the file ABCD.PRN extension file

    Hi
    Am doing File to Abap Proxy scenario. My source will be in text format of fixed length of fileds 7.
    My souce file will be generated by a third party machine with the extension EEE150809.PRN. In my scenario my file adapter should pick the file and update the same in ECC via a Proxy.
    I have configured the Sender File adapter with Message Protocol -  Content Conversion but file adapter is not picking the file. I have checked the Communication channel and status is fine. But the same Communication Channel works for .XML file.
    What are the parameters that I have to consider with the file extension .PRN using File adapter?
    Thanks.
    S.

    Hi Swarna,
    You dont need to worry about the extension when picking the file. You can try using EEE* so that is picks all the files starting with EEE. If you have the fixed name then you can try giving EEE150809.*. Also EEE150809.PRN should not have any issue. Try to see in sender commu ication cahnnel for anyerrors. Probably there might be some network issues or authorisation issues. If you are reading with NFS then ask them to give necessary permissions. If you are reading through FTP check the user id and pwd you are using.
    Regards,
    ---Satish

  • Sender File Adapter stop processing all files

    Hello all,
    the file adapter pick up all files in the directory by default.
    if  a large number of files are in the directory then this could slow down the pi processing.
    is there any way to process only one file per polling??
    regards

    >
    Ralf Zimmerningkat wrote:
    > Hello all,
    > the file adapter pick up all files in the directory by default.
    > if  a large number of files are in the directory then this could slow down the pi processing.
    > is there any way to process only one file per polling??
    >
    > regards
    I do not have any proble if you have got the answer. BUT this blog says how to exclude the other files from the same folder.
    Your Case: For example, Your Sender CC wants to pick up file ABC.txt from /xyz dir, now suppose there are 10 thousand files of same name in the dir and you want ABC.txt should be picked up one by one, So how this blog is going to help you. Can you Plz explain to me and others too?
    @Sachin may be you can throw some light on this... may be I am missing something.

  • Sender File Adapter picking the same file twice

    We are facing a weird issue with File Sender Adapter
    We are using PI File Adapter ( NFS ) to read files for a NFS folder and
    processing those in PI.Normally it works fine. But for a scenario we
    are noticing it sometimes process the same file twice before archiving,
    thus duplicating the financial postings.
    What we have is :
    File Sender Adapter - NFS, Polling interval 60 secs, and Processign
    mdoe Archive. File name includes Wildcards - JE_Upload*.txt
    what we are noticing is that :
    when it picks up a file, it immediately polls again to check for
    another file, and sometimes the file is not yet archived so it picks up
    and reprocess the same file.
    If you see the message below, both belong to the same file, and it
    picked up the same file again in 12 secs after processing it the first
    time
       Successful 02.11.2009 15:01:00 02.11.2009 15:01:01   APMANUAL     urn:bl:i2g:003:100
    SI_SKF_FIDOC_OB XI Message
       Successful 02.11.2009 15:00:49 02.11.2009 15:00:50   APMANUAL     urn:bl:i2g:003:100
    SI_SKF_FIDOC_OB XI Message
    Anyone seen this behavior before?

    Hi,
    Please check the script which creates file in source NFS Folders. There is possibility that script is making change in file when PI is picking up the file.
    When PI picks the file first time it creates one message ID in system. After that if script is making any change in file without file name change (This need not necessary data change), for PI it becomes new file and new message gets generated in PI for same file.
    This error normally comes when File adapter is not able to archive file succesfully. For eg. file with same name alredy exists in Archive folder.
    File adapter generates the new message id whenfile get modified(eg.change in its length or data change) even though
    the file name is same and when file get change ,XI file adapter thinks that its new file and hence generate the new message id for same file.
    If file has same name and notmodified then XI adapter will not generate new message id and will keep on throw the error till you remove that file with same name from the
    archieve directory.
    -Warm Regards,
    Gouri

  • Cannot process a Fixed Field Length file using the File Adapter (Sender)

    Hi -
    I have checked throughout these posts and blogs but I still have not been able to find a solution to my issue.  When using the File Adapter (Sender) I get a Conversion initialization failed with "xml.keyfieldName", no value found.  Why would I require a key field when I am using fixed field lenghts?  The file is comprised of 2 structures - 1 header and multiple details (see below).  There are no key fields in the flat file that I would be able to use.  Any suggestions?
    011000390      Customer Americas        20080605164317 000000000000000800000008000000000016000000                              
    12345678          100500       100500       Supplier 1                         0000000000030000002008040400                    
    12345678          100501       100501       Supplier 2                         0000000000052000002008042100 
    The File Adapter is configured as follows:
    Document Name = Rfchke00
    Document Namespace = 'my namespace'
    Recordset Name = Rfchke00
    Recordset Structure = Dtachkh,1,Dtachkp,*
    Recordset Sequence = Ascending
    Recordsets per Message = 1
    Key Field Type = String (Case-Sensitive)
    Dtachkh.fieldFixedLengths = 15,25,8,6,1,8,8,8,15,3,31
    Dtachkh.fieldNames = F1,F2,F3,F4,F5,F6,F7,F8,F9,F10,F11
    Dtachkh.processFieldNames = fromConfiguration
    Dtachkp,fieldFixedLengths = 18,13,13,35,15,3,8,2,21
    Dtachkp,fieldNames = F1,F2,F3,F4,F5,F6,F7,F8,F9
    Dtachkp,processFieldNames = fromConfiguration
    Thanks,
    Dave

    Hi,
    you can use the module from which u can convert your structure to
    H011000390 Customer Americas 20080605164317 000000000000000800000008000000000016000000
    D12345678 100500 100500 Supplier 1 0000000000030000002008040400
    D12345678 100501 100501 Supplier 2 0000000000052000002008042100
    Please note the extra H,D in the struture added by the module.
    You can then use them as your key fieldValues.. The module should be deployed in Visual Admin and then can be used in the Module tab of your adapter CC
    While writing the content conversion after that please dont forget about the added new characters
    Please note also that i can find that the word supplier kept repeating in all the Dtachkp records
    Please use that
    Also if you feel that the field is of 13 characters and that would cause a problem dont worry... create a dummy field eg split tht 13 to two fields and use the common one as key field Value and identifier... as i see in ure case its like 500 Supplier , 502 Supplier . u can split the first 4 char and the remaing 9 char are key field value.
    try this out
    Rgds
    Aditya

  • Synchronous file adapter sender side configuration in sap pi

    Hi Experts
    synchronous file adapter sender side configuration in sap pi
    can you explain any one tell me step by step procedure?
    Regards
    Sagar

    Hi,
    You can use RequestResponseBean in the sender file adapter module .
    RequestResponseBean (SAP Library - SAP Exchange Infrastructure)
    Request/Response Bean for IDOC_AAE adapter
    Instead of IDOC_AAE adapter you can use FILE adapter.
    Regards,

  • File adapter - How to pass File name and path at runtime

    Hi gurus,
    We want to use PI 7.0 as an ftp server and expose the config as a webservice where the service consumer can pass one or more file names and the path to pick them and drop them on a fixed ftp server.
    So precisely, I need to be able to set the file name, target directory parameters in both sender and receiver file/ftp adapters at runtime. is this possible at all ?
    I am aware of passing Adapter specific parameters from sender file adapter to receiver file adapter to create the same folder structure and file names. But my requirement is different. I hope I am clear.
    Could I please get some advise on this .
    Thanks & Kind Regards,
    Jhansi.

    Hi Jhansi,
    Either you can go ahead with dynamic configuration as said by other SDN'ers. Else can go with Java Mapping:
    Here is the code for Java Mapping:
    import com.sap.aii.mapping.api.*;
    import java.io.*;
    import java.text.*;
    import java.util.*;
    public class GetDynamicConfiguration implements StreamTransformation {
    private Map param;
    public void setParameter(Map map1) {
    this.param = map1;
    public void execute(InputStream inputstream, OutputStream outputstream) throws StreamTransformationException {
    try {
    AbstractTrace trace = null;
    // a) Set ouput File name
    String directory=null;
    trace = (AbstractTrace)param.get(StreamTransformationConstants.MAPPING_TRACE );
    param.put(DynamicConfigurationKey.create("http://sap.com/xi/XI/Dynamic", StreamTransformationConstants.DYNAMIC_CONFIGURATION), "");
    DynamicConfiguration conf = (DynamicConfiguration) param.get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File", "FileName");
    DynamicConfigurationKey key1 = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File", "Directory");
    String filename =conf.get(key);
    conf.put(key, filename);
    trace.addInfo("File name is "+filename);
    if(filename.equals("in.txt"))
    directory = "/home/ftpxi/in";
    if(filename.equals("test.txt"))
    directory = "/home/ftpxi/in/test";
    if(filename.equals("shweta27.txt"))
    directory = "/home/ftpxi/in/test";
    trace.addInfo("Directory name is "+directory);
    conf.put(key1, directory);
    // b) Just copy input file to output file
    byte[] b = new bytehttp://inputstream.available();
    inputstream.read(b);
    outputstream.write(b);
    } catch (Exception exception) {
    exception.printStackTrace();

  • File Adapter polls all the files from the directory when deployed again

    Hi,
    File Adapter polls all the files from the inbound directory irrespective of the timestamp when deployed again.
    For ex. when the BPEL process with file adapter is deployed, it starts polling the directory based on the timestamp as and when the directory is written with the files. I did not opt for deleting the files after read by the File Adapter.
    But, when BPEL process is modified and deployed again, this time, the file adapter picks up all the files in the inbound directory and doesn't consider the timestamp.
    My guess is that it should not pick all the files but based on timestamp only.
    I guess I can observe the same behavior if I bounce the Application Server also
    Do I have an option to achieve this?
    Thanks,
    Sasi Bhushan.

    try this:
    1- create a File object for the directory. (look at isDirectory() )
    2- create a File[] that represents the files in that directory. (.listFiles())
    3- if (file[x].isDirectory()) {recursive method call;}
    4- else {
    process file;
    If you want more help--do some work on it, and come back with specific questions relating to specific lines in your code and specific error messages you've been receiving.

  • File adapter picking up partial files

    Hi All,
    We are facing a wierd problem with the File Adapter.
    The problem is that, we are getting the xml files from the source system, and PI is supposed to pick them up and process them. Sometimes, the file adapter is picking up the empty files / partial files, i.e., before the file is completely written on to the FTP folder.
    We tried increasing the polling interval. But this did not help. Since we are taking the files from the FTP, the option "MSecs" in Additional Parameters also will not work. As we are on PI 7.0 SP13, we tried to search for the "Empty File Handling" option wherein we can make the file adapter skip the 0kb files. But we are not able to find that option anywhere.
    Please help us find a solution to this problem.
    Thanks,
    Hari.

    Hari,
    In sender communication channel click on  Advanced. Then you see the paramter Msecs to Wait Before Modification Check. Add a value 3000. Then you should be good.
    Regards,
    ---Satish

  • Detect "end of file" while send n numbers files over a socket?

    Hi!
    I�m trying to find a way to detect "end of file" while send n numbers files over a socket.
    What i'm looking for is how to detect on the client side when the file i�m sending is downloaded.
    Here is the example i�m working on.
    Client side.
    import java.io.*;
    import java.net.*;
    public class fileTransfer {
        private InputStream fromServer;
        public fileTransfer(String fileName) throws FileNotFoundException, IOException {
            Socket socket = new Socket("localhost", 2006);
            fromServer = socket.getInputStream();
            for(int i=0; i<10; i++)
                receive(new File(i+fileName));
        private void receive(File uploadedFile) throws FileNotFoundException, IOException {
            uploadedFile.createNewFile();
            FileOutputStream toFile = new FileOutputStream(uploadedFile);
            byte[] buffer = new byte[4096];
            int bytesRead = 0;
            while ((bytesRead = fromServer.read(buffer)) != -1) {
                toFile.write(buffer, 0, bytesRead);
        public static void main(String[] args) {
            try {
                new fileTransfer("testa.jpg");
            } catch (Exception ex) {ex.printStackTrace();}
    }Server side.
    import java.io.*;
    import java.net.*;
    public class fileTransferSend {
        Socket serv = null;
        OutputStream toClient;
        public fileTransferSend(String fileName) throws FileNotFoundException, IOException {
            StartServer();       
            for(int i =0; i<10; i++)
                send(new File(fileName));
        public void StartServer() throws IOException {
            ServerSocket ssocket = new ServerSocket(2006);
            System.out.println("Waiting for incomming");
            serv = ssocket.accept();
            System.out.println("incomming");
            toClient = serv.getOutputStream();
        private void send(File f) throws FileNotFoundException, IOException {
            if(f.exists() && f.canRead()) {
                FileInputStream fromFile = new FileInputStream(f);
                try {
                    byte[] buffer = new byte[4096]; // 4K
                    int bytesRead = 0;
                    System.out.println("sending: "+f.getName());
                    while ((bytesRead = fromFile.read(buffer)) != -1) {
                        toClient.flush();
                        toClient.write(buffer, 0, bytesRead);
                finally {
                    //toClient.close();
                    fromFile.close();
            } else {
                System.out.println("no files");
        public static void main(String[] args) {
            try {
                new fileTransferSend("test.jpg");
            }catch(Exception e) {e.printStackTrace();}
    I know that the client never reads -1 becuase i doesn�t close the stream.
    Is there anyway to tell the client that the file is downloaded?

    A common (and easy) TCP/IP protocol is to send length, followed by data.
    Because TCP/IP is a stream-oriented protocol, a receiver can never absolutely determine where the first packet ends and the second packet begins. So it is common to send the length of the packet, followed by the packet itself.
    In your case, you could send length of file, followed by file data. It should be fairly easy to obtain file length and send that as a 32-bit (or 64-bit value). Here is an idea (not code) for the receiver:
    receive (4) // where 4 = number bytes to receive
    unsigned length = convert 4 bytes to unsigned integer
    while (length != 0)
    n = receive ( length ) // where n = number bytes actually received, and length = number bytes desired
    Or, you can use the concept of an "Escape" character in the stream. Arbitrarily choose an ESCAPE character of 0x1B (although it could be any 8-bit value). When the receiver detects an ESCAPE char, the next character can be either control or data. So for end of file you might send 0x1B 0x00. If the byte to be sent is 0x1B, then send 0x1B 0x1B. The receiver would look something like this:
    b = read one byte from stream
    if (b == 0x1B)
    b = read one byte from stream
    if (b == 0x00) then end of file
    else place b in buffer
    else
    place b in buffer
    Later.

  • File Adapter Not picking the files

    Hi All,
    We have a process wherein the file adapter picks up the file from a particular location and it processed thereafter. We get the files once every month. We noticed that if the files that are being dazzled are of the same, i.e if the same nomenclature is there for the file that was dazzled the previous month, the adapter does not pick up the file. Only after renaming the file, it picks the file and processed them.
    Any idea why the files that are dazzled with the same name are not being picked up.
    Thanks in Advance...!!

    Hi,
    While configuring file adapter to pick up the files cross verify with file name putting in the directory location against the
    "Includes files with name pattern" "Excludes file with name pattern" file name..
    let say if u kept .*txt if picks the files txt with any name and one more think once after picking up the file from particular location are u enabling (delete file once read) option in configuration(It all depends on ur req)..
    cross check the schema element of the file pattern.

Maybe you are looking for

  • CC (14.x) Bugs

    I've got to the stage where I have to say something, because Photoshop CC is definitely buggy in my experience to date.  The one that annoys me the most is that I suddenly get stuck with a small brush tool that won't go away without restarting Photos

  • Ipod connection to pc

    I have an older version of the Ipod Scroll. It does not have a dock port only a firewire port. There must be some way that I can connect it to my PC, just no one I have spoke to can help me. Is there an adapter from firewirt to usb, and if so where c

  • Custom ABAP extractor question

    Hi Geeks, I have written an ABAP report for a custom extractor. My report pulls all necessary data & modify table ZTABLE. Now I want to trigger event in BW using RSSM_RAISE_EVENT. which I will use to trigget process chain in BW. My question is how BW

  • HT204476 Can I delete my iPhoto Library after migrating to Photos?

    My iPhoto Library is about 450 GB in size. This morning I migrated it to Photos. After a reboot my Mac started complaining that I have no disk space left (I have a 1 TB drive in my MacBook Pro). It appears that the Photos migration process duplicated

  • 10.4 won't install on g4 iBook.... because I'm stupid.

    I bought a little 12" g4 iBook to give away. I have one just like it. The one I just bought came with 10.3.7. My other g4 is running 10.4.11. I have the iBook g4 start up disks, so I thought... "Hey! I'll make this new one 10.4, as well!" But (and he