Content conversion Vs  Module (MessageTransformBean) - help?

Hi All,
Scenario- File Sender, reading file (header,data,*,trailer)
when should we use standard content conversion, Module (MessageTransformBean) ?
I need to generate complex XML structure from flat-file records.
Source (using some key value to identify header/data/trailer)
header
data-record
data-record
trailer
Target (nested structe - not sure how to do nested part using content conversion)
<message_mt>
<record>
<header>
   <key>
   <info>
       <key1/>
        <key2/>
   </info>
</header>
<partner>
   <parvw/>
    <par1/>
</partner>
<line-ite>
  .. details ..
</line-item>
</record>
<message_mt>
I looked at all the logs related to this, how-to docs as well, no where mentioned how to create nested structures, most of them are flat structure
Can anyone advise me how to do this and when should i use content coversion, module and why?
Appreciate any help.
Thanks
Message was edited by: kumar p
Message was edited by: kumar p

The content conversion in file adapter and module 'MessageTransformBean' are similar. Therefore you use the module in file adapter only, when you want to write an adapter module which works on the plain text structure before the conversion. Mostly you use the 'MessageTransformBean' in other adapters like JMS- or Mail adapter, where no content conversion is possible by default.
The content conversion is not able to create a nested structure. You have to create a flat structure first, then create a nested structure with mapping.
Regards
Stefan

