Hierarchial data through content conversion

All,
we have an input file in the following format. (This is a fixed length file structure, where the first character is the type of the record and the rest is the data)
0XXXX
1YYYY
2MasterRow-1
3Childrow 1
3Childrow 2
4Childrow 1
4Childrow 2
2MasterRow-2
3Childrow 21
3Childrow 22
4Childrow 21
5XXXXX
we need this converted as follows, (all records are master records, only record 2 can have children. and the records of type 3 & 4 that follow record type 2 (till the next occurence of record type 2) are the children of that record.
<record><type>0</type><data>XXXX</data></record>
<record><type>1</type><data>YYYY</data></record>
<record><type>2</type><data>MasterRow-1</data>
    <children>><type>3</type><data>Childrow 1</data></children>
    <children>><type>3</type><data>Childrow 2</data></children>
    <children>><type>4</type><data>Childrow 1</data></children>
    <children>><type>4</type><data>Childrow 2</data></children>
</record>
<record><type>2</type><data>MasterRow-2</data>
    <children>><type>3</type><data>Childrow 21</data></children>
    <children>><type>3</type><data>Childrow 22</data></children>
    <children>><type>4</type><data>Childrow 21</data></children>
</record>
<record><type>5</type><data>XXXX</data></record>
Can we do this using content conversion? or should we go for multi step mapping?
Thanks,

Hi,
Ref. this doc. <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/482aae19-0301-0010-3485-8efd618818d0">How to Handle Unstructured Source Contents for Adapters</a>
Regards,
Jakub

Similar Messages

  • File adapter modules : Access to file data before content conversion

    I have a file sender channel for which content conversion in applied. The incoming file has data in comma separated values format.
    e.g.
    102366,Amol Joshi,DEPT1
    107752,XYZ PQR,DEPT2
    I want to access the the actual data in the file before content conversion takes place. Is it possible to access this data inside the adaper module? I tried creating an adapter module and put it before CallSAPAdapter,it still gets the XML after content conversion as the input data to the module.
    Any pointers?

    Hi Amol,
    I dont know if it is the right approach.
    But if u r not able to meet ur requirement u can do one work around.
    Use Message Transformation Bean to convert it once again in to CSV (flat file structure) and then proceed with ur module.
    There should be a better way than this.
    Hope we could find a better solution in the forum.
    Regards,
    Sudharshan

  • Hierarchy on file content conversion for receiver?

    Y'all,
    I'm stuck in this problem and I haven't find a solution to solved it... so, all your clues and reply's are really appreciate...
    The basic problem is a File content conversion for a receiver C.C. that is not working and it's raising some errors in the RWB, I have gone thru some blogs but I still having a lot of doubts...
    I want to produce a flat TXT file that will have a line for every node or subnode, it doesn't matter if it's not represented as hierarchical structure like this one... but the records must be produced or written in the same order...
    Man_Del_Header as main node with Man_Header, Delete_Detail and Trailer as subnodes...
    <?xml version="1.0" encoding="UTF-8"?>
    <ns1:MT_DISTRIBUTOR_DELETE xmlns:ns1="http://xxx.com/xi/POSout">
       <Man_Del_Header>
          <MD_Header>|HM|1|</MD_Header>
          <MD_StoreNumber>051</MD_StoreNumber>
          <MD_filler1>|2|0000|3|</MD_filler1>
          <MD_EffDate>09/17/07</MD_EffDate>
          <MD_filler2>|4|005|5|dsdvnd|7|</MD_filler2>
          <MD_BatchNumber>500</MD_BatchNumber>
          <MD_fiiller3>|8|</MD_fiiller3>
          <MD_BatchDescr>DELETE PREV CST BTCH</MD_BatchDescr>
          <MD_filler4>|10|D|</MD_filler4>
          <MD_linef>1</MD_linef>
          <Man_Header>
             <Man_Header>|HM|1|</Man_Header>
             <Man_StoreNumber>051</Man_StoreNumber>
             <Man_filler1>|2|0000|3|</Man_filler1>
             <Man_EffDate>09/17/07</Man_EffDate>
             <Man_filler2>|4|005|5|dsdvnd|7|</Man_filler2>
             <Man_BatchNumber>500</Man_BatchNumber>
             <Man_filler3>|8|</Man_filler3>
             <Man_BatchDescription>Delete Distributor</Man_BatchDescription>
             <Man_filler4>|</Man_filler4>
             <Man_linef>Constant</Man_linef>
          </Man_Header>
          <Delete_Detail>
             <Delete_Detail>|D|901|170|</Delete_Detail>
             <Delete_DistribNumber>0000005010</Delete_DistribNumber>
             <filler9>|</filler9>
             <delete_linef>1</delete_linef>
          </Delete_Detail>
          <Delete_Detail>
             <Delete_Detail>|D|901|170|</Delete_Detail>
             <Delete_DistribNumber>0000005011</Delete_DistribNumber>
             <filler9>|</filler9>
             <delete_linef>1</delete_linef>
          </Delete_Detail>
          <Trailer>
             <Trailer>|T|1|</Trailer>
             <TotalRecCnt>00005</TotalRecCnt>
             <filler1>|2|</filler1>
             <NoOfHeaders>00002</NoOfHeaders>
             <filler2>|3|</filler2>
             <NoOfAdds>00000</NoOfAdds>
             <filler3>|4|</filler3>
             <NoOfChanges>00000</NoOfChanges>
             <filler4>|5|</filler4>
             <NoOfDeletes>00002</NoOfDeletes>
             <filler5>|13|</filler5>
             <NoOfSubstitution>00000</NoOfSubstitution>
             <filler6>|</filler6>
             <linef>1</linef>
          </Trailer>
       </Man_Del_Header>
       <Man_Del_Header>
          <MD_Header>|HM|1|</MD_Header>
          <MD_StoreNumber>061</MD_StoreNumber>
          <MD_filler1>|2|0000|3|</MD_filler1>
          <MD_EffDate>09/17/07</MD_EffDate>
          <MD_filler2>|4|005|5|dsdvnd|7|</MD_filler2>
          <MD_BatchNumber>500</MD_BatchNumber>
          <MD_fiiller3>|8|</MD_fiiller3>
          <MD_BatchDescr>DELETE PREV CST BTCH</MD_BatchDescr>
          <MD_filler4>|10|D|</MD_filler4>
          <MD_linef>1</MD_linef>
          <Man_Header>
             <Man_Header>|HM|1|</Man_Header>
             <Man_StoreNumber>061</Man_StoreNumber>
             <Man_filler1>|2|0000|3|</Man_filler1>
             <Man_EffDate>09/17/07</Man_EffDate>
             <Man_filler2>|4|005|5|dsdvnd|7|</Man_filler2>
             <Man_BatchNumber>500</Man_BatchNumber>
             <Man_filler3>|8|</Man_filler3>
             <Man_BatchDescription>Delete Distributor</Man_BatchDescription>
             <Man_filler4>|</Man_filler4>
             <Man_linef>Constant</Man_linef>
          </Man_Header>
          <Delete_Detail>
             <Delete_Detail>|D|901|170|</Delete_Detail>
             <Delete_DistribNumber>0000005012</Delete_DistribNumber>
             <filler9>|</filler9>
             <delete_linef>1</delete_linef>
          </Delete_Detail>
          <Delete_Detail>
             <Delete_Detail>|D|901|170|</Delete_Detail>
             <Delete_DistribNumber>0000005013</Delete_DistribNumber>
             <filler9>|</filler9>
             <delete_linef>1</delete_linef>
          </Delete_Detail>
          <Delete_Detail>
             <Delete_Detail>|D|901|170|</Delete_Detail>
             <Delete_DistribNumber>0000005014</Delete_DistribNumber>
             <filler9>|</filler9>
             <delete_linef>1</delete_linef>
          </Delete_Detail>
          <Trailer>
             <Trailer>|T|1|</Trailer>
             <TotalRecCnt>00006</TotalRecCnt>
             <filler1>|2|</filler1>
             <NoOfHeaders>00002</NoOfHeaders>
             <filler2>|3|</filler2>
             <NoOfAdds>00000</NoOfAdds>
             <filler3>|4|</filler3>
             <NoOfChanges>00000</NoOfChanges>
             <filler4>|5|</filler4>
             <NoOfDeletes>00003</NoOfDeletes>
             <filler5>|13|</filler5>
             <NoOfSubstitution>00000</NoOfSubstitution>
             <filler6>|</filler6>
             <linef>1</linef>
          </Trailer>
       </Man_Del_Header>
    </ns1:MT_DISTRIBUTOR_DELETE>
    |HM|1|051|2|0000|3|09/17/07|4|005|5|dsdvnd|7|500|8|DELETE PREV CST BTCH|10|D|1
    |HM|1|051|2|0000|3|09/17/07|4|005|5|dsdvnd|7|500|8|Delete Distributor|Constant
    |D|901|170|0000005010|1
    |D|901|170|0000005011|1
    |T|1|00005|2|00002|3|00000|4|00000|5|00002|13|00000|1
    |HM|1|061|2|0000|3|09/17/07|4|005|5|dsdvnd|7|500|8|DELETE PREV CST BTCH|10|D|1
    |HM|1|061|2|0000|3|09/17/07|4|005|5|dsdvnd|7|500|8|Delete Distributor|Constant
    |D|901|170|0000005012|1
    |D|901|170|0000005013|1
    |D|901|170|0000005014|1
    |T|1|00006|2|00002|3|00000|4|00000|5|00003|13|00000|1
    So as you can see, i wanna produce a flat file that will have line or record for each node, it doesn't matter that it has a hierarchy or a deeper level, it should be a simple flat file...
    The thing is that i have been trying to setup the receiver comm. channel and it's raising some errors like Could not process due to error:
    <i>java.lang.Exception: Exception in XML Parser (format problem?):'java.lang.Exception: Message processing failed in XML parser: 'java.lang.Exception: Consistency error: more fields found in XML structure than specified in conversion parameters! (Value 'XXXX')', probably configuration error in file adapter (XML parser error)'</i>
    I have checked this blog:
    /people/karthiknarayan.kesavan2/blog/2007/08/22/file-content-conversion-for-multi-hierarchical-structure
    Unfortunately i don't know if there's another way to achieve this...

    Jerry,
    it easy if you go with multi mapping concept and without BPM if you are above >XI3.0 SP14.and use Append mode in the receiver file adapter.
    just create the target structure like root under that Man_Del_Header,Man_Header,Detail,Trailer at the same level but got be careful with occurences.
    <b>Source:</b>
    I think from your structure you have
    Man_Del_Header  (1-unb)
    Man_Header   (1-1)
    detail   (0-unb ) may be (1-unb)
    trailer (1-1)
    create <b>target DT</b> like:
    ROOT
    ..Man_Del_Header  (1-1)
    ..Man_Header   (1-1)
    ..detail   (0-unb ) may be (1-unb)
    ..trailer (1-1)
    all are at same level under ROOT.
    create MT,MI,MM,IM.
    in MM just map correspoding fields and if you have any unbounded onces map the nodes too. and map Man_Del_Header in the source to MT_XYZ (important)
    and in the MM go to MESSAGES tab and change the occurences of the target Message to 0-unbounded same way in the interface mapping 0-unbounded.
    here it create anothe extra node in the mapping something like Message1,this is ok.
    and in ID just create all other objects like as usual except  creating Interface determination ,in that select the extended radio button.
    in reciever File CC use FCC ,would be very simple in the recordsetstrcture give
    your four nodes Man_Del_Header,Man_Header,Detail,Trailer.
    and use either fixed or field seperator.use append mode in recv File CC otherwise it will generate files as many occurences your source "Man_Del_Header" has ,cos we are mapping it to the MT--xyz .
    thats it you are ready to go...
    if any error post back here again.
    you can make use of this thread
    /people/jin.shin/blog/2006/02/07/multi-mapping-without-bpm--yes-it146s-possible  (here there are two target DT ,but you just create one DT,remaining are similar)
    good luck.
    Babu

  • Question on File Content Conversion

    Hi all,
       I went through this blog(/people/venkat.donela/blog/2005/03/02/introduction-to-simplefile-xi-filescenario-and-complete-walk-through-for-starterspart1) for File content conversion and I have a question regading File Content Conversion. Is it always neccessary to have the data type structure as File, Record, Row and then the fields. Is it always neccesary to maintain this level of hierarchy for File content conversion to work.

    Hi Sonia,
    For FCC sender or receiver if you want text with delimieter / csv file process.
    use the below parameters
    You would have to use the Document name ,namespace,record set name ,record strucutre name ( and occurrences also) and processing parameters in Sender side
    In receiver side Record structre, processing parameters.
    see below links to have more details..
    /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/jeyakumar.muthu2/blog/2005/11/29/file-content-conversion-for-unequal-number-of-columns
    /people/anish.abraham2/blog/2005/06/08/content-conversion-patternrandom-content-in-input-file
    /people/harrison.holland5/blog/2006/12/20/xi-configuration-for-mdm-integration--sample-scenario /people/shabarish.vijayakumar/blog/2006/04/03/xi-in-the-role-of-a-ftp
    /people/prateek.shah/blog/2005/06/14/file-to-r3-via-abap-proxy
    /people/mickael.huchet/blog/2006/09/18/xipi-how-to-exclude-files-in-a-sender-file-adapter -
    Regards
    Chilla

  • File Content Conversion Error

    Hello,
    I have Async. File receiver scenario in which the following is the XML message structure. This is received by the file adpater.
    <ns1:MT_Info_File xmlns:ns1="urn:http://freemanco.com/xi/info_list">
       <TYPE>
         <FileItem>
               <FileName>DD11022007</FileName>
          </FileItem>
      </TYPE>
      <DATA>
          <LineItem>   <LineEntry>234567891234567890123456789012345678901234567890</LineEntry>
          </LineItem>
       <LineItem>
    <LineEntry>95473523647586969587265245437586979798376524253586</LineEntry>
        </LineItem>
      <DATA>
    <LineItem</ns1:MT_Info_File>
    <u><b>I want to write only folowiing DATA structure to file. I do not want to wite contents of TYPE structure</u>
      <DATA>
          <LineItem>   <LineEntry>234567891234567890123456789012345678901234567890</LineEntry>
          </LineItem>
       <LineItem>
    <LineEntry>95473523647586969587265245437586979798376524253586</LineEntry>
        </LineItem>
      <DATA></b>
    In the receiver file adpater I have follwoing <u><b>File content conversion parameters</b></u>.
    RecordSetStructure: DATA,LineItem,*
    *.addHeaderLine     0
    *.fieldFixedLengths     301
    *.fixedLengthTooShortHandling     Error
    *.endSeparator     nl
    LineItem.fieldSeparator     nl
    DATA.fieldSeparator     nl
    While testing I got following error. Looks like it is expecting some values for FileItem element in the XML.
    <b>Error</b> Attempt to process file failed with java.lang.Exception: Exception in XML Parser (format problem?):'java.lang.Exception: Message processing failed in XML parser: 'Conversion configuration error: Unknown structure 'FileItem' found in document', probably configuration error in file adapter (XML parser error)'
    <b>Error</b> MP: exception caught with cause com.sap.aii.af.ra.ms.api.RecoverableException: Exception in XML Parser (format problem?):'java.lang.Exception: Message processing failed in XML parser: 'Conversion configuration error: Unknown structure 'FileItem' found in document', probably configuration error in file adapter (XML parser error)': java.lang.Exception: Exception in XML Parser (format problem?):'java.lang.Exception: Message processing failed in XML parser: 'Conversion configuration error: Unknown structure 'FileItem' found in document', probably configuration error in file adapter (XML parser error)'
    <b>Error</b> Exception caught by adapter framework: Exception in XML Parser (format problem?):'java.lang.Exception: Message processing failed in XML parser: 'Conversion configuration error: Unknown structure 'FileItem' found in document', probably configuration error in file adapter (XML parser error)'
    <b>Error</b> Delivery of the message to the application using connection File_http://sap.com/xi/XI/System failed, due to: com.sap.aii.af.ra.ms.api.RecoverableException: Exception in XML Parser (format problem?):'java.lang.Exception: Message processing failed in XML parser: 'Conversion configuration error: Unknown structure 'FileItem' found in document', probably configuration error in file adapter (XML parser error)': java.lang.Exception: Exception in XML Parser (format problem?):'java.lang.Exception: Message processing failed in XML parser: 'Conversion configuration error: Unknown structure 'FileItem' found in document', probably configuration error in file adapter (XML parser error)'.
    How to resolve this issue? I appreciate your help.
    Thank you,
    Balaji

    Balaji,
    I would suggest to remove FileItem and LineItem in your receiver datatype. They are increasing the hierarchy of your content conversion. If you do that then you will have
    <ns1:MT_Info_File xmlns:ns1="urn:http://freemanco.com/xi/info_list">
    <TYPE>
    <FileName>DD11022007</FileName>
    </TYPE>
    <DATA><LineEntry>234567891234567890123456789012345678901234567890</LineEntry>
    <LineEntry>95473523647586969587265245437586979798376524253586</LineEntry>
    <DATA>
    </ns1:MT_Info_File>
    Then in content converstion give this parameters:
    Record structure :  TYPE,FileName,DATA,LineEntry
    TYPE.fieldfixedlengths   : 0
    FileName.fieldfixedlenghts:0
    DATA.fieldfixedlenghts:0
    LineEntry.fieldfixedlengths:301
    LineEntry.endSeparator:'nl'
    Then it should work. Also you can use FileName in your variable substituition. Also please see this weblog on how to use FileName in variable substitution:
    /people/sravya.talanki2/blog/2005/08/11/solution-to-the-problem-encountered-using-variable-substitution-with-xi-sp12
    If you dont want to remove FileItem and LineItem then add these also in your content conversion. Then the parameters would be:
    Recordset:  TYPE,FileItem,FileName,DATA,LineItem,LineEntry
    TYPE.fieldfixedlengths   : 0
    FileItem.fieldfixedlengths:0
    FileName.fieldfixedlenghts:0
    DATA.fieldfixedlenghts:0
    LineItem.fieldfixedlengths : 0
    LineEntry.fieldfixedlengths:301
    LineEntry.endSeparator:'nl'
    Regards,
    ---Satish

  • Content Conversion for Item node under Header node

    Hi,
    Below is the file sample:
    0LBS00000000082011090707:30:13~0000000009
    4GBP55.67SB300005VISTADocNO1100DistChanPaymentDays
    5001QuanUoMNetPriceGrossPricePubDiv9781444724585201109071001.1
    5002QuanUoMNetPriceGrossPricePubDiv9781444724585201109071001.1
    4GBP55.67SB300005VISTADocNO1100DistChanPaymentDays
    5001QuanUoMNetPriceGrossPricePubDiv9781444724585201109071001.1
    1~7
    Record Type:Header Record(Always = 0),Min Occurrence:1,Max Occurrence:1
    Record Type:Sales Invoice Header Record (Always = 4),Min Occurrence:0,Max Occurrence:unlimited
    Record Type:Sales Invoice Item Record (Always = 5) ,Min Occurrence:1(per Sales Invoice Header Record)
    ,Max Occurrence:999999 (per Sales Invoice Header Record)
    Record Type:Trailer Record(Always = 1),Min Occurrence:1,Max Occurrence:1
    In content conversion:
    Record set structure:Header,1,SalesInvoiceHeader,(Star),SalesInvoiceItem,(Star),Trailer,1
    Key field name:RecordType
    Header.fieldSeparator ~
    Header.fieldNames RecordType,SendingSystem,FileNumber,CreationDate,CreationTime,NextFileNumber
    Header.keyFieldValue 0
    SalesInvoiceHeader.fieldSeparator ~
    SalesInvoiceHeader.fieldNames cordType,Currency,ExchangeRate,DocumentType,Customer,VistaDocNumber,PubDiv,DistChan,PaymentDays
    SalesInvoiceHeader.keyFieldValue 4
    SalesInvoiceItem.fieldSeparator ~
    SalesInvoiceItem.fieldNames RecordType,ItemNumber,Quantity,UoM,NetPrice,GrossPrice,PubDiv,Material,BillDate,VATAmount,VATRate
    SalesInvoiceItem.keyFieldValue 5
    Trailer.fieldSeparator ~
    Trailer.fieldNames RecordType,RecordCount
    Trailer.keyFieldValue 1
    ignoreRecordsetName true
    The Src str in ESR is
    1. Header
    2. SalesInvoiceHeader
    SalesIncoiveItem(Chlid node of SalesInvoiceHeader)......
    3. Trailer
    Provide some inputs
    Thnkx

    VJ,
    You are absolutely right it is not possible to get multiple hierarchy using file content conversion.
    Splitbyvalue function would not work in my scenario as I need to group FED records based on first few characters in the first column of FED records. I wrote a UDF to insert context change based on the column value.
    Thanks again for your help.
    Regards
    Haseeb

  • Content Conversion for multi level heirarchy

    Gurus,
    I have the following scenario
    FileXIFile
    Input File structure is as follows
    FH|............  (occurs 1)
    FE|............. (occurs *)
    FED|........... (child of FE and can occur * under FE)
    FT|.............. (occurs 1)
    The file contents are pipe delimited.
    Example file
    FH|.....
    FE|........
    FED|........
    FED|.........
    FE|.......
    FED|........
    FT|............
    As stated above, FED recordtype can occur multiple times under FE
    My inbound message structure is
    .....Header (1)
    ........ErrorRecord (0,unbounded)
    .............ErrorDataRec (0,unbounded)
    .....Trailer (1)
    Recordset Structure - Header,1,ErrorRecord,,ErrorDataRec,,Trailer,1
    Recordset Sequence - Variable
    KeyFieldName - RecordType
    Content Parameters
       I have defined field separator as pipe for each recordset
       I have defined keyFieldValue for each recordset
       I have defined fieldNames for each recordset
    Here is my problem
    The file loads ok. However, ErrorDataRec loads at the same level as ErrorRecord rather than loading under it.
    I have played with fieldNames to define ErrorDataRec as a field under ErrorRecord and not definining as one, doesnot seem to make a difference.
    I need someway to tell the parser that ErrorDataRec needs to be loaded as a substructure of ErrorRecord.
    Anyone has any ideas?
    Regards
    Haseeb

    VJ,
    You are absolutely right it is not possible to get multiple hierarchy using file content conversion.
    Splitbyvalue function would not work in my scenario as I need to group FED records based on first few characters in the first column of FED records. I wrote a UDF to insert context change based on the column value.
    Thanks again for your help.
    Regards
    Haseeb

  • Sender FILE Adapater Content Conversion: Header and Item Data

    Hi
    I need to pick a file and do the content conversion. The XML structure which should be formed should be in the below format. I have a CSV file which needs to be converted.
    Kindly suggest how can I maintain parameters for Header and Item level data in Recordset structure.
    How can I specify in Recordset parameter which is Header(Customerno, Doc type and Address) and Item level(Line Item) data.
      <?xml version="1.0" encoding="UTF-8" ?>
      <customernumber></customernumber>
      <documenttype></documenttype>
    - <Address>
            <name1></name1>
            <name2></name2>
      </Address>
    - <LineItem>
            <material>100016</material>
            <amount>1000</amount>
    </LineItem>

    Hi Swetank,
    The file after conversion should have one Header and you can have any number of line items.
    Once you choose File Content Conversion in the message protocol header while configuring the Sender File Adapter, you get the following enteries in the Content Conversion Parameters:
    Document Name
    Document Namespace
    Document Offset
    Recordset Name
    Recordset Namespace
    Recordset Structure
    Recordsets per Message
    Key Field Name
    To maintain the Header information, Some entries are mandatory, i.e.
    Recordset Name: Here please specify the name of the structure. It is included in the XML schema.
    Recorset Structure: Here you need to enter the sequence and the number of substructures. Since Header is one but you can have many Line items, you will write:
    customernumber,1,documenttype,1,Address,1,LineItem,*
    this format is clearly explained in the link provided by Divya.
    And in the Additional fields you need to write the name of fields corresponding to different Recorset Structures and also add some property to it, like fixed lengths, use some separators etc.
    and Most important field is:
    Key Field Name: If you specified a variable number of substructures for Recordset Structure, in other words, at least one substructure has the value ‘*’, then the substructures must be identified by the parser from their content. This means that a key field must be set with different constants for the substructures. In this case, you must specify a key field and the field name must occur in all substructures.
    Here you need to enter LineItem as it is the only Recordset Structure with an *.
    I hope this solves your problem,
    Thanks and Regards,
    Varun Joshi

  • Inconsistent  Data for File Content Conversion

    HI XI Friends,
    Its IDOC to File Scanario,
    File is of .txt file..
    my IDOC contains 14 segments
    some times some segements will not come with Idoc..
    first three characters represent segment numbers..
    structure of txt file
    00112345       address1  street1
    00212345       office1      street1
    00312345       homw2     city2     street2
    if that IDOC doent contain 002..then .txt file should be..
    00112345       address1  street1
    00312345       homw2     city2    street2
    all Segement in that idoc are optional..
    if I use Fixed lengh in File Content Conversion then ther would be blank row  for 002 if that IDOc doent Conatin
    00112345       address1  street1
    00312345       homw2     city2    street2
    please guide me...how to use content conversion in this case..
    regards
    Munna

    Hi ,
    Thank you very much for your response..
    .txt file is of fixed lenths with no field Seperator
    IDOC contains number segements..
    the resultant txt file if we created first 3 segements data..
    00112345 address1 street1
    00212345 office1 street1
    00312345 homw2 city2 street2
    if we create 001 segment and 003 segement the text file should be
    00112345 address1 street1
    00312345 homw2 city2 street2
    but for new row of each segment ... endseperator 'nl' after first segemnt in Content conversion parameter and 002 segement values..and again endSeperator 'nl'...
    if we are not sending 002 segement data in the IDOC ..then it will give blank
    00112345 address1 street1
    00312345 homw2 city2 street2
    my requirement is if we dont send 002 segement data then no blank row .how to check if the segement is having data or not  and also how to declare it in Content Conversion parameters of File Adapters.
    please guide me
    regards
    Munna

  • 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 i.e Flat file 2 Flat file

    Hi guys,
       I am new 2 SAP XI
    and i am trying 2 do "Flat File To Flat File".
    Input File contains following data:
    Name:varun
    Surname:rajaraman
    Address:B-2
    Employee no:8204
    i.e Each Data is in separate Row.
    Output File Should contain the following data:
    I am varun rajaraman staying at B-2 bearing employee no. 8204.
           (name,surname)               (address)                        (Employee No.)
    i.e data should be in a single row.
    So, i have a problem of reading the data from input file i.e data from each row and transfering it into output file along with which i need 2 insert  "i am " ,"staying at", etc.
    pls tell me the procedure in detail.
    Thanks and regards
    santhosh rajaraman

    Hi,
    Check this links for file content convertion.
    File content conversion sites
    /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

  • File Content Conversion Parameters in FIle Adapter

    Hi
    I am doing a scenario - XML file to Text file using File content conversion parameters in Receiver File Adapter Channel.
    I given FCC Parameters like:
    DATA.addHeaderLine - '0'
    DATA.fieldSeparator - ,
    DATA.endSeparator - 'nl'
    But im getting error in Receiver File Adapter as - fieldSeparator not specified.
                 i would be greatful if any one help me.
    Regards
    Rajesh

    Hi Rajesh,
    There are lot of blogs which explain File Content Conversion in different scenarios:-
    /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/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion
    /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/sap.user72/blog/2005/01/06/how-to-process-csv-data-with-xi-file-adapter
    /people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter
    I hope this helps.
    Regards.
    Praveen

  • Sender File Adapter - Content Conversion

    HI Friends,
    I got a scenario where I need to convert the File to XML document through Sender file adapter..
    My file looks like below.
    BATCH1234........
    12DASER123142JMM
    237DSAFDLKC839890
    45SDFLASJ90011
    BATCH3455...
    132FGAR
    SD21352525
    BATCH998898...
    123145DSRTW
    12FSTS
    So there is a Header and Body for each record set..
    My XML Structure is as follows.
    <TimeStructure>
      <TimeRecord>
         <ControlRec>
             <Field1>BATCH </Field1>   
             <Field2> ...</Field2>
         </ControlRec>
         <DataRec>
             <F1> ...... </F1>
             <F2> ...... </F2>
         </DataRec>
      </TimeRecord>
      <TimeRecord>
         <ControlRec>
             <Field1> BATCH  </Field1>   
             <Field2> ADFAS  </Field2>
         </ControlRec>
         <DataRec>
             <F1> ...... </F1>
             <F2> ...... </F2>
         </DataRec>
       </TimeRecord>
    </TimeStructure>
    The blog <a href="/people/shabarish.vijayakumar/blog/2006/02/27/content-conversion-the-key-field-problem:///people/shabarish.vijayakumar/blog/2006/02/27/content-conversion-the-key-field-problem
    is somewhat relevant to my requirement.
    But the problem is I have the keyfield "BATCH" for my header file but don't have any <b>key field in the data record</b> of the input file.
    Please help me out how to mention the configuration parameters.
    Regards,
    Kumar

    Hi,
    If you don't have constant key value for your detail records, then you can not directly get the required xml.
    So in this case, you can read all the records in a common Row model, i.e each record will be considered as a one row with all the values, and then split this row with Substring or java functions in the mapping.
    Even you can do this in the Adapter module .
    If you have key value for each record to identify then you can try with content conversion.
    Regards,
    Moorthy

  • Remove of quotes"' in the sender file adapter -- file content conversion

    HI Guys,
    MY source file is comma seprated file (,) in the file i had quotes" " for the data like
    "5000543","0.00","03/04/2009",
    is there any way i can remove the quotes in file content conversion
    Please help me on this
    Regards
    Srinivas

    Srinivas,
    This should not be a big deal, because your fields are separated by a comma. So you need to keep in mind like you are doing the content conversion for a csv file.
    See this blogs for some information:
    /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
    In the second blog 1345 there are parameters for content conversion. So similarly mention your conversion parameters in your sender communication channel. So after converting to xml your input fields have values like:
    field1:  "5000543"
    field2:  "0.00"
    field3: "03/04/2009"
    So all your field values has with "". Now you can use either standard replace funciton or a udf as given above and then it will remove the quotes and then you can map according to your requirements. If you think sometimes you can get quotes and sometime not in the file then you can use function like startswith or endswith along with exists and can map accordingly.
    Regards,
    ---Satish

  • Problem when using keyfield in sender file content conversion

    Hi all,
    I am using FCC at sender side.
    My recordset structure is as follow::
    <MT_TW_TLOG>
      <Transaction>
       ---<SalesItem> 1...unbounded
           <XF_SOURCESYS>
           <XF_STORECODE>
           <XF_TYPE>
           <XF_VOIDFLAG>
       ---</saleItem>
       ---<SalesReturn> 1...unbounded
           <XF_SOURCESYS>
           <XF_STORECODE>
           <XF_TYPE>
           <XF_VOIDFLAG>
       ---</saleReturn>
       ---<SalesTotal>
           <XF_SOURCESYS>
           <XF_STORECODE>
           <XF_TYPE>
           <XF_VOIDFLAG>
       ---</saleTotal>
       ---<SalesTender> 1...unbounded
           <XF_SOURCESYS>
           <XF_STORECODE>
           <XF_TYPE>
           <XF_VOIDFLAG>
       ---</saleTender>
    </Transaction>
    FCC specification that i have used is::
    Recordset name::       Transaction
    Recordset Structure::  salesItem,,salesReturn,,salesTotal,1,SalesTender,*
    Recordset Sequencee::  
    Variable
    Key field name::XF_TYPE
    key fiel type::String(Case-sensitive)
    then i have given following information::
    salesItem.fieldnames ::all field names
    salesItem.fieldSeparator::,
    salesItem.keyFieldvalue::2
    salesItem.processFiledNames::fromConfiguration
    salesReturn.fieldnames ::all field names
    salesReturn.fieldSeparator::,
    salesReturn.keyFieldvalue::2
    salesReturn.processFiledNames::fromConfiguration
    salesTotal.fieldnames ::all field names
    salesTotal.fieldSeparator::,
    salesTotal.keyFieldvalue::2
    salesTotal.processFiledNames::fromConfiguration
    salesTender.fieldnames ::all field names
    salesTender.fieldSeparator::,
    salesTender.keyFieldvalue::2
    salesTender.processFiledNames::fromConfiguration
    My source file is a text file.
    So when i am transfering following data,
    scenario works fine.
    PCTW,TWS001,2,1
    PCTW,TWS001,2,10
    PCTW,TWS001,3,2
    PCTW,TWS001,1,3
    PCTW,TWS001,4,4
    Third field is my XF_TYPE.
    But if i change the order of records as follows::
    PCTW,TWS001,3,1
    PCTW,TWS001,3,10
    PCTW,TWS001,2,2
    PCTW,TWS001,1,3
    PCTW,TWS001,4,4
    It fails at adaper monitor and throws following error::
    2006-11-01 10:42:00 UTC: Error: Conversion of complete file content of 'try.txt' to XML format failed around position 0: Exception: ERROR consistency check in recordset structure validation (line no. 3: missing structure(s) before type 'SalesItem'
    Please provide some help on it.
    Thanks & Regards,
    Nilima

    Hi Nilima,
    Just go through this Weblog.
    /people/anish.abraham2/blog/2005/06/08/content-conversion-patternrandom-content-in-input-file
    and specially the hilighted ( circled text ) in this and its description below.
    Hope this will be helpful
    Reward if helpful.
    Regards
    Sachin

Maybe you are looking for

  • Audio/Animation Bug, with a work-around

    This is one of those cases where TechSupport believes a work-around is fine to something I would consider a bug. Took me a while to find the solution so I'd like to share with everyone my problem/solution. Background: I have a presentation with recor

  • Trying to access my 851w from outside my lan, but can access inside fine

    Hi, I purchased a 851w to use as my home router and to learn more about the cisco IOS. I have been spending some time studying for CCENT/CCNA and so far I have enjoyed learning as I go. However, I am having problems accessing this router from a remot

  • Video sound to TV won't run through headphones

    Hi, I have my stereo and TV hooked up to a MacMini (the 2009 slim metal one with the optical drive).  I have a headphone splitter attched to the headphones jack going to the TV and the stereo.  The Mini is hooked up to the TV with a mini DP connector

  • How to use not equal to in read

    Hi experts , I have a read statement in which i am reading status internal table. read table it_jest into wa_jest where inact ne 'X' this inact ne 'X' is giving me an syntax error i tried inact eq '' inact eq ' ' inact eq space' but nthng worked plea

  • Clickable trackpad in Windows XP?

    I'm testing a Windows application via Boot Camp and, while everything installed beautifully, I'm really struggling with the (archaic by comparison) Windows interface. Is there ANY way to make the trackpad clickable? There was a software hack for this