RFC lookup in pi7.1

Hi,
I follow all the steps given in following link to create RFC Lookup,
http://help.sap.com/saphelp_nwpi71/helpdata/en/33/1ec6ced273493a993a80c2301c03da/frameset.htm
but i got an error like,
No value is assigned to parameter
Can any one tell me where is a problem.
Regards,
Rohit.

Hi Rohit,
Use this  for any RFC Mapping Lookups!
/people/sravya.talanki2/blog/2005/12/21/use-this-crazy-piece-for-any-rfc-mapping-lookups
SAP XI Lookup API
/people/alessandro.guarneri/blog/2006/03/27/sap-xi-lookup-api-the-killer
Lookup’s in XI made simpler
/people/siva.maranani/blog/2005/08/23/lookup146s-in-xi-made-simpler
Mapping look up API
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
A good extract from a forum discussion
Mapping programs (message, Java, and XSLT mappings) are executed on the Integration Server, where they can access the global value-mapping table (see Executing Value Mappings) and mapping runtime constants. In addition, calls to other application systems are sometimes necessary to meet the following requirements:
● To get read access to application system data in the mapping program
● To call existing mapping routines in the application system
In what all are the adapters are we using this lookups?
The API for mapping lookups supports access using the RFC, JDBC, and SOAP adapters
How we have to create the lookups?
Check this weblogs with some screenshots on how to achieve this:
/people/siva.maranani/blog/2005/08/23/lookup146s-in-xi-made-simpler
/people/sravya.talanki2/blog/2005/12/21/use-this-crazy-piece-for-any-rfc-mapping-lookups
/people/alessandro.guarneri/blog/2006/03/27/sap-xi-lookup-api-the-killer
/people/sap.user72/blog/2005/12/06/optimizing-lookups-in-xi
/people/morten.wittrock/blog/2006/03/30/wrapping-your-mapping-lookup-api-code-in-easy-to-use-java-classes