Similar Messages

  • JMS content conversion adapter module

    Hi All,
    In JMS Content conversion module Xml2Plain how do u put two new lines 'nl'.
    I am using localejbs/AF_Modules/MessageTransformBean in adapter module.
    If I put xml.record.fieldSeparator in parameter name and in parameter value if I put one 'nl' it gives me one new line. Now I require two new lines in my output text so I put 'nl' 'nl' in parameter value but it takes only one new line.
    e.g
    Vivek
    mumbai
    India
    John
    Delhi
    India
    Now I want the output as:
    Vivek
    mumbai
    India
    John
    Delhi
    India
    Thanks in advance.
    ravijeet

    try,
    xml.record.fieldSeparator '0x0D''0x0D'
    or
    xml.record.fieldSeparator '0x0A''0x0A'

  • Change of Content-Type with Module MessageTransformBean

    Hello,
    I am looking at an efficient way of changing the content-type of a received message (e.g. from application/xml to text/xml) by using the module MessageTransformBean.
    I know it would be possible with Java Mapping, but if possible I want to avoid that and use a standard module.
    I was thinking of using the parameter Transform.ContentType, however the problem is that the parameter xml.conversionType
    has to be set too. I do not want to change the message format from flat to XML but just want to change the content type.
    Is there any way to achieve with this standard module (maybe by using a dummy value for the xml.conversionType parameter)?
    Thank you for your input!

    Hi,
    If you are using the SOAP receiver adapter, you can change the content type by these configuration parameters:
    Module Configuration Parameter         HTTP Header Entry                   Example
    XMBWS.XMLEncoding                        Content-Type charset               iso-8859-1
    XMBWS.TransferEncoding                 Content-Transfer-Encoding      base64
    without the need for an additional module in the chain.
    Hope this helps.
    Regards,
    S. Gokhan Topcu

  • File Content Conversion in Receiver Adapter Help

    Hi,
    I need to have a flat file at receiver side with the following structure.
    Product
    LineItem
    Notes
    Product
    LineItem
    Notes
    But i am getting as
    Product
    Product
    LineItem
    Notes
    Notes
    Please suggest me the changes to be made in File Content Conversion Parameter
    Your Help will be appreciated.
    Thanks in advance,
    Ashok

    Singh,
    I think we wont give field names in the receiver file adapter. Please find the details below:
    RecordSet Structure: Product,LineItem,Notes.....
    Parameters:
    Product.fieldFixedLengths:30,10...
    Product.endSeparator:'nl'
    LineItem.fieldFixedLengths:30,10..
    LineItem.endSeparator:'nl'
    Notes.fieldFixedLengths:30,10...
    Notes.endSeparator: 'nl'
    Thanks
    Ashok

  • Module processor enhancement with file content conversion

    Hi All,
      I have a bean (module processor) that converts the a PDF doc to text. I need to use the same bean with file content conversion. Module processor processing sequence is as follows:
    1) My Bean: localejbs/myBean
    2) Default: localejbs/CallSapAdapter (Bean for file content conversion).
    When I tried the same (myBean + File adapter with file content conversion) , it was not working as expected. But the same bean works fine with normal file adapter (myBean + File adapter without file content conversion).
    Couldn't figure out the reason. Please help.
    Regards,
    Ajay.

    As the content conversion of the file adapter is done before calling the customer module, it is not possible to use both.
    As workaround you can do the file content conversion with help of the MessageTransformBean. In the module chain you put the MessageTransformBean after your module.
    Note that the configuration of the MessageTransformBean has to be done like the J2SE sender file adapter:
    http://help.sap.com/saphelp_nw04/helpdata/en/0d/00453c91f37151e10000000a11402f/frameset.htm
    You find an example here:
    https://websmp206.sap-ag.de/~sapdownload/011000358700001186732005E/HowToConveModuleJMS.pdf
    Regards
    Stefan

  • Problem with file content conversion for multiple substrcture. Please help!

    Hi Experts,
       I am using file content conversion in file sender communication channel. The input file is a flat file with data like this:
       A01 AA8I0NBVDA      20090704     84900
       A02 AA8I0NBVDA      20090704     84900
       A03 AA8I0NBVDA      20090704     84900
       I want the data in sender side after content conversion to be like this:
      <ns:Receive_Schedules xmlns:ns="http://mynamespace">
         <ScheduleData>
              <line>A01 AA8I0NBVDA      20090704     84900</line>
              <line>A02 AA8I0NBVDA      20090704     84900</line>
              <line>A03 AA8I0NBVDA      20090704     84900</line>
         </ScheduleData>
    </ns:Receive_Schedules>
    I have tried many options in file content conversion but getting the data like this:
    <ns:Receive_Schedules xmlns:ns="http://mynamespace">
         <ScheduleData>
              <line>A01 AA8I0NBVDA      20090704     84900</line>
         </ScheduleData>
           <ScheduleData>
              <line>A02 AA8I0NBVDA      20090704     84900</line>
           </ScheduleData>
           <ScheduleData>
              <line>A03 AA8I0NBVDA      20090704     84900</line>
           </ScheduleData>
    </ns:Receive_Schedules>
    Following are the settings/properties have configured in content conversion:
    Document Name     Receive_Schedules
    Document namespace     http://mynamespace
    Document Offset     <no value>
    Recordset Name     <no value>
    Recordset namespace     <no value>
    Recordset structure     ScheduleData,*
    Recordset sequence     Ascending
    Recordsets per message     1
    Key field Name     <no value>
    Key Field Type     String
    ignoreRecordsetName     true
    ScheduleData.endSeparator     'nl'
    ScheduleData.fieldNames              line
    ScheduleData.fieldSeparator     'nl'
    How to get the desired message? What changes I need to do in content conversion settings? Please help!
    thanks
    Gopal
    Edited by: GOPAL BALIGA on Jul 1, 2009 12:11 PM

    Hi Ranjan,
      My structure is like what you ahve defined.
      scheduledata...1.1
    ...line....0...Unbound
      I also tried the parameters you gave but still getting the same.
      <ns:Receive_Schedules xmlns:ns="http://mynamespace">
    <ScheduleData>
    <line>A01 AA8I0NBVDA 20090704 84900</line>
    </ScheduleData>
    <ScheduleData>
    <line>A02 AA8I0NBVDA 20090704 84900</line>
    </ScheduleData>
    <ScheduleData>
    <line>A03 AA8I0NBVDA 20090704 84900</line>
    </ScheduleData>
    </ns:Receive_Schedules>
    Following are the settings/properties have configured in content conversion:
    Recordset structure ScheduleData,*   -
    > Is the value correct?
    Recordset sequence Ascending  -
    > Is the value correct?
    Recordsets per message 1  -
    > Is the value correct?
    ignoreRecordsetName true
    ScheduleData.fieldSeparator nl
    ScheduleData.fieldNames line
    ScheduleData.endSeparator nl
    Edited by: GOPAL BALIGA on Jul 2, 2009 5:28 AM

  • IMAP Sender channel, Content Conversion Module , target XSD structure issue

    Hi,
    I'm using the content conversion adapter module in my IMAP senderchannel , to transform a flat file into a IDOC ORDERS05 structure.
    I have some difficulties generating the right structure... how can I make a more deep structure ?
    My output is like this. All created segment is on the same level.
    <ORDERS05>
        <IDOC>
            <E1EDK01>
            <E1EDK03>
            <E1EDKA1>
            <E1EDK02>
            <E1EDKT1>
            <E1EDKT2>
            <E1EDKT2>
            <E1EDKT1>
            <E1EDKT2>
            <E1EDKT2>
        <IDOC>
    </ORDERS05>
    Here the E1EDKT2 should be a "level under" or "sub structure" to E1EDKT1, and not on the same level !
    The wanted result:
    <ORDERS05>
        <IDOC>
            <E1EDK01>
            <E1EDK03>
            <E1EDKA1>
            <E1EDK02>
            <E1EDKT1>
                <E1EDKT2>
                <E1EDKT2>
            <E1EDKT1>
                <E1EDKT2>
                <E1EDKT2>
        <IDOC>
    </ORDERS05>
    How can I solve this ????

    Hi,
    you can do it on adapter level too:
    but you cannot do it in standard content conversion I guess
    (if it has more then 2 levels)
    check this how you can do it:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/482aae19-0301-0010-3485-8efd618818d0
    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>

  • Receiver File content conversion - NO Output

    Hi, yesterday i posted already to this topic but i chose to make a new thread.
    I have an IDoc2File Scenario where i put the generated File to the filesystem of the XI-Server.
    I try to do a file content conversion at the receiver side. I already read several blogs and also the official documentation (which is kind of bad - because the arne't posted all supported parameters which could be used on the recordset)
    But anyway, the is a txt file written but without any details inside, no data is deliverd.
    I do a message mapping and try to put only some data to the end-file.
    here is my MT which i try to convert:
    MT_Tafel
    ++TafelRecordset
    +++TafelDetailsStructure
    ++++TAFIST
    ++++TAFSOLL
    My parameters at the receiver communication channel are:
    Recordset: TafelDetailsStructure
    TafelDetailsStructure.endSeparator = 'nl'
    TafelDetailsStructure.addHeader = 0
    TafelDetailsStructure.fieldSeparator = ,
    I have the right message protocol, i am trying to write a simple text file, i have no file-coding like ASCII, file is directly written into an empty one - and that's all.
    The file is written but without data inside.
    Do i have to announce the filednames i want to write? Like TafelDetailsStructure.fieldNames??
    Do i have to add Parameters concerning the tags on the higher level, like TafelRecordset?
    Is there a general overview about all parameters you can use on this file content conversion?
    Can anybody help me with my scenario - i have no clue what i have done wrong. Communcation channel says everthing is fine, message succesfully transfered.
    best regards, Jens

    hi,
    you need to mention the names of the field by
    TafelDetailsStructure.fieldNames where u need to specify the filed names.
    and also chk the similar thread
    content conversion
    plsz check the blog
    /people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion
    check this like below,
    http://help.sap.com/saphelp_nw04/helpdata/en/d2/bab440c97f3716e10000000a155106/content.htm
    hope this helps,
    kvr
    Message was edited by:
            PrasadBabu Koribilli

  • Content Conversion module in JMS Adapter - MessageTransformBean

    Hi All,
    We are using Content Conversion module using MessageTransformBean in JMS adapter to read a flat file from MQ Queue.It works fine and the file is getting picked and successfully converted into a xml structure in XI.
    The flat file is multiple line file with each line as one xml record.But the xml structure after conversion has only one record in it.So we end up getting multiple messages each with one record instead of ONE xml structure with multiple records in it.
    Could I know why I am not getting multiple records in one xml structure as expected.
    Do I need to change  xml.structureTitle as  MyTitle,* or should I put something endSeparator like we do in File Content Conversion.
    Any Help appreciated.
    Thanks,
    V
    Edited by: CollinsV on Aug 9, 2010 6:28 AM
    Edited by: CollinsV on Aug 9, 2010 6:36 AM
    Edited by: CollinsV on Aug 9, 2010 6:38 AM
    Edited by: CollinsV on Aug 9, 2010 6:39 AM
    Edited by: CollinsV on Aug 9, 2010 6:56 AM

    Thanks Shabarish .I did follow the same document , but the xml is not converted as multiple records in it .we are getting only one xml message for each record in the file .
    The xml structure we are getting :
    <ns:MyDocument xmlns:ns="http://xi.com/test">
    <MyTitle>
    <field-name1>111</field-name1>
    <field-name2>222</field-name2>
    <field-name3>333</field-name3>
    </MyTitle>
    </ns:MyDocument>
    We need onle one xml message instead as below.
    <ns:MyDocument xmlns:ns="http://xi.com/test">
    <MyTitle>
    <field-name1>AAA</field-name1>
    <field-name2>BBB</field-name2>
    <field-name3>CCC</field-name3>
    </MyTitle>
    <MyTitle>
    <field-name1>111</field-name1>
    <field-name2>222</field-name2>
    <field-name3>333</field-name3>
    </MyTitle>
    </ns:MyDocument>
    Any Help ...
    Thanks
    V

  • Complex XML to Plain in JMS adapter "Content conversion module"

    Hi!
    I have read the document on "How To… use the content conversion module with XI3.0 J2EE JMS Adapter", and it says only SimpleXML can be converted in the receiver channel.
    I had hoped for a solution at least as good as in the File/ftp adapter, where complex XML can be transformed to files.
    Are there plans to include complex XML conversion in the JMS adapter?
    I can not use the file adapter as I need to change the file name and destination, and that can not be done by adding own module to its single module.
    Any idea how I can achieve what I want?
    To only way I can find, is to create a file using the file/ftp adapter, and then pick it up again and treat all the lines as the same structure (one row = one xml field). Then output this new xml message to file, using the JMS adapter and add any modules with name and destination determination.
    Appreciate any help!
    Regards,
    Oeystein Emhjellen

    Hello,
    Have you tried to use an XSLT mapping within the IE?
    I have, at one customer site, created a XSLT message mapping which converts the  XML to a fixed length ASCII file format. I than added the XSLT message mapping as a second mapping step on the interface mapping.
    In this case I was able to publish a fairly complex fixed length file format to MQ Series via the JMS adapter.
    /Johan

  • JMS Content Conversion wtih MessageTransformBean

    Hi
    I'm doing a content conversion in a MQSeries Receiver Channel using the MessageTransformBean. The adpater logs say that the bean has been processed and that the message has been transformed successfully. However, when I look on the queue and in the adapter message content I still see the original xml message. Any one have an idea what the problem could be? We are on XI 7.0 SP11
    Thanks
    Tim

    Tim,
    you can use MessageTransformBean module in file adapter.
    Just add the module in the module tab.
    Regards,
    Henrique.

  • File Sender Content Conversion: Help needed

    Hello Experts,
    i need help with file sender content conversion:
    i have a file which looks like this:
    12329460  24.01.09/07:01  167     Y010122851  136086  43300007            E70115  1L2_96_1
    12329660  25.01.09/07:02  157     Y010122851  136086  43390007            E711J5  1L2_96_1
    as you can see 8 fields, separated with whitespaces
    and i want and xml file which looks like this:
    <DT_DATA_FILESENDER>
      <Recordset>
          <Data> 
            <field1>12329460</field1>
            <field2>24.01.09/07:01</field2>
            <field3>167</field3>    
            <field4>Y010122851</field4> 
            <field5>136086</field5> 
            <field6>43300007</field6>
            <field7>E70115</field7> 
            <field8>1L2_96_1</field8
         </Data>
          <Data> 
            <field1>12329660</field1>
            <field2>25.01.09/07:02</field2>
            <field3>157</field3>    
            <field4>Y010122851</field4> 
            <field5>136086</field5> 
            <field6>43390007</field6>
            <field7>E711J5</field7> 
            <field8>1L2_96_1</field8
         </Data>
      </Recordset>
    Would you please let me know how the datatype has to look like?
    And especially how the FCC has to be configured for this scenario?
    Thanks in advance,
    Chris

    > With fixed lengths i get it working,
    >
    > but with de fieldseparator 0X09 it does not work,
    > would you please tell me the complete FCC config not only the fieldSeparation line?
    Well Christian,
    There is one thing, eithere you can use fieldSeparator or fieldFixedLengths you can not use both together. So in your case do not use fieldSeparator.
    The complete FCC is almost same as given in the blog in my previous reply. See the final output in that blog and create your data type accordingly. e.g.
    Recordset
    ------Item 0...unbound
    --------Field1 0..1
    --------Field2 0..1
    --------Field3 0..1
    --------Field8 0..1
    Regards,
    Sarvesh

  • Need Help in Sender File Content Conversion

    Hi All,
    I request your expert advice on Sender File content Conversion. I need to process the below pasted file. I was able to achieve this by keeping a offset of 6 in Sender PI File Adapter (PI 7.1) to ignore first 6 lines and used a Unix script to remove last line"END OF REPORT".
    Now my new requirement is I need to capture the date "DECEMBER 2009" from line 3. How can I do this. I have set offset as 6 so Adapter will start processing from line 7. If I don't set offset Interface fails. Please suggest. Thank you.
    ABC LAB            XYZ LIMITED"
                       TRIAL BALANCE"
                       FOR THE PERIOD ENDED DECEMBER 2009"
    "TEST Bank","101000",-1589365.58,0.00,738295.08,0.00
    "TEST Bank Clearing A/c","101200",0.00,0.00,14848018.55,0.00
    "TEST Bank Sweeps","101250",104315957.19,0.00,7571985482.08,0.00
    "TEST Receipts","101260",0.00,0.00,19788596.15,0.00
    "TEST Corporate Deposits","101270",-7776629.87,0.00,-135914980.50,0.00
    "SHARES","00SH",0.00,0.00,-7869890086.22,0.00
    "END OF REPORT"

    Dear Phani,
    Please go through the below blogs:
    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
    Please see the below links for file content conversion..
    /people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter - FCC
    /people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter - FCC
    File Content Conversion for Unequal Number of Columns
    /people/jeyakumar.muthu2/blog/2005/11/29/file-content-conversion-for-unequal-number-of-columns - FCC
    Thanks,
    Satya

  • Java Mapping Or Adapter Module for MultiLevel File Content Conversion ??

    Hi Experts,
    Hi All,
    As we all know file content conversion cannot parse more than three level even if we use FCC paramenters or MessageTransform Bean /StrictXmlToPlain Bean.
    Currently i am facing an scenario where i can expect an content coversion with four or five levels.
    for ex.
    Target Message Looks like
    Header(0..1)
           |_____X
           |_____Y
           |_____Detail(0.n)
                 |____A
                 |____B
                 |____SubDetail(0.n)
                        |_____Trailer(0.n)
                                |______rec1
                                |______rec2
                                |______rec3(0..n)
                                       |______Subrec1
                                       |______Subrec2
    So my question how can i do the FixedLength/CSV in the target system ???
    Shall i do java mapping ? if yes then any code example relevant to this type of scenario
    Shall i do adapter module development ?if yes then any code example relevant to this type of scenario
    Thanks In Advance
    Ronit Mishra

    Target Message Looks like
    Header(0..1)----
    Level 1
           |_____X
           |_____Y
           |_____Detail(0.n)----
    Level 2
                 |____A
                 |____B
                 |____SubDetail(0.n)----
    Level 3
                        |_____Trailer(0.n)----
    Level 4
                                |______rec1
                                |______rec2
                                |______rec3(0..n)----
    Level 5
                                       |______Subrec1
                                       |______Subrec2

  • File Content Conversion help

    Input file is Excel file. Should I need to convert this using the File Content Conversion(File Sender), if so can anyone pls explain me how????
    thank you

    Hi,
    This Will help you,
    1) With JAVA Mapping  we can Achieve 
    /people/rahul.nawale2/blog/2006/07/18/java-mapping-an-alternate-way-of-reading-a-csv-file
    ( go thru the Below  lines  in the Blog )
    http://help.sap.com/saphelp_nw04/helpdata/en/1f/0e3237e5875249e10000009b38f936/frameset.htm
    Page 37
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/da1e7c16-0c01-0010-278a-eaed5eae5a5f
    /people/gregor.wolf3/blog/2006/09/01/excel-to-csv-conversion-with-a-php-web-service
    Regards
    Agasthuri Doss

Maybe you are looking for