MessageTransformBean in sender JMS Adapter flat file to xml conversion

Hi All,
The scenario is MQ (Flat File )  --->PI -
>Idoc
The flat file structure is
112233
AABBCC
The expected XML Structure after using MessageTransformBean in the sender JMS adapter  is
<Record>
<Row>
<f1>11</f1>
<f2>22</f2>
<f3>33</f3>
</Row>
<Row>
<f1>AA</f1>
<f2>BB</f2>
<f3>CC</f3>
</Row>
</Record>
But I am getting 2 SEPARATE xml messages each with only one Row in it like the following
1st XML:
<Record>
<Row>
<f1>11</f1>
<f2>22</f2>
<f3>33</f3>
</Row>
</Record>
2nd XML:
<Record>
<Row>
<f1>AA</f1>
<f2>BB</f2>
<f3>CC</f3>
</Row>
</Record>
I would like to have one xml message with all rows in it.It seems the MessageTransformBean is not recognizing the end of line in the flat file.Do i need to use endSeparator explicitly.
I followed the "How to use Content Conversion in JMS Adapter " and configured the adapter,still no luck..
Any Help greatly Appreciated
Thanks,
C

Hi Chirag,
The parameter name sequence changes alphabetically by itself when I save and activate it eventhough I enter as it is in the document.How to stop changing this sequence or put it the order as required in the Module Processor.
Currently my sequence is
Transform.Class
Transform.ContentType
xml.conversionType
xml.documentName
xml.documentNamespace
xml.fieldFixedLengths
xml.fieldNames
xml.processFieldNames
xml.structureTitle
Let me know how to change the sequence ,if that is the issue.
Thanks,
C

