File content conversion only 100 characters read from source..

Hi,
In my case I have a sender channel with file content conversion set as follows;
Recordset structure : Record, 1
sequence: ascending
Key field type : String (case sensitive)
record.fieldseparator : 'nl'
record.fieldnames : Data
ignorerecordsetname: true
Idea is in ECC, when a custom program is run, it reads the shipment data and builds an xml file with data in various nodes like;
<shipmentId>6767667</shipmentId>
<DelvText>hjysks sag fhdososlhfiof </DelvText>
Now all this data is converted to a single string entry under tag called <Data> and passed on to the third party system by PI using above conversion.
And the resulting file will have all the data like this;
- <Record>
  <Data><?xml version="1.0" encoding="UTF-8"?></Data>
  </Record>
- <Record>
  <Data><ShipmentId>6767667</ShiomentId>.........</Data>
It so happens that the data that is populated in the <DelvText> by the program is lost during conversion. I get only first 100 characters in the resulting above mentioned XML after the file content conversion happens. rest of the string is lost. I can see all other data perfect except for this long text.
This is the data I enter in the delivery's header text  under shipment instruction field. I debugged the program and see that the entire text is indeed filled but gets lost after the file conversion happens !!
What can be the reason ?
thnks

Stefan, I appreciate your concern, thanks. But this is an already working interface and I cannot change it and can only assist with minor data mapping changes and troubleshooting such issues.
Scenario is simple, ECC has to send shipment data to third party via PI.
The shipment data has to be sent as an XML file with a single <Data> tag as I showed to you earlier.
It is so weird that when I type my delivery text less than 100 characters I can see that in full text in my XML file but only when the text is more than 100 characters, the XML has only 100 characters and it is passed to the third party like that and so third party is consdering this as incomplete info.
Would help if you can think and let me kjow what may create this kind of an  issue or if you can point me where to look for issues.
thnks

