Howto use Converting File Content in Rec. Adapt. to suppress a xml-element

Hi,
we use PI/700, SP6.
I have following structure (example):
<MsgOut>
  <Sender>Partner1</Sender>
  <Receiver>Partner2</Receiver>
  <FlatPayload>
     blabla blabla
  </FlatPayload>
</Msgout>
Now I wanna use a XI-File-Adapter to write just a Flat-File with the content (of the element <FlatPayload>):
    blabla blabla
(in other words: I wanna suppress all other xml-elements beside of FlatPayload)
But I'm not able to configurate this with the function "Converting File Content"
I tried different possiblities:
e.g.
setting yyy.fieldFixedLengths = 0 and yyy.fixedLengthTooShortHandling = Cut
(yyy = Sender and Receiver)
or
just defining "MsgOut,FlatPayload" as RecordSet Structure (without Sender and Receiver)
Result: no success.
Now my question: is it possible to suppress some xml-elements?
Thanks for your help!
bye
Wolfgang

HI,
You can suppress the XML Nodes/Elements over here. Not Fields ..
For e.g if your outout xml is like this
<MsgOut>
    <Sender>Partner1</Sender>
    <Receiver>Partner2</Receiver>
<FlatPayload>
   <flatdata> blabla blabla</flatdatat>
</FlatPayload>
</Msgout>
In this case you can suppress the <FlatPayload> node/element here.. Using Cut Parameter in the Receiver File Content COnversion.
/people/sravya.talanki2/blog/2005/08/11/solution-to-the-problem-encountered-using-variable-substitution-with-xi-sp12
So in your case, you can restructure your data type as you required.. I have mentioned in vice-versa here
Hope this helps,
Regards,
Moorthy
Message was edited by: Krishna Moorthy P

