File Adapter with Content Conversion

Hi -
I am trying to convert a Flat file which has data as
firstnamelastnamecompanyName
Now i have created a message type which has a root name as Contact and its children are FirstName,LastName,Company.
And in the configurator i have created a file adapter with the content conversion, but being very new to XI i have never used a file adapter with content conversion.  This is what i have in my Content Conversion Parameters.Please correct my code.
Document Name      ::   MT_Contact
Document Namespace ::   http://venkat
Document Offset    :: <i>i did not enter anything here</i>
Recordset Name     ::   RootNode(i gave this name just like that,,, Should it be something from the IR??
Recordset NameSpace:: <i>i did not enter anything here</i>
Recordset Structure::   Contact (this is the name in my IR
Recordset Sequence ::  Ascending
Recordsets per Message :: Contact,* (Can someone explain what should be given here)
Then in the bottom in the name value pairs i have given
Contact.fieldNames   =   FirstName,LastName,Company
Contact.fieldSeparator = #
When i am using the above configuration the error i am getting in RWB is Error: Conversion initialization failed: Exception: java.lang.Exception: java.lang.Exception: Error(s) in XML conversion parameters found:
Format error in 'xml.recordset' argument: incomplete structure (name,number) pairInvalid 'xml.recordsetsPerMessage' value 'Contact,*' found
I am very new to XI and i am unable to understand what exactly each field means in the file adapter when the content coversion is used. Can someone take the pain of explaining them.
Thank you
Venkat

Hi,
Use the following to create an XML strucutre like this,
<MT_CONTACT>
<CONTACT>
<FirstName> </FirstName>
<LastName> </LastName>
<CompanyName> </CompanyName>
</CONTACT>
<MT_CONTACT>
DocumentName : MT_TEST
DocumentNamespace : Yournamespace
RecordserName : record
RecordsetStructure : CONTACT,1
In the table,
ignoreRecordsetName  : true
CONTACT.fieldNames : FirstName,LastName,CompanyName
CONTACT.fieldSeparator : #
Go through the links suggested by moorthy and also these blogs to understand content conversion better,
/people/anish.abraham2/blog/2005/06/08/content-conversion-patternrandom-content-in-input-file
/people/jeyakumar.muthu2/blog/2005/11/29/file-content-conversion-for-unequal-number-of-columns
/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/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
Regards,
Bhavesh

Similar Messages

  • Sender file adapter with content conversion  Simple XML

    Hi experts,
    I'm trying to parametrize my sender file adapter content conversion.
    I'm receiving a text file with one single line like:
    AA1;AA2; AA3;
    and I want to convert it to an XML like
    <MT_A1>
    <field1>AA1</field1>
    <field2>AA2</field2>
    <field3>AA3</field3>
    </MT_A1>
    Actually I know how to do somenthing like
    <MT_A1>
        <LINE>
              <field1>AA1</field1>
              <field2>AA2</field2>
              <field3>AA3</field3>
         <LINE>
    </MT_A1>
    What I want is remove the <LINE> tag from my XML.
    Regards
    Gonzalo
    Edited by: Gonzalo del Castillo on Nov 28, 2008 2:18 PM

    Hi
    Use this help document for receiver FCC
    http://help.sap.com/saphelp_nw04/helpdata/en/d2/bab440c97f3716e10000000a155106/content.htm
    Content Conversion (Pattern/Random content in input file)
    File conversion text to xml (Few Last Post)

  • File sender with content conversion and ignoreRecordsetName

    Him,
    I have an scenario with a compressed file sender with content conversion.
    In my sender cc i have:
    1     AF_Modules/PayloadZipBean     Local Enterprise Bean     unzip
    2     AF_Modules/MessageTransformBean     Local Enterprise Bean     transform
    3     CallSapAdapter     Local Enterprise Bean     2
    In module configuration, I have also added:
    xml.ignoreRecordsetName  --> true
    But RecordsetName is not removed from XML
    Why?
    thanks, in advance
    Carme

    Hi,
    No need to enter anything in module configuration. Just specify following Name-Value pair in the table provided on the Content Conversion tab of your file adapter.
    Add a row with Name = ignoreRecordsetName and Value = true (Both case-sensitive)
    For details, see [this link|http://help.sap.com/saphelp_nw04/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm].
    [some more here|http://www.riyaz.net/blog/index.php/2008/02/20/xipi-file-content-conversion-for-complex-structures/]
    Regards,
    Riyaz

  • FIle Adapter Receiver - Content Conversion

    I have a xml file as below that I am trying to convert to a simple csv file. All I get is a blank csv file at the ouptput. I tried different setting for the file conversion in the reveiver file adapter. No luck yet. I could write to an output XML file with no problem, so my interface is working!
    The SAP Help doesn't provide  much info on this. Your help is highly appreciated.
    Thnaks.
    ?xml version="1.0" encoding="UTF-8" ?>
    - <ns:PlantMaintenanceMessageType xmlns:ns="http://cs.par/demo/plantmaintenance">
      <EquipmentID>10005661</EquipmentID>
      <FunctionalLocation>KB</FunctionalLocation>
      <Date />
      <Time />
      </ns:PlantMaintenanceMessageType>

    What is your root node ?
    For your content conversion you need to specify the Recordset Structure but in your case i dont find an entry for the same.
    If your XML had an extra tag like
    xml version="1.0" encoding="UTF-8" ?>
    - <ns:PlantMaintenanceMessageType xmlns:ns="http://cs.par/demo/plantmaintenance">
    <b><details></b>
    <EquipmentID>10005661</EquipmentID>
    <FunctionalLocation>KB</FunctionalLocation>
    <Date />
    <Time />
    <b></details></b></ns:PlantMaintenanceMessageType>
    then your record set structure wud be details
    and in you content conversion parameters you cud say
    details.fieldSeparator -> ,
    details.endSeparator 'nl'
    I guess you are on sp13 or above hence there even if you content conversion fails a blank file will be created (thats what i have experienced).
    Reagrds,
    ShaBZ

  • Sender File Adapter and content conversion

    Hi,
    How can we remove the last line from the file using content conversion?
    The last line should not be read from the input file.
    Like for the first line we can use Document Offset .......similarly do we have any option for the last line?

    >
    neelansha singh wrote:
    > date                       Empno         Empname
    > 19.03.2009            12345            Neel
    > 20.03.2009             34566           Neelkanth
    > EmpDes                 Japan        100
    >
    >
    > The file is like this first row i have removed using document offset.......from 2nd row till nth row the structure is as shown above and the last row has no. of fields 1 less than all other rows and also its root node is different like shown above its rootnode is EmpDes..........How to use File content conversion for this?
    do you want to avoid the last line i.e
    EmpDes                 Japan        100
    in that case the 3 options are
    1. use a adapter module and remove the last line - this is the ideal option
    2. use a OS script - will work but only if you are using the NFS option in the file adapter instead of FTP
    3. read that also using content conversion (treat it as a trailer) and ignore it during the mapping

  • File Synchronous with Content conversion

    Hi
    I am doing the scenario file-xi-rfc-file basically sysnchronous scenario..if i used the XML file as input its working fine ...but if used he CSV file as a input fle is licking up but i am not getting any response..
    Any one have any idea
    venkat

    HI SV
    follow these links to get step by step
    /people/arpit.seth/blog/2005/06/27/rfc-scenario-using-bpm--starter-kit - File to RFC
    /people/michal.krawczyk2/blog/2005/08/22/xi-maintain-rfc-destinations-centrally - Maintain RFC destination
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/xi/file-rfc-file(Without%2bBPM)
    Weblog to send Response from RFC to File in Asyn Mode Using Proxy [original link is broken]
    /people/arpit.seth/blog/2005/06/27/rfc-scenario-using-bpm--starter-kit
    https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&query=filetorfctofile&adv=false&sortby=cm_rnd_rankvalue
    hope this will solve your problem
    regards
    sandeep
    If helpful kindly reward points

  • Creating a file with  content conversion

    Hi all,
    I have a scenario in XI which i create a file in it,
    I want to create the file with the content conversion option but with no field separator.
    I have an error message - "File adapter receiver channel is not initialized. Unable to proceed: null" if i don't use the fieldSeperator option.
    I don't want to use this option, I want the file to be created without separators.
    Thanks,
    Naama

    Hi Namma,
    Go through very imp blogs:
    File Content prameters for the Receiver Adapter
    http://help.sap.com/saphelp_nw04/helpdata/en/d2/bab440c97f3716e10000000a155106/frameset.htm
    File Content prameters for the Sender Adapter
    http://help.sap.com/saphelp_nw04/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm
    Refer
    File Receiver with Content Conversion
    File Receiver with Content Conversion
    Configuring the Receiver File/FTP Adapter
    http://help.sap.com/saphelp_nw04/helpdata/en/95/bb623c6369f454e10000000a114084/frameset.htm
    File content conversion sites:
    Introduction to simple(File-XI-File)scenario and complete walk through for starters(Part1)
    Introduction to simple (File-XI-File)scenario and complete walk through for starters(Part2)
    File Receiver with Content Conversion
    Content Conversion (Pattern/Random content in input file)
    NAB the TAB (File Adapter)
    Introduction to simple(File-XI-File)scenario and complete walk through for starters(Part1)
    Introduction to simple (File-XI-File)scenario and complete walk through for starters(Part2)
    How to send a flat file with various field lengths and variable substructures to XI 3.0
    Content Conversion (Pattern/Random content in input file)
    NAB the TAB (File Adapter)
    File Content Conversion for Unequal Number of Columns
    Content Conversion ( The Key Field Problem )
    The specified item was not found.
    File Receiver with Content Conversion
    http://help.sap.com/saphelp_nw04/helpdata/en/d2/bab440c97f3716e10000000a155106/content.htm
    Please see the below links for file content conversion..
    The specified item was not found. - FCC
    The specified item was not found. - FCC
    File Content Conversion for Unequal Number of Columns
    File Content Conversion for Unequal Number of Columns - FCC
    Content Conversion (Pattern/Random content in input file)
    Content Conversion (Pattern/Random content in input file) - FCC
    XI Configuration for MDM Integration - Sample Scenario - FCC - MDM
    Thanks,
    Satya Kumar

  • FCC: Problems with content conversion

    Dear all,
    I have a receiver FTP adapter with content conversion. In RWB I'm facing following error message:
    Adapter Framework caught 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 'FCOTUPI')', probably configuration error in file adapter (XML parser error)'
    The field with value FCOTUPI could be found in POS recordset. I double check the length of columns but couldn't find
    an error.
    CC configuration:
    Recordset structure: HEADER,POS,SUBPOS
    HEADER.fieldFixedLengths = 8,4,8
    POS.fieldFixedLengths = 8,20,15,3
    SUBPOS.fieldFixedLengths = 5,5
    HEADER.fixedLengthTooShortHandling = Cut
    POS.fixedLengthTooShortHandling = Cut
    SUBPOS.fixedLengthTooShortHandling = Cut
    As you can see by the names, I am using as XML to convert a structure with subnodes. In documentation it said
    that it is not allowed, but in some threads I found the information that structure could be processed.
    Any ideas how to solve this problem?
    Thanks
    Chris

    Dear Amit,
    thanks for your answer. I already checked this blog, but hoped for other solutions.
    My problem: I tried to map my hierarchical structure to a flat structure.
    Source
    Struc1 (0..unbounded)
    -Item1.1
    -Struc2 (0..unbounded)
    --Item 2.1
    --Struc3 (0..unbounded)
    ---Item3.1
    Target:
    Struc1 (0..unbounded)
    -Item1.1
    Struc2 (0..unbounded)
    -Item 2.1
    Struc3 (0..unbounded)
    -Item3.1
    But if e.g. the Struc2 appears two time it will be created two time in target structure before
    the Struc3 is created. But ths Struc3 belongs to Struc2 and should be created in flat file under
    Struc2 directly.
    How can we created a flat structure like this
    Struc1
    Struc2
    Struc3
    Struc3
    Struc2
    Struc3
    Thanks
    Chris

  • Issue with content conversion in receuver communication channel

    Hi,
    I am trying to configure receiver communication channel with file adapter and content conversion.
    File structure is simple, as shown below:
    MT_EmployeeDetails
         Employee_rec
              Employee_rec_struct
                   EmpNo
                   EmpName
                   Address
    It should have generated file in the following format:
    1101     xxxx     xxxxx
    1102     xxxx     xxxxx
    1103     xxxx     xxxxx
    But it is generating flat file as shown below:
    1101     1102     1103     1104
    Basically it is populating only first field in the target field. But I could see that the xml file is properly getting
    generated in sxmb_moni.Also, when i tried to generate xml file without FCC, it is creating file properly.
    following are the parameters I am using:
    Employee_rec_struct.fielSeparator     '0x09'
    Employee_rec_struct.endSeparator     'nl'
    pls let me know whetehr i need to add any other parameters in FCC.

    Hi,
    Can u please provide with the exact structure of target... i know u have mentioned it already...
    But the hierarchy and occurence is nt clear..
    Like
    Mt
    ---Employee(1)
    Records(0..unbounded)
    Name(1)
    Age(1)
    So that others here,can easily get vt exactly u want and give the solution....
    If ur structure is like..
    MT_EmployeeDetails
    ---Employee_rec
    Employee_rec_struct(0..unbounded)
    EmpNo
    EmpName
    Address
    Then,
    Use,
    Employee_rec_struct.fieldSeparator '\t'
    end separator is optional... by default its new line characcter.. no need of giving....
    U should be giving the recordStructure as  Employee_rec_struct,*
    If still nt solved do post
    Babu

  • How to verify receiver jms scenarios with content conversion

    Hi All,
    I m doing a Content Conversion at receiver JMS Side.
    The jms queue is installed in a Mainframe System. i heard that  messagesa will be showed only in hexadecimal mode in mainframe system.
    So how to verify my scenario?
    Is there any way i can check the content cnversion part?

    Hi,
    Hope these links will help
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/70ffd890-0201-0010-708f-d5dad2dfcf3a
    fine tuning
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/412290ec-0201-0010-0790-dfd946efc5f4
    FCC @ receiver
    File Receiver with Content Conversion
    FCC @ sender
    Content Conversion (Pattern/Random content in input file)
    regards,
    Prashant

  • File sender adapter and content conversion with polish character

    We are loading a csv file with PI 7.0 file sender adapter using "content conversion" - all fields go through EXCEPT a special character hex '208C' (space in front) looks like "Æ" is converted to hex 'C28C'.
    We are using code page UTF8
    We are using:
    enclosuresign "
    enclosuresignescape ""
    fieldcontentformatting nothing
    enclosureconversion NO
    Hope some one can help

    Hi Bohamo,
    Hope you have set the following for your file sender adapter :
    1. Transfer Mode is set to Binary,
    2. File Type Text,
    3. Encoding ISO-8859-1( for Western European Latin ).
    Inorder to recognize Polish Character, try as follows :
    Your sender file after coming into Pi has XML encoding declaration 'UTF-8'.
    Write a simple XSLT mapping to change the value of the attribute "encoding" to "ISO-8859-1" in the output XML of message mapping . Include this XSLT map as the second mapping step in your interface mapping.
    First step in your interface mapping will be your already existing message mapping.
    An example of the XSL code :
    <?xml version='1.0'?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output method='xml' encoding='ISO-8859-1' />
    <xsl:template match="/">
    <xsl:copy-of select="*" />
    </xsl:template>
    </xsl:stylesheet>
    or you can also do java mapping if you are comfortable with java code !
    Cheers,
    Ram.

  • Sender File Adapter with file conversion

    Hi guys,
    I’m using a Sender File adapter with file conversion. The message to be processed has a structure with fixed lengths and in your content are some values that needs to be ignored.
    An example:
    value1  <b>value2</b>  value3…
    I want to ignore <b>value 2</b> but I can’t find a parameter for that! Do I need to define dummy fields on my data type and ignore those fields during mapping? Or there is a specific parameter for that?
    Thanks in advance,
    Ricardo.

    hi,
    there always is another way:)
    you can import the whole line to one field
    and cut it inside the adapter module
    (then you can define start and stop of the substring that you need to use)
    but of course it's not standard even though it's quite easy to achieve in java
    Regards,
    michal
    <a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>

  • File Adapter with Conversion - XML with Hierarchy?

    XI 3.0 (SP9)
    We are using the inbound file adapter with conversion to convert a flat file that has header and line items.  I would have thought that the data type should have been setup something like this:
    <data type>
    <header>
      <item>1</item>
      <item>2</item>
    </header>
    </data type>
    Our flat file looks like this:
    H12345
    I12345
    We have only been able to configure the file adapter to bring in the data like this:
    <data type>
    <header></header>
    <item>1</item>
    <item>2</item>
    </data type>
    What is the proper way to inbound data through a file adapter that has structure conversion like this?
    Do all of the elements get put under the root node, or is there a way to build structure?
    Do we need to build the data type to correspond with the exact way that the data will come in from the file adapter?
    Thanks
    Peter

    Not quite sure what you want to get, as the flatfile and xml structure does not contain the same values.
    However, I will try to give you an example:
    Your flat file looks like this:
    H12345
    I12345
    If the first row is header and the next is a line, then you need to specify the fila adapter with the following:
    Document name = datatype
    Recordset name = recordset
    Recordset structure = header,1,item,*
    Recordsets per message = *
    Recordset sequence = Ascending (need SP10 for this, but you do not need it for this)
    Keyfieldname = id
    header.fieldFixedLengths = 1,5
    header.fieldNames = id,number
    header.keyFieldValue = H
    header.lastFieldsOptional = Yes
    item.fieldFixedLengths = 1,5
    item.fieldNames = id,number
    item.keyFieldValue = H
    item.lastFieldsOptional = Yes
    This will create something like this:
    <datatype>
    <recordset>
    <header>
    <id>H</id>
    <number>12345</number>
    </header>
    <item>
    <id>I</id>
    <number>12345</number>
    </item>
    </recordset>
    </datatype>
    Hoever, if both rows are "item" rows , then you need to specify the file adapter with the following:
    Document name = datatype
    Recordset name = header
    Recordset structure = item,*
    Recordsets per message = *
    Recordset sequence = Ascending (need SP10 for this, but you do not need it for this)
    item.fieldFixedLengths = 1,5
    item.fieldNames = id,number
    item.lastFieldsOptional = Yes
    This will create something like this:
    <datatype>
    <header>
    <item>
    <id>H</id>
    <number>12345</number>
    </item>
    <item>
    <id>I</id>
    <number>12345</number>
    </item>
    </header>
    </datatype>
    Q: Do we need to build the data type to correspond with the exact way that the data will come in from the file adapter?
    A: Yes!
    Good luck!

  • File to IDOC with content conversion

    Hi
    I am trying to do a file content conversion scenario. This is a fixed length file which needs to be converted to idoc.
    I have configured IR and ID (FCC parameters added). While testing the end-end scenario we are able to see that sender adapter has successfully read the message , but we are not able to see any message in SXMB_MONI.
    Please help

    Following is the file structure
    "RecordType HeaderField2 HeaderField3"
    "RecordType LineItem2 LineItem3"
    "RecordType TrailerField2 TrailerField3"
    Following are content conversion Parameters [KeyFieldName -> RecordType]
    HeaderRow.beginSeparator -> '"'
    HeaderRow.fieldFixedLengths -> 10,20,10 (for ex)
    HeaderRow.fieldNames -> RecordType,HeaderField2,HeaderField3
    HeaderRow.keyFieldValue -> 01 (COnstant)
    HeaderRow1.endSeparator -> '"'
    Similar for line item and trailer
    Is there any way to check our input file against the content conversion parameters to make sure that they are correct
    Thanks

  • Using File Adapter with Logical Name

    I am creating a file adapter with Logical name. Apart from giving the Logical name is there any other configuration that I am suppose to do on the Web Logic before I start using it?
    Thanks in Advance.

    After configuring the file adapter, all you need to do is , give the path as a value for the logical name which you have created earlier. That you can do on the file adapter property inspector. There is no need to do anything on the server level. Lemme know
    Thanks,
    N

Maybe you are looking for

  • Username Kerfuffle, why not fix once and for all?

    The issue of people wanting to change their username seems to come up again and again. Perhaps Apple/Jive could deliver a clearer message when people sign up that their username is immortal, so pick something you like. Or better yet, allow people to

  • FCP won't Show/Unhide; Must Force Quit

    Always troubleshooting Studio program errors and here's another one... This just started happening yesterday. I will Cmd+H to hide FCP and am unable to bring the program back up. Right-clicking and selecting "Show" or any of the other options do not

  • Adobe Acrobat 10 inactive in Outlook 2013. Activating it in the COM add-in does not work.

    How do I get a link to adobe on the ribbon and activate Acrobat PDF maker in the COM add-in?

  • File sender content conversion 0..unbounded does not pull file

    i am trying to map a flat file using content conversion to this xml structure: <Header> <Field_ID/> <Filler/> <Record_type/> <File_name/> <File_date/> <File_time/> <Heb_code/> <Claim_no/> <Cont_no/> <Remark/> </Header> <Claim_Header> <Field_ID/> <Fil

  • New MacMini and Mitsubishi WD-65733

    I have just recently purchased a Mitsubishi WD-65733, i hooked my mini up using DVI/HDMI converter and cable to it right when I plugged in the tv and it worked until i adjusted my resolution to the highest settings and now the tv shows no picture. I