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)

Similar Messages

  • 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

  • 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

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

  • Sender File Adapter with file conversion  Multimapping

    Hello all,
    i have to use multimapping with the file sender adapter
    XML for multimapping ist like this
    ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
       <ns0:Message1>
          <ns1:KVNR_Senden_MT xmlns:ns1="urn:lsv.de/SENDER">
             <Inhalt>
                <KE/>
                <VF/>
                <BBNRAB/>
                <BBNREP/>
                <VERNR/>
                <ED/>
                <FEKZ/>
    in File adapter
    DocumentName Messages
    RecordsetName  Inhalt
    Recorset Struc Inhalt,20
    Inhalt.fieldFixedLength 4,5,6.....
    Inhalt.fieldNames        KE,VF,.....
    but were can I generate Message1?????
    any Hints?
    regards
    ralf

    sorry but the message tags will not be add dynamically
    i have change an existing message mapping 1:1 with file content conversion
    into a multimapping.
    by changing into multimapping the message was surrounded with
    <ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
       <ns0:Message1>.......
    no changing in File Adapter an in the IE there was an error
    com.sap.aii.utilxi.misc.api.BaseRuntimeException geworfen: RuntimeException in Message-Mapping transformatio~.
    if i added the stuct
    <ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
       <ns0:Message1>.......
    by hand and it works???
    so i think i had to add
    <ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
       <ns0:Message1>.......
    to the file content conversion but i don't know how to do it???
    Ralf

  • 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 Mail Adapter with SAP Conversion agent

    have some1 used SAP conversion agent on attchment from XI Sender Mail adapter?
    it seems to ignore the attchment of the e-mail
    the sender configuration module tab is as follows :
    1.localejbs/AF_Modules/PayloadSwapBean transform
    2.localejbs/sap.com/com.sap.nw.cm.xi/CMTransformBean CM
    3.sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBean mail
    The paramters are
    transform swap.keyName Content-Disposition
    transform swap.keyName Content-Description
    transform swap.keyValue attachment
    transform swap.keyValue codeco
    CM TransformationName ZIM_CODECO_VALIDATIONS
    The Convesion Agnet runs prefectly when using the Conversion Agent engine
    thx,Shai Rosenzweig

    check with tis may helpful for you
    http://help.sap.com/saphelp_nw04/helpdata/en/43/4c38c4cf105f85e10000000a1553f6/frameset.htm
    Regds
    Abhishek

  • Sender File adapter with nested structure

    friends,
    Source structure is looks like below
    <mt_details>
    <header>
       <key> </key>
       <id > </id>
       <name> </name>
       <contact>    
          <key> </key>
          <pno> </pno>
       </contact>
    </header>
    </mt_details>
    If both the nodes i.e <header>&<contact> are at same level then the sender adapter picking the file as requried.But in this case the <contact> node is subnode of <header> Please help how in configuring the sender file adpter(Fixed file).
    Sample file :
    HDRE100testname
    PHO999999999
    Ravi Pal

    Hi Ravi,
    I dont think this is possible, Just read the following link,
    http://help.sap.com/saphelp_nw04/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm
    and the content under FILE STRUCUTRE says,
    <i>The structure of these substructures must be fixed and corresponds to the description of the row structure logic in the table below.</i>
    The strcuture that you want is not supported.
    Regards,
    Bhavesh

  • Sender file adapter with FCC not creating last field

    Hi,
    I've got the following file:
    field1;field2;field3
    FCC is the following:
    Recordset streucture: ITEM,*
    ITEM.fieldSeparator     ;
    ITEM.endSeparator     'nl'
    ITEM.fieldNames FIELD1,FIELD2,FIELD3
    ignoreRecordsetName     true
    I expect to generate the following XML:
    <FIELD1>field1</FIELD1>
    <FIELD2>field2</FIELD2>
    <FIELD3>field3</FIELD3>
    That's working OK. The problem is when I receive a file with the FIELD3 empty. Example:
    field1;;
    I expect:
    <FIELD1>field1</FIELD1>
    </FIELD2>
    </FIELD3>
    But I get:
    <FIELD1>field1</FIELD1>
    </FIELD2>
    And this raises an error during the mapping because the FIELD3 is mandatory in the Data Type definition, even it's empty

    I expect:
    <FIELD1>field1</FIELD1>
    </FIELD2>
    </FIELD3>
    But I get:
    <FIELD1>field1</FIELD1>
    </FIELD2>
    use a mapwithdefault in your mapping so that it will always create an empty node if there was no value to be mapped to the target field.

  • 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

  • Sender File Adapter. Fixed Lengths and Field Separator

    Hello guys,
    I have a doubt in Sender File Adapter with Content Conversion.
    I have a text file like:
    a,b,c,,e
    I have the configuration in the adapter:
    Register.fieldNames: a,b,c,d,e
    Register.fieldSeparator: ,
    The question I have is can I format the length of the text when i create the XML?
    I woul like to create the XML like:
    <Row>
      <Register>
        <a>a   </a>
        <a>b  </a>
        <a>c  </a>
        <a>   </a>
        <a>e   </a>
      </Register>
    </Row>
    I would like that when I create the file in Field A I have length = 4, but I have only 1 in the entry, and I want to fill the rest of the length with spaces.
    I tried with FieldFixedLengths but when I test it the fields are not being formatted and take the commas as part of the field.
    I know that this can be done in Receiver File Adapter, you leave for example one field of 5 length and you format it to 12 length with spaces.
    Is this possible for Sender File ADapter?
    Many thanks.
    Regards,
    Xavi.

    hi,
    See the example given in this bog, in this blog the string has been splited into different fields as per the field length, so you may use the same concept to get your output.
    /people/anish.abraham2/blog/2005/06/08/content-conversion-patternrandom-content-in-input-file
    I hope it helps you.
    Regards,
    Sarvesh

  • Sender file adapter missingLastFields Parameter

    hi all,
    i have a wierd problem...
    i use a sender file adapter with content conversion to read the data of a file.
    all is fine until he get to a record when the last couple of fields are not in the file (and it's ok that they don't appear). i want the adapter to put no data in the last couple of fields but convert them to the XML tags.
    i am using the parameters: missingLastFields and keepIncompleteFields to keep the fields although they don't appear in the file.
    the parameters i am using are these:
    SA140.fieldNames:
    ActionCode,UpdateType,IDNumber,Filler1,RecordCode,Filler2,ExteriorColour1,Filler3,ExteriorColour2,Filler4,ExteriorColour3,Filler5,ExteriorColour4,Filler6,ExteriorColour5,Filler7,ColourArea1,Filler8,ColourArea2,Filler9,ColourArea3,Filler10,ColourArea4,Filler11,ColourArea5,Filler12,TireCode1,Filler13,TireCode2,Filler14,TireCode3,Filler15,TireCode4,Filler16,TireCode5
    SA140.fieldFixedLengths:
    2,2,10,4,3,41,5,1,5,1,5,1,5,1,5,1,2,1,2,1,2,1,2,1,2,1,6,10,6,10,6,10,6,10,6
    SA140.keyFieldValue:
    140
    SA140.missingLastFields:
    Ignore (i used the parameter "add" too and it still didn't work)
    SA140.keepIncompleteFieids
    true
    the row i am trying to read is:
    024018837002186 21140         1799    KW16    RW17    1010    9147                                         F18L19     7503 F18L19     7502 F18K27     7508
    as you see a couple of the last fields are showing in the text.
    could you please tell what am i doing wrong?
    maybe there is another parameter i missed?
    regards,
    roi grosfeld

    sorry but it still doesn't work...
    i am getting the same error:
    Conversion of file content to XML failed at position 0: java.lang.Exception: ERROR converting document line no. 5 according to structure 'SA140':java.lang.Exception: Consistency error: last field in structure 'SA140.' is incomplete - specify 'keepIncompleteFields' parameter accordingly to allow this
    regards,
    roi grosfeld

  • Module processing inside Sender File Adapter

    Hello,
    I am trying to analyze whether I can create a specialized module inside Sender File Adapter. As of right now, the Sender File Adapter and Receiver as well, assume endSeparator character in the end of each record. For files that do not have this field, it is just on continuous string, I assumed I can create an
         adapter module
         call it BEFORE data in the file is being converted to XML format
         Insert 'nl' character (since the record length is fixed)
         Call regular adapter processing (converting to/from XML)
        However, creating any module inside Sender File Adapter, the payload of the main document is already in XML format. Is there anyway to avoid it?
       Thanks for your help,
             Dmitriy Mindich

    It is not possible with the standard functionality.
    So maintain the sender file adapter with no conversion, but in the module tab enter following modules:
    1. Your module
    2. The conversion module (*)
    3. The standard module.
    (*) for details look here:
    Look here:
    http://service.sap.com/nw-howtoguides
    -> Exchange Infrastructure
    -> How To Use the Content Conversion Module in JMS Adapter
    Regards
    Stefan

  • File Adapter - File Content Conversion to XML last element missing

    I'm using the SAP File Adapter with File Content Conversion to convert | (pipe) delimited records into XML.
    When the last field is blank, I would expect that an empty node gets created, however, the node doesn't get created at all.
    For example given these settings...
    Record.fieldSeparator = |
    Record.endSeparator = 'nl'
    Record.fieldNames = FIELD1,FIELD2,FIELD3
    Using this three record file as my data...
    |123|XYZ
    ABC||XYZ
    ABC|123|
    When converted to XML, this is what the recordset XML structure looks like...
    <Recordset>
    <Record>
    <FIELD1 />
    <FIELD2>123</FIELD2>
    <FIELD3>XYZ</FIELD3>
    </Record>
    <Record>
    <FIELD1>ABC</FIELD1>
    <FIELD2 />
    <FIELD3>XYZ</FIELD3>
    </Record>
    <Record>
    <FIELD1>ABC</FIELD1>
    <FIELD2>123</FIELD2>
    </Record>
    </Recordset>
    Notice that the last record is missing the "FIELD3" element.
    Edited by: William Krick on Jun 17, 2011 4:49 PM

    Giuseppe Agnello wrote:
    > Sorry, there was a typo in the parameter name.
    > Word fields should start with capital F.
    > Try with Record.missingLastFields, with value "add"
    >
    > http://help.sap.com/saphelp_nw70/helpdata/en/ae/d03341771b4c0de10000000a1550b0/frameset.htm
    >
    > Similar issue was resolved with same parameter in this thread:
    > Sender file adapter with FCC not creating last field
    That did the trick.  It was a typo.  Thanks Giuseppe.
    I'm willing to bet that this parameter was added to fix the parsing bug without breaking existing users that had already worked around the original bug.   You shouldn't really have to special case the last field.

  • 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

Maybe you are looking for

  • Access AFP, email, Remote Desktop via VPN and local network but NOT web

    How can I do this? Right now I can set up all these services where I can access them via VPN only, but not on the local network or via the web. If I want to access them via the local network I have to open up the ports in the firewall, however this o

  • 300 GB of hard drive + Time Machine = 12.69 GB of space???  uh..oops

    I am not sure, but I just suddenly realized that I have only 12.69 GB of hard drive left on a large hard drive. I clicked on Time Machine and saw that it was ON but I don't have an external hard drive set to it. If Time Machine is ON and there is no

  • Airplay Mirroring issues on Macbook Pro

    I have a late 2011 model MacBook Pro and I am trying to connect Airplay mirroring. However, the option is not showing up in my system preferences. What is wrong?

  • Login as sys delay

    Dear all, Oracle 11g on sun solaris 10 Login as sqlplus sys/oracle as sysdba takes a lot of time to login where as normal users can be able to login immediately including user system.Please atleast give me a hint to troubleshoot this. Kai

  • "Dynamic Declaration/Variable"

    Hi, first sorry for my bad english :) I have a Problem with Forms Builder 6 I want to know if it possible to set dynamic declarations inside a loop loop_i := 1; WHILE loop_i < 10 LOOP go_item('GERAET' || to_char(loop_i) || '.Beginn'); --Geraet1.Begin