Similar Messages

  • XI 3.0 File Adapter: Converting File Content in Sender Adapter

    Hi,
    This is probably a basic question but does anyone have an example of the parameters used when you are using the 'Converting File Content' option on the File Adapter ?
    Also, where do the record sets have to be defined ? Are these data types in the Integration Builder ?
    The documentation is to say the least a bit flaky.
    Any help would be appreciated.
    Kind regards
    Colin.

    Hello,
    I'm wondering if someone has experience setting up conversion for different record structures. The example shown (in a greate way) only picture one kind of structure.
    How should it be done if the file would contain
    10Mat1
    20100PCS
    The first record structure has columns
    ID(2),Material(10)
    The second redcord structure has columns
    ID(2),Quantity(3), Unit of messure (3)
    Brgds
    Kalle

  • Converting File Content.Unexpected XML format

    Hello,
    I need to convert file content in File Receiver Adapter.
    In my opinion, i have unexpected XML format of a payload message. (At least, the format does not contain a structure element):
    That is,
    I have the XML message:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:MT_BW ID="123" BirthDay="20/03/1969" Title="consultant" Name="John" LastName="Smith" xmlns:ns0="http://sap.com/xi/BASIS"/>
    I need to convert it into plane text format with fieldseparator.
    How to convert this xml message into plane text format if it does not contain any structure elements  (that is, <struc1>  <field1>value</field1>  </struc1>) according to help guide?
    How should i configure RecordSet in File Adapter?
    I am confused.
    Thank you

    Igor,
    Are u getting the format from the source?
    <ns0:MT_BW ID="123" BirthDay="20/03/1969" Title="consultant" Name="John" LastName="Smith" xmlns:ns0="http://sap.com/xi/BASIS"/>
    If yes, then create one more data type with structure
    <Record>
    <ID/>
    <BirthDay/>
    <Title/>
    <Name/>
    <LastName/>
    </Record>
    And do direct mapping. So now you can easily configure the content conversion for the target format isn't it?
    Its my thought, I don't know whether its feasible for you or not..
    raj.

  • Use temporary file in FTP receiver adapter

    Hi guys,
    I'm not getting the purpose of "use temporary file" in FTP receiver adapter. Can you describe any situation, where this should be used?
    What is the location of this temporary file?
    Is it deleted after "normal" file is created?
    Thanks a lot,
    Olian

    > I'm not getting the purpose of "use temporary file" in FTP receiver adapter. Can you describe any situation, where this should be used?
    Some times when you create the file on your target dir then if there is another application looking for same file is quite faster to pick the file before it is complety written on target dir then in this situation using temporary file option is very helpful. What it does, it simply creates the file first by using temporary name once all bytes or bits has been transfered then it creates the original name and the temp file get deleted.
    > What is the location of this temporary file?
    Same location, where your original file is suppose to be written.
    > Is it deleted after "normal" file is created?
    Yes.
    Regards,
    Sarvesh

  • Error in Converting File Content in a Sender Adapter

    Hi everyone.
    We are using File content conversion as message protocol for a simple flat file (sender) .
    In the sender communication channel we have configured the recordset structure as follows:
    order_row.filedNames : orderid,item,quantity,price
    order_row.filedSeparator : ,
    order_row.endSeparator : 'nl'
    <b>Conversion initialization failed: java.lang.Exception: java.lang.Exception: java.lang.Exception: Error(s) in XML conversion parameters found: Parameter 'order_row.fieldFixedLengths' or 'order_row.fieldSeparator' is missing Mandatory parameter 'order_row.fieldNames': no value found </b>
    In monitoring no XML messages are seen in IDX5.
    What is the solution for this kind of problem.

    you have to provide values for the recordset structure?
    Below i am refering multiple blogs on Content conversion, please refer them to help you get a hand on the same.
    /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 - TAB delimited
    /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

  • File Content Conversion - Receiver Adapter

    Hi To All
    I have an XML Structure
    <LIST>
         <Seg1>
              <Element1>123</Element1>
         </Seg1>
         <Seg2>     
              <Element1>ABC</Element1>
              <Element2>DEF</Element2>
              <Element3>GHF</Element3>
            </Seg2>     
    <LIST>
    I'm using File content conversion in receiver Adapter
    I want my output like this.
    ABCDEFGHF
    I don't need the Segment Seg1.
    In my parameters RecordsetStructure only I have Seg2 and the details for this Segment
    but When I receive a file, the adapter convert with segment 1.
    123
    ABCDEFGHF
    can you help me?.

    easiest alternative is mentioned here already, drop it in the mapping.
    You can also try to write a java pgm and invoke it as an OS command. that cuts the segment1 out before passing it to content conversion. ..more painful..but will work.
    Regards
    Ravi Raman

  • When to use "Use Temporary File" in receiver FTP adapter

    Hi Experts,
    I have nerver used "Use Temprary File" as the "Write Mode" in receiver ftp adapter.
    I want to knwo under what kind of requirment we should use this option?
    Thanks in advance.
    Best Regards,

    Hi Aditya
    Usually it's advisable to use "use temporary file" as write mode when you want to avoid your file to be picked up by receiver while PI channel is still writing it.
    Obviously larger the file, more chances you have that this issue could occur.
    If you select the "use temporary file", XI will write the content to a temporary file with another name of your choice and only once writing has finished it will rename it to the actual name setup in the "file name scheme".
    Regards,
    Giuseppe

  • File content conversion sender adapter

    Hi Friends,
    I am doing File to IDoc scenario.
    I am using File Content Conversion for File Adapter.
    My structure look like this
    MT_File
    HEADER1 1..1
    --header1
    -- header2
    HEADER2 1..1
      --header3
    DETAILS 1..unbounded
    --details1
    --details2
    --details3
    TRAILER1 1..1
      -- trailer1
    TRAILER2 1..1
      -- trailer2
    ----trailer3
    In File Content conversion parameeters..
    Document Name :MT_File
    Document Namespace :urn:test:FileFcctoIdoc
    RecordSet name :
    RecordsetStructure :HEADER1,1,HEADER2,1,DETAILS,*,TRAILER1,1,TRAILER2,1
    RecordSet Structure: Ascending
    RecordSet Per message : *
    Key Field Name :header1,header3,details1,trailer1,trailer3
    ignoreRecordsetName     : true
    HEADER1.fieldNames      :header1,header2
    HEADER1.keyFieldValue      : H1
    HEADER1.fieldFixedLengths  :5,10
    HEADER1.endSeparator   :'nl'
    HEADER2.fieldNames             :header3
    HEADER2.keyFieldValue         : *D
    HEADER2.fieldFixedLengths     :5
    HEADER2.endSeparator         :'nl'
    DETAILS.fieldNames               :details1,details2,details3
    DETAILS.keyFieldValue         : 3
    DETAILS.fieldFixedLengths     :5,5,5
    DETAILS.endSeparator         :'nl'
    TRAILER1.fieldNames               :trailer1
    TRAILER1.keyFieldValue         : *S
    TRAILER1.fieldFixedLengths     :5
    TRAILER1.endSeparator         :'nl'
    TRAILER2.fieldNames               :trailer2,trailer3
    TRAILER2.keyFieldValue         :SE    TRAILER2.fieldFixedLengths    :5,5
    TRAILER2.endSeparator         :'nl'
    File is :
    H1hh1hhhhhhhhh2
    *Ddd*
    Xddd1dddd2dddd3
    Xddd4dddd5dddd6
    Xddd7dddd8dddd9
    *Sss*
    SEKss2
    in RWB, Channel CC_FILE_Sender_FccDemo: Empty document found. Proceed without sending message
    I think the problem is in FCC paramters..
    Could please have a look and correct me
    Regards
    Ram

    Ram,
    The problem which i can see is your key field values in your test file. Remember you should have the key field value in each new line at the same place.
    For example you have given your text file as shown below...
    File Given By You is :
    >H1hh1hhhhhhhhh2
    >*Ddd *
    >Xddd1dddd2dddd3
    >Xddd4dddd5dddd6
    >Xddd7dddd8dddd9
    >*Sss *
    >SEKss2
    Compair the above file with the below one..
    >H1hh1hhhhhhhhh2
    >*Ddd *
    >Xddd1dddd2dddd3
    >Xddd4dddd5dddd3
    >Xddd7dddd8dddd3
    > *Sss *
    >SEKss2
    If you notice, for details I have given key field value 3 in each line & at same place.
    One more thing just use the KeyFieldName only one ( just follow the same blog which I have given, to understand how to use the KeyFieldName )
    e.g.
    Document Name :MT_File
    Document Namespace :urn:test:FileFcctoIdoc
    RecordSet name :
    RecordsetStructure :HEADER1,1,HEADER2,1,DETAILS,*,TRAILER1,1,TRAILER2,1
    RecordSet Structure: Ascending
    RecordSet Per message : *
    Key Field Name : KF
    Regards,
    Sarvesh

  • Converting File Content: 2 different record structures

    Dear all,
    I have the following question: Is the PI 7.0 file adapter capable to convert the file content of a file which has two different record types? E.g.
    Rekord 1: String(2) String(4) String(19)
    Rekord 2: String(2) String(7) String(8)
    In the XML structure I need for each of the record set, an own record structure e.g.
    <documentName>...
    <recordset1>
    <NameA>
    <field-nameA1>field-value</field-nameA1> // String(2)
    <field-nameA2>field-value</field-nameA2> // String(4)
    <field-nameA3>field-value</field-nameA3> // String(19)
    </NameA>
       </recordset1>
    <recordset2>
    <NameA>
    <field-nameA1>field-value</field-nameA1> // String(2)
    <field-nameA2>field-value</field-nameA2> // String(7)
    <field-nameA3>field-value</field-nameA3> // String(8)
    </NameA>
      </recordset2>
    The different record sets can be determined by the value of field 1 (string(2))
    Thanks and best regards
    Florian

    HI,
    I can see that.
    The number of characters in the file for TABLE2 is lesser then the number of field size given.
    for eg. if the table2 fixed field length sum is 20 ,your file contains only 10 characters. Please give complete data for table2
    Test file
    100WELCOME 0430000960603201321
    <b>2000000000040008000803</b>
    Table2.fieldFixedLengths: 1,10,10,10,3,3,4,1,38
    Ragards
    vijaya
    Message was edited by: vijaya kumari

  • File content conversion - sender adapter for Header and detail records

    Hi Experts,
                     I am receiving a field of fixed length content format.(Header)The first line of the file will follow the structure X having some fields and (DetailRecord)subsequent lines in the file will follow structure Y having somes fields.There is no record identifier for Header and Detail records.In one file first line is Header records and remaining subsequent line is DetailRecord.What are the parameters we have to set for sender file content conversion parameters as i donot have any key field and key field value.And in one file we have only one header records ( first line) and n number of detail records from 2nd line onwards.
    Thanks
    Deepak

    Hi
    Refer the below fourm link,
    Flat file whitout id
    Regards
    Ramg.

  • 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!!!

  • Howto use zipped-file for payload?

    hi experts,
    in our interface, we get a message with a zipped xml-document. so i have to change the "main payload" to the attachment and then unzip the file.
    to swap the payload i used the following entry in the "modul"-tab:
    AF_Modules/PayloadSwapBean, local enterprise bean, transform
    keys:
    transform, swap.keyName, payload-name
    transform, swap.keyValue, attachment-1
    --> i think this works, because in the response message i see only the payload "attachment-1"
    but i am not able to unzip the file.
    i used the PayloadZipBean with the following values:
    AF_Modules/PayloadZipBean, local enterprise bean, unzip
    keys:
    unzip, zip.mode, unzip
    what am i doing wrong, or did i forgot something?
    thx 4 your help!

    Hi dieter,
    in your sender CC (tab module), try that:
    Processing Sequence:
    Nbr     Module Name                     Type                    Module Key
    1     AF_Modules/PayloadZipBean     Local Enterprise Bean     unzip
    2     AF_Modules/PayloadSwapBean     Local Enterprise Bean     swappayload
    3     CallSapAdapter                     Local Enterprise Bean     0
    Module Configuration:
    Module Key               Parameter Name     Parameter Value
    swappayload          swap.keyName     content-type
    swappayload          swap.keyValue     application/xml
    unzip                     zip.mod         unzip
    Regards.
    Mickael

  • 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

  • Converting file content into xstring

    Hi all,
    can any please let me know how to convert application server filecontent to xstring.
    thanks in advance
    Lucky

    Please try finding out yourself by searching for available information before starting a thread.
    Thread locked.
    Thomas

  • 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)

Maybe you are looking for