Similar Messages

  • Flat files to XML conversion module?

    Hi Experts,
    I would like to know from where I can have free download for flat files to XML conversion module which I can test in development server. Your help will be well appreciated.
    Thanks and Regards,
    Praveen.

    u have file adapter with FCC which does the flat file to XML conversion. wat is ur requirement?
    refer the help or search on SDN for file content conversion.
    http://help.sap.com/saphelp_nw04/helpdata/en/e3/94007075cae04f930cc4c034e411e1/frameset.htm
    few examples:-
    Introduction to simple(File-XI-File)scenario and complete walk through for starters(Part1)
    Key value:
    How to send a flat file with various field lengths and variable substructures to XI 3.0
    File Receiver with Content Conversion
    chirag

  • Error in Flat File to XML conversion

    Hi all,
    I am trying to convert a flat file to XML using the Sender File Adapter and I am getting the following error message.
    2006-01-23 17:23:00 EST: Error: Conversion of complete file content to XML format failed around position 0: Exception: ERROR converting document line no. 2 according to structure 'GL_FileUpload_SAPECC_Header_DT1':java.lang.Exception: ERROR in configuration: more elements in file csv structure than field names specified!
    My flat file looks like this,
    --Start
    GL,GLI,1,RefTest,4011,Test,1234567890,12032005,12032005,GL,RK
    GL,GLI,4011,3011,,,,,,AU,600,7000,8000,9000,5000,RK,,,,,,,,,,,,,,,,,,,,
    ---End
    The adapter configuration is like this:
    Document Name: GL_FileUpload_SAPECC_Item_MT1
    Document Namespace: urn:corptech.qld.gov.au:sss_std_offering:gl
    RecordSet Name: GL_FileUpload_SAPECC_Record_DT1
    RecordSet Namespace: urn:corptech.qld.gov.au:sss_std_offering:gl
    RecordSet Structure: GL_FileUpload_SAPECC_Header_DT1,1,GL_FileUpload_SAPECC_Item_DT1,*
    RecordSet Sequence: Ascending
    Key FieldName: TransType
    On the Adapter Properties, I have got:
    --Start
    GL_FileUpload_SAPECC_Header_DT1.fieldNames: TransType,RowType,SequenceNo,ReferenceKey,SenderSystem,HeaderText,CompanyCode,DocumentDate,PostingDate,DocumentType,ReferenceNo
    GL_FileUpload_SAPECC_Header_DT1.fieldSeparator: ,
    GL_FileUpload_SAPECC_Item_DT1.fieldNames: TransType,RowType,SequenceNo,GLAccount,CostCentre,ProfitCentre,InternalOrder,WBSElement,TaxCode,Currency,GLAmount,VendorAmount,CustomerAmount,AssetAmount,DRCR,ItemText,VendorNo,CustomerNo,Name,Street,City,PostCode,PoBox,State,Country,BankKey,BankAccount,BankCountry,CalcTax,PaymentTerms,BaseDate,PaymentBlock,PaymentMethod,Assignment,AssetNo,AssetSubNo,AssetTransaction
    GL_FileUpload_SAPECC_Item_DT1.fieldSeparator: ,
    ignoreRecordsetName: true
    GL_FileUpload_SAPECC_Header_DT1.keyFieldValue: GL
    GL_FileUpload_SAPECC_Item_DT1.keyFieldValue: GL
    ---End
    The structure defined on the data type looks like this,
    --Start
    GL_FileUpload_SAPECC_Record_DT1   Complex Type
       GL_FileUpload_SAPECC_Header_DT1  Element
          TransType                     Element
          RowType                       Element
          Sequence Number               Element
        GL_FileUpload_SAPECC_Item_DT1   Element
          TransType                     Element
          RowType                       Element
          Sequence Number               Element
          GLAccount                     Element
    ---End
    Any help or suggestion please.
    Thank you.
    Warm Regards,
    Ranjan

    Hi, Ranjan.
      First of all, let's look at the meaning of the error.
    > ...Exception: ERROR converting document line no. 2 according to
    > structure 'GL_FileUpload_SAPECC_Header_DT1':java.lang.Exception:
    > ERROR in configuration: more elements in file csv structure than
    > field names specified!
      It seems that XI interpreted 2nd line as
    Header_DT1 not as Item_DT1 that you meant.
    >  GL,GLI,4011,3011,,,,,,AU,600,7000,8000,9000,5000,RK,,,,,,,,,,,,,,,,,,,,
      That's why it says this line has more elements than the structure
    defined(Header_DT1)
      And the reason why XI misinterpreted the above as Header is that
    you used keyFieldValue with the same value.
    > ...Header_DT1.keyFieldValue: GL
    > ...Item_DT1.keyFieldValue: GL
      According to the following help,
    http://help.sap.com/saphelp_nw04/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm
    it says like the following.
    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.
    How about using different constants for header and item if possible?
    Good luck.

  • File Adapter: Flat-file to XML

    New to the Oracle ESB.
    I am using the file adapter to read in a fixed-length flat file, have mapped it to an xsd and now I just want to dump the resulting xml into a directory. I don't see an obvious way to do this without converting it back to a flat file (by pointing the file writer back to a similar flat file xsd). Missing something obvious?
    Thank you!

    File Adapters content conversion does not supprot such a nested strucutre currently.
    The only format supported is the one shown in ths link,
    http://help.sap.com/saphelp_nw04/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm
    Either write a module that will do this conversion or Change the datatye for the source to the format shown in help.sap.
    Regards
    Bhavesh

  • IDOC to flat file without XML conversion

    Hi,
    I want to implement a scenario like this:
    IDOC --> XI --> flat file
    The flat file has to have the IDOC structure as you have when you write an IDOC to the R/3 file port. But we want to have this process running through XI.
    When you use the IDOC Adapter the IDOC is converted to XML first, which is time consuming. So this I want to skip this step.
    So is it possible to receive the IDOC directly in XI without converting it to XML? How should this process be designed.
    Ron

    Ron
    Looks like you need IDOC tunneling. It is possible by making a configuration parameter.
    You can find more information in http://help.sap.com/saphelp_nw04/helpdata/en/ab/bdb13b00ae793be10000000a11402f/content.htm
    While you try it, I will try to simulate this requirement in our system and let you know the result.
    KK

  • Converting flat file to XML using JMS

    Hi,
    I want to convert flat file to xml. My sender adapter is JMS,
    Can anyone tell me that how to do that conversion ? Conversion is very simple.
    Can we use File content conversion in JMS Sender ? any link or blog ? or any other idea to achieve this ?
    Regards
    Kulwinder

    Hi,
    The pdf has been removed from that link i suppose.
    Anyways, go through the below help, everything that is there in "HowToConveModuleJMS.pdf" has been mentioned in this...
    http://help.sap.com/saphelp_nw04/helpdata/en/24/4cad3baabd4737bab64d0201bc0c6c/content.htm
    Hope it would surely help you.
    You can go through the below link, for better understanding..
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/a05b2347-01e7-2910-ceac-c45577e574e0
    Regards,
    Swetha.
    Edited by: Swetha Reddy on Feb 26, 2009 5:30 AM

  • Problem with special character like u00E5,u00E4 u00F6 in Sender JMS Adapter

    Hi,
    Problem:
    Sender JMS Adapter has transformation error when the file includes western european characters such as å,ä ö. And because of this reason the data is not picked up by adapter.
    The scenrio is JMS --- > XI ---> Proxy.
    If the file does not include the western European characters then it is working fine, but when the file include the western european characters such as å, ä, ö so got the error.
    Our Efforts:
    We have tried ISO8859-1 in JMS Module Tab as shown below.
    1. Transfer.ContentType text/xml;charset=ISO-8859-1
        AND with this also
    2. Transfer.ContentType application/coctet-stream;charset=ISO-8859-1
    None of them working.
    Error In CC:
    In Sender CC monitoring we are getting the below error.
    Error while processing message 'aa157082-b064-4421-0fc3-c286d2732093'; detailed error description: com.sap.aii.adapter.jms.api.channel.filter.MessageFilterException: Error converting Message: sun.io.MalformedInputException: TransformException: Error converting Message: 'sun.io.MalformedInputException' at com.sap.aii.adapter.jms.core.channel.filter.SendToModuleProcessorFilter.filter(SendToModuleProcessorFilter.java(Compiled Code)) ...
    Any suggestion in this regard will be a great help.
    Regards,
    Sarvesh

    > I think you have to figure out first, which codepage you really have, not just try. Maybe you ask someone or you check with a hex editor.
    Hi Stefan,
    Finally we solved the problem.
    As you said above to figure the the codepage, we asked to our MQ team for the same and found that they are using ISO-8859-1. In XI we were also trying with multiple conbinations (ISO-8859-1, UTF-8 and many more), but didn't get any success.
    Finally MQ team changed their encoding to UTF-8 and in XI we used ISO-8859-1 and we get the success in picking the data with spl char. Even though in XI the spl char comes in destorted order but at the receiver end they are in proper shape.
    Thanks a lot for your help.
    Regards,
    Sarvesh

  • Content conversion in Sender JMS adapter-document

    Hi,
    I am tring to read fixed length flat file from MQ-series Queue using JMS adapter.
    I want to use content converstion to convert the flat file to XML.
    I am not able to open the PDF link provided in SDN.
    if anyone has a copy of the pdf document on JMS content conversion, could you please enmil it to me
    at [email protected]
    Edited by: ashok sri on May 27, 2008 5:25 PM

    please go through the  document
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/50061bd9-e56e-2910-3495-c5faa652b710

  • Sender JMS Adapter - NOT Working

    Hello Everybody - We are on SP13, also installed JMS Driver files on the system. We are running, Central Adapter Engine.
    We configured the Sender JMS Adapter for WBI MQ->XI->SAP scenario. We need to JMS Adapter to be configured to connect to WBI from XI. Everything looks great in configuration but in the Adpater Monitoring, JMS Adapter is with Error Status and Message says "Sender channel. Details: (No detail information set.)".
    Does anybody has any idea about this error ?
    I checked SAP Help link as well on this. Based on this link http://help.sap.com/saphelp_nw04/helpdata/en/ca/e7673c86d19b35e10000000a11402f/frameset.htm. Do we need to configure this JMS Adapter somewhere on teh server as well ? If yes, then where ? Pls respond if you have any clue about it.
    Thanks in anticipation...

    Hello Stefan - Thanks for response.
    Here are the Parameters.......
    Adapter Type: JMS
    Sender Type Clicked
    Transport protocol:WebSphereMQ (non-JMS)
    Message protocol:JMS 1.x
    Adapter Engine:Integration Server
    Queue ConnectionFactory Java Class:com.ibm.mq.jms.MQQueueConnectionFactory
    Queue Java Class:com.ibm.mq.jms.MQQueue
    IP Address or Server Name:10.9.48.154
    Server Port:1414
    Queue Manager Name:WBIDEV
    Channel Name:WBI.XI.SVRCONN
    JMS Queue:XI_REQUEST
    Transport/Network Protocol:TCP/IP
    JMS-Compliant:JMS-Compliant
    Transactional JMS Session:Check box Set
    JMS Queue User:XIUSER
    JMS Queue Password:********
    Set XI message ID(MessageID) to:GUID(recommended value)
    Set XI cenversation ID(conversationID) to:No value
    Mapping of Message:Message Payload=JMS Payload
    Quality of Service:Exactly Once
    Time Period for duplicate check for EO(IO)(secs):86400
    Wait After Message Error(msecs):1000
    Wait before Reconnect(msecs):1000
    Status:Active
    The Error Message I see in the Adapter Monitor is "Sender Channel. Details: (No detail information set.)
    Pls advice If I am missing anything ?
    Thanks....
    Amrish.

  • Flat file to XML in SAP SFTP adapter

    Hello All
    I am trying to convert flat file to xml using SAP SFTP adapter.
    Flat File is like below:
    AABEN;20141106;20141106;45;0.00
    AABOL;20141106;20141106;45;0.00
    ABGRI;20141106;20141106;45;0.00
    ADDEA;20141106;20141106;45;0.00
    ALADA;20141106;20141106;45;58.43
    AMSCH;20141106;20141106;45;0.00
    ANOLV;20141106;20141106;45;0.00
    ANROY;20141106;20141106;45;0.00
    AVMCD;20141106;20141106;45;0.00
    Message Type structure I created like below
    In Server SFTP adapter in Module tab I am using "AF_Modules/MessageTransformBean" and conversion type ="StructPlain2XML"
    I am getting error = "Error: com.sap.aii.af.sdk.xi.adapter.trans.TransformException: Transformer Conversion3.0.5226 Error initializing Class: java.lang.Exception: java.lang.Exception: java.lang.Exception: Error(s) in XML conversion parameters found (4408) Parameter 'xml.keyFieldName' is missing (4403) Parameter 'xml.keyFieldType' is missing (4403) ; nested exception caused by: java.lang.Exception: java.lang.Exception: java.lang.Exception: Error(s) in XML conversion parameters found (4408) Parameter 'xml.keyFieldName' is missing (4403) Parameter 'xml.keyFieldType' is missing (4403) "
    I am not using any key field then please let me know how to overcome this issue.
    I searched on SDN but did not get any perfect answer.
    Thanks
    Dheeraj Kumar

    Hello Dheeraj,
    Thanks for your reply. I created a new discussion,
    Flatfile to XML
    Thanks well in advance for your help!
    -Satish.

  • Sender JMS adapter configuration for IBM MQSeries

    Dear All,
    i am doing a IBM MQSeries 5.2.x Message ->sender JMS adapter -> XI server -> receiver RFC adapter -> R/3.
    i have deployed the JMS adapter with the required jar files of IBM MQSeries 5.2.x in XI server.
    in Sender JMS adapter configuration for IBM MQSeries 5.2.x, i have put following data:
    1. Transport Protocol: Websphere MQ - is it okay?
    in JMS provider settings:
    2. in channel name - what should be there?
    3. Transport Network protocol should be TCP/IP or WebsphereMQ - how to decide this thing.
    4. JMS Complaint - whether WebsphereMQ or JMS API.
    in JMS Settings:
    5. JMS Queue user - is this IBM MQSeries 5.2.x Queue User or someother user?
    6. JMS Message Selector - what data to take here.
    So if anybody has connected IBM MQSeries 5.2.x to XI via JMS adapter, please answer my above queries.
    Regards,
    Rajeev Gupta

    Hi Swaroop,
    you can send me those documents at my gmail-id : [email protected]
    Hi All,
    one more question - to connect XI server to IBM MQSeries via JMS adapter in ID, do we need to have a MQSeries Client installed on XI server - or - just by configuring JMS adapter, we can send messages from IBM MQSeries to XI server without any MQSeries client on XI server?
    Why Channel name is required in JMS configuration data?
    Thanks,
    Rajeev Gupta

  • How to ignore Recordset name in XML(Sender JMS Adapter)?

    Hi All.
    I am using Sender JMS Adapter along with content conversion.
    I have put in Parameter:
    Plain2XMLService xml.ignoreRecordsetName true
    still the Inbound payload in SXI_MONITOR has Node Recordset, which should not be the case.
    Please advice, does this ignoreRecordsetName works in JMS adapter, if Yes does it works same way as in File Adapter content conversion?
    Thanks in Advance

    >
    Gowtham Peddi wrote:
    > Hi All.
    >
    > I am using Sender JMS Adapter along with content conversion.
    >
    > I have put in Parameter:
    > Plain2XMLService xml.ignoreRecordsetName true
    >
    > still the Inbound payload in SXI_MONITOR has Node Recordset, which should not be the case.
    >
    > Please advice, does this ignoreRecordsetName works in JMS adapter, if Yes does it works same way as in File Adapter content conversion?
    >
    > Thanks in Advance
    can you try
    ignoreRecordsetName true instead of xml.ignoreRecordsetName
    also try to not give any value for the xml.recordsetName parameter.
    I actually doubt if we can ignore the record set name using the module.

  • Sender JMS Adapter: Problem in Recordst

    Hi All.
    I am using Sender JMS Adapter along with content conversion.
    I have put in Parameter:
    Plain2XMLService     xml.ignoreRecordsetName           true
    still the Inbound payload in SXI_MONITOR has Node Recordset, which should not be the case.
    Please advice, does this ignoreRecordsetName works in JMS adapter, if Yes does it works same way as in File Adapter content conversion?
    Thanks in Advance

    Hi Pravesh,
    Check this file on Sender JMS adapter if it helps you in anyway;
    http://help.sap.com/saphelp_nw04s/helpdata/en/ca/e7673c86d19b35e10000000a11402f/frameset.htm
    Also check this:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/50061bd9-e56e-2910-3495-c5faa652b710
    Regards,
    Subhasha Ranjan

  • Sender jms adapter-archiving before processing the message

    Hi,
    Do we have any option in Sender JMS adapter to archive the message before processing the message?
    I have searched in sender JMS adapter (XI7.0) settings, but couldn't find any option.
    My assumption is whether any option provided in configuration setting of adapter engine or any other alternatives.
    Thanks,
    Srini.

    Hi Srini.
    Here is the code. But you may prefer the EAR module, just for deploy. I need your email to send it to you.
    If you want to create it yourself follow the steps in this guide and paste the code:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f013e82c-e56e-2910-c3ae-c602a67b918e
    When you configure the module in the JMS sender communication channel you have to spedify 2 parameter for the log file location:
    "file.path" (XI server file system path) and "file.name"
    CODE:
    package com.bfa.af.modules;
    import java.io.FileWriter;
    import java.io.IOException;
    import java.io.PrintWriter;
    import java.util.Date;
    import javax.ejb.CreateException;
    import javax.ejb.SessionBean;
    import javax.ejb.SessionContext;
    import com.sap.aii.af.mp.module.Module;
    import com.sap.aii.af.mp.module.ModuleContext;
    import com.sap.aii.af.mp.module.ModuleData;
    import com.sap.aii.af.mp.module.ModuleException;
    import com.sap.aii.af.ra.ms.api.Message;
    @author ibermatica
    public class BFATraceModule implements SessionBean, Module {
         private SessionContext myContext;
         public void ejbRemove() {
         public void ejbActivate() {
         public void ejbPassivate() {
         public void setSessionContext(SessionContext context) {
              myContext = context;
         public void ejbCreate() throws CreateException {
         public ModuleData process(ModuleContext moduleContext, ModuleData inputModuleData) throws ModuleException
              FileWriter outFile;
              try
                   Date date = new Date();
                   String filePath = moduleContext.getContextData("file.path");
                   String fileName = moduleContext.getContextData("file.name");
                   outFile = new FileWriter(filePath + System.getProperty("file.separator") + fileName, true);
              catch (IOException e)
                   e.printStackTrace();
                   throw new ModuleException(e);
              PrintWriter out = new PrintWriter(outFile, true);
              try
                   out.println("--- Start of message ---");
                   //Get message content.
                   Message data = (Message)inputModuleData.getPrincipalData();
                   if(data.getDocument() != null)
                        out.println(data.getDocument().getText());
                   else
                        out.println("Empty message.");
                   out.println("--- End of message ---");
                   out.println("Total characters: " + data.getDocument().getText().length());
              catch(Exception exc)
                   out.println(exc.toString());
              finally
                   if(out != null)
                        out.close();     
                   if(outFile != null)
                        try {
                             outFile.close();
                        } catch (IOException e1) {
                             throw new ModuleException(e1);
              return inputModuleData;

  • Change of Encoding in Sender JMS Adapter

    Hi,
       My scenario is like that:-
    FTP->MQ Queue->JMS Queue->XI->R/3
    From JMS Queue IDOC xml is coming in UTF-8 encoding to XI. In that IDOC xml certain special characters are there, say, some Latin or European character. But for the scenario XI->R/3, data are not getting posted to R/3. In XI side, it is not giving any error, but it is giving a flag (in QRFC Monitor) which is “ Error between two Character Sets”.
    I am unable to rectify this error. One solution I have guessed that is, it will be possible to resolve this issue if I can change the encoding in XI to ISO-8859-1. But I don’t know how to change the encoding in Sender JMS Adapter in XI. Could you please help me to resolve this issue?
    BR
    Soumya B

    Hi,
    Check following:
    1. In SXMB_MONI, what is the XML structure generated for inbound and outbound message. Check the encoding used in both. This could be checked by looking at the first line of XML generated. For UTF encoding, usually, the first line should look as follows:
    <?xml version="1.0" encoding="UTF-8" ?>
    2. If the encoding for both is different, try to figure out which encoding is used for Message Type in XI. For matching the encodings, you could change the XSD used for creating message type in XI. This way, the character encoding could be changed. And this solution should suffice if the problem has occured between XI to R3 scenario.
    Also, for learning more about character encodings, you could visit following link:
    http://www.cs.tut.fi/~jkorpela/chars.html
    Hope it helps.
    Bhavish.
    Reward points if comments found useful:-)

Maybe you are looking for

  • Some bugs in Zen MX

    I bought the Zen Mx in January of this year. My player contains the last firmware version published: .02.04. The Zen Mx don?t play? music folders correctly. I maked some music? folder in the Music Imported folder. The playing mode is normal. I power/

  • Can't access emc and/or management shell

    Really need some help with this. Researched all day and no fixes have helped. Exchange 2010 - Windows 2008 R2 Standard. EMC error:  Connecting to remote server failed with teh following error message: The WinRM client cannot process the request. It c

  • Image not displaying help!

    Ok this is probably me being really stupid but i have a servlet which i compiled then put the class file in the correct folder (i am using tomcat ) the servlet has this: out.println(ServletUtilities.headWithTitle(title) + "<BODY BGCOLOR=\"#a00e0e\">\

  • Extracting XML Document embeded in Envelope

    Hi all My problem is how do I extract the XML Document embeded in the Envelope Is there a method to do the same Since it is present in the cdata section as a string How do i reconvert it to a XML document I am using jdom TIA Sanjay

  • Zoom in to part of video

    Hi Guys, Sorry to ask but I do not use FCE that much. I am working with a video of a CCTV footage and want to zoom in to part of the footage to see what is gong on in detail. except I have no idea how to do this! Is there a way you can either zoom in