Process txt files in zip file

Hello everybody,
I have a scenario where PI needs to obtain a zip file via FTP using the File adapter, this zip file contains a number of txt files that I need to process, and the content of one of them send it to an ECC, now I'm using the PayloadZipBean Module in the Sender FIle Adapter, and I have two things if I use the Message Protocol as File, I get a Payload for each txt file in the zip file, but this payload has no structure, and if I use the File Content Conversion I get an XML strcuture with only one field and a strange string in it, and somewhere in this string the names of the files I assume all the content of the zip file, can anyone help on how could I achieve what I need that is to pull the zip file via SAP PI, then unzip it, and with the content of one of the txt files send it to an ECC via ABAP Proxy, thanks in advance for your answers.
Regards,
Julio Cesar

Hi,
you can do it in futher way ...
pickup zip file and simply extract and dump it in another temp folder (can use scripts on OS level).
@ then Use another sender communication channel to pickup all these text file .
for further clarification you can use these links also. -
Re: PI needs to obtain a zip file via FTP using the File adapter
Accessing File using FTP from Java Mapping
File Sender Adapter with FTP protocol
BR
Raj

Similar Messages

  • Converting html file into zip file and send email attaching zip file

    Hi Experts,
    I am trying to send email with attachment(html). Which contains more than 7MB. So, It is throwing an error like Size exceeded.
    So, Now i need to compress the data for less than 7MB.
    I decided to convert HTML File into ZIP File.
    Kindly suggest me to convert the HTML file into ZIP file and sending email with attached ZIP file.
    Correct answer rewarded,
    Thanks & Regards,
    N. HARISH KUMAR

    Hi Experts,
    *// HTML_TAB converting into ZIP File
       DATA  : zip_tool TYPE REF TO cl_abap_zip,
               filename TYPE string ,
               filename_zip TYPE string .
       DATA  : t_data_tab TYPE TABLE OF x255,
               bin_size TYPE i,
               buffer_x TYPE xstring,
               buffer_zip TYPE xstring.
    filename = text-007.                                                                          "'HTML_TAB
    *describe the attachment
       DESCRIBE TABLE html_tab LINES tab_lines.
       bin_size = tab_lines * 255.
       CALL FUNCTION 'SCMS_BINARY_TO_XSTRING'
         EXPORTING
           input_length = bin_size
         IMPORTING
           buffer       = buffer_x
         TABLES
           binary_tab   = html_tab.
       IF sy-subrc <> 0.
    *     message id sy-msgid type sy-msgty number sy-msgno
    *     with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
       ENDIF.
    *create zip tool
       CREATE OBJECT zip_tool.
    *add binary file
       CALL METHOD zip_tool->add
         EXPORTING
           name    = 'FSSAI_MAIL.HTML'
           content = buffer_x.
    *get binary ZIP file
       CALL METHOD zip_tool->save
         RECEIVING
           zip = buffer_zip.
       CLEAR: t_data_tab[],bin_size.
       CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
         EXPORTING
           buffer        = buffer_zip
         IMPORTING
           output_length = bin_size
         TABLES
           binary_tab    = html_tab.
    Thanks & Regards,
    N. HARISH KUMAR

  • Process multiple documents in zip file without using ccBPM in PI

    Hi,
    Is it possible for PI to handle multiple documents within a zipped source file without the use of ccBPM?
    For example, I have an incoming source zip file containing 0.pdf, a,xml, z.pdf respectively,  After having the sender communication channel uncompress the zip file, each pdf file should be pushed to a directory on a file server, and the xml file should go through a message mapping.
    Is this possible to process all of the files without the use of ccBPM?
    Regards,
    Jim

    Hi Michal,
    Thank you for your response.  The example I provided is just one potential case.  In general, the zip file will always contain 1 xml file and 0-n PDFs, Word docs, or other types of documents.  Also, the first file in the zip may not always be the xml file, which is what I was trying to portray by my example.  Since I am not sure how many non-xml files will be included, I did not know if I could handle all of them directly, without ccBPM.
    At this point, I am leaning towards using a script preprocessor to uncompress the zip, then for each file found, push the xml file to an NFS channel which will process/map the xml, and push every other file type to another NFS channel to copy these documents to a predetermined directory on a predetermined server.
    What are your thoughts on this approach?
    Thanks and Regards,
    Jim

  • Add .txt files into .zip file

    Hello friends,
    Any buddy knows how to add ".txt" files into ".zip" format through the ABAP code. 
    Thanks in advance.

    Hi Murali,
    You can use the method in the class CL_ABAP_GZIP to zip your file and then download it using GUI_DOWNLOAD.
    data: zip type ref to cl_abap_zip,
          result type xstring.
    create object zip.
    zip->add( name = some_file content = content ).
    result = zip->save( ).
    Also you can check this thread as well.
    How to Download data in Zip folder
    Re: UNZIP file from ABAP
    Hope this will help.
    Regards,
    Ferry Lianto
    Please reward points if helpful.

  • How can I stop Microsoft IE renaming .jar files to .zip files?

    I realise this question has been asked before on this forum, but as far as I can tell no answer has yet been posted.
    If I put a .jar file on my webserver for people to download, later versions of Internet Explorer will rename the file from xxx.jar to xxx.zip on the client's machine. Is there any way of stopping this from happening?
    It looks like the problem is caused by IE examining the contents of the file and realising it uses ZIP compression. As a result, any file that I create (not just jars) that uses Java to zip the contents, when placed on a web server, gets interpreted as a .zip file by IE regardless of its extension.
    I realise there are some workarounds such as zipping the .jar file, creating a .exe file from the .jar, telling everyone to use Firefox etc., but none of these are really acceptable or particularly efficient. I am really hoping there is something I can do to the .jar file or the compression process that will tell IE to leave the file alone.
    Thanks,
    Jo.

    You can save any kind of document on iCloud Drive, as long as the file size is smaller than 15GB.
    See:   iCloud Drive FAQ
    Create a new folder for your Office documents on iCloud Drive and drag your documents there, or select iCloud Drive in the File Chooser panel, when you save a document.

  • Java.util.zip.ZipFile.entries() shows only 99 files but zip file is fine.

    Hi,
    I have a wierd issue with java.util.zip.ZipFile
    Code as simple as
    ZipFile file = new ZipFile("my.zip") ;
    System.out.println(file.size());
    For this particular zip file, it says 99 files found but the zip contains more than 60,000 files. I tried the zip with unzip and zip utilities and the zip file checks out fine. I even tried to unzip the contents, and zip 'em up all over again, just to eliminate the chances of corruption while the zip was being transferred over the network.
    The same program works fine with another zip containing more or less the same number of files and prints 63730.
    Any idea? This can not possibly be related to the type of files the zips contain? right? In any case, the contents of both zips are text/xml files.
    Any help would be greatly appreciated.
    Regards,
    ZiroFrequency

    I know its a problem with this particular zip. But whats interesting is that "unzip" can easily open / verify the zip and claims that it is a valid zip.
    As I wrote earlier, I unzipped the file and zipped up the contents again in a new zip but java can't still count the contents correctly.
    So I am thinking there is something to do with the "contents" of the xmls inside the zip? (characterset issues?)
    There are no exceptions thrown and no error anywhere :(
    I basically need to pinpoint the issue so that I can have it corrected upstream as this zip file processing is an ongoing process and I need to resolve it not just once but for the periodic executions.
    Hope this helps explain the issue.

  • Appending files to zip files

    Hi,
    My requirement is i have to append data to zip files using file receiver adapter.
    am also using FCC.
    can anybody help me on this how to approach.
    -Kishore
    Edited by: Kishore_Kumar_XI on Mar 3, 2012 6:05 PM

    Hi,
    I think you can use my blog case for your scenario
    ABAP PROXY TO FILE – Handling Heavy Volumes in SAP PI (ABAP PROXY TO FILE u2013 Handling Heavy Volumes in SAP PI)
    Steps:
    1. split into two scenario
         proxy --> XI --> file    (using above blog concept)
         (ii) file (zipped) --> Xi --> FTP (file) without IR objects
    using the first scenario write the file to XI server internal file location using NFS protocol using file receiver channel in append mode.
    Use the scripts as mentioned in the above blog (Note:- scripts will differ depending on XI Operating System). In the second script i.e.,  "Run OS Command After Message Processing" script, add the extra functionality which can zip and rename the file when it is last transaction. The last transaction can be identified from ABAP proxy message with little extra functionality in the report and using dynamic configuration we can pass this as input to second script which does the zipping and renaming.
    We are renaming the file for the last transaction, so that it can be pooled by second scenario file sender channel which will pool with the same naming convention. Pass this zip file directly to FTP server without using any IR objects.
    Regards,
    Praveen Gujjeti

  • MFT 12.1.3 does not decompress all files when zip file size 2G

    Hi,
    I am having an issue with MFT and SOA. In my setup MFT receives zip files, decompress the zip file into several other files and send them as file reference to a SOA process for further processing. Now I am getting a very large file with a size of around 2 G containing 4 files where the larges file is 5G uncompressed. However when I submit this file to the MFT embedded ftp server MFT moves the file to the payload area, and start decompressing.It stops after compressing the first file. Can't find any error message in the server logs.
    Has somebody seen this kind of behavior?
    Any tip or tricks where to look to find more info about what could be the issue?
    Thanks in advance Frans

    With iPhoto crashing while trying to create a new library makes me think the application may the culprit an you may have to reinstall it. Have you tried the library wihile booted into  Safe Mode?
    Are you able to boot into another user account on your Mac and run iPhoto there?  If so then your home account looks suspicious.
    OT

  • Diconnect between readme file and zip file.

    Hi,
    For the drivers for oracle 8.1.6 the zip file (816classes12b.zip) contains file classes111.zip and classes102.zip. but no classes12.zip as the readme file (http://technet.oracle.com/software/tech/java/sqlj_jdbc/files/815readme.txt) says.
    What files do I need to get to Oracle 8.1.6 from jdk1.2? Where can I get them.
    Thanks,
    Prashant Rane

    Yeah but my freind if you are working with JDK1.1 or higher u need only classes111.zip
    null

  • Name zip file and zipped file in File Receiver

    Dear experts,
    I have a "RFC to File"-scenario. So I have a File Receiver and the received XML needs to be zipped. I have a XSLT mapping that hands over a dynamic file name to the File Receiver. Now when I use the PayloadZipBean my resulting ZIP-file gets the dynamic name. But the zipped XML gets the name "untitled.xml". But I also want the zipped file to get the dynamic name!
    I had a look at Stefan Grube's blog /people/stefan.grube/blog/2007/02/20/working-with-the-payloadzipbean-module-of-the-xi-adapter-framework
    and also at the WIKI http://wiki.sdn.sap.com/wiki/display/XI/Adapter%20Module%20PI%207.0%20Set%20Attachment%20Name?bc=true
    Do you know if there is any way I can avoid writing my own adapter module? I would like to stay with SAP standard modules!
    If not, will the module described in that WIKI also work with a File Receiver instead of a Mail Receiver? (I think it should)
    Thank you for any ideas and best regards,
    Peter

    Hello Amit, Hello Abhishek Salvi,
    Thank you again for your advice and the links to the NWDS. I downloaded it and everything went well until the deployment.
    I followed How-to-Guide: http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/c0b39e65-981e-2b10-1c9c-fc3f8e6747fa?quicklink=index&overridelayout=true
    Then I got the error: The DOCTYPE declaration in the ejb-jar.xml deployment descriptor is missing.
    I looked at thread: The DOCTYPE declaration in the ejb-jar.xml deployment descriptor is missing
    I am using PI 7.0, JDK version 1.4.12.
    My local JDK Version 1.5.0_22, NWDS 7.1.
    Could the JDK version on the server be a problem? Or NWDS 7.1 and PI 7.0?
    I used all the libraries mentioned on this page under PI 7.0:
    http://wiki.sdn.sap.com/wiki/display/XI/Where%20to%20get%20the%20libraries%20for%20XI%20development
    When I create the Enterprise Bean I have to specify "Component and Local Interfaces", e.g. "com.sap.aii.af.lib.mp....."
    But in my PI system I cannot find JAR files with the name "aii.af.lib.mp..."
    Could that be the problem?
    Do I have to specify different "Component and Local Interfaces" when creating the Enterprise Bean?
    Thank you again for any help!
    Best regards,
    Peter
    Edited by: Peter Wallner on Apr 21, 2011 10:13 AM

  • Cannot open/unblock msi & exe files in .zip file

    Trying to open .zip file but get security warning. Have tried to set unblock file but still issue still exists and the files cannot be opened. Is there a way to override this restriction?

    I had the same problem in build 9926 (seems to be solved for me in 10041). Clicking "Unblock" or running the Powershell command "unblock-file" had no effect whatsoever.
    A workaround is to add a Policy that prevents Windows from blocking the file in the first place, when it's downloaded. This requires you to redownload the files though, as it does not fix already blocked files.
    Solution 1:
    Add the following to the registry or save it as a reg-file to import:
    Windows Registry Editor Version 5.00
    [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Attachments]
    "SaveZoneInformation"=dword:00000001
    Where 1 is "do not block downloaded files" and 2 would be "block downloaded files"
    Solution 2:
    Open gpedit.msc and browse to User Configuration > Administrative Templates > Windows Components > Attachment Manager. Enable "Do not preserve zone information in file attachments".
    Seems no reboot is required.
    More info here https://support.microsoft.com/kb/883260

  • Problem In Extracting xml file from Zip File

    Hi,
    In my application I am creating a zip file which contains some xml files. I am using Weblogic 8.1 for my application.
    When I try to extract the xml file from the zip file it displays error and those xml files are not extracted from the zip file.
    Otherwise on tomcat it works absolutely fine.
    Is there any support issues of using the zip files with weblogic?
    Please respond.
    Thanks in Advance.

    Friends
    I resolved the problem
    just to add the jars of
    mail.jar and activation.jar in the client side.
    regards
    ashok

  • CLASSPATH, Jar file or zip file visibility during compilation and  run time

    I am using jwsdp-1_0_01 with some success.
    However, making my *.jar or *.zip files
    visible during ant builds is not working.
    Setting a CLASSPATH environment
    variable (BTW: I on a Linux box) seems
    to have no effect. I'm using the ant build
    machinery found the JWSDP download
    jwsdp-1_0_01/docs/tutorial/examples/jaxrpc/
    and as long as I don't reference anything in
    mystuff.zip
    compilation succeeds and tomcat is happy
    to provide my service. How can I get ant
    and tomcat to see 'mystuff.zip' or 'foo.jar'
    or whatever.
    Note: I was able to get past these problems
    using jwsdp-1_0-ea1 but (sigh) nothing learned there
    seems to help here.
    -joe

    Hi joe
    I made changes to targets.xml (in jwsdp-1_0\docs\tutorial\examples\jaxrpc\common) to include my own jar files.
    To enable Tomcat to see the jar files when I install the service, I copied them into jwsdp-1_0\common\lib.
    Here is the modified targets.xml (from Windows):
    <target name="compile-server" depends="prepare" description="Compiles the server-side source code">
    <echo message="Compiling the server-side source code...." />
    <javac srcdir="src" destdir="${build}/shared"
    includes="net\agmodel\metsoap\*.java"
    excludes="net\agmodel\metsoap\*Client.java"
    classpath="C:/jwsdp-1_0/common/lib/genericbroker.jar:C:/jwsdp-1_0/common/lib/weatherdata.jar" />
    </target>
    <target name="compile-client" description="Compiles the client-side source code">
    <echo message="Compiling the client source code...." />
    <javac srcdir="src" destdir="${build}/client" classpath="${jwsdp-jars}:build/shared:build/client:C:\jwsdp-1_0\common\lib\genericbroker.jar:C:\jwsdp-1_0\common\lib\weatherdata.jar" includes="net/agmodel/metsoap/*Client.java" />
    </target>
    Hope this helps.
    Good luck
    Matthew

  • I have a 2007 iMac with version 10.6.8.  When downloading "some" files to my computer, these files become "zip files."  When I open the zip file, it produces a document in some coding language. How can I open the file to produce a legible document?

    I have a 2007 iMac with version 10.6.8 and 4GB of expanded memory.  When downloading "some" emailed documents, the downloaded file becomes a "zip file," which when opened looks like a coded message.  How can I open the "zip file" so that it produces a legible document?  Please, help!!  thank you!!!

    A "zip file" is a compressed file. "Zipping" in principle does not and cannot change the contents. So that if the contents before zipping are garbage, or unreadable on a Mac, when you expand the file you will get garbage or an unreadable file.
    The first thing to verify therefore is whether the file, before it was zipped, was in a "Mac friendly" format. Can you do that?
    You do not need an App to zip or unzip. These functions are built in on our Macs.
    And yes, zipping and unzipping using the built in functionality, work fine in OS 10.6.8. And 10.7 and 10.8 and 10.9.

  • IOS sends files as Zipped files

    When I email a numbers document from my ios device it shows up in my email as a zipped file.  Then if I check the email from an Ios device I can not open it, because it is zipped, and if I check my email from my mac, I need to unzip and then open.  So Frusterating!!  This did not happen prior to Numbers 3.0.  I have a construction company and I have several guys reporting their daily logs to me this way.  THey all have a form in Numbers on their Ipad that they fill out and then they email it to me the end of every day.  They send it to me as a numbers file, but when I get it, it is always zipped.  Is this a default that can be changed or something??

    No. What you are talking about is an attached audio file, not voice mail, and is not associated with the phone function. If you need privacy, use the earbuds.

Maybe you are looking for