Exception in Message mapping for JDBC - XI- file

Hi,
In the above scenario, Sender JDBC adapter has processed the message but when i checked the processed XML messages, its giving an error message with details
<i>During the application mapping
com/sap/xi/tf/_MM_XXXX_a
com.sap.aii.utilxi.misc.api.BaseRuntimeException
was thrown: RuntimeException in Message-Mapping
transformatio~</i>
how to make the source structure so that it gets correctly populated with the result set of sender JDBC adapter? Are there any constraints while making the Data type for the source structure?
Regards,
Nitin Aggarwal.

Hi,
The problem is solved...
Actually, the runtime system was not able to map the result set generated by the Sender JDBC adapter to the source structure of message mapping. This was because the result set has a particular structure and its like
    <resultset>
      <row>
        <column1>value1</column1>
        <column2>value2<column2>
       </row>
    </resultset>
To map this kind of structure to the source structure, a  <b>row</b> element should always be there below the root node and the structure fields should be placed as sub elements to row. One more thing the root node of the source structure should be same as the document name specified in the sender JDBC adapter config.
Anyways, Thanks to all for the valuable efforts.
Regards,
Nitin.

Similar Messages

  • Error while testing in message mapping for JDBC lookup

    The error is as follows.
    Exception during processing the payload.Problem when calling an adapter by using communication channel JLU_chan (Party: , Service: JLU_BUSS, Object ID: 0519f96e59c534829ebdcdea837dacb7) XI AF API call failed. Module exception: (No information available). Cause Exception: 'Error processing request in sax parser: Error when executing statement for table/stored proc. 'table' (structure 'statement'): java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Missing ), ], or Item in query expression 'username  = [Ljava.lang.String;@d7f610 and password = [Ljava.lang.String;@5b96eb'.'.
    com.sap.aii.mapping.lookup.LookupException: Problem when calling an adapter by using communication channel JLU_chan (Party: , Service: JLU_BUSS, Object ID: 0519f96e59c534829ebdcdea837dacb7) XI AF API call failed. Module exception: (No information available). Cause Exception: 'Error processing request in sax parser: Error when executing statement for table/stored proc. 'table' (structure 'statement'): java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Missing ), ], or Item in query expression 'username  = [Ljava.lang.String;@d7f610 and password = [Ljava.lang.String;@5b96eb'.'.
         at com.sap.aii.ibrun.server.lookup.AdapterProxyLocal.execute(AdapterProxyLocal.java:131)
         at com.sap.aii.ibrun.server.lookup.SystemAccessorInternal.execute(SystemAccessorInternal.java:68)
         at com.sap.aii.ibrun.server.lookup.SystemAccessorHmiServer.process(SystemAccessorHmiServer.java:149)
         at com.sap.aii.ibrun.server.lookup.SystemAccessorHmiServer.process(SystemAccessorHmiServer.java:77)
         at com.sap.aii.utilxi.hmis.server.HmisServiceImpl.invokeMethod(HmisServiceImpl.java:169)
         at com.sap.aii.utilxi.hmis.server.HmisServer.process(HmisServer.java:178)
         at com.sap.aii.utilxi.hmis.web.HmisServletImpl.processRequestByHmiServer(HmisServletImpl.java:296)
         at com.sap.aii.utilxi.hmis.web.HmisServletImpl.processRequestByHmiServer(HmisServletImpl.java:211)
         at com.sap.aii.utilxi.hmis.web.workers.HmisInternalClient.doWork(HmisInternalClient.java:70)
         at com.sap.aii.utilxi.hmis.web.HmisServletImpl.doWork(HmisServletImpl.java:496)
         at com.sap.aii.utilxi.hmis.web.HmisServletImpl.doPost(HmisServletImpl.java:634)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:387)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:365)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:944)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:266)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:160)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
    Root Cause:
    com.sap.aii.af.service.api.AFException: XI AF API call failed. Module exception: (No information available). Cause Exception: 'Error processing request in sax parser: Error when executing statement for table/stored proc. 'table' (structure 'statement'): java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Missing ), ], or Item in query expression 'username  = [Ljava.lang.String;@d7f610 and password = [Ljava.lang.String;@5b96eb'.'.
         at com.sap.aii.af.service.api.AdapterAccess.sendMsg(AdapterAccess.java:214)
         at com.sap.aii.af.service.api.AdapterAccess.execute(AdapterAccess.java:283)
         at com.sap.aii.ibrun.server.lookup.AdapterProxyLocal.execute(AdapterProxyLocal.java:123)
         at com.sap.aii.ibrun.server.lookup.SystemAccessorInternal.execute(SystemAccessorInternal.java:68)
         at com.sap.aii.ibrun.server.lookup.SystemAccessorHmiServer.process(SystemAccessorHmiServer.java:149)
         at com.sap.aii.ibrun.server.lookup.SystemAccessorHmiServer.process(SystemAccessorHmiServer.java:77)
         at com.sap.aii.utilxi.hmis.server.HmisServiceImpl.invokeMethod(HmisServiceImpl.java:169)
         at com.sap.aii.utilxi.hmis.server.HmisServer.process(HmisServer.java:178)
         at com.sap.aii.utilxi.hmis.web.HmisServletImpl.processRequestByHmiServer(HmisServletImpl.java:296)
         at com.sap.aii.utilxi.hmis.web.HmisServletImpl.processRequestByHmiServer(HmisServletImpl.java:211)
         at com.sap.aii.utilxi.hmis.web.workers.HmisInternalClient.doWork(HmisInternalClient.java:70)
         at com.sap.aii.utilxi.hmis.web.HmisServletImpl.doWork(HmisServletImpl.java:496)
         at com.sap.aii.utilxi.hmis.web.HmisServletImpl.doPost(HmisServletImpl.java:634)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:387)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:365)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:944)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:266)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:160)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)

    I'll give you the query.Can you please check my code.Code is as follows.
    //write your code here
    String Query = " ";
    Channel channel = null;
    DataBaseAccessor accessor = null;
    DataBaseResult resultSet = null;
    //Build the Query String
    Query = "Select role from login where username  = " + username + " and password = " + password + "" ;
    try{
    //Determine a channel as created in the configuration
    channel = LookupService.getChannel("JLU_BUSS","JLU_chan");
    //  Get a system accessor for a channel.As the call is being made to the database an database accessor is obtained.
    accessor = LookupService.getDataBaseAccessor(channel);
    // Execute the Query and get the values in the resultSet.
    resultSet = accessor.execute(Query);
    for(Iterator rows = resultSet.getRows();rows.hasNext();)
    Map rowMap = (Map)rows.next();
    result.addValue((String)rowMap.get("role"));
    catch(Exception ex){
    result.addValue(ex.getMessage());
    finally{
    try{
    if (accessor!=null) accessor.close();
    catch(Exception e){
    result.addValue(e.getMessage());

  • Questions to a Mapping for IDOC-to-File Scenario

    Hi all,
    I want do develop a Message-Mapping for an IDOC-to-File Scenario. A SAP System sends an IDOC to the XI-System and the XI-System should make a mapping an send a XML-File to a FTP-Server. The Strukture of the target message is very easy:
    <xdoc>
       <Invoice>
          @purno
          <HeaderInfo>
             <invno/>
             <shipdate/>
             <extvalue/>
          </HeaderInfo>
          <DetailInfo>
             <LineItem>
                @lineno
                <vpartno/>
                <descrip/>
                <qtyord/>
                <cost/>
                <vendmemo/>
             </LineItem>
          </DetailInfo>
       </Invoice>
    </xdoc>
    The source message is an IDOC. This IDOC can contain one or more positions (E1EDP01). Those different positions should be mapped into different LineItem's (see target structure) -> so in the target file one or more LineItems can appear.
    Is it possible to implement this process with a common message-mapping or have I to implement a business process?
    Thanks
    with best regards
    Christopher

    Hi Christopher,
    <i>Is it possible to implement this process with a common message-mapping or have I to implement a business process?</i> - This thing is possible with common message mapping......you dont need business proces for it.......in msg mapping after taking the source IDOC and target xml struc, map the E1EDP01 field to LineItem field.......just check the occurance of these nodes.....it should be 0..unbounded.........so as many E1EDP01 nodes will be there in idoc, that many LineItem nodes in target will be created.......
    Thanks,
    Rajeev Gupta

  • Require a Message mapping for this Logic.

    Hi Experts,
    I require a Message mapping for this Logic.
    In the Source there are 4 fields and, the Target side, the fields should appear like this.
    Source Structure- File
    Record
    |-> Header
    Order_No
    Date
    |-> Item
    Mat_No
    Quantity
    Target Structure-IDoc
    IDoc
    |-> Header
    |-> Segment
    Delivery_Order_No
    Recv_Date
    |-> Item
    |-> Segment
    Delivery_Order_No
    Material_Num
    Recv_Quantity.
    The Logic is for every Order number an IDOC is generated.And if the Material num matches then the quantity should be added. and important note  is that the material numbers are different for every order number. That means if a material number is 2 in the order number A. Then the material number can never be 2 in any of the order numbers.Here is the following with an example for the above scenario.
    For example:-
    we have
    Source Structure- File
    Order-no Date Mat_No Quantity
    1 01/02/2011 A 10
    1 01/02/2011 B 15
    1 01/02/2011 A 10
    2 01/02/2011 C 10
    2 01/02/2011 C 10
    3 01/02/2011 D 20
    3 01/02/2011 D 10
    3 01/02/2011 E 25
    Target Structure-IDoc
    Delivery_Order_No Recv_Date Material_Num Recv_Quantity
    1 01/02/2011 A 20
    1 01/02/2011 B 15
    2 01/02/2011 C 20
    3 01/02/2011 D 30
    3 01/02/2011 E 25
               So for this example total of 5-Idocs created. That means for this example if Order_No is 1 When the Mat_No is A the quantity gets added. For this Scenario 1 IDoc with four Fields 2 in Header(Delivery_Order_No, Recv_Date) and 2 in Item(Material_Num, Recv_Quantity) is generated by adding the quantity field in the Target Side. Similarly if Order_No is 1 when the Mat_No is B  then separate IDoc is generated with four Fields 2 in Header(Delivery_Order_No, Recv_Date) and 2 in Item(Material_Num, Recv_Quantity) in the Target Side. Similarly, if Order_No is 2 when the Mat_No is C, an IDoc is generated with four Fields 2 in Header(Delivery_Order_No, Recv_Date) and 2 in Item(Material_Num, Recv_Quantity) by adding the quantity field  in the Target Side.  ike wise the process goes on upto 3.Kindly do the needy..
    Thanq very much in advance..
    Edited by: Prashanth Bharadwaj on Oct 17, 2011 1:29 PM

    Hi Prashanth,
    Concatinate the two fields OrderNo and MaterialNo and follow the below logic which will resolve your problem.
    concatinationOfOrderNo&MaterialNo>removecontext>sort>splitByValueChange>collapseContext-->IDOC
    concatinationOfOrderNo&MaterialNo>removecontext>sort>splitByValueChange>collapseContext>splitByEachValue>subString(0,1)-->Delivery_Order_No
    formatByExample>collapseContext>SplitByEachValue-->Recv_Date
    FormatByExample:
    input1:resulrOfSortByKey
    input2:concatination>removecontext>sort-->SplitByValuChange
    sortByKey:
    input1:concatination-->removecontext
    input2:date-->removecontext
    concatinationOfOrderNo&MaterialNo>removecontext>sort>splitByValueChange>collapseContext>splitByEachValue>subString(1,1)-->Material_Num
    formatByExample>sum>Recv_Quantity
    FormatByExample:
    input1:sortByKey
    input2:concatination>removecontext>sort-->SplitByValueChange
    SortByKey:
    input1:concatination-->removecontext
    input2:Quantity-->removeContext
    Regards,
    Priyanka.

  • Mapping for IDoc to File

    Hi,
           I am doing mapping for IDoc to file scenario.
    Idoc is INVOIC02.
    Source field  is KRATE from segment E1EDP05
    Target field is Rate.
    Mapping rule is as follows.
    zero when Condiditon type (E1EDP05-KSCHL ) = YCSE  ( enter total 15 digits without any decimal in it. The last 2 digits will be treated as digits after decimal )
    Can someone explain the mapping?
    I have to map KRATE and Rate but where does KSCHL comes into this?
    Please explain

    TAKE HELP FROM THESE LINKS : These links can be helpful for you.
    http://help.sap.com/saphelp_nw04/helpdata/en/43/c4cdfc334824478090739c04c4a249/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/5d/db0e83e8e74202a5bff527055ab7e5/content.htm
    Regards,
    Sandeep Kaushik

  • Is there pre-configured message mapping for SRM Content?

    Hi,
    My requirement is to do a message mapping between the SRM Message "Purchase Order Request" and the R/3 Idoc Orders01. Is there a preconfigured message mapping in SRM content or will I have to do it?
    I see the generated proxy class from the outbound message interfacePurchaseOrderRequest_Out which will carry the message to XI and my requirement is to map it to the Interface ORDRSP.Orders01 Please let me know if there is a pre-configured message mapping for this ? or is the message mapping between the message "Purchase Order Request" and the R/3 IDOC ORDERS01 to be done by the developer himself?

    HI,
    There are mappings available in the predelivered SRM content from SAP.
    Did you import  the SRM content into the repository? If so , you can find this.
    www.service.sap.com/ibc -> Integrated Business Content for mySAP SRM->
    Hope this helps,
    Rgds,
    Moorthy
    Message was edited by:
            Krishna Moorthy P

  • Java Mapping for JDBC Interface

    Hi,
    please help on java mapping for my jdbc interface.
    my java code for jdbc is:
    Created on May 7, 2008
    TODO To change the template for this generated file go to
    Window - Preferences - Java - Code Style - Code Templates
    package XiMappingDB2.com.xi.test;
    @author miracle
    TODO To change the template for this generated type comment go to
    Window - Preferences - Java - Code Style - Code Templates
    Created on May 2, 2008
    To change the template for this generated file go to
    Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
    package com.xi.test;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.OutputStream;
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.Statement;
    import java.util.HashMap;
    import java.util.Map;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    import org.w3c.dom.Node;
    import org.w3c.dom.NodeList;
    import com.sap.aii.mapping.api.AbstractTrace;
    import com.sap.aii.mapping.api.MappingTrace;
    import com.sap.aii.mapping.api.StreamTransformation;
    import com.sap.aii.mapping.api.StreamTransformationConstants;
    import com.sap.aii.mapping.api.StreamTransformationException;
    @author kotla
    To change the template for this generated type comment go to
    Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
    public class NameMerge implements StreamTransformation  {
         private Map param = null;   
         private MappingTrace trace = null;
         public void setParameter(Map param){       
         this.param = param;
         if (param == null) { 
         this.param = new HashMap();
         public void execute(InputStream input, OutputStream output)      
         throws StreamTransformationException {
         AbstractTrace trace = null;     
         String RESULT = new String();
         trace =      
         (AbstractTrace) param.get(             
         StreamTransformationConstants.MAPPING_TRACE);
         try {          
        //Create DOM parser
        DocumentBuilderFactory factory =   
        DocumentBuilderFactory.newInstance();     
        DocumentBuilder builder = factory.newDocumentBuilder();
         //Parse input to create document tree
         Document doc = builder.parse(input);
                    trace.addInfo(doc.toString());
          //          Map the elements          
        Node root = doc.getFirstChild(); // gets the root element
         NodeList children = root.getChildNodes();
          for (int item = 0; item < children.getLength(); item++) {
          if (children.item(item) instanceof Element) {
          root = (Element) children.item(item);
          NodeList ch = root.getChildNodes();
          RESULT = RESULT.concat(ch.item(0).getNodeValue() + " ");
          trace.addInfo(RESULT); }
          catch (Exception e) {           
               trace.addDebugMessage(e.getMessage());      
       //Return the output document
       String document_exit = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><ns0:Person2 xmlns:ns0=\"urn:xxxxx.com:test:mapping:lookups\"><RESULT>" 
       + RESULT               
       + "</RESULT></ns0:Person2>";
         insertDB(RESULT);
       try
            output.write(document_exit.getBytes());
             catch (IOException e1) {
            trace.addDebugMessage(e1.getMessage());
    public void insertDB(String DETAILS){
        Statement stmt = null;
        Connection conn = null;
        try {
          conn = getConnection();
          conn.setAutoCommit(false);
          stmt = conn.createStatement();
          stmt.execute("insert into KUMAR(DETAILS) values ('"DETAILS"')");
          //System.out.println ('"DETAILS"');
          conn.commit();
          stmt.close();   
          conn.close();
        } catch (Exception e) {
          System.err.println("Error: " + e.getMessage());
          e.printStackTrace();
      public Connection getConnection() throws Exception {
        String driver = "com.ibm.db2.jcc.DB2Driver";
        String url = "jdbc:db2://172.17.4.24:50000/SAMPLE";
        String username = "miracle";
        String password = "sairam";
        Class.forName(driver);
        Connection conn = DriverManager.getConnection(url, username, password);
        return conn;
    but we are getting the following error:Linkage error occurred when loading class JavaDatabaseApp/XiMappingDB2/com/xi/test/NameMerge (http://FILE2JDBC_US, 7d7b3141-f4d1-11dc-b25e-d5d5c0a80198, -1)
    Start of test
    LinkageError at JavaMapping.load(): Could not load class: JavaDatabaseApp/XiMappingDB2/com/xi/test/NameMerge
    java.lang.NoClassDefFoundError: JavaDatabaseApp/XiMappingDB2/com/xi/test/NameMerge (wrong name: XiMappingDB2/com/xi/test/NameMerge) at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:539) at java.lang.ClassLoader.defineClass(ClassLoader.java:448) at com.sap.aii.ibrep.server.mapping.ibrun.RepMappingLoader.findClass(RepMappingLoader.java:175) at java.lang.ClassLoader.loadClass(ClassLoader.java:289) at java.lang.ClassLoader.loadClass(ClassLoader.java:235) at com.sap.aii.ibrep.server.mapping.ibrun.RepJavaMapping.load(RepJavaMapping.java:136) at com.sap.aii.ibrep.server.mapping.ibrun.RepJavaMapping.execute(RepJavaMapping.java:50) at com.sap.aii.ibrep.server.mapping.ibrun.RepMappingHandler.run(RepMappingHandler.java:80) at com.sap.aii.ibrep.server.mapping.rt.MappingHandlerAdapter.run(MappingHandlerAdapter.java:107) at com.sap.aii.ibrep.server.mapping.ServerMapService.transformInterfaceMapping(ServerMapService.java:127) at com.sap.aii.ibrep.server.mapping.ServerMapService.transform(ServerMapService.java:104) at com.sap.aii.ibrep.sbeans.mapping.MapServiceBean.transform(MapServiceBean.java:40) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0.transform(MapServiceRemoteObjectImpl0.java:167) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0p4_Skel.dispatch(MapServiceRemoteObjectImpl0p4_Skel.java:104) at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:320) at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:198) at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:129) at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33) at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(Native Method) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170).
    please solve this issue.

    Uday,
    May be you have uploaded class file into external definitions.
    You need to Zip the class file into .jar  and then upload into external definitions of integration repository
    Regards,
    Kiran Bobbala

  • Runtime Exception in Message mapping transformation.

    hi Experts,
    i did IDOC(MATMAS05) to File scenario.
    if i tested the mapping in IR (Test tab), its working fine.
    but when i triggered the IDOC from SAP R/3 system, it reaches to SAP PI and showing Mapping falure in SXMB_Moni.
    then i took the payload from the MONI, and tesed with this payload in Mapping test tab in IR.
    there it is showing as java null pointer exception.
    can anybody tell me what is the problem here?
    thanks,
    kumar

    Hi,
    I think the required fields might not be occuring, if it occurs it might not have contianed any values thats the reason why message mapping is failing. For required fields you might have done some transformations which will not work if source required field has no values in it.
    So kindly check and correct.
    Regards,
    Chandra.

  • Throwing Exception in Message mapping.

    Hello,
    I am using PI 7.0 and SP 16.
    I have implemented this blog  /people/alessandro.guarneri/blog/2006/01/26/throwing-smart-exceptions-in-xi-graphical-mapping . But when i was testing in Message Map it is showing the error but when i am testing an end to end scenario it is not showing any trace or error.
    My trace level is 3.  Also message status in moni is Scehdule for outbound processing.
    Please help.
    Thanks and Regards
    Hemant

    Dear Hemanth,
        I have implemented this in my scenario and it was working fine. Might be the condition you have given is not satisfied with the input XML values. Check the following things.
    1. Did you import the .jar or .zip files with two java clsses (CustomMappingException, ExceptionThrower) under imported archives?
    2. Did you give the package name under imports of UDF?
    3. Check whether package names are same at all the places wherever mentioned in that blog.
    If you do correctly these things it must work when the conditions satisfied.
    Main thing is the mapping should go error with red flag in SXMB_MONI. Then only you can find the message in trace.
    Regards,
    JP.
    Edited by: Jaganmohan Ponmani on Feb 25, 2010 7:10 PM

  • Message Mapping Error in Text File to XML file Scenario

    Hi Gurus,
    This is Sudheer...I am New to SAP-PI......
    Below link is File to File Scenario(Text File to XML File)...
    https://www.sdn.sap.com/irj/scn/wiki?path=/display/xi/basicFileAdapterContentConversion
    I am facing Message Mapping Error....I am not able to map the fileds...
    Please help me.
    -Sudheer

    Thanks Shabarish & Manisha for your reply....
    Ya I am getting error while I am testing in IR....
    I dont know how to map the fields that shown given below...
           Message Type         ---         Message Type
                 Record                              Employee
                     Header                                 EmployeeID
                         Key                              Name
                         EmpID                          Company
                         Name                            Phone
                         Company                       Prior_Employer
                         Phone                               Company         
                      Detail                                   Location
                          Key
                          Company
                          Location

  • Runtime Exception in Message mapping

    Hi Experts,
    I have a scenario of  IDoc to  <third party adapter> cXML.
    The message caught the below error
    RuntimeException in Message-Mapping transformation : Runtime exception during processing target field mapping ......./ShipTo[2]/Address/PostalAddress/DeliverTo (suppressed field). The message is: Exception:[java.lang.ArrayIndexOutOfBoundsException: 7] in class com.sap.xi.tf._M_IDOC_to_cXML_ method getShipToContact$[, , com.sap.aii.mappingtool.tf3.rt.Q2QFunctionWrapper@253fdd8a]
    Please suggest on what went wrong, as everything is working fine before.
    Thanks in advance.
    MK

    Mk:
    Please check if the source fields which are mapped to the target are all generated by the SAP Script and make sure that they have data so that when they are mapped to the target. If they are mapped and source fields don't have data then it may error out. Sometimes SAP Script might not generate a node if there is not data for it, make sure you handle that condition also.
    RuntimeException in Message-Mapping transformation is
    due to the missing TEXT_LINE element in the segment Z1VOBTH for the TEXT_ID 'INVOICE_TO_LOCATION'
    I am not able to understand this. is Text_ID subelement of Text_Line?? Could you please post the complete error message as it is.

  • Route of the operator.... while creating mapping for idoc to file

    Hi,
    Scenario is IDOC to File but certain rules are there while creating a mapping in XI.
    This is the description for my scenario :
    Within XI this Idoc message needs to be translated into 2 text files:
    1 file for the route of the operator
         - Read the idoc data.
         - When reading a new order first get the customer. This will be a new line in the file.
            The customer number will be set into the filed u2018CustomerIDu2019.
         - Then read the items. For every item create a new line in the file. The machine number will be mapped to the field CustomerID
         - The field RouteOrder should get a sequential number. Starting at 001 and updated by 1 for every new line.
    Could you please guide me how can i implement this above scenario.
    Regards,
    Y.Raj

    Within XI this Idoc message needs to be translated into 2 text files:
    this can be done using multimapping i.e. defining your target messages at mapping tabs in your message mapping.
    When reading a new order first get the customer. This will be a new line in the file.
    The customer number will be set into the filed u2018CustomerIDu2019.
    If there is some condition for identifying new order then you should put condition based on input field.
    if customer no doesnot exists in order then RFC lookup can fetch customerno
    The field RouteOrder should get a sequential number. Starting at 001 and updated by 1 for every new line.
    for this declare varaible in global section and use the same or some builtin function can be used for the same.
    Rajesh

  • Multi Mapping for JDBC Receiver JDBC Adapter

    Hi All,
        I'm trying an IDoc to JDBC (canonical XML) scenario using multi mapping (single IDoc as source and two different JDBC messages in receiver end). But, this is failing in RWB with some parser error. So, am not sure whether multi mapping is allowed for JDBC Canonical XML format. Please clarify.
    Thanks,
    Hussain.

    Hi ,
    JDBC Adapter supports multi mapping,so you can implement the same,but what do you mean by Canonical XML format??
    Regards,
    Raj

  • BaseRuntime Exception during Message Mapping

    Hi I am performing the scenario File --> XI --> File
    I want to do the File content Conversion (FCC) only at the Receiver side.
    My source file(Message Type) is XML which looks like as below:
    <?xml version="1.0" encoding="UTF-8" ?>
    - <ns0:MT1_FCC xmlns:ns0="http://accenture.com/xi/F2F">
    - <Name_>
    - <Name>
      <FName>abc</FName>
      <MName>bcd</MName>
      <LName>cde</LName>
      </Name>
      </Name_>
      </ns0:MT1_FCC>
    My target file would be the text file which will look like as follows:
    abc#bcd#cde
    However at runtime the Error is thrown with BaseRuntimeException in Message Mapping which simple one to one mapping from source message to target message . the source and the target message are same.
    The Error message is as follows:
    <Trace level="1" type="T">RuntimeException during appliction Java mapping com/sap/xi/tf/_MM_FCC_</Trace>
      <Trace level="1" type="T">com.sap.aii.utilxi.misc.api.BaseRuntimeException: Fatal Error: com.sap.engine.lib.xml.parser.ParserException: XML Declaration not allowed here.(:main:, row:1, col:8) at com.sap.aii.mappingtool.tf3.Transformer.checkParserException
    Kindly Look into the Issue..

    Hi i think you are getting confused by the Sorce Structure...
    Ok lemme retype it for You and please then tell me the necessary parameters needed to convert the source xml file into the target text file
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:MT1_FCC xmlns:ns0="http://accenture.com/xi/F2F">
       <FullName>
          <Name>
             <FName>abc</FName>
             <MName>bcd</MName>
             <LName>cde</LName>
          </Name>
       </FullName>
    </ns0:MT1_FCC>

  • Failed in Message Mapping for Sender SOAP Adapter

    I am using a synchronous Sender SOAP adapter for sending SOAP messages using HTTP security protocol. I am trying to send SOAP messages to XI and then to RFC-R/3. And Responses back from RFC to XI and then to SOAP. I am getting an error for failed in message mapping in SXMB_MONI for converting SOAP messages to RFC. When I debug it in Message Mapping in Integration Repository, it works fine.
    Any help is appreciated.
    Thanks in advance!
    Mrudula

    Hi,
    try to do a full cache refresh
    regards,
    Jakub

Maybe you are looking for