RFC Lookup API error in PI 7.1?

Hi Guys,
The RFC lookup which has been developed in PI 7.0 using the lookup API is unable to find the CC defined in the directory for a business system. after upgrading to PI 7.1. We are getting the error as below. This look up works perfectly fine in Dev(PI 7.1) and QA(PI 7.1) but in Prod(PI 7.1). We are on PI 7.1 EHP1 SP03.
Errorcom.sap.aii.mapping.lookup.LookupException: Plain exception:Error when calling an adapter by using the communication channel In_RFC_SAPLookUp (Party: , Service: Test, Object ID: 74e5e47336133351bebcb8c6a6bc68c8) The channel with object ID 74e5e47336133351bebcb8c6a6bc68c8 could not be found in the Integration Server Java Cache. Check if the channel exists in the Integration Builder Directory and execute a refresh of the Java Cach.
We did the cache refresh and also restarted the prod server but the error still persists. We have tried connecting to the prod receiver sap system from QA and the lookup works perfectly fine. We dont understand why it dosent work in prod.
any help or suggestions would be really appreciated.
Thanks,
Srini

Hi Rajesh,
The CC has the correct business system. We have also tried even by creating a new cc and it always says it cannot find the defined cc from the RFC lookup. We are passing this value as a constant value to the RFC lookup.
I could not understand why it is not finding only this CC? Is this something that RFC lookup is unable to find the CC?
any help would be appreciated
Thanks,
Srini