Similar Messages

  • File Content Conversion: Remove reserved characters from Content

    Hi PI Gurus,
    we're facing a little problem with FCC in File Receiver Adapter.  Sometimes the defined fieldSeparator ("|") comes within the field content.
    e.g.
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:Positions xmlns:ns0="http://test.com">
    <Position>
    <Value1>001</Value1>
    <Value2>Test|Content</Value2>
    </Position>
    </ns0:Positions>
    So, my first thought was to replace all "|" with a litte java mapping beind the actual mapping.
    But, is there any possibility to achieve this via configuration of FCC (something like fieldSeperatorSubstitution)?
    Help is as always highly appreciated!
    Cheers,
    Matthias Kral

    Hello Hareenkumar,
    yes you're totally right. I ran in several OutOfMemoryError while testing the code above. The errors started with messages over 15 MB.
    Here's the code, that is productive now. It replaces all Pipes "|" by Slashes "|" and really works fine and performant.
    public void execute(InputStream in, OutputStream out)
              throws StreamTransformationException {
              try {
                   int totalCount = 0;
              byte[] buf = new byte[40960];
              int count = 0;
                   while (count >= 0) {
                        count = in.read(buf);
                        totalCount += count;
                        if (count > 0) {
                             for (int i=0; i<count; i++){
                                  if (buf<i>==124){
                                       buf<i> = 47;
                             out.write(buf, 0, count);
              } catch (IOException e) {
                   throw new StreamTransformationException(e.getMessage());
    Thank you all again!!!
    Cheers Matthias

  • Reading "u00A3" through file content conversion

    Hi,
    My input file has  "£" as a character. While reading this character through file content conversion XI is converting it into two characters. I have used encoding as UT-8, and have tried various other encoding as well. But nothing seems to be working.
    Is there any way out to read this symbol as one character only.?
    Thanks,
    Rosine Jose.

    hi,
    you can try with ANSI encoding as well as ISO-8859-1.
    check this page, they explain about utf-8 encoding.
    http://www.cl.cam.ac.uk/~mgk25/ucs/examples/UTF-8-demo.txt
    Cheers.

  • File Content Conversion--- Removing Quotations from csv file

    I have a csv file in the folowing format:
    field1,field2,field3,field4
    "111","222","333","444"
    "aaa","bbb","ccc","ddd"
    Suppose the header name is row in IR.
    While configuring the sender file adapter in XI, i have given following parameters under file content conversion.
    row.fieldNames=field1,field2,field3,field4
    row.fieldSeparator=","
    row.processFieldNames=fromConfiguration
    row.beginSeparator="
    After picking up the XML file XI processes the data so that we have out put as
    row
    field1 111
    field2 222
    field3 333
    field4 444"
    row
    row
    field1 aaa
    field2 bbb
    field3 ccc
    field4 ddd"
    row
    My Problem is what parameter should I add in ID to remove this last quote say 444" and ddd" from the XML message ????
    I tried using
    row.endSeparator=" but it is still giving the same output.
    Can anyone help ????????????????????????

    Hi,
    Try this FCC instead
    row.fieldNames=field1,field2,field3,field4
    row.fieldSeparator=,
    row.processFieldNames=fromConfiguration
    row.enclosureSign=u201C
    row.enclosureSignEsc=u201Cu201C
    row.endSeparator='nl'
    http://help.sap.com/saphelp_NW04/helpdata/en/e3/94007075cae04f930cc4c034e411e1/frameset.htm
    If you specify xml.enclosureSign=u201C and xml.enclosureSignEsc=u201Cu201C, text enclosed in quotation marks is transferred unchanged and the quotation marks are removed.
    Thanks
    SaNv...

  • Problem in file content conversion from XML to CSV

    Hi Experts,
    I am finding problem in file content conversion. I need to convert the following XML file into CSV file:
      <?xml version="1.0" encoding="UTF-8" ?>
    - <ns0:MT_CROSS_REF xmlns:ns0="urn:dabur:idoc2file:pos">
          <Update_type>2</Update_type>
          <PLU>00000000</PLU>
          <Cross_ref_PLU>7777777</Cross_ref_PLU>
          <Capture_PLU />
          <Package_size />
          <Package_desc />
      </ns0:MT_CROSS_REF>
    The output file data has to be like:
    2,00000000,7777777,,,,
    The problem I am facing is while specifying the content conversion parameters in communication channel i dont know what recordset structure i should mention as all the records are directly under root. If I mention recordset structure as "ns0:MT_CROSS_REF" and parameters as
    ns0:MT_CROSS_REF.fieldSeparator   ,
    ns0:MT_CROSS_REF.endSeparator    'nl'
    i get error in communication channel monitoring and no file is posted.
    Please help me as to what correct parameter i should mention in my case.
    Thanks,
    Regards,
    Yash

    Hi Chirag,
    I cannot change the xml file as it comes after mapping idoc to a message type. How can I add ROOT in the xml? My message type is like MT_CROSS_REF and it has those 6 fields as in the XML (Update_type, PLU etc.). I do the mapping of these fields from a IDOC and get the XML.
    I hope you got my point.
    Thanks,
    Yash

  • Supress Column Heading - File Content Conversion in Sender Adapter

    Hi,
    Let me give a more clear picture about my scenario.  I need to convert CSV File to XML output:-
    My source file has column heading and values.  The sample data is mentioned hereunder:-
    PERNR;KID;PNALT;NACHN;NAME2;VORNA
    ;1200;1200;Angus
    I have created a data type as under:-
    DT_LegacyEmployee (Category - Complex Type)
         Employees (Category - Element, Occurence - 1)
              Header (Category - Element, Occurence - 0...1)
                   PERNR_H
                   KID_H
                   PNALT_H
                   NACHN_H
                   NAME2_H
                   VORNA_H
              Employee (Categroy - Element, Type - DT_LegacyEmployee_Row, Occurence - 0...unbounded)
                   PERNR
                   KID
                   PNALT
                   NACHN
                   NAME2
                   VORNA
    The file conversion parameters in the file sender adapter are mentioned hereunder:-
    Document Name - MT_LegacyEmployee
    Document Namespace - http://abc.com/xi
    Recordset Name - Employees
    Rescordset Structure - Header,1,Employee,*
    Recordsets per Message - 1
    Key Field Type - String (Case Sensitive)
    Employee.fieldSeparator - ;
    Employee.endSeparator - 'nl'
    Employee.fieldNames - PERNR,KID,PNALT,NACHN,NAME2,VORNA
    I dont' have a key field value.  How do we remove the header and show only the values in the xml output.  I have searched the forum topics as well checked many blogs related to file content conversion, but nothing helped.  Kindly advice how to fix this issue.  Thanks in advance.
    Regards.
    Praveen

    Hi Praveen,
    Change your File Adapter as below
    Document Name - MT_LegacyEmployee
    Document Namespace - http://abc.com/xi
    Recordset Name - Employees
    Rescordset Structure - Employee,*
    Recordsets per Message - 1
    Key Field Type - String (Case Sensitive)
    Employee.fieldSeparator - ;
    Employee.endSeparator - 'nl'
    Employee.fieldNames - PERNR,KID,PNALT,NACHN,NAME2,VORNA
    There is no need for the Header required in the data type.
    DT_LegacyEmployee (Category - Complex Type)
    Employees (Category - Element, Occurence - 1)
    Employee (Categroy - Element, Type - DT_LegacyEmployee_Row, Occurence - 0...unbounded)
    PERNR
    KID
    PNALT
    NACHN
    NAME2
    VORNA
    Now the trick is in the mapping program
    Lets assume your mapping looks like
    MT_LegacyEmployee ---> MT_TargetEmployee
    - Employees ---> Records
       - Employee ---> Record
         - PERNR  ---> TargetPERNR
         - .. so on
    When you do a mapping from Employee ---> Record apply the following logic.
    (PERNR)--->
                 (TestEquals =) --->(NOT)--->
    (Constant) --->                                (IF)
    (PERNR)                       (IF Without Else) ---> (Record)
                                                   (THEN)
                                (Employee)--->
    When doing this make sure RightClick on PERNR and Select Context ---> Employees.
    By default context would be from Employee and it will give you an error of XSD format. So make sure you are changing the context.

  • 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 using SOAP adapter

    Hi,
         I'm using a receiver SOAP adapter in my IDOC to file scenario and need to do file content conversion in the receiver side.
    Are any standard modules available for file content conversion in the SOAP adapter or do I need to write custom EJB modules for this.
    Please note that I have to use a SOAP adapter, can't use any other adapter.
    Thanks in advance
    Shiladitya

    Hi,
    XML Document Conversion Type
    &#9679;      Enter recordTypes as the parameter name.
    Under Parameter Value, enter the complete, comma-separated list of all names of recordset types that occur in the document to be converted.
    If you decide to use this method, you can define a different conversion type for each recordset type that occurs in the XML document.
    For example, you could name the recordset types as follows: RecordType1,RecordType2,RecordType3.
    &#9679;      Enter singleRecordType as the parameter name.
    Under Parameter Value, enter the name of a recordset type that is to be used to convert all elements that occur in the XML document.
    If you decide to use this method, define the same conversion type for each recordset type that occurs in the XML document.
    You must enter exactly one parameter only. Whichever parameter you choose, you automatically exclude the second parameter.
    You define further parameters for each recordset type.
    In the remainder of this documentation the parameters are specified by the prefix <RecordType>. In your configuration, replace this name with the name of the recordset type.
    Conversion Type List with Separators
    &#9679;      <RecordType>.fieldSeparator
    Enter the field separator that is written between the individual fields of a record.
    This specification is mandatory.
    Conversion Type List with Fixed Field Length
    &#9679;      <RecordType>.fieldLengths
    Specify a character string that contains a list of fixed field lengths that are separated by commas and which determines the number and the length of fields generated in the text file.
    For example, you want to write a recordset with three elements that have field widths of five, ten, and fifteen characters. Enter:
    <RecordType>.fieldLengths = 5,10,15
    This specification is mandatory.
    &#9679;      <RecordType>.fieldLengthExceeded
    Specify how you want to handle fields that exceed the configured field length. Permitted values for the parameter value are:
    &#9675;       error (default)
    Interrupts processing of message with error
    &#9675;       cut
    Cuts off superfluous characters
    &#9675;       ignore
    Ignores the field length restriction
    Further Entries
    &#9679;      <RecordType>.beginSeparator
    Enter a string. The string is placed in front of the first field of a recordset.
    &#9679;      <RecordType>.endSeparator
    Enter a string. The string is appended to the last field of a recordset as a concluding character. The default is \r\n.
    &#9679;      contentType
    Enter the MIME type of the converted payload. The default value is text/plain.
    &#9679;      addHeaderLine
    Only define this parameter if you have already defined singleRecordType.
    Define whether a header line is to be added to the result of the conversion.
    &#9675;       none (default)
    Does not insert a header line
    &#9675;       fromXML
    The header line is generated from the element name of the first recordset of the XML document
    &#9675;       fromConfiguration
    The header line is determined by the configuration parameter headerLine.
    &#9679;      headerLine
    Only define this parameter if you have already set addHeaderLine=fromConfiguration.
    The value that you define is placed in front of the result of the conversion as a header line.
    &#9679;      fixedLineWidth
    Enter the maximum line length n (in characters) that can be written to the resulting document. The separator specified by lineSeparator is inserted in the resulting document every n characters.
    &#9679;      lineSeparator
    Only define this parameter if you have already defined fixedLineWidth.
    Specify the string that is written to the resulting document at the end of each line that is written with fixedLineWidth. The default is \r\n.
    Use of Special Characters
    You can use special characters in the following parameters: <RecordType>.fieldSeparator, <RecordType>.beginSeparator, <RecordType>.endSeparator, headerLine, and lineSeparator.
    &#9679;      Tabulator: \t
    &#9679;      Carriage Return (CR): \r
    &#9679;      Line Feed (LF): \n
    &#9679;      Arbitrary character: \x<code>
    <code>indicates the hexadecimal character code of the character to be displayed.
    Regards,
    Phani

  • File content conversion for file with hierarchical structure

    Hi
    I want to read a flat file in the following message structure using file content conversion.
    Message structure is :
    01 ( occurence = 1)
    _ 1B (occurence = unbounded)
    _ 1G (occurence = unbounded)
    _1H (occurence = 1)
    _1N ( occurence = unbounded)
    99 (occurence = 1, trailer record)
    In short there will be one 01 ( header record) in file. There will multiple 1B records. Under one 1B record there will multiple 1G records. Under each 1G record there will be one 1H recoprd and multiple 1N record. At the end there will one 99 record.
    File format : Fixed length
    Data in the text file would be as follows :
    01Test
    1BF0001MS005       4855390859  
    1GF000172075F31501  GBPINV 040806
    1HF000172075F 
    1NF000172075F0011MS0051125002FOOUKSTFOOD
    1NF000172075F0021MS0056540003ICOMSIEARCA 
    1BF0111TT005       3454390859  
    1GF011172075F31501  INRINV 040806
    1HF011172075F 
    1NF011172075F0011MS0051125002FOOUKSTFOOD
    1NF011172075F0021MS0056540003ICOMSIEARCA 
    99002187004855390859
    Is it possible to do above using file content conversion or is there any method to do it. Please suggest.
    Thanks
    Varun

    you cant acheive this heirarchy using the file adapters cont. conv, cos it supports only to a single level.
    Maybe you can have a module or use the conversion agent !!
    Some good reads on the Conv. agent!!!
    /people/william.li/blog/2006/03/17/how-to-get-started-using-conversion-agent-from-itemfield
    /people/paul.medaille/blog/2005/11/18/conversion-agent-a-free-lunch
    /people/alexander.bundschuh/blog/2006/03/14/integrate-sap-conversion-agent-by-itemfield-with-sap-xi
    /people/paul.medaille/blog/2005/11/17/more-on-the-sap-conversion-agent-by-itemfield

  • File Content Conversion : Sender Channel

    Hi
      I am trying to do content conversion in the Sender Channel from a flat file to a XML.
    My Target XML(message structure) looks like
    <H1>
      <H2>
          <D>Detail Record</D>
          <L1>line</L1>
          <L1>line</L1>
      </H2>
      <H2>
          <D>Detail Record</D>
          <L1>line</L1>
          <L1>line</L1>
      </H2>
    </H1>
    Here the element <H2> is only needed to group <D> and the following <L1> elements of each new occurrence of <D>.
    Now my problem is that the element <H2> is not getting created.
    and the message after content conversion is looking as follows
    <H1>
          <D>Detail Record</D>
          <L1>line</L1>
          <L1>line</L1>
          <D>Detail Record</D>
          <L1>line</L1>
          <L1>line</L1>
    </H1>        
    What should I do to get the desired result.

    @Yes Bhavesh you  are right.
    Hi Jai,
           I am trying the other way round.i.e from flat file to a XML message.As I said I was trying to do it for Sender Channel where is the after content conversion I want a XML file.The example is a what I framed out of my actual problem.
    if flat file is as follows ,
    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    DetailRecord1
    Line1
    Line2
    Line3
    DetailRecord2
    Line4
    Line5
    then the XML must look like
    <H1>
    <H2>
    <D>DetailRecord1</D>
    <L1>Line1</L1>
    <L1>Line2</L1>
    <L1>Line3</L1>
    </H2>
    <H2>
    <D>DetailRecord2</D>
    <L1>Line4</L1>
    <L1>Line5</L1>
    </H2>
    </H1>
    I identify the different types records in the flat file
    as follows,
    Record starting with "Detail" is considered as <D> element
    Record starting with "Line"  is considered as <L> element.
    Hope I did clarify.

  • Sender File Adapter - File Content Conversion

    Hello,
    i do have a problem with the file content conversion at the sender file adapter.
    I have configured the file content conversion with key field defined
    keyfield: key
    recordsetstructure is set as head,1,item,*
    head.fieldSeparator  | 
    head.beginSeparator  |
    head.endSeparator  |
    head.keyFieldValue  H
    head.fieldNames  key,....
    item.fieldSeparator  | 
    item.beginSeparator  |
    item.endSeparator  |
    item.keyFieldValue I
    item.fieldNames  key,....
    When i run it like this it will not read since it has a problem to identify the key fields.
    When ever i change the whole logic to be not based on fieldseparator but on fixed length, everything is working perfectly fine.
    but this unfortuantly doesn't help as i have no fixed structure for the rest of the fields.
    also when i change the recordsetstructure to head,1,item,1 my file is also processed correctly, of corse only for the first line, it at least tells me that the file structure is correctly defined.
    Can anyone help why the identification for the keyfields doesn't work with field names and separator but in the same set up with fixed lengths ?
    thanks a lot

    Hello All,
    thanks for the helpful answers.
    So i tried Jayan tip and removed the begin Separter.
    Unfortuantly my file is really looking like this |H|...|...| for the header record
    and for the item record |I|...|...| ( this was an" I" like in Item ...
    In my opinion this means i really do have a begin seperator which is the same like the field separator.
    When i removed it from both the file and the config it started to work.
    So i wrote an java function which will trow away the first digit in this case and integrated it in my szenario.
    So that when this file is read there is no | as a begin flag anymore.
    And the whole thing starts to work, this sounds more like a bug then a feature but anyway i am happy.
    so thanks a lot
    Tina

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

  • File Content Conversion with Multiple structures

    Here is the scenario
    Legacy to XI -> XI to R/3 (App Server)
    txt file and fixed length.
    <b>Test file</b>
    100WELCOME    0430000960603201321
    2000000000040008000803
    <b>Table2</b>
    RecordType
    PriorityCode
    Destination
    BankOrginNo
    CreationDate
    CretionTime
    Spaces
    <b>Table2</b>
    RecordType
    Destination
    BankOrginNo
    ReferenceCode
    ServiceCode
    RecordLength
    CharactersPerBlock
    PartialCompression
    CompressionSpaces
    <b>Content Conversion Parameters:</b>
    Document Name: Details
    RecordsetName  : recordset
    Recordsetstructure  : Table1,1,Table2,*
    Recordsetsequence: Ascending
    RecordsetperMessage: *
    Keyfieldname          : KF
    Kefieldtype          : String(Case-Sensitive)
    Table1.keyFieldValue     :'1'
    Table1.fieldFixedLengths:1,2,10,10,6,4,47
    Table1.fieldNames :RecordType,PriorityCode,Destination,BankOrginNo,CreationDate,CretionTime,Spaces
    Table2.keyFieldValue     :'2'
    Table2.fieldFixedLengths: 1,10,10,10,3,3,4,1,38
    Table2.fieldNames:RecordType,Destination,BankOrginNo,ReferenceCode,ServiceCode,RecordLength,CharactersPerBlock,PartialCompression,CompressionSpaces
    ignoreRecordsetName     :true
    When I am trying with first structure it is working fine, where as 2 structures it is not.
    in the adopter monitoring it show it pics the file from Legacy(file adopter display green), where as SXMB_MONI it is not showing any thing.
    can any body help on this do I need to maintain any other parameters for file content conversion.
    Thanks
    M

    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

  • CSV File Content Conversion

    Hello, I have a litte problem with the File-Adapter and the File Content Conversion.
    We get csv-files in which are 2 structures
    the first row contents headerinformations like invoicenumber and sumfields.
    The following rows contents item-informations.
    I want to convert the file in a xml-format like this:
    <invoice>
       <invoiceheader>
         .... (information from the first row)
       </invoiceheader>
       <itemlist>
          <item>
              ... (information from 2. row )
          </item>
          <item>
              ... (information from 3. row )
          </item>
          <item>
              ... (information from last row )
          </item>
       </itemlist>
    </invoice>
    The csv-file looks like this:
    In the csv-file i have no keys which determine the kind of row. I only know that the first row contains the headerinformation and the following rows (2. until last) contains the item informations.
    Any idea ?
    Kindly regards
    Detlef Breitwieser

    Hello anybody !
    I want the conversion is done by the file-adapter -
    and i have no keyvalues - that's the problem.
    I only know - the 1. row contains the headerstructure and the following rows contains the itemstructure.
    I configured the Fileadapter with this paramters (for an example)
    xml.recordsetStructure=HeaderSum,1,Item,60000
    xml.recordsetName=AvisRechnung
    xml.recordsetsPerMessage=*
    xml.documentName=Avis
    xml.HeaderSum.fieldSeparator=;
    xml.HeaderSum.structureTitle=head
    xml.HeaderSum.fieldNames=head1,head2,head3,head4,head5,head6,head7,head8
    xml.Item.fieldSeparator=;
    xml.Item.structureTitle=item
    xml.Item.fieldNames=item1,item2,item3,item4,item5,item6,item7,item8,item9
    The Csv-File is this:
    79;1616243;0;20050706;200401;RWE_DEBIT_AVIS_200401.txt;200401;978;
    ;R0921018;KM;IT;PROAUTO S.A.S.;DI S PRODAN & C;VIA AQUILEIA C/O APT GIULIANO;RONCHI DEI LEGIONARI (GO);IT00503570319
    8,72325E+11;R0921013;KM;DE;AVIS AUTOVERMIETUNG GMBH&CO.KG;ZIMMERSMUEHLENWEG 21;61437 OBERURSEL, GERMANY;ST.NR.003/225/14000;DE-1650-38-067
    8,72325E+11;R0921041;KM;DE;AVIS AUTOVERMIETUNG GMBH&CO.KG;ZIMMERSMUEHLENWEG 21;61437 OBERURSEL, GERMANY;ST.NR.003/225/14000;DE-1650-38-067
    And the converted xml-file is :
    <?xml version="1.0" encoding="utf-8"?>
    <Avis>
    <AvisRechnung>
         <head>
              <head1>79</head1>
              <head2>1616243</head2>
              <head3>0</head3>
              <head4>20050706</head4>
              <head5>200401</head5>
              <head6>RWE_DEBIT_AVIS_200401.txt</head6>
              <head7>200401</head7>
              <head8>978</head8>
         </head>
         <item>
              <item1></item1>
              <item2>R0921018</item2>
              <item3>KM</item3>
              <item4>IT</item4>
              <item5>PROAUTO S.A.S.</item5>
              <item6>DI S PRODAN &amp; C</item6>
              <item7>VIA AQUILEIA C/O APT GIULIANO</item7>
              <item8>RONCHI DEI LEGIONARI (GO)</item8>
              <item9>IT00503570319</item9>
         </item>
         <item>
              <item1>8,72325E+11</item1>
              <item2>R0921013</item2>
              <item3>KM</item3>
              <item4>DE</item4>
              <item5>AVIS AUTOVERMIETUNG GMBH&amp;CO.KG</item5>
              <item6>ZIMMERSMUEHLENWEG 21</item6>
              <item7>61437 OBERURSEL, GERMANY</item7>
              <item8>ST.NR.003/225/14000</item8>
              <item9>DE-1650-38-067</item9>
         </item>
         <item>
              <item1>8,72325E+11</item1>
              <item2>R0921041</item2>
              <item3>KM</item3>
              <item4>DE</item4>
              <item5>AVIS AUTOVERMIETUNG GMBH&amp;CO.KG</item5>
              <item6>ZIMMERSMUEHLENWEG 21</item6>
              <item7>61437 OBERURSEL, GERMANY</item7>
              <item8>ST.NR.003/225/14000</item8>
              <item9>DE-1650-38-067</item9>
         </item>
    </AvisRechnung>
    </Avis>
    But i want to group the items in an item with name <itemlist>. In this case the items appears under the node <AvisRechnung>

  • Create substructures via file adapter - file content conversion

    I have a need to create a structure as follows using file content conversion from a flat file
    source:
    H1~00
    S1~1A
    L1~1B
    S1~2A
    L1~2B
    S1~3A
    L1~3B
    <?xml version="1.0" encoding="UTF-8"?>
    <ns:x_MT xmlns:ns68="urn:abt.com/IAM">
      <DocHeader>
          <Label />
          <type />
      </DocHeader>
      <DocItem>
          <Ship>
            <Label />
            <type />
          </Ship>
          <Lines>
            <Label />
            <type />
          </Lines>
       </DocItem>
    </ns:x_MT>
    I can successfully create a x_MT but I do not get the  heirarchy (DocItem node) and therefore I'm having trouble on the mapping side.
    My file content conversion is as follows:
    Document Name: x_MT
    Document Namespace: urn:abt.com/IAM
    Recordset Name: x_DT
    Recordset structure: DocHeader,1,Ship,,Lines,
    Recordsets per message: *
    Key Field Name: label
    DocHeader.fieldSeparator     '0x7E'
    DocHeader.endSeparator             'nl'
    DocHeader.fieldNames             label,type
    DocHeader.keyFieldValue         H1
    Ship.fieldSeparator     '0x7E'
    Ship.endSeparator     'nl'
    Ship.fieldNames             label,type
    Ship.keyFieldValue      S1
    Lines.fieldSeparator     '0x7E'
    Lines.endSeparator     'nl'
    Lines.fieldNames     label,type
    Lines.keyFieldValue     L1
    What I get is a structure without the node DocItem and therefore appears like a flat structure and mapping fails since I have multiple 'Lines' and only the last one gets mapped.
    I've read all the weblogs around this topic and none seemed to address more than one node. Please help.
    Thank you,
    Parimala

    Hi Parimala,
    As per SAP help document the structure created by content conversion would look like this..
    http://help.sap.com/saphelp_nw04/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm
    <documentName>...
       <recordset>
    <NameA>
    <field-nameA1>field-value</field-nameA1>
    <field-nameA2>field-value</field-nameA2>
    <field-nameA3>field-value</field-nameA3>
    </NameA>
    <NameB>
    <field-nameB1>column-value</field-nameB1>
    <field-nameB2>column-value</field-nameB2>
    <field-nameB3>column-value</field-nameB3>
    </NameB>
       </recordset>
       <recordset>
       </recordset>
    </documentName>...
    If you require a <DocItem> node then you have to handle this in mapping.
    Regards
    Anand

Maybe you are looking for