Unzip using Payloadzipbean/file content conversion

Experts,
I have a scnario, I get a zip file with .gz extension, unzip it read th file using file adapter.
I am using Payloadzipbean module to unzip(zip.mode = unzip).
The problem is File adapter converting the zip file into xml and unzipping the file.
How do I force File adapter to unzip first and do content conversion.
thanks

Hi man.
How did you solve this. I have to pick up a zip file with a .txt file then I need to convert this file to xml with module MessageTransformBean but Im getting this error:
com.sap.aii.messaging.adapter.trans.TransformException: Error converting Message: 'sun.io.MalformedInputException'; nested exception caused by: sun.io.MalformedInputException
This is my structure
row (1..n)
>TRANSPORTES (1)
>ENTREGAS (1..n)
I have configured the module tag in this way:
AF_Modules/PayloadZipBean - zip
AF_Modules/MessageTransformBean - transform
CallSapAdapter - 0
zip - zip.mode - unzip
transform - Transform.Class - com.sap.aii.messaging.adapter.Conversion
transform - xml.ENTREGAS.endSeparator - 'nl'
transform - xml.ENTREGAS.fieldFixedLengths - 1,30
transform - xml.ENTREGAS.fieldNames - TIPO,NUM_ENTREGA
transform - xml.ENTREGAS.keyFieldValue - E
transform - xml.TRANSPORTES.endSeparator - 'nl'
transform - xml.TRANSPORTES.fieldFixedLengths - 1,30
transform - xml.TRANSPORTES.fieldNames - TIPO,NUM_TRANSPORTE
transform - xml.TRANSPORTES.keyFieldValue - T
transform - xml.keyFieldType - CaseSensitiveString
transform - Transform.ContentType - text/plain;charset=utf-8
transform - xml.conversionType - StructPlain2XML
transform - xml.documentName - MPrueba_Zip
transform - xml.documentNamespace - http:/XXXXXX.es/XXXX/sap/prueba
transform - xml.keyFieldName - TIPO
transform - xml.processFieldNames - fromConfiguration
transform - xml.recordsetName - row
transform - xml.recordsetStructure - TRANSPORTES,1,ENTREGAS,*
If I use only the MessageTransformBean directly from .txt everything works ok!!!
What am I doing wrong???
Thanks a lot!!!