Similar Messages

  • RFC lookup in pi7.o by Michael

    Hi all ,
    I followed Michaels Blog for RFC look up.
    In test tab it shows sucess.The issue is in I get output as
    <?xml version="1.0" encoding="UTF-8"?><rfc:ZSD_RFC_READ_TABLE.Response xmlns:rfc="urn:sap-com:document:sap:rfc:functions"><IT_ZSCLOC></IT_ZSCLOC><IT_ZXILOOKUP></IT_ZXILOOKUP></rfc:ZSD_RFC_READ_TABLE.Response>
    I need only value from the table for the field ZSCLOC.
    How can i do this.
    Thanks,
    Srinivasa

    Hi
    As per my understanding you want only the value of the "IT_ZSCLOC". You can use REGEX to parse/extract the response content.
    In you UDF .. remove the last line "return content" with the below code,
    String newContent;
    String pattern = "(<IT_ZSCLOC>)(.*)(</IT_ZSCLOC>)";
    // Create a Pattern object
    Pattern d = Pattern.compile(pattern);
    // Now create matcher object.
    Matcher m = d.matcher(content);
    if (m.find( )) {
    newContent = m.group(2);
    } else {
    newContent = "";
    return newContent;
    Imports --> java.util.regex.;*
    Regards
    Ramg
    Edited by: Ramkumar Ganesh on May 17, 2010 7:14 PM
    Edited by: Ramkumar Ganesh on May 17, 2010 7:15 PM

  • URGENT : RFC Lookup came in from which service pack of PI7.0

    Hi Experts ,
                            This is a very urgent requirement .I wish to know RFC Lookup feature in Message Mapping came into existence from which service Pack in PI 7.0.Was it in SP18/19?? please reply .
      Please revert as early as possible .
    Regards,
    Arnab.

    i think the lookup API are part of SP13 onwards. ( i.e. prior to 7.1), reference: http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/2219
    from 7.1 onwards, few lookups like RFC Lookup are provided as standard functions in message mapping.

  • 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

  • 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

  • Problem in RFC Lookup

    Hi,
    I am performing RFC lookup using Communication Channel.
    I have used a function called "Z_MATERIAL_DETAILS".
    Input to this function is "MATERIALID" and Output of the function is "MATNR".
    I am using the following code in my UDF for performing lookup::
    //write your code here
    final String CHANNEL_NAME = "CC_RFC_LookUp",
                   VALNOTFOUND = "VALUE_NOT_FOUND",
                   SAPRFCNS = "urn:sap-com:document:sap:rfc:functions",
                   TAG_FM = "Z_MATERIAL_DETAILS",
    //               TAG_QTB = "QUERY_TABLE",
                   TAG_QFL = "UOMCODE"; //UOMCODE
              DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
              DocumentBuilder builder = null;
              factory.setNamespaceAware(false);
              factory.setValidating(false);
              try {
                   builder = factory.newDocumentBuilder();
              } catch (Exception e) {
              //     trace.addWarning("Error creating DocumentBuilder - " + e.getMessage());
                   result.addValue(e.toString());
              Document docReq = null;
              try {
                   // Building up RFC Request Document
                   docReq = builder.newDocument();
                   Node root = docReq.appendChild(docReq.createElementNS(SAPRFCNS, TAG_FM));
                   root.appendChild(docReq.createElement(TAG_QFL)).appendChild(docReq.createTextNode(resultFieldName[0]));
              } catch (Exception e) {
              //     trace.addWarning("Error while building RFC Request  - " + e);
                   result.addValue(e.toString());
         //     trace.addInfo("RFC Request XML: " + docReq.toString());
              // Lookup
              Payload result1 = null;
              try {
                   Channel channel = LookupService.getChannel("EC1CLNT800", "CC_RFC_LookUp");
                   RfcAccessor accessor = LookupService.getRfcAccessor(channel);
                   InputStream is = new ByteArrayInputStream(docReq.toString().getBytes());
                   XmlPayload payload = LookupService.getXmlPayload(is);
                   result1 = accessor.call(payload);
              } catch (LookupException e) {
              //     trace.addWarning("Error during lookup - " + e);
                   result.addValue(e.toString());
              // Parsing RFC Response Document
              Document docRsp = null;
              try {
                   docRsp = builder.parse(result1.getContent());
              } catch (Exception e) {
              //     trace.addWarning("Error when parsing RFC Response - " + e.getMessage());
                   result.addValue(e.toString());
              //trace.addInfo("RFC Response XML: " + docRsp.toString());
              String res = "";
              try {
                   res = docRsp.getElementsByTagName("UOMTEXT").item(0).getFirstChild().getNodeValue();
              } catch (Exception e) {
              //     trace.addWarning("Result value not found in DOM - " + e.getMessage());
                   result.addValue(e.toString()+VALNOTFOUND);
              result.addValue(res);
    Code in Z_MATERIAL_DETAILS ::
    ""Local Interface:
    *"  IMPORTING
    *"     VALUE(UOMCODE) LIKE  MARA-MFRPN OPTIONAL
    *"  EXPORTING
    *"     VALUE(UOMTEXT) LIKE  MARA-MATNR
    *"  EXCEPTIONS
    *"      val_not_found
    <b>select single matnr from mara into uomtext where mfrpn = uomcode.</b>
    if sy-subrc <> 0.
    raise val_not_found.
    endif.
    ENDFUNCTION.
    <b>When i send three material ids the function module will access the R/3 system thrice which will give rise to PERFORMANCE ISSUE.
    So,is there any way to send all the materialids at one time to Function module and similarly receive all the MATNR from Function at once,so that we need to access R/3 system only once.</b>

    HI,
    Check this link for passing table parameter in JCO call.
    http://www.sapdevelopment.co.uk/java/jco/jco_callfunc.htm
    Following is the code for retrieving table parameter in JCO call to function BAPI_PO_CREATE.
    JCO.Table return_tab = function.getTablesParameterList().getTable("RETURN");
    if (return_tab.getNumRows()) > 0 {
    // Output the error messages
      return_tab.firstRow();
      do {
        System.out.println(return_tab.getString("MESSAGE");
      while (return_tab.nextRow());
    } else {
      String PO_NUM = function.getExportParametersList().getString("PURCHASEORDER");
      System.out.println("Purchase order " + PO_NUM + " created");
    Thanks and Regards,
    Sandeep Maurya.

  • RFC Lookup in XSLT Mapping

    Hi,
    I am trying to do RFC Lookup in XSLT.
    I got this excellent mapping tool here at sdn:
    RFC Lookup by Thorsten Nordholm Søbirk
    But I am having problems when I uses this in a multi-record mapping. (many-to one) with lookup for every element.
    Has anyone done IDOC with XSLT and RFC lookup (PI 7.11) ?  Can you share the XSLT or experience?
    Thx for sharing

    Hi @ Fariah Ali
    here is the mapping:
    Inbound: IDOC HRMD_A07  (from ALE replication)
    We only want to have Infotypes IT0001, IT0002, IT0050
    Outbound:
    <?xml version="1.0" encoding="utf-8"?>
    <mt_I004_Time_Stammdaten>
        <Datensatz>
              <PersNr>PERSNR</PersNr>
              <Name>ENAME</Name>
              <Eintrittsdatum>BEGDA</Eintrittsdatum>
              Austrittsdatum>ENDDA</Austrittsdatum>
             <BeschArt/>
             <Gueltigkeitsdatum/>
       </Datensatz>
    </mt_I004_Time_Stammdaten>
    thx holger

  • XSLT Mapping : RFC Lookup using java helper class

    Hi All,
    I am doing RFC Lookup in xslt mapping using java helper class. I have found blog for the same (http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/05a3d62e-0a01-0010-14bc-adc8efd4ee14) However this blog is very advanced.
    Can anybody help me with step by step approach for the same?
    My basic questions are not answered in the blog as:
    1) where to add the jar file of the java class used in xslt mapping.
    I have added zip file of XSLT mapping in imported archived and using that in mapping.
    Thanks in advace.
    Regards,
    Rohan

    Hi,
    Can u please have look at this in detail , u can easily point out yourself the problem...
    http://help.sap.com/saphelp_nw04/helpdata/en/55/7ef3003fc411d6b1f700508b5d5211/content.htm
    Please observe the line,
    xmlns:javamap="java:com.company.group.MappingClass
    in XSLT mapping..
    The packagename of class and class name and XSLT namespace should be matching...
    Babu
    Edited by: hlbabu123 on Sep 29, 2010 6:04 PM

  • 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

  • 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

  • Exception Handling in RFC lookup

    Hi Experts,
    I have a query in RFC Lookup function working with PI 7.1,  file to Idoc scenario.
    I am using Enhance Receiver Determination to find the dynamic recivers.Here we have used a Functional Module which gives an output according to the the input parameter (which comes from input file). thus i have used RFC lookup to the remote system to fetch this info from FM.
    Problem -
    When the remote system is down or if the RFC lookup attemped & exceptions raised for some reason (RFC user authority has been changed & it was not able to perform the intended Job at remote system) , the message stuck in queue and block the several other messages from another interfaces which belongs to teh same queue.
    Queries-
    This is not allowed in production as it affects other services.
    1>how can we handle the RFC lookup exception (in case of remote system is down or if the RFC lookup exception)
    2>how can we perform Local lookup at PI box rather then remote lookup (the FM fetches the data from remote system)
    3>Is Value mapping is relevant in this case raher the RFC lookup ? I am not sure as the values are dynamic & selected as per the FM's output.
    Please provide your valuable insight .
    Thanks in advance !
    -Jyoti

    Hi Jyoti,
    Answer for your 3 question.
    1. RFC lookup will get execute on R/3 so if R/3 is down there no way that your RFC lookup will work as expected.
    2. So if R/3 is down or RFC not able to get receiver system due to some problem.. then in that case.
              On your Receiver determination at bottom
              Configure  u201Cif no receiver found proceed as followingu201D
               In this you can have 3 option.
                        a. Error message u2013 if you select this the transaction will end with error message in SXMB_MONI
                        b. Ignore: if you select this execution will get ignored and there will not be any entry in SXMB_MONI
                        c. Select the following receiver. You can select this and can configured default receiver system in case if RFC not able to determine receiver then interface will get route to receiver system configured here.
    3. As you mentioned values are dynamic  then Value mapping doesnu2019t make any sense here. RFCl ookup is the right option and above are few other option in case you RFC lookup flailed.
    Thanks,
    Bhupesh

  • 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

  • Java RFC lookup from XSLT mapping

    I tried to implement a generic Java RFC Lookup class to be called as a Java extension from my XSLT mapping. I found the How-To-Guide "Easy RFC lookup from XSLT mappings using a Java helper class" ([Easy RFC lookup pdf site|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/05a3d62e-0a01-0010-14bc-adc8efd4ee14?quicklink=index&overridelayout=true]) and tailored the source code to my XSLT program.  I am getting the error "Variable '$inputparam' has not been bound to a value".  Can anyone tell me what I am missing?  I am not familiar with java at all, and only moderately familiar with XSLT.

    > I am getting the error "Variable '$inputparam' has not been bound to a value". Can anyone tell me what I am missing?
    At runtime the variable does not get value.  You need to assign value to the variable inputparam. Just curious why dont use the RFC lookup graphical  which is very easy and no need to handle java programming. You need to configure just reciever RFC communication channel.

  • PI 7.1 EHP1 RFC Lookup- Issue

    Friends,
    I'm seeing one strange issue in RFC Lookup behavior in my PI 7.1 EHP1 . Please give me some ideas for the same
    Please see the below image for what I have done and what I'm seeing in the display queue.
    http://www.flickr.com/photos/8764045@N06/4642237515/sizes/o/
    To make it more simple - When I click on the Display queue on RFC lookup, I can see some 20 values with context changed. I removed my context and passed it to the UDF. When I check the input length in the UDF it's always giving 1, even though the display queue gives me 20 values.
    Any ideas?
    -Raj.

    Stefan/Sarvesh,
    Thanks for your replies . Please see the below snapshots for complete picture.
    UDF code & Properties -http://www.flickr.com/photos/8764045@N06/4643880555/sizes/o/
    RFC Lookup Properties -http://www.flickr.com/photos/8764045@N06/4643880541/sizes/o/
    Display Queues on UDF and RFC Lookup -http://www.flickr.com/photos/8764045@N06/4643883271/sizes/o/
    I truly appreciate all your help on this.
    -Raj.

  • RFC lookup in Integration Scenario

    Hi,
    I have a scenario where I need to do RFC lookup first and based on the values ( typically the lookup will give file path and file name), I need to send these values as variable substitution to file adapter to read the file. The above is in loop until all entries from lookup are used up. If all entries in lookup are used up then the scenario should run again every 5 minutes automatically.
    Is there anyway possible to achieve the above in XI/PI. We are on SP14.
    Thanks in advance for your help

    Hi,
      you will use RFCLook up at Message mapping.
      the out put values of RFC look up mapped to two target fields 
    1. file name
    in the variale substitution give file name schema as %var%
    mention var = payload:Message type,1,item,filename
    warm regards
    mahesh.

Maybe you are looking for

  • Excel output (with graphics)

    Hello, I am using Oracle reports 10g 1.2.0 version. We need to generate oracle reports in Excel format ("real" Excel, not delimited text) with tabular data and also graphics. I used desformat=spreasheet. But is is giving only one worksheet. I've foun

  • When using my Gmail account, I often (many times a day) get "Unresponsive Script" errors.

    when using my Gmail account I often (many times daily) get "Unresponsive Script" errors. I have to hit "CONTINUE" button to continue.

  • Web Dynpro ABAP v/s BSP

    These questions are for someone who have extensively worked on both Web Dynpro ABAP as well as BSP in the past. (1) Will it be worth gaining knowledge on BSP since we already have now Web       Dynpro ABAP platform for web development ?.     Will it

  • Network connection to airport express fails

    All of a sudden I can no longer stream music to my airport expresses. (I have two). Some times I get a (unknown error occured 1500) error. I am running windows xp. How do I trouble shoot / fix this problem? I can send stream music from my ipod and ip

  • Backing up a external hard disk attached to Time Capsule

    I have a hard drive attached to the USB port on my Time Capsule where i keep iTunes music and iPhoto Library, however my problem is that this drive does not get backed up through Time Machine. For some reason Time Machine cannot 'see' it? Any advice?