Message mapping: table lookup

The requirement:
Source message contains some keys and values, and target message has different keys. Values are simply mapped. no problem. but the mapping between source message keys and target message keys is a bit complicated so it is controlled in a seperate table. End users do maintainance jobs on the mapping table on a daily base.
I checked some threads in this forum and I now understand that this kind of table lookup can be done using the combination of JCo, ABAP programs and ABAP tables, but what is the common way in dealing with such kind of requirement?

You can use value mapping if you are not looking at picking up values from application system.It is just like SM30 transcation.You can get the info under SAP XI->Design and Configuration->Configuration->Value Mapping.
If you are in SP13 you can use lookup API SAP XI->Design and Configuration->Design->Mapping look ups.

Similar Messages

  • Message mapping RFC lookup

    Hi.
    I'm trying to do a RFC inside a message mapping with java code. I have to send a field (id) and return the vendor code (lifnr).
    I'm searching michal Krawczyk's weblog to see how can i do that but the link is broken.
    Does anybody has that document that can send me to [email protected]?
    Regards.
    Inigo.

    hi Inigo,
    please look at the following blogs,
    /people/sravya.talanki2/blog/2005/12/21/use-this-crazy-piece-for-any-rfc-mapping-lookups
    /people/siva.maranani/blog/2005/08/23/lookup146s-in-xi-made-simpler
    /people/michal.krawczyk2/blog/2005/09/15/xi-rfc-mapping-lookups-from-bc-to-xi
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/801376c6-0501-0010-af8c-cb69aa29941c
    /people/alessandro.guarneri/blog/2006/03/27/sap-xi-lookup-api-the-killer
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/801376c6-0501-0010-af8c-cb69aa29941c
    /people/sravya.talanki2/blog/2005/12/21/use-this-crazy-piece-for-any-rfc-mapping-lookups
    /people/sravya.talanki2/blog/2005/12/21/use-this-crazy-piece-for-any-rfc-mapping-lookups
    Regards
    Sreeram.G.Reddy
    Message was edited by:
            Sreeram Reddy

  • Message mapping tab works fine ,runtime exception

    Hi ,
    Need some advice... I get a runtime messge mapping error ( system error) failing the substring logic although when i download the same payload and run in test tab it works fine. Has anyone encountered similar issue ?
    Thank you.

    objects are active.Your second point is good ,but this error only happens when a load test is done , partciular messages throw runtime exception and fail in mapping on substring logic but when the same payload is downloaded and run via message mapping tabl it runs through. i will try disabling the substring logic nodes.
    Secondly when i get a runtime exception ,i try to restart the same message and it goes thorugh successfully. So restarting in moni helps.... but does not explain why....
    Thanks
    Edited by: xi project on May 18, 2010 12:28 AM

  • Lookup value mapping table through message mapping.

    Hello All,
    I am working on a graphical mapping (message mapping). When trying to map the source message to the target message, I need to find out it a particular <b>key</b> exists in the <b>value mapping table</b>. Depending on the result, I need to map different source fields to the target field.
    Is there any inbuilt function which will allow me to do a lookup on a value mapping table, or is it possible to lookup a value mapping table from a UDF?
    Please help!
    Warm Regards,
    Keerti

    Hi,
    Please see the below links for Value mapping ..
    Value mapping /people/sukumar.natarajan/blog/2006/10/23/accessing-value-mapping-defined-in-directory-using-java-functions
    Value mapping in XSLT /people/sreekanth.babu2/blog/2005/01/05/design-time-value-mappings-in-xslt
    Value Mapping replication - /people/sreekanth.babu2/blog/2005/02/23/value-mapping-replication
    Also see
    https://www.sdn.sap.com/irj/sdn/advancedsearch?query=value%20mapping%20in%20xi&cat=sdn_weblog
    /people/community.user/blog/2007/01/08/valuemapping-using-the-graphical-mapping-tool
    /people/alessandro.guarneri/blog/2006/03/27/sap-xi-lookup-api-the-killer
    https://www.sdn.sap.com/irj/sdn/advancedsearch?query=value%20mapping%20in%20xi&cat=sdn_weblog
    Regards
    Pradeep N

  • Local lookup in message mapping

    Hi all,
    I've a table on the SAP PI system filled with data. From my message mapping, I want to do a lookup.
    What's the best way to perform this lookup.
    Again, this is a local table. So not a table residing on the SAP ECC system.
    Thanks a lot.
    Dimitri

    Hi,
    >>>I've a table on the SAP PI system filled with data. From my message mapping, I want to do a lookup.
    What's the best way to perform this lookup.
    the best/easiest way would be to use ABAP mapping (right after your message mapping - as in interface
    determination you can have many mappings)
    just to do the lookup in XI table (in abap mapping you juse use a select to get this data)
    so map the data in message mapping
    then do the lookup in abap mapping just for this one field
    Regards,
    Michal Krawczyk

  • Graphical message mapping examples for JDBC and RFC lookup

    hi, can any body provide me graphical message mapping examples for the "JDBC Lookup" function and "RFC Lookup" function?
    I'm now studying the graphical message mapping and want to try those 2 functions. thank you.
    I expect the examples to be simple enoung, not need to set up much.

    >
    Madhu_1980 wrote:
    > can u check this link:
    >
    > PI 7.0 & 7.1 Mapping - Blogs,Articles,Wiki,Code Samples and Videos Collections https://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=79955426  
    >
    > it contains a link : SAP PI 7.1 Mapping Enhancements Series: Graphical Support for JDBC and RFC Lookups /people/jin.shin/blog/2008/02/15/sap-pi-71-mapping-enhancements-series-graphical-support-for-jdbc-and-rfc-lookups
    May be I'm too foolish to follow those links, I got issues of each links.
    What I really want is an example from step0
    Swarup:
    Refer the Lookup document - Easy Lookup in Process Integration 7.1
    https://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/20befc9a-aa72-2b10-ae9b-b0988791d457
    The first step is "Create an RFC Enabled Function Module for look up", but where can I create the function module? Should I use ESB, IB? or use transaction 'SE11' ?
    Kulkarni:
    Very good links for RFC lookup with 7.0/3.0
    https://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/70d90a91-3cf4-2a10-d189-bfd37d9c3231&overridelayout=true
    At page6 "PI Development/Configuration", it saies "You are on the design maintenance screen in the Integration Builder.Expand the subnodes for the software component version for which you want to import interfaces".
    What is "design maintenance screen" ? My IB version is: Service Pack:08 Release:NW07_08_REL.
    When I open IB, it display a screen titled with "Configuration: Intergation Builder", I did not find "software component version" node on the left tree.
    Madhu_1980 :
    it contains a link : SAP PI 7.1 Mapping Enhancements Series: Graphical Support for JDBC and RFC Lookups /people/jin.shin/blog/2008/02/15/sap-pi-71-mapping-enhancements-series-graphical-support-for-jdbc-and-rfc-lookups
    The Prerequisites state:
    The JDBC channel to be used for the lookup must be configured and activated in the Integration Directory.
    The definition of the table used for the lookup must already be imported into the ES Repository as an external definition
    But I don't know how to create a JDBC channel and define the table.

  • Soap lookup in PI7.31 message mapping

    Hi All,
    I have a soap lookup created in UDF in PI message mapping
    I am taking material id from the source structure and use it as input parameter for the lookup webservice
    Here is the UDF code which takes material number and returns the internal id
    AbstractTrace trace = container.getTrace();
    String matintid = "";
    try {
    //instance the channel to invoke the service.
    Channel channel = LookupService.getChannel("BS_Bus","CC_SearchLookup");
    SystemAccessor accessor = LookupService.getSystemAccessor(channel);
    // The Request message in XML. THIS IS THE LOOKUP SERVICE
      String SOAPxml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><searchTM_MATERIAL>xmlns:ns0=\"MDM_MAT_Search_MDM"><query><criteria><fTX_MATERIAL><constraint><value>"
    +a
    + "</value><expressionOperator>equals</expressionOperator></constraint></fTX_MATERIAL></criteria></query><reposInfo><repositoryName>REP_MATERIALS</repositoryName><serverName>mdm6765</serverName></reposInfo></searchTM_MATERIAL>";
    InputStream inputStream =new ByteArrayInputStream(SOAPxml.getBytes());
    XmlPayload payload = LookupService.getXmlPayload(inputStream);
    Payload SOAPOutPayload = null;
    //The response will be a Payload. Parse this to get the response field out.
    SOAPOutPayload = accessor.call(payload);
    /* Parse the SOAPPayload to get the SOAP Response back.  */
    InputStream inp = SOAPOutPayload.getContent(); 
    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); 
    /* Create DOM structure from input XML */ 
    DocumentBuilder builder = factory.newDocumentBuilder(); 
    Document document = builder.parse(inp);
    NodeList matlist = document.getElementsByTagName("tM_MATERIAL");
    Element material = (Element) matlist.item(0);
    NodeList recidlist = material.getElementsByTagName("recordIdentification");
    Element recidnode = (Element)recidlist.item(0);
    matintid = recidnode.getNodeValue();
    trace.addInfo("matnid is" + matintid);
    } catch (Exception e) {
    trace.addWarning("Error" + e);  }
    trace.addInfo("Service XXX success executed");
    return matintid;
    This is giving a java null point error
    Errorjava.lang.NullPointerException: while trying to invoke the method org.w3c.dom.Element.getElementsByTagName(java.lang.String) of a null object loaded from a local variable at slot 16
    Any idea whats going on? I am able to get response for the webservice using SOAP UI 
    And here is the soap input and output in SOAP UI execution
    Input
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:MDM_MAT_Search_MDM" xmlns:urn1="urn:com.sap.mdm.ws.beans.mdt_mat_search_mdm_in" xmlns:urn2="urn:com.sap.mdm.ws.beans" xmlns:urn3="urn:com.sap.mdm.core.beans">
       <soapenv:Header/>
       <soapenv:Body>
          <urn:searchTM_MATERIAL>
             <urn:query>
                <!--Optional:-->
                <urn1:criteria>
                     <!--Optional:-->
                   <urn1:fTX_MATERIAL>
                      <urn2:constraint>
                         <!--Optional:-->
                         <urn2:value>12345</urn2:value>
                         <!--Optional:-->
                         <urn2:expressionOperator>equals</urn2:expressionOperator>
                      </urn2:constraint>
                   </urn1:fTX_MATERIAL>
                </urn1:criteria>
             </urn:query>
             <urn:reposInfo>
                <urn3:repositoryName>REP_MATERIALS</urn3:repositoryName>
                <urn3:serverName>mdm1234</urn3:serverName>
             </urn:reposInfo>
          </urn:searchTM_MATERIAL>
       </soapenv:Body>
    </soapenv:Envelope>
    Output:
    <SOAP-ENV:Envelope xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
       <SOAP-ENV:Body xmlns:rpl="urn:MDM_MAT_Search_MDM">
          <rpl:searchTM_MATERIALResponse xmlns:rn0="java:sap/standard" xmlns:rn1="urn:com.sap.mdm.ws.beans" xmlns:rn2="http://schemas.xmlsoap.org/soap/encoding/" xmlns:rn3="urn:com.sap.mdm.core.base" xmlns:rn4="urn:com.sap.mdm.ws.beans.mdt_mat_search_mdm_in" xmlns:rn5="urn:com.sap.mdm.core.beans">
             <rpl:Response>
                <rn1:executionStatus>
                   <rn1:status>OK</rn1:status>
                   <rn1:description>Search/Retrieve done successfully</rn1:description>
                   <rn1:dataObject>Records 1..1 of 1 found</rn1:dataObject>
                </rn1:executionStatus>
                <rn4:tM_MATERIAL>
                  <rn4:fTX_MATERIAL>12345</rn4:fTX_MATERIAL>    
                 <rn4:recordIdentification>
                       <rn4:internalID>1267</rn4:internalID>
                    </rn4:recordIdentification>
           </rn4:tM_MATERIAL>
             </rpl:Response>
          </rpl:searchTM_MATERIALResponse>
    Thx
    mike

    Hi Mike,
    What I suspect is, you get a null pointer exception because the XML tag name which you are trying to retrieve, has a namespace. Could you please instead try to use:
    getElementsByTagNameNS(java.lang.String namespaceURI, java.lang.String localName)
              Returns a NodeList of all the Elements with a given local name and namespace URI in document order.
    Let us know if it works.
    Regards,
    Shweta

  • Data lookup in R/3 database from message mapping

    Hi,
    I am trying to lookup R/3 database from Message mapping.
    Instead of creating Java class outside XI and then importing into Integration Repository, I have defined an advanced function in message mapping and trying to connect to R/3 using JCo API. But System is giving syntax errors as listed below:
    Check Result for Object CustomerDetailsMap Source code has syntax error:
    F:/usr/sap/C03/DVEBMGS00/j2ee/cluster/server0/./temp/classpath_resolver/Mapc1513850c14511d985d5001143eb68b9/source/com/sap/xi/tf/_CustomerDetailsMap_.java:58: illegal character: 160 Â Â Â Â Â Â Â Â // Change the logon information to your own system/user
    F:/usr/sap/C03/DVEBMGS00/j2ee/cluster/server0/./temp/classpath_resolver/Mapc1513850c14511d985d5001143eb68b9/source/com/sap/xi/tf/_CustomerDetailsMap_.java:60: illegal character: 160             "DEV18" ,    // userid
    Can somebody help in rectifying the problem?
    Thanks and Regards,
    Nitin.

    Hi,
    can u post the java code which u have used in mapping.
    There is a doc in XI-Articles. "How to Perform SAP Data Lookups Within XI Mappings" By Jerome Delune 16 October, 2003. Try looking at this article and do ur mapping.
    Hope this helps you.
    Cheers,
    Siva Maranani.

  • JDBC Lookup in message mapping

    Hi Folks,
    in a message-mapping i use a jdbc lookup.
    i get this error, can anybody help me ?
    Put value [Plain exception:Problem when calling an adapter by using communication channel JDBC_MKA_Receiver_Lookup (Party: , Service: R3EREDATA, Object ID: 3ab59ba811163c5697dbcd40fb0c4957) Check whether the communication channel exists in the Integration Directory; also check the cache notifications for the instance Integration Server (central Adapter-Engine) Channel object with Id Channel:3ab59ba811163c5697dbcd40fb0c4957 not available in CPA Cache.
    thanks for your help

    Hi Folks,
    now i get a new error.
    it will be nice when you could answered me, thanks
    Put value [Exception during processing the payload.Problem when calling an adapter by using communication channel JDBC_MKA_Receiver_Lookup (Party: , Service: BS_EPS, Object ID: 866ef440ca5b3cefb1381267f5693591) XI AF API call failed. Module exception: (No information available). Cause Exception: 'JDBC Adapter configuration not initialized: null'. com.sap.aii.mapping.lookup.LookupException: Problem when calling an adapter by using communication channel JDBC_MKA_Receiver_Lookup (Party: , Service: BS_EPS, Object ID: 866ef440ca5b3cefb1381267f5693591) XI AF API call failed. Module exception: (No information available). Cause Exception: 'JDBC Adapter configuration not initialized: null'. at java.lang.Throwable.<init>(Throwable.java:194) at java.lang.Exception.<init>(Exception.java:41) at com.sap.aii.mapping.api.StreamTransformationException.<init>(StreamTransformationException.java:29) at com.sap.aii.mapping.lookup.LookupException.<init>(LookupException.java:72) 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:733) at javax.servlet.http.HttpServlet.service(HttpServlet.java:848) at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:332) at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:0) at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:387) at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:336) at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:868) at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:250) at com.sap.engine.services.httpserver.server.Client.handle(Client.java:0) at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:92) at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:30) at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:35) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:99) 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: 'JDBC Adapter configuration not initialized: null'. at java.lang.Throwable.<init>(Throwable.java:194) at java.lang.Exception.<init>(Exception.java:41) at com.sap.aii.af.service.api.AFException.<init>(AFException.java:88) 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:733) at javax.servlet.http.HttpServlet.service(HttpServlet.java:848) at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:332) at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:0) at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:387) at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:336) at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:868) at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:250) at com.sap.engine.services.httpserver.server.Client.handle(Client.java:0) at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:92) at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:30) at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:35) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:99) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170) ]

  • RFC lookUp during Message mapping

    All
       I want to get soem values from SAP table during message mapping.After getting the values am going  to do 2:1 mapping by using BPM.
      Could you please let me know the basic and fundamental things about RFC look up during mapping and RFC settings in XI as well in R3?
    Please explain

    Hi Rajesh,
    Pl post this in XI Forums to get quick replies.
    Regards
    Ayyapparaj

  • Raising exceptions in database lookups in message mapping

    Hi
       We have been able to successfully do a database lookup from within a message mapping - thanks to weblogs already existing out there. However, we have requirement that states that - if the lookup fails ( failure to connect to DB / data retrieved is null ) , then the mapping should fail - and an exception raised.
    How can we go about doing this from within the java code - of the mapping lookup ?
    Any correct pointers /solutions to achieve this will be rewarded rightaway. Thanks in advance for your time.

    Hi,
    you can use Alessandro's way:
    /people/alessandro.guarneri/blog/2006/01/26/throwing-smart-exceptions-in-xi-graphical-mapping
    this way you can throw smart exceptions:)
    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>

  • RFC Lookup's in message mapping fail with RuntimeException for no reason

    Hi guys,
    We have developed interfaces that execute a lot of RFC's from Message Mapping, by making use of RFC Lookup API.
    In ID, in the corresponding RFC Receiver Communication Channel we have set the number of maximum connections to 100.
    However, when a big number of Idocs with lots of items is sent to XI some messages fail in XI because mapping fails with a runtime exception that is not correct, since there is a return value found from the execution of the RFC function. And when I am testing the mapping in Test mode of XI IR, the mapping is executed successfully.
    Do you think that by increasing the maximum number of connections in Communication Channel, it will take effect?
    Evaggelos

    Hi Evaggelos,
    DECREASE, may be til 10.
    Regards,
    Udo

  • Delete all the entries in target table when message mapping?

    Hello Gurus,
    I have a requirement in the project. When I do message mapping, I need to delete all the entries in the target table and then insert the new rows. From searching the old posts, I know it is possible without BPM. Can anyone please help me out? I really appreciated it.
    Regards,
    Bai

    Hi Bai,
    Check the below links:
    http://help.sap.com/saphelp_nwpi711/helpdata/en/43/9519abb1146353e10000000a11466f/frameset.htm
    Defining a DELETE Statement 
    http://help.sap.com/saphelp_nwpi711/helpdata/en/44/7b6e85fde93673e10000000a114a6b/content.htm
    Thanks,

  • SOAP lookups from withing message mapping

    Hi
       We are doing a call to a webservice from within a udf in a message mapping using the SOAP API described in one of the blogs in SDN. We are using a soap receiver communication channel to make this webservice call -
    We see activity on the communication channel monitoring - indicating that there is a call going out and a response coming back from the webservice. But there are no details shown on the payload in communication channel monitoring. We do not see this webservice lookup as a message on the adapter engine either ?
    Is there any place from within XI runtime environment we can get a hold of the message going out to webservice call and the return from webservice ?  We are facing problems in the webservice not doing the required action desired and hence this question on visibility of the call to the webservice.
    Thanks in advance for your time.

    My udf is basically makes a call to the webserservice lookup method ( line - CallCentralMonitoring.LogToCentralMonitoring( "IN130.10", "COMPLETED"); ) - the definition of CallCentralMonitoring class is given below after the udf
    UDF
    String adapter = "RECEIVE_FusionDBLookUpRequest";
    Channel channel = null;
    boolean retry = false;
    int noOfRetries = 0;
    String sqlQuery = new String("");
    DataBaseAccessor accessor = null;
    DataBaseResult resultSet = null;
    String parameterValue = new String("");
    MappingTrace trace = container.getTrace();
    // Build the Query String
    //sqlQuery = "select * from CTL_BusinessRules with (nolock) where parameter_key = '" + parameterKey + "'";
    sqlQuery = "exec uspCTL_GetBusinessRule '" + parameterKey + "'";
    do
         try
              //trace.addInfo( "SQL query is: " + sqlQuery);
              // Determine a channel, as created in the Configuration
              channel = LookupService.getChannel(businessService,adapter);
              // Get a system accessor for the channel. As the call is being made to a DB, a DatabaseAccessor is obtained.
              accessor = LookupService.getDataBaseAccessor(channel);
              //trace.addInfo( "Successfully obtained the system accessor..." );
              // Execute Query and get the values in resultset
              resultSet = accessor.execute(sqlQuery);
              Iterator rows = resultSet.getRows();
              //trace.addInfo( "Executed query successfully..." );
              while( rows.hasNext() )
                   Map rowMap = (Map)rows.next();
                   parameterValue =  rowMap.get("CHARACTER_VALUE").toString();
                   //trace.addInfo( "Parameter Value is: " + parameterValue );
              retry = false;
              CallCentralMonitoring.LogToCentralMonitoring( "IN130.10", "COMPLETED");
              return parameterValue;
         catch( Exception ex )
              //trace.addInfo( ex.toString() );
              if ( noOfRetries < 3 )
                   retry = true;
                   noOfRetries++;
              else
                   retry = false;
                   CallCentralMonitoring.LogToCentralMonitoring( "SD152.01", "Error");
                   ExceptionThrower.fire( "Database connectivity error: " + ex.toString() );
         finally
              try
                   if ( accessor != null ) accessor.close();
              catch( Exception e )
                   ExceptionThrower.fire("Error closing accesor: " + e.getMessage() );
                   //return e.getMessage();
    } while( retry );
    return null;
    Class CallCentralMonitoring
    package com.xxxxx.xi.mapping.udf;
    import java.io.ByteArrayInputStream;
    import java.io.InputStream;
    import com.sap.aii.mapping.lookup.Channel;
    import com.sap.aii.mapping.lookup.LookupException;
    import com.sap.aii.mapping.lookup.LookupService;
    import com.sap.aii.mapping.lookup.Payload;
    import com.sap.aii.mapping.lookup.SystemAccessor;
    import com.sap.aii.mapping.lookup.XmlPayload;
    public class CallCentralMonitoring {
         public static void LogToCentralMonitoring (String MON_EISLDCTLID, String MON_MsgStatus)  {
              String soapXML = new String("");
              /* Pass the Business System and Communication Channel as  input to the getChannel().
              /* BS_SOAPLOOKUP – Business System*CC_Webservice_SOAP_CURRENCY_CONVERTOR – Receiver SOAP Adapter */
              Channel channel = null;
              try {
                   channel = LookupService.getChannel( "EI_CentralMonitoringServives", "Receive_SOAP_TrackingServiceWS" );
              } catch (LookupException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              SystemAccessor accessor = null;
              try {
                   accessor = LookupService.getSystemAccessor(channel);
              } catch (LookupException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              /* Construct the SOAP Request Message using the InputParameters */          
              soapXML = "<LogToCentralMonitoring xmlns=\"http://xxxxx.EI.CentralMonitoring\"> <loggingData> <MON_EISLDCTLID>"
               + MON_EISLDCTLID
               + "</MON_EISLDCTLID><MON_ProgramID>"
               + MON_EISLDCTLID
               + "</MON_ProgramID><MON_ProcessID>"
               + MON_EISLDCTLID
               + "</MON_ProcessID><MON_ClientAlert>"
               + "N"
               + "</MON_ClientAlert><MON_MsgStartTimeStamp>"
               + "03/30/2007 10:00:00"
               + "</MON_MsgStartTimeStamp><MON_MsgEndTimeStamp>"
               + "03/30/2007 10:00:01"
               + "</MON_MsgEndTimeStamp><MON_MsgStatus>"
               + MON_MsgStatus
               + "</MON_MsgStatus><MON_MsgStatusDescription>"
               + MON_MsgStatus
               + "</MON_MsgStatusDescription> </loggingData> </LogToCentralMonitoring>";
              InputStream inputStream = new ByteArrayInputStream(soapXML.getBytes());
              XmlPayload payload = LookupService.getXmlPayload(inputStream);
              Payload soapOutPayload = null;
              /The SOAP call is made here and the response obtained is in the soapOutPayload./
              try {
                   soapOutPayload = accessor.call(payload);
              } catch (LookupException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
         }//end LogToCentralMonitoring
    }//end class

  • Message mapping problem: BAPI with range table parameters

    A kind hello to all,
    I try to call the BAPI_ALM_ORDERHEAD_GET_LIST in a 4.70 system via RFC connector. The configuration already works with another BAPI. With this here I get message mapping exception:
    Trace level="1" type="T">com.sap.aii.utilxi.misc.api.BaseRuntimeException: RuntimeException in Message-Mapping transformation: Zielelement /ns1:BAPI_ALM_ORDERHEAD_GET_LIST kann nicht angelegt werden. Prüfen Sie, ob die XML-Instanz für die Ausgangs-XSD und die Zielfeldzuordnung die Anforderungen der Ziel-XSD erfüllt. at com.sap.aii.mappingtool.tf3.AMappingProgram.start
    (How can I switch the trace language to English easily? I try to translate:
    "BAPI_ALM_ORDERHEAD_GET_LIST cannot be created. Check if the XML instance meets the requirements for the output XSD and the destination field mapping meets the requirements of the destination XSD.")
    But the mapping test tool in the Integration Builder Design does not report any warning or error.
    My guess is that the problem lies in the parameter structure of the BAPI_ALM_ORDERHEAD_GET_LIST: I have to fill the IT_RANGES selection range table, so it looks as if I need several instances of the item in the corresponding XML. Can I use "Duplicate tree" in the mapping editor? Here I got another exception?
    Many thanks for any help!
    Regards,
    Carsten

    Hi Udo,
    you gave the final hint, indeed I used a XML file that was not evidently not compliant to the message type I created (even though it had been validated by Altova XMLspy).
    From now onwards I only use the "Create instance" function of the test tool to create the XML body of my test messages...
    Thanks a lot,
    and best regards,
    Carsten

Maybe you are looking for

  • I want to re-install OS 10.2 but can't find the disks

    I have an old iMac G4 that I want to re-install the OS but don't have the disks.  Any idea of where I can find a copy of OS 10.2?  I tried installing an 10.4 but the machine won't accept that version of OS X.

  • Split Edits using Timecode (dashboard) on FCPX 10.0.7 - icons?

    Hi! My FCPX 10.0.7 does not show the "roll edit" or "ripple edit" icon in blue on the timecode dashboard, and just shows blue-ed playhead icon. Because of this when I manually enter on the dashboard frame counts to go forward or back at the time of a

  • Oracle JDBC Thin Driver and Firewall Problem

    Hi! We have Oracle 8.1.5 and Websphere App Server. There is a firewall between the two. A servlet creates a connection pool (not that of Wesphere's). The frontend is JSP/HTML (no applets). The servlet uses the Oracle JDBC Thin Driver for DB Connectio

  • Line Segment Tool Options won't allow negative angle

    When you select an object and hit Return to bring up the Move dialog, Illustrator allows you to enter a negative rotation amount in the Angle field (e.g., -30°). This is great. However, when you select the Line Segment tool and click in the drawing a

  • Compressing 7.5 Hour video for Dual Layer DVD

    I've got to compress 7.5 hours of footage into an MPEG2 fittable on a Dual Layer DVD. The client knows that the quality will be inferior. Anyone have any suggestions as to settings before I start? I'm guessing to set the bitrate to 2.3 or so. How abo