Similar Messages

  • RFC LookUp API

    Hi everybody,
    when usinf the RFC lookUp API in UDF you get a whole XML Document as the response.
    What is the easiest way to extract a special value from the InputStream .
    (https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a03e7b02-eea4-2910-089f-8214c6d1b439)
    Regards Mario

    Hi Mario !
    Check this weblog:
    /people/alessandro.guarneri/blog/2006/03/27/sap-xi-lookup-api-the-killer
    specially the LookupHandler, the RFC part, after the execution of the RFC
    Regards,
    Matias.

  • RFC Lookup mapping error in PI 7.1

    Hi Experts,
    I´m getting mapping error when executing interface SOAP -> WS (SAP ECC) . The message mapping call RFC Lookup to SAP ECC.
    When test the message mapping in Integration Builder the interface calls communication channel by RFC Lookup and works fine.
    That interface was imported from QAS environment and was working fine, but in PRD it doesn´t works.
    I checked the Interface Determination and the parameter is filled correctly with communication channel. The same communication channel was used on message mapping test.
    The Interface Determination in SXI_CACHE has no value assigned to parameter in PRD environment, otherwise, the same interface determination in SXI_CACHE in QAS environment there is value (CC ID).
    The problem persists after Cache Refresh in SXI_CACHE and CPA Cache.
    Can anyone help me ?
    Thanks in advance,
    Regis Ferrato
    Bellow the trace of error ocurred:

    Hi Regis,
    Please check my reply in your other thread:
    Re: RFC Lookup error cache in PI 7.1
    Regards,
    ---Satish

  • RFC Lookups API

    Hi Experts,
    Can you please share with me the following document on XI Mapping lookups RFC API by Michal
    [https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/xi/xi-code-samples/xi%20mapping%20lookups%20rfc%20api.pdf]
    the above link is not working.
    Thanks,
    MK

    Hi
    For Mapping Lookups~
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/xi/xi-code-samples/mapping%20lookups:%20RFC%20API.pdf
    The specified item was not found.
    Use this crazy piece for any RFC Mapping Lookups!
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/801376c6-0501-0010-af8c-cb69aa29941c
    Java Mapping
    http://help.sap.com/saphelp_nw04/helpdata/en/e2/e13fcd80fe47768df001a558ed10b6/content.htm
    DOM parser API
    http://java.sun.com/j2se/1.4.2/docs/api/org/w3c/dom/package-frame.html
    On how to create XML docs with SAX and DOM go thruugh these links:
    http://www.cafeconleche.org/books/xmljava/chapters/ch09.html
    http://www.cafeconleche.org/books/xmljava/chapters/ch06.html
    Also go through these Blogs....
    SAX Parser
    Java Mapping (Part I)
    Java Mapping (Part II)
    Java Mapping (Part III)
    regards
    srinivas

  • Value Mapping Replication Vs RFC Lookup API Usage Pros and Cons

    Hi Ananth,
       Looking at the options you have, Value Mapping Replication might be a better option, because, by going the second route, you are just trying to simulate how a Value mapping replication works in reality.
    But, when the VMR framework is readily available, why do we need to simulate it by using Java code?
    Moreover, the java code approach will be triggered as many times and the number of messages that are triggered VS the number of times the VMR tables in the Java Runtime gets updated only when there is an entry that is added/modified in the SAP side (Which i feel is less frequent than the frequency of the messages being sent through XI).
    Regards,
    Ravi Kanth Talagana

    Hi,
    There are more issues you need to consider here:
    1) Is this static data or will it change often (the lookup data);
    2) Wether it is a good approach to keep it in middle system? if so who takes the ownership of managing it i.e. update, delete etc from time to time
    3) The tables don't seem small to me for value mapping
    I am not a big expert but i am off the opinion going RFC way as it will keep loose-coupling in place.
    However your issue for not using graphical RFC is not true though, you can pass all your line items as a single object which means only making ONE single call to ECC and then get the return the same way. Think along the lines of internal table as an object
    regards,

  • 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

  • Character translation error in Mapping Lookup API (RFC)

    Dear all,
    I am new to XI and got a question concerning XI Mapping Lookup API - I send an RFC Request, which comes back as RFC Response(XML), that I fill in a String to map on.
    My problem is, characters such as "Ä,ä,Ü,ß" and so on come back pretty weird and I also got a lot of quotes in my String. Could somebody please give me a hint how to move on with this..
    thanx in advance
    P.S. Is it usefull to handle this problem using the DOM Parser instead holding the response in a string? 
    Info: called system is R/3 4.6b, XI runs on 6.4 SR 16

    Dear all - thanks for your very fast help but I still have problem with the wrong character...
    @Michal - Using this coding (the easiest way, I found from the WebLog) to convert the Payload type to String, delivers the result I have  shown at the end,  so could you give me please some approach how to handle this
                   Payload resultOfCall = accessor.call(payload);
                   InputStream in = resultOfCall.getContent();
                   out = new ByteArrayOutputStream(1024);
                   byte[] buffer = new byte[1024];
                   for (int read = in.read(buffer); read > 0; read = in.read(buffer)) {
                        out.write(buffer, 0, read);
                   content = out.toString();
                   return content;
    Result:
    <?xml version="1.0" encoding="UTF-8"?><rfc:Z_GETFTXC108TXTFROMFILE2.Response xmlns:rfc="urn:sap-com:document:sap:rfc:functions"><SCENOEDITXTSTRUCT><MANDT>030</MANDT><SCENARIOID>TVPN</SCENARIOID><FILENAME>/usr/sap/text3.txt</FILENAME><FILETYPE>ASC</FILETYPE><TEXT1>Kleines Regengesicht  aaLlMmNnOoPpQqRrSsTtUuVvWwXxYyZzßßÄäÜü2 AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZzßßÄäÜü3 AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZzßß1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678906 AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZzßßÄäÜü3 AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZzßß8 AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZzßßÜüÖö9 ÄäBbCcDdEeFfGgÖöIxxSTRINGENDE</TEXT1><TEXT2>2 AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZzßßÄäÜü1234567890123456789012345678901234567890123456789012345678903 AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZzßß1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678902 AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZzßßÄäÜü7 ÄäBbCcDdEeFfGgHhIiJjKkLlMmNnÖöPpQqRrSsTtÜüVvWwXxYyZzßßÖöÜü8 AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZzßßÜüÖö9 ÄäBbCcDdEeFfGgÖöIxxSTRINGENDE</TEXT2><TEXT3>3 AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZzßßKleines Regengesicht  aaLlMmNnOoPpQqRrSsTtUuVvWwXxYyZzßßÄäÜü3 AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZzßß1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678906 AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZzßßÄäÜü7 ÄäBbCcDdEeFfGgHhIiJjKkLlMmNnÖöPpQqRrSsTtÜüVvWwXxYyZzßßÖöÜü8 AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZzßßÜüÖö9 ÄäBbCcDdEeFfGgÖöIxxSTRINGENDE</TEXT3><TEXT4>7 ÄäBbCcDdEeFfGgHhIiJjKkLlMmNnÖöPpQqRrSsTtÜüVvWwXxYyZzßßÖöÜü7 ÄäBbCcDdEeFfGgHhIiJjKkLlMmNnÖöPpQqRrSsTtÜüVvWwXxYyZzßßÖöÜü2 AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZzßßÄäÜü123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890Kleines Regengesicht  aaLlMmNnOoPpQqRrSsTtUuVvWwXxYyZzßßÄäÜü1234567890123456789012345678901234567890123456789012345678908 AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZzßßÜüÖö9 ÄäBbCcDdEeFfGgÖöIxxSTRINGENDE</TEXT4><TEXT5></TEXT5></SCENOEDITXTSTRUCT></rfc:Z_GETFTXC108TXTFROMFILE2.Response>
    Thnaks in advance!

  • Java Error in RFC Lookup in XSLT Mapping usinf Java helper class

    Hi All,
    I am doing RFC Lookup in XSLT Mapping using Java Helper class.
    The Lookup works fine when called one RFC at a time However my requirement is I want to do 2 Lookups.
    Both Lookups works when done individually however when I call both lookups in one mapping I get following error "javax.xml.transform.TransformerException: DOMSource whose Node is null."
    Following is the code I have written in XSLT for the lookup:
         <xsl:template name="Lookup_1">
              <xsl:param name="STDPN"/>
                   <rfc:RFC_READ_TABLE>
                        <QUERY_TABLE>KNA1</QUERY_TABLE>
                        <OPTIONS><item><TEXT>
                                  <xsl:value-of select="$STDPN"/>
                             </TEXT></item>
                        </OPTIONS>
                        <FIELDS>
                             <item>
                                  <FIELDNAME>KUNNR</FIELDNAME>
                             </item>
                        </FIELDS>
                   </rfc:RFC_READ_TABLE>
              </xsl:variable>
              <xsl:variable name="response" xmlns:lookup="java:urn.mt.pi" select="lookup:execute($request, 'BS_D, 'cc_RfcLookup', $inputparam)"/>
              <xsl:element name="STDPN">
                   <xsl:value-of select="$response//DATA/item/WA"/>
              </xsl:element>
         </xsl:template>
         <xsl:template name="Lookup_2">
              <xsl:param name="BELNR"/>
                   <xsl:variable name="Query">AGMNT = '<xsl:value-of select="$BELNR"/>'</xsl:variable>
                   <xsl:variable name="request1">
                        <rfc:RFC_READ_TABLE>
                             <QUERY_TABLE>ZTABLE</QUERY_TABLE>
                             <OPTIONS><item><TEXT>
                                  <xsl:value-of select="$Query"/>
                                  </TEXT></item>
                             </OPTIONS>
                             <FIELDS>
                                  <item>
                                       <FIELDNAME>KUNAG</FIELDNAME>
                                  </item>
                             </FIELDS>
                        </rfc:RFC_READ_TABLE>
                   </xsl:variable>
                   <xsl:variable name="response1" xmlns:lookup="java:urn.mt.pi" select="lookup:execute($request1, 'BS_D','cc_RfcLookup', $inputparam)"/>
                   <xsl:element name="BELNR">
                        <xsl:value-of select="$response1//DATA/item/WA"/>
                   </xsl:element>
         </xsl:template>
    My Question: Am I doing anything wrong? Or Is it possible to call multiple lookups in one XSLT?
    Thanks and Regards,
    Atul

    Hi Atul,
    I had the same problem like you had.
    The main Problem is that with the example code the request variable is created as NodeList object. In XSLT a variable is somekind of a constant and can't be changed. As the request object is empty after the first request the programm fails at the following line:
    Source source = new DOMSource(request.item(0));
    So I've created a workaround for this problem.
    In the call of the template I've put the request as a parameter object at the template call:
    <xsl:with-param name="req">
    <rfc:PLM_EXPLORE_BILL_OF_MATERIAL xmlns:rfc="urn:sap-com:document:sap:rfc:functions">
      <APPLICATION>Z001</APPLICATION>
      <FLAG_NEW_EXPLOSION>X</FLAG_NEW_EXPLOSION>
      <MATERIALNUMBER><xsl:value-of select="value"/></MATERIALNUMBER>
      <PLANT>FSD0</PLANT>
      <VALIDFROM><xsl:value-of select="//Recordset/Row[name='DTM-031']/value"/></VALIDFROM>
      <BOMITEM_DATA/>
    </rfc:PLM_EXPLORE_BILL_OF_MATERIAL>
    </xsl:with-param>
    With this change the request will be provided as a String object and not as a NodeList object.
    Afterwards the RfcLookup.java has to be changed to the following:
    package com.franke.mappings;
    import java.io.ByteArrayInputStream;
    import java.io.ByteArrayOutputStream;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.PrintWriter;
    import java.io.StringWriter;
    import java.util.Map;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.transform.Source;
    import javax.xml.transform.Transformer;
    import javax.xml.transform.TransformerFactory;
    import javax.xml.transform.dom.DOMSource;
    import javax.xml.transform.stream.StreamResult;
    import org.w3c.dom.Document;
    import org.w3c.dom.Node;
    import org.w3c.dom.NodeList;
    import com.sap.aii.mapping.lookup.Channel;
    import com.sap.aii.mapping.api.StreamTransformationConstants;
    import com.sap.aii.mapping.api.AbstractTrace;
    import com.sap.aii.mapping.lookup.RfcAccessor;
    import com.sap.aii.mapping.lookup.LookupService;
    import com.sap.aii.mapping.lookup.XmlPayload;
    * @author Thorsten Nordholm Søbirk, AppliCon A/S
    * Helper class for using the XI Lookup API with XSLT mappings for calling RFCs.
    * The class is generic in that it can be used to call any remote-enabled
    * function module in R/3. Generation of the XML request document and parsing of
    * the XML response is left to the stylesheet, where this can be done in a very
    * natural manner.
    * TD:
    * Changed the class that request is sent as String, because of IndexOutOfBound-exception
    * When sending multiple requests in one XSLT mapping.
    public class RfcLookup {
         * Execute RFC lookup.
         * @param request RFC request - TD: changed to String
         * @param service name of service
         * @param channelName name of communication channel
         * @param inputParam mapping parameters
         * @return Node containing RFC response
         public static Node execute( String request,
                 String service,
                 String channelName,
                 Map inputParam)
              AbstractTrace trace = (AbstractTrace) inputParam.get(StreamTransformationConstants.MAPPING_TRACE);
              Node responseNode = null;
              try {
                  // Get channel and accessor
                  Channel channel = LookupService.getChannel(service, channelName);
                  RfcAccessor accessor = LookupService.getRfcAccessor(channel);
                   // Serialise request NodeList - TD: Not needed anymore as request is String
                   /*TransformerFactory factory = TransformerFactory.newInstance();
                   Transformer transformer = factory.newTransformer();
                   Source source = new DOMSource(request.item(0));
                   ByteArrayOutputStream baos = new ByteArrayOutputStream();
                   StreamResult streamResult = new StreamResult(baos);
                   transformer.transform(source, streamResult);*/
                    // TD: Add xml header and remove linefeeds for the request string
                    request = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"+request.replaceAll("[\r\n]+", ""); 
                    // TD: Get byte Array from request String to send afterwards
                    byte[] requestBytes = request.getBytes();
                   // TD: Not used anymore as request is String
                    //byte[] requestBytes = baos.toByteArray();
                    trace.addDebugMessage("RFC Request: " + new String(requestBytes));
                    // Create input stream representing the function module request message
                    InputStream inputStream = new ByteArrayInputStream(requestBytes);
                    // Create XmlPayload
                    XmlPayload requestPayload =LookupService.getXmlPayload(inputStream);
                    // Execute lookup
                    XmlPayload responsePayload = accessor.call(requestPayload);
                    InputStream responseStream = responsePayload.getContent();
                    TeeInputStream tee = new TeeInputStream(responseStream);
                    // Create DOM tree for response
                    DocumentBuilder docBuilder =DocumentBuilderFactory.newInstance().newDocumentBuilder();
                    Document document = docBuilder.parse(tee);
                    trace.addDebugMessage("RFC Response: " + tee.getStringContent());
                    responseNode = document.getFirstChild();
              } catch (Throwable t) {
                   StringWriter sw = new StringWriter();
                   t.printStackTrace(new PrintWriter(sw));
                   trace.addWarning(sw.toString());
              return responseNode;
         * Helper class which collects stream input while reading.
         static class TeeInputStream extends InputStream {
               private ByteArrayOutputStream baos;
               private InputStream wrappedInputStream;
               TeeInputStream(InputStream inputStream) {
                    baos = new ByteArrayOutputStream();
                    wrappedInputStream = inputStream;
               * @return stream content as String
               String getStringContent() {
                    return baos.toString();
              /* (non-Javadoc)
              * @see java.io.InputStream#read()
              public int read() throws IOException {
                   int r = wrappedInputStream.read();
                   baos.write(r);
                   return r;
    Then you need to compile and upload this class and it should work.
    I hope that this helps you.
    Best regards
    Till

  • RFC Lookup error after moving to Quality from Development

    Hi All,
    For a scenario,I am using the RFC Lookup in message mapping.
    I am not using it in a UDF but for directly for an target element....
    The scenario was wrkng properly in development... but in quality it's not wrkng giving the following error....
    RuntimeException during appliction Java mapping com/sap/xi/tf/_ABC_DEF_GHI_JKL_ Thrown: com.sap.aii.utilxi.misc.api.BaseRuntimeException: com.sap.aii.mapping.api.UndefinedParameterException: The input-parameter ISU_RFC_Receiver does not exist. at com.sap.aii.mappingtool.tf7.Transformer.start(Transformer.java:148) at com.sap.aii.mappingtool.tf7.AMappingProgram.transform(AMappingProgram.java:620) at
    The design part and Config part are done properly..
    1.Message mapping-->Parameters (given the CC Name)
    2.Operation mapping-->Binding (The binding parameters is specified)
    3.In the interface determination.... choosen the Parameter for Operation mapping...
    But still i am getting the above error..
    Did any1 face the same prblm ever??? If yes may i know how u resolved???
    Any inputs or suggestions is appreciated...
    Babu

    HI Michal,
    I checked it thtz fine the same objects are transported to Quality without any modification...
    But Still i am getting the same proble..
    Any other inputs????
    Babu
    Edited by: hlbabu123 on Apr 8, 2010 7:54 PM

  • RFC lookup - Error executing simple lookup

    Hi guys,
    Something weird is happening.
    I'm using a RFC lookup to get some parameters and I'm using the same generic UDF that I usually take on different projects.
    But this time I'm getting the following error:
    com.sap.aii.mappingtool.tf3.MessageMappingException: Runtime exception during processing target field mapping /ns0:Messages/ns0:Message1/MessageStatus/StatusInformation/Status. The message is: Exception:[java.lang.StringIndexOutOfBoundsException] in class com.sap.xi.tf._mmEOrdersRetailRequest_ method SAPRFCLookup$[RFC_Receiver_LookUp_SAP, MARA, MATNR EQ &apos;000000000000000123
    &apos; , VPSTA, TST002, com.sap.aii.mappingtool.tf3.rt.Context@1f231f23]
    Do you have any idea?
    I've commented my RFCLookup code and the error jumps up on the getRfcAccessor line.
              try {
    // 1. Determine a channel (Business system, Communication channel)
                com.sap.aii.mapping.lookup.Channel channel = com.sap.aii.mapping.lookup.LookupService.getChannel(BusinessService,CommChannel);
    // 2. Get a RFC accessor for a channel.
                accessor = com.sap.aii.mapping.lookup.LookupService.getRfcAccessor(channel);
    The channel is well created on the IDirectory, associated with the correct BusinessSystem. I can check on the CommunicationChannel Monitoring that the channel opens the JCO connection correctly..
    However if I change this RFCLookup by a JCOLookup everything works smoothly...
    I've done this thousand times but now I'm not able to get the problem...
    Can you guys help?

    Hi Sridevi,
    Sorry for the late reply but the problem continues...
    We're using Netweaver 7.0 SP 14, patch number 0026
    Thanks for your interest.
    The complete error description is:
    Runtime exception during processing target field mapping
    The message is: Exception:[java.lang.StringIndexOutOfBoundsException] in class com.sap.xi.tf._mmTest
    method SAPRFCLookup$[RFC_Receiver_LookUp_SAP, MARA, MATNR EQ &apos;000000000000000123&apos;, VPSTA, TST002, com.sap.aii.mappingtool.tf3.rt.Context@5ef05ef0] com.sap.aii.mappingtool.tf3.MessageMappingException: Runtime exception during processing target field mapping /ns0:Messages/ns0:Message1/MessageStatus/StatusInformation/Status. The message is: Exception:[java.lang.StringIndexOutOfBoundsException] in class com.sap.xi.tf._mmTest method SAPRFCLookup$[RFC_Receiver_LookUp_SAP, MARA, MATNR EQ &apos;000000000000000123&apos;, VPSTA, TST002, com.sap.aii.mappingtool.tf3.rt.Context@5ef05ef0] at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:364) at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:326) at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:326) at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:326) at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:326) at com.sap.aii.mappingtool.tf3.AMappingProgram.start(AMappingProgram.java:415) at com.sap.aii.mappingtool.tf3.Transformer.start(Transformer.java:142) at com.sap.aii.mappingtool.tf3.AMappingProgram.execute(AMappingProgram.java:118) at com.sap.aii.ibrep.server.mapping.ServerMapService.transformInternal(ServerMapService.java:431) at com.sap.aii.ibrep.server.mapping.ServerMapService.execute(ServerMapService.java:169) at com.sap.aii.ibrep.sbeans.mapping.MapServiceBean.execute(MapServiceBean.java:52) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0_0.execute(MapServiceRemoteObjectImpl0_0.java:301) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0_0p4_Skel.dispatch(MapServiceRemoteObjectImpl0_0p4_Skel.java:146) at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:319) at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:200) at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:136) 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(AccessController.java:207) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:102) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:172) Root Cause: com.sap.aii.utilxi.misc.api.BaseRuntimeException: Exception:[java.lang.StringIndexOutOfBoundsException] in class com.sap.xi.tf._mmTest method SAPRFCLookup$[RFC_Receiver_LookUp_SAP, MARA, MATNR EQ &apos;000000000000000123&apos;, VPSTA, TST002, com.sap.aii.mappingtool.tf3.rt.Context@5ef05ef0] at com.sap.aii.mappingtool.tf3.rt.FunctionWrapper.calculateCurrentValue(FunctionWrapper.java:84) at com.sap.aii.mappingtool.tf3.rt.FunctionWrapper.cacheValue(FunctionWrapper.java:60) at com.sap.aii.mappingtool.tf3.rt.FunctionWrapper.gotoNextContext(FunctionWrapper.java:40) at com.sap.aii.mappingtool.tf3.rt.AResIterator.gotoNextContext(AResIterator.java:37) at com.sap.aii.mappingtool.tf3.rt.FunctionWrapper.gotoNextContext(FunctionWrapper.java:37) at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:266) at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:326) at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:326) at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:326) at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:326) at com.sap.aii.mappingtool.tf3.AMappingProgram.start(AMappingProgram.java:415) at com.sap.aii.mappingtool.tf3.Transformer.start(Transformer.java:142) at com.sap.aii.mappingtool.tf3.AMappingProgram.execute(AMappingProgram.java:118) at com.sap.aii.ibrep.server.mapping.ServerMapService.transformInternal(ServerMapService.java:431) at com.sap.aii.ibrep.server.mapping.ServerMapService.execute(ServerMapService.java:169) at com.sap.aii.ibrep.sbeans.mapping.MapServiceBean.execute(MapServiceBean.java:52) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0_0.execute(MapServiceRemoteObjectImpl0_0.java:301) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0_0p4_Skel.dispatch(MapServiceRemoteObjectImpl0_0p4_Skel.java:146) at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:319) at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:200) at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:136) 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(AccessController.java:207) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:102) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:172) Root Cause: java.lang.reflect.InvocationTargetException Caused by: java.lang.StringIndexOutOfBoundsException at java.lang.String.substring(String.java:1019) at com.sap.aii.utilxi.hmi.api.HmiHttpClientImpl.extractCookieValue(HmiHttpClientImpl.java:318) at com.sap.aii.utilxi.hmi.api.HmiHttpClientImpl.extractCookie(HmiHttpClientImpl.java:307) at com.sap.aii.utilxi.hmi.api.HmiHttpClientImpl.getCookies(HmiHttpClientImpl.java:292) at com.sap.aii.utilxi.hmi.api.HmiHttpClientImpl.sendRequestAndReceiveResponseViaHttp(HmiHttpClientImpl.java:207) at com.sap.aii.utilxi.hmi.api.HmiHttpClientImpl.sendRequestAndReceiveResponse(HmiHttpClientImpl.java:108) at com.sap.aii.utilxi.hmi.api.HmiClientAdapter.invokeMethod(HmiClientAdapter.java:88) at com.sap.aii.ibrep.server.lookup.SystemAccessorHmiClient.<init>(SystemAccessorHmiClient.java:64) at com.sap.aii.ibrep.server.lookup.SystemAccessorHmiClient.getInstance(SystemAccessorHmiClient.java:112) at com.sap.aii.ibrep.server.lookup.LookupServiceProvider$RemoteClientDelegator.<init>(LookupServiceProvider.java:99) at com.sap.aii.ibrep.server.lookup.LookupServiceProvider$RemoteClientDelegator.<init>(LookupServiceProvider.java:89) at com.sap.aii.ibrep.server.lookup.LookupServiceProvider$RemoteClient.getSystemAccessor(LookupServiceProvider.java:76) at com.sap.aii.mapping.lookup.LookupService.getRfcAccessor(LookupService.java:249) at com.sap.xi.tf._mmTest.SAPRFCLookup$(_mmTest.java:122) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60) at java.lang.reflect.Method.invoke(Method.java:391) at com.sap.aii.mappingtool.tf3.rt.FunctionWrapper.calculateCurrentValue(FunctionWrapper.java:76) at com.sap.aii.mappingtool.tf3.rt.FunctionWrapper.cacheValue(FunctionWrapper.java:60) at com.sap.aii.mappingtool.tf3.rt.FunctionWrapper.gotoNextContext(FunctionWrapper.java:40) at com.sap.aii.mappingtool.tf3.rt.AResIterator.gotoNextContext(AResIterator.java:37) at com.sap.aii.mappingtool.tf3.rt.FunctionWrapper.gotoNextContext(FunctionWrapper.java:37) at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:266) at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:326) at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:326) at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:326) at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:326) at com.sap.aii.mappingtool.tf3.AMappingProgram.start(AMappingProgram.java:415) at com.sap.aii.mappingtool.tf3.Transformer.start(Transformer.java:142) at com.sap.aii.mappingtool.tf3.AMappingProgram.execute(AMappingProgram.java:118) at com.sap.aii.ibrep.server.mapping.ServerMapService.transformInternal(ServerMapService.java:431) at com.sap.aii.ibrep.server.mapping.ServerMapService.execute(ServerMapService.java:169) at com.sap.aii.ibrep.sbeans.mapping.MapServiceBean.execute(MapServiceBean.java:52) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0_0.execute(MapServiceRemoteObjectImpl0_0.java:301) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0_0p4_Skel.dispatch(MapServiceRemoteObjectImpl0_0p4_Skel.java:146) at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:319) at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:200) at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:136) 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(AccessController.java:207) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:102) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:172) RuntimeException in Message-Mapping transformation: Runtime exception during processing target field mapping /ns0:Messages/ns0:Message1/MessageStatus/StatusInformation/Status. The message is: Exception:[java.lang.StringIndexOutOfBoundsException] in class com.sap.xi.tf._mmTest method SAPRFCLookup$[RFC_Receiver_LookUp_SAP, MARA, MATNR EQ &apos;000000000000000123&apos;, VPSTA, TST002, com.sap.aii.mappingtool.tf3.rt.Context@5ef05ef0]

  • RFC Lookup error :No RFC authorization for function module

    Hi All,
    I have created RFC in the PI system and enabled it as remote. I am working on PI7.1
    I have imported RFC into Repository.But when i am trying to execute RFC lookup function in the graphical mapping I am getting No RFC authorization for function module error.
    Unhandled RFC exception: <rfc:Z_MAIL_LOOKUP.Exception xmlns:rfc="urn:sap-com:document:sap:rfc:functions"><Name>RFC_ERROR_SYSTEM_FAILURE</Name><Text>No RFC authorization for function module Z_MAIL_LOOKUP.</Text><Message><ID>RFC_ERROR_SYSTEM_FAILURE</ID><Number>341</Number></Message><Attributes><V1>RFC_NO_AUTHORITY</V1></Attributes></rfc:Z_MAIL_LOOKUP.Exception> com.sap.aii.mapping.api.StreamTransformationException: Unhandled RFC exception: <rfc:Z_MAIL_LOOKUP.Exception xmlns:rfc="urn:sap-com:document:sap:rfc:functions"><Name>RFC_ERROR_SYSTEM_FAILURE</Name><Text>No RFC authorization for function module Z_MAIL_LOOKUP.</Text><Message><ID>RFC_ERROR_SYSTEM_FAILURE</ID><Number>341</Number></Message><Attributes><V1>RFC_NO_AUTHORITY</V1></Attributes></rfc:Z_MAIL_LOOKUP.Exception> at com.sap.aii.mappingtool.flib7.RfcLookup.cacheMore(RfcLookup.java:95) at com.sap.aii.mappingtool.tf7.rt.AMultiResIterator$MultiOutIterator.gotoNextContext(AMultiResIterator.java:95) at com.sap.aii.mappingtool.tf7.AMappingProgram.processNode(AMappingProgram.java:315) at com.sap.aii.mappingtool.tf7.AMappingProgram.processNode(AMappingProgram.java:406) at com.sap.aii.mappingtool.tf7.AMappingProgram.start(AMappingProgram.java:496) at com.sap.aii.mappingtool.tf7.Transformer.start(Transformer.java:133) at com.sap.aii.mappingtool.tf7.AMappingProgram.transform(AMappingProgram.java:626) at com.sap.aii.ibrep.server.mapping.exec.ExecuteXiMappingCommand.transformInternal(ExecuteXiMappingCommand.java:197) at com.sap.aii.ibrep.server.mapping.exec.ExecuteXiMappingCommand.execute(ExecuteXiMappingCommand.java:94) at com.sap.aii.ib.server.mapping.exec.CommandManager.execute(CommandManager.java:43) at com.sap.aii.ibrep.server.mapping.ServerMapService.execute(ServerMapService.java:40) at com.sap.aii.ibrep.server.mapping.MapServiceBean.execute(MapServiceBean.java:40) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at com.sap.engine.services.ejb3.runtime.impl.RequestInvocationContext.proceedFinal(RequestInvocationContext.java:43) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:166) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatesTransition.invoke(Interceptors_StatesTransition.java:19) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Resource.invoke(Interceptors_Resource.java:71) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Transaction.doWorkWithAttribute(Interceptors_Transaction.java:38) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Transaction.invoke(Interceptors_Transaction.java:22) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:189) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatelessInstanceGetter.invoke(Interceptors_StatelessInstanceGetter.java:16) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_SecurityCheck.invoke(Interceptors_SecurityCheck.java:21) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_ExceptionTracer.invoke(Interceptors_ExceptionTracer.java:16) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177) at com.sap.engine.services.ejb3.runtime.impl.DefaultInvocationChainsManager.startChain(DefaultInvocationChainsManager.java:133) at com.sap.engine.services.ejb3.runtime.impl.DefaultEJBProxyInvocationHandler.invoke(DefaultEJBProxyInvocationHandler.java:164) at $Proxy1005_10002.execute(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at com.sap.engine.services.rmi_p4.P4DynamicSkeleton.dispatch(P4DynamicSkeleton.java:234) at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:351) at com.sap.engine.services.rmi_p4.server.ServerDispatchImpl.run(ServerDispatchImpl.java:70) at com.sap.engine.services.rmi_p4.P4Message.process(P4Message.java:62) at com.sap.engine.services.rmi_p4.P4Message.execute(P4Message.java:37) at com.sap.engine.services.cross.fca.FCAConnectorImpl.executeRequest(FCAConnectorImpl.java:872) at com.sap.engine.services.rmi_p4.P4Message.process(P4Message.java:53) at com.sap.engine.services.cross.fca.MessageReader.run(MessageReader.java:58) at com.sap.engine.core.thread.execution.Executable.run(Executable.java:108) at com.sap.engine.core.thread.execution.CentralExecutor$SingleThread.run(CentralExecutor.java:304) Runtime exception when processing target-field mapping /ns0:MT_FileDummy/File; root message: Unhandled RFC exception: <rfc:Z_MAIL_LOOKUP.Exception xmlns:rfc="urn:sap-com:document:sap:rfc:functions"><Name>RFC_ERROR_SYSTEM_FAILURE</Name><Text>No RFC authorization for function module Z_MAIL_LOOKUP.</Text><Message><ID>RFC_ERROR_SYSTEM_FAILURE</ID><Number>341</Number></Message><Attributes><V1>RFC_NO_AUTHORITY</V1></Attributes></rfc:Z_MAIL_LOOKUP.Exception>
    13:42:37 End of test
    Edited by: Rams on Apr 17, 2009 1:43 PM

    Hi! Rams,
    I think the issue is related to Authentification Issue..Even though u did correctly please check once the below
    1) Check any Typo Erros are there while configuring or giving names in Lookups.
    2) please check Authorizations like ID and PWD and Sufficient Roles
    3) Also please check did u given paramters correctly while doing RFC look up I mean paramers , Binding parameters and RFC channel name and adapter type or Simple type it must be an  adapter
    4) In ID part while configuring Interface determinaition you need to give your RFC look Up name there also..Hence check whether u given or not if yes correctly or not
    5) Also remember one thing if your scenario is correct mostly you can know the result in mapping itself it seems while testing Message mapping and Interface mappings give your RFC look up paramters in the parameters tab present in TEST tab and later in Document tab give Input...and execute it works if it doesn;t works and if there is an issue with RFC you can get there only..ok
    Also go through the below document::
    [https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/20befc9a-aa72-2b10-ae9b-b0988791d457]
    I hope this will give u brief idea...
    Also check with basis while taking SAP_ALL authorization so that first u ill came to know whether issue is related to authentification or RFC module itself remote enabled and also do SXI_CACHE also ocne to refresh ESR and ID objects..
    Regards::
    Amar Srinivas Eli

  • Lookup APIs: for RFC

    i wan to make a RFC call from my UDF, in a message mapping.....can u provide me sample blog for making call through lookup APIs

    Hi Sudeep,
    these may help you
    /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
    database lookup
    lookup jdbc in graphical mapping
    Remote JDBC Connection Error
    JDBC Lookup
    http://help.sap.com/saphelp_nw2004s/helpdata/en/0f/f084429fb4aa1ae10000000a1550b0/frameset.htm
    Also have look at these Blogs and threads...
    /people/sundararamaprasad.subbaraman/blog/2005/12/09/making-csv-file-lookup-possible-in-sap-xi
    /people/alessandro.guarneri/blog/2006/03/27/sap-xi-lookup-api-the-killer
    JDBC Lookup
    EJB Lookup
    Re: RFC Lookup.
    CSV File LookUp
    Thanks,
    Ram
    Pls reward for useful answers

  • RFC lookup error when table in change mode

    Hi,
    I´m using an RFC lookup from XI to translate external to internal partner nr. Input to the FM in R/3 is the external partner nr och the FM should return the internal partner nr to XI. The problem is that when a user edits the table that my FM reads from a get an error.
    - Isn´t it possible to read a r/3 table while it is in change mode? Is my only way around this to create a z version of this table?
    Claes

    Hi Claes
    have  a look on these  links ,
    For your RFC lookup,
    /people/alessandro.guarneri/blog/2006/03/27/sap-xi-lookup-api-the-killer
    /people/sravya.talanki2/blog/2005/12/21/use-this-crazy-piece-for-any-rfc-mapping-lookups
    RFC lookups pdf https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/xi/xi-code-samples/xi%20mapping%20lookups%20rfc%20api.pdf
    /people/alessandro.guarneri/blog/2006/03/27/sap-xi-lookup-api-the-killer
    Michal's Blog on RFC Mapping Lookup:/people/michal.krawczyk2/blog/2005/09/15/xi-rfc-mapping-lookups-from-bc-to-xi
    RFC Lookup.
    RFC lookup return no values
    http://help.sap.com/saphelp_nw2004s/helpdata/en/17/d609b48ea5f748b47c0f32be265935/frameset.htm
    Also check this useful link which also talk about Value Lookup:
    Value lookup
    http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm
    /people/prasad.illapani/blog/2006/10/25/how-to-check-jdbc-sql-query-syntax-and-verify-the-query-results-inside-a-user-defined-function-of-the-lookup-api
    Lookups - /people/morten.wittrock/blog/2006/03/30/wrapping-your-mapping-lookup-api-code-in-easy-to-use-java-classes
    Lookups - /people/alessandro.guarneri/blog/2006/03/27/sap-xi-lookup-api-the-killer
    Thanks !!

  • RFC lookup error

    Hi all,
    I am doing an RFC lookup to increment counter. I am facing a problem.
    I followed the code written by Michael. https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/a03e7b02-eea4-2910-089f-8214c6d1b439
    My udf is as shown below: -
    String content = "";
    MappingTrace importanttrace;
    importanttrace = container.getTrace();
    java.util.Map param = container.getTransformationParameters();
    String MSGID = (String) param.get (StreamTransformationConstants.MESSAGE_ID);
    // filling the string with our RFC-XML (with values)
    String m="<?xml version="1.0" encoding="UTF-8"?><ns0:_-GLB_-ZGT_RFBIBL00_COUNTER xmlns:ns0="urn:sap-com:document:sap:rfc:functions"><IM_V_FILENAME>CA10.NCH.FCIPAY04</IM_V_FILENAME><IM_V_MSGID>"MSGID"</IM_V_MSGID><IM_V_WRNO>DEVWR0001725</IM_V_WRNO></ns0:_-GLB_-ZGT_RFBIBL00_COUNTER>";
    importanttrace.addWarning("Input value is  "+m);
    RfcAccessor accessor = null;
    ByteArrayOutputStream out = null;
    try
    // 1. Determine a channel (Business system, Communication channel)
    Channel channel = LookupService.getChannel(receiverBS,"CC_RFC_RCV_AMS_R3F_DEVWR001725");
    // 2. Get a RFC accessor for a channel.
    accessor = LookupService.getRfcAccessor(channel);
    // 3. Create a xml input stream representing the function module request message.
    InputStream inputStream = new ByteArrayInputStream(m.getBytes());
    // 4. Create xml payload
    XmlPayload payload = LookupService.getXmlPayload(inputStream);
    // 5. Execute lookup.
    Payload result = accessor.call(payload);
    InputStream in = result.getContent();
    out = new ByteArrayOutputStream(1024);
    byte[] buffer = new byte[1024];
    for (int read = in.read(buffer); read > 0; read = in.read(buffer)) {
    out.write(buffer, 0, read);
    content = out.toString();
    catch(LookupException e)
    importanttrace.addWarning("Error while lookup " + e.getMessage() );
    catch(IOException e)
    importanttrace.addWarning("Error " + e.getMessage() );
    finally
    if (out!=null) {
    try {
    out.close();
    } catch (IOException e) {
    importanttrace.addWarning("Error while closing stream " + e.getMessage() );
    // 7. close the accessor in order to free resources.
    if (accessor!=null) {
    try {
    accessor.close();
    } catch (LookupException e) {
    importanttrace.addWarning("Error while closing accessor " + e.getMessage() );
    //returning the result u2013 RFC-XML.response
    if ((content.substring(143,150)).equals("NOENTRY"))
    ExceptionThrower.generate("INVALID INPUT DEVWR NUMBER OR ID" );
    return "Nothing";
    else
    return (content.substring(143,155));
    The problem i am facing is that, i am not able to pass the IM_V_MSGID parameter to the function module.
    The other 2 parameters i can pass. that is IM_V_FILENAME and IM_V_WRNO.
    i am able to extract the message ID using
    java.util.Map param = container.getTransformationParameters();
    String MSGID = (String) param.get (StreamTransformationConstants.MESSAGE_ID);
    and displayed it in SXI_MONITOR trace also using importanttrace.addWarning("Input value is  "+m);
    i got the correct MSGID in the trace.But the problem is that this value is not getting passed to the FM. Cos the table is supposed to increment the counter whenever the MSGID value changes.
    I tried hardcoding the MSGID value to 'abc' or '123' like values but the same thing happended. The counter will not increment. The FM is working perfectly when i run it and change the MSGID values manually.
    Thanks
    Pratichi

    Hi,
    We have done this by creating an FM in XI ABAP stack:
    FUNCTION Z_ZBXI_GET_PRE_MSG_ID.
    ""Local Interface:
    *"  IMPORTING
    *"     VALUE(I_CURRMSGID) TYPE  CHAR40
    *"  EXPORTING
    *"     VALUE(E_PREMSGID) TYPE  CHAR40
    DATA: lv_currmsgid type SXMSPMAST-MSGGUID,
          lv_parentmsgid LIKE SXMSPMAST-PARENTMSG,
          lv_premsgid LIKE SXMSPMAST-MSGGUID.
    lv_currmsgid = i_currmsgid.
    select single PARENTMSG from SXMSPMAST into lv_parentmsgid where MSGGUID = lv_currmsgid.
    e_premsgid = lv_parentmsgid.
    ENDFUNCTION.
    You need to call this FM through RFC lookup UDF in your mapping.
    Let me know if it works for you.
    Regards,
    Shweta

  • RFC Lookup Error --- error executing simple look up

    Hi all,
    Below is the error when displaying the queue of the UDF.
    RuntimeException in Message-Mapping transformation: Exception:[java.lang.RuntimeException: Error during MEI RFC Lookup] in class com.sap.xi.tf._MM_COND_A03_TO_MT_PRICELIST_ method callRFC$[com.sap.aii.mappingtool.tf3.CBufIter@32523252, com.sap.aii.mappingtool.tf3.CBufIter@32c732c7, com.sap.aii.mappingtool.tf3.CBufIter@333c333c, com.sap.aii.mappingtool.tf3.CBufIter@33c133c1, com.sap.aii.mappingtool.tf3.CBufIter@4bb84bb8, com.sap.aii.mappingtool.tf3.CBufIter@50ef50ef, com.sap.aii.mappingtool.tf3.CBufIter@51645164, com.sap.aii.mappingtool.tf3.CBufIter@51d951d9]
    But when i test the mapping by passing input parameters the UDF responses with the output parameters and with the following error
    Request MEILookup XML: <?xml version="1.0" encoding="UTF-8"?><ns0:ZRFC_MEI_PUBLISH_PRICELIST xmlns:ns0="urn:sap-com:document:sap:rfc:functions"><T_PRICELIST><item><KBETR_IN>1580.00</KBETR_IN><KUNAG_IN>0010000048</KUNAG_IN><KUNWE_IN>0020002894</KUNWE_IN><KSCHL_IN>ZSBP</KSCHL_IN><MATNR_IN>12648R-0090</MATNR_IN></item></T_PRICELIST></ns0:ZRFC_MEI_PUBLISH_PRICELIST>
    Response MEI Lookup XML: <?xml version="1.0" encoding="UTF-8"?><rfc:ZRFC_MEI_PUBLISH_PRICELIST.Response xmlns:rfc="urn:sap-com:document:sap:rfc:functions"><T_ERR_MESSAGES_OUT></T_ERR_MESSAGES_OUT><T_PRICELIST><item><PARVW_OUT>BT</PARVW_OUT><KUNNR_OUT>0010000048</KUNNR_OUT><DATBI_OUT>2008-08-17</DATBI_OUT><DATAB_OUT>9999-12-31</DATAB_OUT><KBETR_OUT>1580.00</KBETR_OUT></item></T_PRICELIST></rfc:ZRFC_MEI_PUBLISH_PRICELIST.Response>
    getKey=item==getValue=<item><KOTABNR_IN>910</KOTABNR_IN><DATBI_IN>20080817</DATBI_IN><DATAB_IN>99991231</DATAB_IN><KBETR_IN>1580.00</KBETR_IN><KUNAG_IN>0010000048</KUNAG_IN><KUNWE_IN>0020002894</KUNWE_IN><KSCHL_IN>ZSBP</KSCHL_IN><PARVW_OUT>BT</PARVW_OUT><KUNNR_OUT>0010000048</KUNNR_OUT><MATNR_IN>12648R-0090</MATNR_IN><DATBI_OUT>2008-08-17</DATBI_OUT><DATAB_OUT>9999-12-31</DATAB_OUT><KBETR_OUT>1580.00</KBETR_OUT></item>
    Runtime exception during processing target field mapping /ns0:MT_PRICELIST. The message is: Exception:[java.lang.RuntimeException: Error during MEI RFC Lookup] in class com.sap.xi.tf._MM_COND_A03_TO_MT_PRICELIST_ method callRFC$[, , , , com.sap.aii.mappingtool.tf3.rt.FunctionWrapper@37883788, com.sap.aii.mappingtool.tf3.rt.FunctionWrapper@5ea95ea9, , ] com.sap.aii.mappingtool.tf3.MessageMappingException: Runtime exception during processing target field mapping /ns0:MT_PRICELIST. The message is: Exception:[java.lang.RuntimeException: Error during MEI RFC Lookup] in class com.sap.xi.tf._MM_COND_A03_TO_MT_PRICELIST_ method callRFC$[, , , , com.sap.aii.mappingtool.tf3.rt.FunctionWrapper@37883788, com.sap.aii.mappingtool.tf3.rt.FunctionWrapper@5ea95ea9, , ] at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:350)

    Hi Mahesh,
    I have tested the RFC and i have taken the input from the function module...the RFC is working good, the comm channel is good...
    below is the error when i tested my mapping... (the output from the function module is also correct)... i need to use hashmap to store the output...
    Request MEILookup XML:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:ZRFC_MEI_PUBLISH_PRICELIST xmlns:ns0="urn:sap-com:document:sap:rfc:functions">
    <T_PRICELIST>
    <item>
    <KOTABNR_IN>910</KOTABNR_IN>
    <DATBI_IN>20080817</DATBI_IN>
    <DATAB_IN>99991231</DATAB_IN>
    <KBETR_IN>1580.00</KBETR_IN>
    <KUNAG_IN>0010000048</KUNAG_IN>
    <KUNWE_IN>0020002894</KUNWE_IN>
    <KSCHL_IN>ZSBP</KSCHL_IN>
    <MATNR_IN>12648R-0090</MATNR_IN>
    </item>
    </T_PRICELIST>
    </ns0:ZRFC_MEI_PUBLISH_PRICELIST>
    Response MEI Lookup XML: <?xml version="1.0" encoding="UTF-8"?>
    <rfc:ZRFC_MEI_PUBLISH_PRICELIST.Response xmlns:rfc="urn:sap-com:document:sap:rfc:functions">
    <T_ERR_MESSAGES_OUT></T_ERR_MESSAGES_OUT>
    <T_PRICELIST>
    <item>
    <KOTABNR_IN>910</KOTABNR_IN>
    <DATBI_IN>20080817</DATBI_IN>
    <DATAB_IN>99991231</DATAB_IN>
    <KBETR_IN>1580.00</KBETR_IN>
    <KUNAG_IN>0010000048</KUNAG_IN>
    <KUNWE_IN>0020002894</KUNWE_IN>
    <KSCHL_IN>ZSBP</KSCHL_IN>
    <PARVW_OUT>BT</PARVW_OUT>
    <KUNNR_OUT>0010000048</KUNNR_OUT>
    <MATNR_IN>12648R-0090</MATNR_IN>
    <DATBI_OUT>2008-08-17</DATBI_OUT>
    <DATAB_OUT>9999-12-31</DATAB_OUT>
    <KBETR_OUT>1580.00</KBETR_OUT>
    </item>
    </T_PRICELIST>
    </rfc:ZRFC_MEI_PUBLISH_PRICELIST.Response>
    getKey=item==getValue=<item><KOTABNR_IN>910</KOTABNR_IN><DATBI_IN>20080817</DATBI_IN><DATAB_IN>99991231</DATAB_IN><KBETR_IN>1580.00</KBETR_IN><KUNAG_IN>0010000048</KUNAG_IN><KUNWE_IN>0020002894</KUNWE_IN><KSCHL_IN>ZSBP</KSCHL_IN><PARVW_OUT>BT</PARVW_OUT><KUNNR_OUT>0010000048</KUNNR_OUT><MATNR_IN>12648R-0090</MATNR_IN><DATBI_OUT>2008-08-17</DATBI_OUT><DATAB_OUT>9999-12-31</DATAB_OUT><KBETR_OUT>1580.00</KBETR_OUT></item>
    Runtime exception during processing target field mapping /ns0:MT_PRICELIST/row. The message is: Exception:[java.lang.RuntimeException: Error during MEI RFC Lookup] in class com.sap.xi.tf._MM_COND_A03_TO_MT_PRICELIST_ method callRFC$[, , , , com.sap.aii.mappingtool.tf3.rt.FunctionWrapper@6d486d48, com.sap.aii.mappingtool.tf3.rt.FunctionWrapper@7bcf7bcf, , ]

Maybe you are looking for

  • Reasons for Invoice Split

    Is there a way to find all reasons as to why when trying to create a Invoice from mulitple deliveries, you get a split?  A list for Header and for Item. Thanks, Diane

  • Error updating FB 4.5.1 on Eclipse 3.6

    Hi all, I have installed Flash Builder 4.5.1 Premium on Eclipse 3.6 SP2 as a Plug-in installation. When I check for updates the updated "BlackBerry Tablet OS Plugin for Adobe Flash Builder, 1.1.0.201106171124" is found. I click next and finish and re

  • I keep getting Close Firefox dialog box. What next?

    I turn on my computer, double click on mozilla firefox icon on desktop,A Close Firefox dialog box appears-"firefox is already running but is not responding. To open a new window, you must first close the existing Firefox process or restart your syste

  • Plugin entry point resource in CS5

    Hi, I tried installing our plugin (built against the CS4 SDK) in Illustrator CS5 for Mac, and it basically worked. However I noticed that randomly during Illustrator CS5 launch it crashes in AWS_CUI_RevertAlert() or AWS_CUI_GetVersionComments(). I re

  • When I try to receive my mail a message pops up saying "cannot connect to server" how can i fix this?

    Hi im wondering if anyone can help me! When I try to receive my mail from my account a message pops up and says "cannot connect to server" I have tried things like deleting my account and adding it again, rebooting my Ipad, restoring my Ipad. it has