Similar Messages

  • DT and MT definition to be used for File Content Conversion

    Hi FCC gurus
    would just like to ask, my scenario is Flat File (fixed length) to IDoc
    the flat file structure is below:
    HHeader.......(Fixed Field until 427characters)
    HText ......... (Fixed Field until 234characters)
    HText ......... (Fixed Field until 234characters)
    HText ......... (Fixed Field until 234characters)
    HText ......... (Fixed Field until 234characters)
    HText ......... (Fixed Field until 234characters)
    DFile ......... (Fixed Field until 404characters)
    DText ......... (Fixed Field until 235characters)
    DFile ......... (Fixed Field until 404characters)
    DText ......... (Fixed Field until 235characters)
    -------No Space, for illustration only PO2--------
    HHeader........ (Fixed Field until 427characters)
    HText ......... (Fixed Field until 234characters)
    HText ......... (Fixed Field until 234characters)
    HText ......... (Fixed Field until 234characters)
    HText ......... (Fixed Field until 234characters)
    HText ......... (Fixed Field until 234characters)
    DFile ......... (Fixed Field until 404characters)
    DText ......... (Fixed Field until 235characters)
    DFile ......... (Fixed Field until 404characters)
    DText ......... (Fixed Field until 235characters)
    -------No Space, for illustration only PO3--------
    HHeader........ (Fixed Field until 427characters)
    HText ......... (Fixed Field until 234characters)
    HText ......... (Fixed Field until 234characters)
    HText ......... (Fixed Field until 234characters)
    HText ......... (Fixed Field until 234characters)
    HText ......... (Fixed Field until 234characters)
    DFile ......... (Fixed Field until 404characters)
    DText ......... (Fixed Field until 235characters)
    DFile ......... (Fixed Field until 404characters)
    DText ......... (Fixed Field until 235characters)
    where:
    HHeader = Header
    HText = Header Text
    DFile = Order Detail File (Line Item)
    DText = Order Detail File Text (Line Item Text)
    As shown above, 1 flat file can contain 3 purchase orders in it structured exactly like the structure definition above.
    I need to map this to 1 IDoc for each purchase order
    so my target structure should be:
    - ORDERS05
       - IDoc (PO1)
       - IDoc (PO2)
       - IDoc (PO3)
    Of course I need to use FCC for this, I'm just a little confused on how I will define the Data Type and Message Type for this.
    For the Data Type should i define it like this:
    DT_ORDERS
       HHeader-Field1 (Element)
       HHeader-Field2 (Element)
       HHeader-Field3 (Element)
       HText-Field1 (Element)
       HText-Field2 (Element)
       HText-Field3 (Element)
       DFile-Field1 (Element)
       DFile-Field2 (Element)
       DFile-Field3 (Element)
       DText-Field1 (Element)
       DText-Field2 (Elemen
    t)
    OR
    should i define the Data Type like this:
    DT_ORDERS
        HHeader (Element)
           HHeader-Field1 (Sub Element)
           HHeader-Field2 (Sub Element)
           HHeader-Field3 (Sub Element)
        HText (Element)
           HText-Field1 (Sub Element)
           HText-Field2 (Sub Element)
           HText-Field3 (Sub Element)
        DFile (Element)
           DFile-Field1 (Sub Element)
           DFile-Field2 (Sub Element)
           DFile-Field3 (Sub Element)
        DText (Element)
           DText-Field1 (Sub Element)
           DText-Field2 (Sub Element)
    Kindly advise which one is the correct definition   (Or if I am missing something out  e.g. Recordset element betweend DT_ORDERS and HHeader)
    Thanks in advance
    Edited by: HJ Dlec on Aug 13, 2010 4:13 AM
    Edited by: Prateek Raj Srivastava on Aug 13, 2010 2:29 PM

    >Kindly advise which one is the correct definition  
    Second approach is fine..
    >(Or if I am missing something out  e.g. Recordset element betweend DT_ORDERS and HHeader)
    Yes do this as well

  • Sender File Content Conversion

    I am using the file content conversion in sender file adapter with fieldFixedLengths parameter in recordset structure. This work fine when the columns in row is exactly with the length set in the parameter recordset. But in same cases, the row in the file has less columns, which occurs errors. If I use the parameter fixedLengthTooShortHandling usage by the receiver file adapter, will it work for the file sender?

    Hi Elton,
    The parameter fixedLengthTooShortHandling is not a part of the Sender File Adapter's content conversion paramteters, So i guess it will not work for the sender file adapter.
    I would suggest that you try it anyways, and if it does work, then it means that this field has been forgotten in the help documentation
    http://help.sap.com/saphelp_nw04/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm
    Regards,
    Bhavesh

  • Mail Adapter and File content conversion.

    I have a scenario to send data from SAP to 4 different boards. I have used a Multi mapping for this scenario. I am using Proxy for SAP to xi and SOAP, File and Mail adapter for the external connections.
    Questions:
    1) I need to send a mail in CSV or Excell format in one scenario. I have used AF_StrictXml2Plain Module but its not working? any thoughts?
    2) In the file adapter I have to add the YYYYMMDD (current Date) to the file name? when I use timestamp i get the time too, any way of getting only date? I cant use the Variable substitution as i dont have date in my payload.
    3) Receiver File content conversion:
    My Message Type Looks like this
    MT_XX_XX
         Row
            title
            xxx
    I have used these parameters:
    Recordset Structure:  Row
    Row.addHeaderLine : 0
    Row.fieldSeparator : ,
    Row.endSeparator: 'nl'
    am I doing something worng, the file content conversion doesnt work.
    Please let me know
    Thanks in advance

    Hi,
    Make sure u are using the bean before the mail adapter bean.
    Before using the file content conversion make sure that there are no substructures in it , in order to use addheader line as 0. else use addheaderline 3 and give the headerline as comma seperated values
    for e.g if this is the type then addheader line= 0
    Type 1  :
    Record_Mt
         Row
             field1
             field2
    else if this the type then addheaderline = 3
    *Type 2: *
    Record_Mt
         Row1
             field1
             field2
         Row2
             field1
             field2
    add module like this
    localejbs/sap.com/AF_Modules/StrictXml2PlainBean
    with the module key e.g. key
    for type 1 struct (as above )add parameter- key as singleRecordType  and value as Row with comma seperated value. (remember header line is 0)
    for type 2 structure (as above )add parameter- key as recordTypes  and value as Row1, Row2 with comma seperated value. (remember header line is 3)

  • File content conversion in File-to-RFC without  BPM

    Hi,
    I am using FCC for file to RFc scenario.
    My input record is in the following format:
    Header record
    data rec1
    data rec2
    Trailer record..
    The parameters are used in File content conversion:
    Recordset Name : Header,item
    Recordset Structure: Header,1,item,*
    key field name : data1
    and in additional parameters:
    Header.fieldNames            HI,GenDate,Ftype,Fname,Fdate
    Header.keyFieldValue       Fname
    Header.fieldFixedLengths 1,8,1,50,8
    Header.endSeparator        nl
    item.endSeparator             nl
    item.fieldNames                  DATA1,DATA2,DATA3,DATA4
    item.keyFieldValue             item
    item.fieldFixedLengths       231,240,241,120
    item.lastFieldsOptional       YES
    Can anyone check whether any parameters are left, b'cos the file is not being read with this settings. and in the C.C its just showing file processing successfully but not able to see the actual file.

    Hi,
    I assume you have header, item and trailer structure in source file.
    Source Data Type will be as follows.
    RecordSet
    --> Header
          --> KeyField(Value OH)
          --> H1
          --> H2
    --> Item
          --> KeyField (Value OL)
          --> I1
          --> I2
    -->Trailer
          --> KeyField (Value OT)
          --> T1
          --> T2
    Where Item Strucutre can come multiple times.
    Please use following settings.
    Recordset name: RecordSet
    RecordSet Structure: Header,1,Item,*,Trailer,1
    Key Field Name: KeyField
    Header.fieldNames: KeyField,H1,H2
    Header.fieldFixedLengths: 2,3,4
    Header.processFieldNames: fromConfiguration
    Header.keyFieldValue: OH
    Header.LastFieldsOptional: YES
    Item.fieldNames: KeyField,I1,I2
    Item.fieldFixedLengths: 2,5,6
    Item.processFieldNames: fromConfiguration
    Item.keyFieldValue: OL
    Item.LastFieldsOptional: YES
    Trailer.fieldNames: KeyField,T1,T2
    Trailer.fieldFixedLengths: 2,8,9
    Trailer.processFieldNames: fromConfiguration
    Trailer.keyFieldValue: OT
    Trailer.LastFieldsOptional: YES
    Regards,
    Gouri

  • File Content Conversion - Error in keyfield Value

    Hello experts,
    I am doing file content conversion for a file to file scenario. The input file is a csv file which is converted to xml using the file content conversion. The key field of input file is used for implementing conversion.
    While testing the FCC, I noticed that if the keyfield value is wrong for a record in the file, the record is ignored altogether without throwing any errors or warnings. Is there any way to notify if any records have been ignored as a result of incorrect keyfield value??
    Thanks in advance!
    RR

    There seems to be NO way to handle it in FCC.
    File Content Conversion - Key Field Value
    u can think of work arounds by handling it in mapping....
    -santosh.

  • File Content Conversion help

    Input file is Excel file. Should I need to convert this using the File Content Conversion(File Sender), if so can anyone pls explain me how????
    thank you

    Hi,
    This Will help you,
    1) With JAVA Mapping  we can Achieve 
    /people/rahul.nawale2/blog/2006/07/18/java-mapping-an-alternate-way-of-reading-a-csv-file
    ( go thru the Below  lines  in the Blog )
    http://help.sap.com/saphelp_nw04/helpdata/en/1f/0e3237e5875249e10000009b38f936/frameset.htm
    Page 37
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/da1e7c16-0c01-0010-278a-eaed5eae5a5f
    /people/gregor.wolf3/blog/2006/09/01/excel-to-csv-conversion-with-a-php-web-service
    Regards
    Agasthuri Doss

  • File content  conversion-Document name

    Hi frndz,
       i am using the file content conversion to upload the sale order details from flat file to r/3, am using the standard bappi for the same. Here my issue is in Content "conversion parameters" there is a parameter "Document name" usually i fill this with the messge type, but now i have not created any messge type for my scenario, i am just imported the bappi and using the same structure so wat i can give in the "Document name" parameter.
    Thanks in advance
    Karthikeyan

    Hi, see this link:
    Configure sender file Adapter With File Content Conversion
    http://help.sap.com/saphelp_nw04/helpdata/en/e3/94007075cae04f930cc4c034e411e1/frameset.htm
    Configure receiver file Adapter With File Content Conversion
    http://help.sap.com/saphelp_nw04/helpdata/en/e3/94007075cae04f930cc4c034e411e1/frameset.htm+
    also see this about documentName parameter
    ignore DocumentName
    Thanks
    Rodrigo
    Edited by: Rodrigo Alejandro Pertierra on Aug 11, 2008 10:59 AM

  • Spaces getting trimmed in file content conversion

    Hi all,
    I am converting a flat file to an XML file by XI. The problem which i am facing in file content conversion is that the spaces in flat file data are getting trimmed to one space in the XML in SXMB_MONI.
    The data in flat file is like SOUTHSEA and HANTS is having nearly 8 spaces.
    But the data in XML is:
    <b><u>SOUTHSEA HANTS PO5 2LZ PO5 2LZ020327</u></b> i.e. in XML, there is only 1 space between SOUTHSEA and HANTS.
    The following parameters i have used in file content conversion:
    .keyFieldValue '*'
    .fieldSeparator 'nl'
    .fieldNames RECORD_DATA
    .ignoreRecordsetName true
    I am taking each record of the flat-file in a single record RECORD_DATA in XML.
    <b>So can anyone tell me why the big spaces are getting trimmed to a single space eg. between SOUTHSEA and HANTS etc.</b>
    Thanks in advance.
    Rajeev Gupta

    Hi,
    try :
    NameA.fieldContentFormatting = <b>nothing </b>
    as the default is <b>trim </b>
    refere:
    http://help.sap.com/saphelp_nw04/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm
    Regards,
    michal
    <a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>

  • Problem with File content conversion and parameters

    Hi experts,
       What is the use of file content conversion that is available in file adapter? For what cases we can use it?
      What do the different content conversion parameters mean?
    Kindly help
    Thanks
    Gopal

    Hi,
    We use the file content convertion to conver the flat file that is text file into XML,
    File adapter cant understand the format the file is,so we have to declare the content convertion parameters.
    Check some links which will tell how the convertion is done.
    /people/venkat.donela/blog/2005/03/02/introduction-to-simplefile-xi-filescenario-and-complete-walk-through-for-starterspart1
    /people/venkat.donela/blog/2005/03/03/introduction-to-simple-file-xi-filescenario-and-complete-walk-through-for-starterspart2
    /people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion
    /people/anish.abraham2/blog/2005/06/08/content-conversion-patternrandom-content-in-input-file
    /people/shabarish.vijayakumar/blog/2005/08/17/nab-the-tab-file-adapter
    /people/venkat.donela/blog/2005/03/02/introduction-to-simplefile-xi-filescenario-and-complete-walk-through-for-starterspart1
    /people/venkat.donela/blog/2005/03/03/introduction-to-simple-file-xi-filescenario-and-complete-walk-through-for-starterspart2
    /people/venkat.donela/blog/2005/06/08/how-to-send-a-flat-file-with-various-field-lengths-and-variable-substructures-to-xi-30
    /people/anish.abraham2/blog/2005/06/08/content-conversion-patternrandom-content-in-input-file
    /people/shabarish.vijayakumar/blog/2005/08/17/nab-the-tab-file-adapter
    /people/jeyakumar.muthu2/blog/2005/11/29/file-content-conversion-for-unequal-number-of-columns
    /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
    Regards,
    Phani
    Reward points if helpful

  • Required help for Identifying diff. items in file content conversion.

    Hi All,
    I've to use a file content conversion parameters for a .txt file in which there are two objects. One is a header and the other is a item detail.
    How do we get or mark the difference between both so that XI recognizes the particular line is a Header and the other is a Item detail
    Thanks in Advance.
    Regards,
    Sree.

    Hi
    Make use of a field which is common to header and item line which will always hold different values for header and item. Or otherwise if possible, add an extra field in the header and item lines, say 'Key' and use it in the 'Key Field Name' parameter in the adapter configuration. See this for details - [File Content Conversion for Complex Structures|http://www.riyaz.net/blog/index.php/2008/02/20/xipi-file-content-conversion-for-complex-structures/].
    Regards,
    Riyaz

  • File content conversion: nodes have multiple occurence and is jumbled

    Hi,
    Here is one structure used in file content conversion.
    Header
    Dataline1
    Dataline1
    Dataline1
    Dataline2
    Dataline2
    Dataline2
    Header, Dataline1 and Dataline2 are nodes containing more than one fileds.
    We have mentioned 'fieldSeparator', 'EndSeparator' and 'keyFieldValue' for each of the nodes Header, Dataline1 and Dataline2 .
    Now the requirement has changed and the source file structure is as given below.
    Header
    Dataline1
    Dataline2
    Dataline1
    Dataline2
    Dataline1
    Dataline2
    Now with the same communication channel, the content conversion picks up only the first occurence of Dataline1, Dataline2 ie only this much
    (Header
    Dataline1
    Dataline2)
    is being picked or read.
    The other occurences are lost, even though logically it should pick all of them, since 'keyFieldValue' is specified for each node..
    Should I give any extra parameters in the communication channel for file content conversion.? or else what is the best way to proceed

    Hi John !
    Have you checked the recordset structure in the file content conversion parameters?? like "Header,1,Dataline1,,Dataline2, " to specifiy that it should be 1 header structure, N dataline1 and N dataline2 ??
    Regards,
    Matias.

  • File content conversion Testing

    I would like to know method to test File Content Conversion to ensure it is read into the correct structure.
    Thanks

    You can do that by checking in the RWB->message monitoring, XI calling the file content conversion module.
    If you have any doubts using the File Content Conversion, check
    http://help.sap.com/saphelp_nw2004s/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm

  • Receiver File content conversion with nested structure

    Hi Guys,
    I have the below nested structure and have to convert it using receiver file content conversion.
    <Header> [o, unbounded]
       <A>a</A>
       <B>b</B>
    </Header>
    <record>   [0, unbounded]
       <field1>
            <X1>x</X1>
            <Y1>y</Y1>
       </field1>
       <field2>
             <X2>x</X2>
             <Y2>y</Y2>
       </field2>
    </record>
    The file is a comma separated one. Please let me know how to configure the content conversion.
    Thanks

    Hi Mukesh,
    Have a look at the Shabz's blog for the receiver File content conversion : File Adapter (Receiver) - Are we "really" sure about the concepts?
    Thanks,
    Pooja

  • Error in Receiver File adapter using File content Conversion

    Hi,
    I am getting the following error in the receiver file adapter.
    Conversion initialization failed: java.lang.Exception: java.lang.Exception: Error(s) in XML conversion parameters found: Parameter 'statement.fieldFixedLengths' or 'statement.fieldSeparator' is missing
    I am using the below parameters for FCC:
    Recordset Structure - statement
    statement.endSeparator - 'nl'
    statement.fieldSeparator - '0X09'
    statement.fieldNames -xblnr,wrbtr,newbs,kostl,newko,prctr,xref1,rke_wwfud,rke_wwst3,blart,bukrs,bldate,budat,gjahr,monat,ctype,waers,bktxt,posnr,wbs_element,mwxkz,businessplace,businessplace,c_waers,c_wrbtr,g_ctype,g_waers,g_wrbtr,h_ctype,h_waers,h_wrbtr,trade_id,lob,sgtxt,zuonr,reason_rev,ldgrp,tcode,lifnr
    ignoreRecordsetName - true
    Please let me know where i am going wrong.
    Thanks,
    Aparna

    Hi Aparna,
    I feel the problem in your content conversion parameters is with
    statement.fieldNames and ignoreRecordsetName
    When you are confirguring receiver file adapter for file content conversion the above one is not required. Please refer below link for details on configuring content conversion in file adapter
    [http://help.sap.com/saphelp_nw04/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/frameset.htm]
    Hope this helps !!
    Regards,
    Amit

Maybe you are looking for

  • Business Area missing

    Hi, I need your guidance. I have run Automatic Payment Program. Clearing Document been generated. Now when i need to cancel the same I am getting error Business Area is missing. Client is having validation as no document get posted without Business A

  • Ipad not showing up in iphoto

    I connect the ipad and itdoesnt show up as a device in iphoto so that I can import photos that i have on the ipad. Any ideas out there? What am i doing wrong? This is a new problem, hasn't happened before.

  • How do I save a profile in Lens Correction in Photoshop

    I am using Photoshop CS6 on a PC running Win7.  In the previous version I was able to save a profile in the Lens Correction panel.  In this version I can find my camera and my lens but it won't let me save the profile.  I only real estate and straigh

  • Determining and using the newline character.

    Hi All, I have a program that I am endeavouring to make completely portable. To this end I need to determine the system independent line seperator character. After looking at several other threads in this forum that deal with this issue, I have tried

  • Corel Painter Fails to Launch on MacBook Pro Core 2 Duo

    I used Set-up Asst. to copy over my apps from my iBook to my new MacBook Pro Core 2 Duo running MAC OS 10.4.8. All of my apps work except for Corel Painter IX which will not launch. It starts to launch, but the initial screen does not come up. I've t