Perform Party lookup in a UDF

Hi
We have defined our message parties as PI parties. It works quite easy to use the lookup code as bellow in an adapter module or adapter.
Is there a the same possible in a UDF. I cannot find this in the API or am I missing something.
  NormalizationManager normManager = NormalizationManager.getInstance();
    Party party=null;
try {
          party= normManager.getXIParty(ADDR_AGENCY_FIGAF, schema, bank);
     } catch (CPAException e) {
   throw new StreamTransformationException("Unable to convert house bank "+bank));

Hi Daniel
You want to read the sender party or receiver party?
You can read the sender party or receiver party from UDF or java mapping using the below API
https://help.sap.com/javadocs/NW04/current/pi/com/sap/aii/mapping/api/StreamTransformationConstants.html

Similar Messages

  • Can not perform RFC  lookup

    Hi All,
    We are getting below error in doing testing in PI mapping.We are calling a RFC function module in PI.
    Cannot perform RFC lookup com.sap.aii.mapping.api.StreamTransformationException: Cannot perform RFC lookup at com.sap.aii.mappingtool.flib7.RfcLookup.cacheMore(RfcLookup.java:105) at com.sap.aii.mappingtool.tf7.rt.AMultiResIterator$MultiOutIterator.gotoNextContext(AMultiResIterator.java:95) at com.sap.aii.mappingtool.tf7.AMappingProgram.processNode(AMappingProgram.java:299) at com.sap.aii.mappingtool.tf7.AMappingProgram.processNode(AMappingProgram.java:395) at com.sap.aii.mappingtool.tf7.AMappingProgram.processNode(AMappingProgram.java:395) at com.sap.aii.mappingtool.tf7.AMappingProgram.start(AMappingProgram.java:482) at com.sap.aii.mappingtool.tf7.Transformer.start(Transformer.java:133) at com.sap.aii.mappingtool.tf7.AMappingProgram.transform(AMappingProgram.java:612) 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.GeneratedMethodAccessor743.invoke(Unknown Source) 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 $Proxy1621.execute(Unknown Source) at sun.reflect.GeneratedMethodAccessor742.invoke(Unknown Source) 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) Caused by: com.sap.aii.mapping.lookup.LookupException: Exception during processing the payload. Error when calling an adapter by using the communication channel BigWRFCReceiver (Party: , Service: KD3_300, Object ID: 4dcd47e22ff0367ea3779fe0e9dc7fd2) XI AF API call failed. Module exception: 'error while processing the request to rfc-client: com.sap.aii.adapter.rfc.afcommunication.RfcAFWException: RfcAdapter: receiver channel has static errors: can not instantiate RfcPool caused by: com.sap.aii.adapter.rfc.RfcAdapterException: error initializing RfcClientPool:com.sap.aii.adapter.rfc.core.repository.RfcRepositoryException: can not connect to destination system due to: com.sap.mw.jco.JCO$Exception: (102) RFC_ERROR_COMMUNICATION: Connect to SAP gateway failed Connect_PM TYPE=A ASHOST=KD3.AP.CSPLC.ORG SYSNR=22 GWHOST=KD3.AP.CSPLC.ORG GWSERV=sapgw22 PCS=1  LOCATION CPIC (TCP/IP) on local host with Unicode ERROR partner '10.227.148.123:sapgw22' not reached TIME Fri Aug 6 02:11:46 201 RELEASE 710 COMPONENT NI (network interface) VERSION 39 RC -10 MODULE nixxi.cpp LINE 2778 DETAIL NiPConnect: 10.227.148.123:3322 SYSTEM CALL connect ERRNO 239 ERRNO TEXT Connection refused COUNTER 27 '. Cause Exception: 'com.sap.aii.adapter.rfc.afcommunication.RfcAFWException: RfcAdapter: receiver channel has static errors: can not instantiate RfcPool caused by: com.sap.aii.adapter.rfc.RfcAdapterException: error initializing RfcClientPool:com.sap.aii.adapter.rfc.core.repository.RfcRepositoryException: can not connect to destination system due to: com.sap.mw.jco.JCO$Exception: (102) RFC_ERROR_COMMUNICATION: Connect to SAP gateway failed Connect_PM TYPE=A ASHOST=KD3.AP.CSPLC.ORG SYSNR=22 GWHOST=KD3.AP.CSPLC.ORG GWSERV=sapgw22 PCS=1  LOCATION CPIC (TCP/IP) on local host with Unicode ERROR partner '10.227.148.123:sapgw22' not reached TIME Fri Aug 6 02:11:46 201 RELEASE 710 COMPONENT NI (network interface) VERSION 39 RC -10 MODULE nixxi.cpp LINE 2778 DETAIL NiPConnect: 10.227.148.123:3322 SYSTEM CALL connect ERRNO 239 ERRNO TEXT Connection refused COUNTER 27 '. com.sap.aii.mapping.lookup.LookupException: Error when calling an adapter by using the communication channel BigWRFCReceiver (Party: , Service: KD3_300, Object ID: 4dcd47e22ff0367ea3779fe0e9dc7fd2) XI AF API call failed. Module exception: 'error while processing the request to rfc-client: com.sap.aii.adapter.rfc.afcommunication.RfcAFWException: RfcAdapter: receiver channel has static errors: can not instantiate RfcPool caused by: com.sap.aii.adapter.rfc.RfcAdapterException: error initializing RfcClientPool:com.sap.aii.adapter.rfc.core.repository.RfcRepositoryException: can not connect to destination system due to: com.sap.mw.jco.JCO$Exception: (102) RFC_ERROR_COMMUNICATION: Connect to SAP gateway failed Connect_PM TYPE=A ASHOST=KD3.AP.CSPLC.ORG SYSNR=22 GWHOST=KD3.AP.CSPLC.ORG GWSERV=sapgw22 PCS=1  LOCATION CPIC (TCP/IP) on local host with Unicode ERROR partner '10.227.148.123:sapgw22' not reached TIME Fri Aug 6 02:11:46 201 RELEASE 710 COMPONENT NI (network interface) VERSION 39 RC -10 MODULE nixxi.cpp LINE 2778 DETAIL NiPConnect: 10.227.148.123:3322 SYSTEM CALL connect ERRNO 239 ERRNO TEXT Connection refused COUNTER 27 '. Cause Exception: 'com.sap.aii.adapter.rfc.afcommunication.RfcAFWException: RfcAdapter: receiver channel has static errors: can not instantiate RfcPool caused by: com.sap.aii.adapter.rfc.RfcAdapterException: error initializing RfcClientPool:com.sap.aii.adapter.rfc.core.repository.RfcRepositoryException: can not connect to destination system due to: com.sap.mw.jco.JCO$Exception: (102) RFC_ERROR_COMMUNICATION: Connect to SAP gateway failed Connect_PM TYPE=A ASHOST=KD3.AP.CSPLC.ORG SYSNR=22 GWHOST=KD3.AP.CSPLC.ORG GWSERV=sapgw22 PCS=1  LOCATION CPIC (TCP/IP) on local host with Unicode ERROR partner '10.227.148.123:sapgw22' not reached TIME Fri Aug 6 02:11:46 201 RELEASE 710 COMPONENT NI (network interface) VERSION 39 RC -10 MODULE nixxi.cpp LINE 2778 DETAIL NiPConnect: 10.227.148.123:3322 SYSTEM CALL connect ERRNO 239 ERRNO TEXT Connection refused COUNTER 27 '. at com.sap.aii.ibrun.server.lookup.AdapterProxyLocal.process(AdapterProxyLocal.java:92) at com.sap.aii.ibrun.server.lookup.SystemAccessorInternal.call(SystemAccessorInternal.java:55) at com.sap.aii.ibrun.server.lookup.SystemAccessorHmiServer.process(SystemAccessorHmiServer.java:140) at com.sap.aii.ibrun.server.lookup.SystemAccessorHmiServer.process(SystemAccessorHmiServer.java:73) at com.sap.aii.utilxi.hmis.server.HmisServiceImpl.invokeMethod(HmisServiceImpl.java:167) at com.sap.aii.utilxi.hmis.server.HmisServer.process(HmisServer.java:212) at com.sap.aii.utilxi.hmis.web.HmisServletImpl.processRequestByHmiServer(HmisServletImpl.java:337) at com.sap.aii.utilxi.hmis.web.HmisServletImpl.processRequestByHmiServer(HmisServletImpl.java:238) at com.sap.aii.utilxi.hmis.web.workers.HmisInternalClient.doWork(HmisInternalClient.java:70) at com.sap.aii.utilxi.hmis.web.HmisServletImpl.doWork(HmisServletImpl.java:532) at com.sap.aii.utilxi.hmis.web.HmisServletImpl.doPost(HmisServletImpl.java:670) at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at com.sap.engine.services.servlets_jsp.server.Invokable.invoke(Invokable.java:66) at com.sap.engine.services.servlets_jsp.server.Invokable.invoke(Invokable.java:32) at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:431) at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:289) at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:387) at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:376) at com.sap.engine.services.servlets_jsp.filters.ServletSelector.process(ServletSelector.java:85) at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:71) at com.sap.engine.services.servlets_jsp.filters.ApplicationSelector.process(ApplicationSelector.java:160) at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:71) at com.sap.engine.services.httpserver.filters.WebContainerInvoker.process(WebContainerInvoker.java:67) at com.sap.engine.services.httpserver.chain.HostFilter.process(HostFilter.java:9) at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:71) at com.sap.engine.services.httpserver.filters.ResponseLogWriter.process(ResponseLogWriter.java:60) at com.sap.engine.services.httpserver.chain.HostFilter.process(HostFilter.java:9) at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:71) at com.sap.engine.services.httpserver.filters.DefineHostFilter.process(DefineHostFilter.java:27) at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12) at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:71) at com.sap.engine.services.httpserver.filters.MonitoringFilter.process(MonitoringFilter.java:29) at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12) at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:71) at com.sap.engine.services.httpserver.server.Processor.chainedRequest(Processor.java:295) at com.sap.engine.services.httpserver.server.Processor$FCAProcessorThread.run(Processor.java:222) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(Native Method) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:152) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:247) Caused by: com.sap.aii.af.service.api.AFException: XI AF API call failed. Module exception: 'error while processing the request to rfc-client: com.sap.aii.adapter.rfc.afcommunication.RfcAFWException: RfcAdapter: receiver channel has static errors: can not instantiate RfcPool caused by: com.sap.aii.adapter.rfc.RfcAdapterException: error initializing RfcClientPool:com.sap.aii.adapter.rfc.core.repository.RfcRepositoryException: can not connect to destination system due to: com.sap.mw.jco.JCO$Exception: (102) RFC_ERROR_COMMUNICATION: Connect to SAP gateway failed Connect_PM TYPE=A ASHOST=KD3.AP.CSPLC.ORG SYSNR=22 GWHOST=KD3.AP.CSPLC.ORG GWSERV=sapgw22 PCS=1  LOCATION CPIC (TCP/IP) on local host with Unicode ERROR partner '10.227.148.123:sapgw22' not reached TIME Fri Aug 6 02:11:46 201 RELEASE 710 COMPONENT NI (network interface) VERSION 39 RC -10 MODULE nixxi.cpp LINE 2778 DETAIL NiPConnect: 10.227.148.123:3322 SYSTEM CALL connect ERRNO 239 ERRNO TEXT Connection refused COUNTER 27 '. Cause Exception: 'com.sap.aii.adapter.rfc.afcommunication.RfcAFWException: RfcAdapter: receiver channel has static errors: can not instantiate RfcPool caused by: com.sap.aii.adapter.rfc.RfcAdapterException: error initializing RfcClientPool:com.sap.aii.adapter.rfc.core.repository.RfcRepositoryException: can not connect to destination system due to: com.sap.mw.jco.JCO$Exception: (102) RFC_ERROR_COMMUNICATION: Connect to SAP gateway failed Connect_PM TYPE=A ASHOST=KD3.AP.CSPLC.ORG SYSNR=22 GWHOST=KD3.AP.CSPLC.ORG GWSERV=sapgw22 PCS=1  LOCATION CPIC (TCP/IP) on local host with Unicode ERROR partner '10.227.148.123:sapgw22' not reached TIME Fri Aug 6 02:11:46 201 RELEASE 710 COMPONENT NI (network interface) VERSION 39 RC -10 MODULE nixxi.cpp LINE 2778 DETAIL NiPConnect: 10.227.148.123:3322 SYSTEM CALL connect ERRNO 239 ERRNO TEXT Connection refused COUNTER 27 '. at com.sap.aii.af.service.api.AdapterAccess.sendMsg(AdapterAccess.java:214) at com.sap.aii.af.service.api.AdapterAccess.call
    Please sugets how to resolve this issue.
    Thanks
    Mohit

    Hi Mohit,
    Do full CACHE refresh.
    http://<host>:5<sys#>00/CPACache/refresh?mode=full
    This may solve the issue.
    Thanks,
    Vijay.

  • Cannot perform RFC lookup

    Hi All,
    We are getting below error in doing testing in PI mapping.
    Cannot perform RFC lookup com.sap.aii.mapping.api.StreamTransformationException: Cannot perform RFC lookup at com.sap.aii.mappingtool.flib7.RfcLookup.cacheMore(RfcLookup.java:105) at com.sap.aii.mappingtool.tf7.rt.AMultiResIterator$MultiOutIterator.gotoNextContext(AMultiResIterator.java:95) at com.sap.aii.mappingtool.tf7.rt.C2CFunctionWrapper.cacheContext(C2CFunctionWrapper.java:77) at com.sap.aii.mappingtool.tf7.rt.C2CFunctionWrapper.gotoNextContext(C2CFunctionWrapper.java:42) at com.sap.aii.mappingtool.tf7.AMappingProgram.processNode(AMappingProgram.java:317) at com.sap.aii.mappingtool.tf7.AMappingProgram.processNode(AMappingProgram.java:410) at com.sap.aii.mappingtool.tf7.AMappingProgram.processNode(AMappingProgram.java:410) at com.sap.aii.mappingtool.tf7.AMappingProgram.processNode(AMappingProgram.java:410) at com.sap.aii.mappingtool.tf7.AMappingProgram.processNode(AMappingProgram.java:410) at com.sap.aii.mappingtool.tf7.AMappingProgram.start(AMappingProgram.java:502) at com.sap.aii.mappingtool.tf7.Transformer.start(Transformer.java:133) at com.sap.aii.mappingtool.tf7.AMappingProgram.transform(AMappingProgram.java:632) 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.GeneratedMethodAccessor701.invoke(Unknown Source) 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:46) 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 $Proxy1525.execute(Unknown Source) at sun.reflect.GeneratedMethodAccessor700.invoke(Unknown Source) 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:355) at com.sap.engine.services.rmi_p4.server.ServerDispatchImpl.run(ServerDispatchImpl.java:69) at com.sap.engine.services.rmi_p4.P4Message.process(P4Message.java:67) at com.sap.engine.services.rmi_p4.P4Message.execute(P4Message.java:41) at com.sap.engine.services.cross.fca.FCAConnectorImpl.executeRequest(FCAConnectorImpl.java:977) at com.sap.engine.services.rmi_p4.P4Message.process(P4Message.java:57) at com.sap.engine.services.cross.fca.MessageReader.run(MessageReader.java:55) at com.sap.engine.core.thread.execution.Executable.run(Executable.java:115) at com.sap.engine.core.thread.execution.Executable.run(Executable.java:96) at com.sap.engine.core.thread.execution.CentralExecutor$SingleThread.run(CentralExecutor.java:314) Caused by: com.sap.aii.mapping.lookup.LookupException: Connection to system RUNTIME using application RUNTIME lost. Detailed information: Error accessing "http://sapdevpid01:51000/run/system/int?container=web" with user "PIREPUSER". Response code is 401, response message is "Unauthorized" at com.sap.aii.ibrep.server.lookup.LookupServiceProvider$RemoteClientDelegator.<init>(LookupServiceProvider.java:103) at com.sap.aii.ibrep.server.lookup.LookupServiceProvider$RemoteClientDelegator.<init>(LookupServiceProvider.java:86) at com.sap.aii.ibrep.server.lookup.LookupServiceProvider$RemoteClient.getSystemAccessor(LookupServiceProvider.java:73) at com.sap.aii.mapping.lookup.LookupService.getRfcAccessor(LookupService.java:258) at com.sap.aii.mappingtool.flib7.RfcLookup.cacheMore(RfcLookup.java:78) ... 52 more Caused by: com.sap.aii.utilxi.hmi.api.HmiCoreException: Connection to system RUNTIME using application RUNTIME lost. Detailed information: Error accessing "http://sapdevpid01:51000/run/system/int?container=web" with user "PIREPUSER". Response code is 401, response message is "Unauthorized" at com.sap.aii.utilxi.hmi.api.HmiCoreException.newCommunicationError(HmiCoreException.java:85) at com.sap.aii.utilxi.hmi.api.HmiHttpJDKClient.sendRequestAndReceiveResponse(HmiHttpJDKClient.java:184) at com.sap.aii.utilxi.hmi.api.HmiClientAdapter.invokeMethod(HmiClientAdapter.java:92) at com.sap.aii.ibrep.server.lookup.SystemAccessorHmiClient.<init>(SystemAccessorHmiClient.java:50) at com.sap.aii.ibrep.server.lookup.SystemAccessorHmiClient.getInstance(SystemAccessorHmiClient.java:71) at com.sap.aii.ibrep.server.lookup.LookupServiceProvider$RemoteClientDelegator.<init>(LookupServiceProvider.java:96) ... 56 more Root Cause: com.sap.aii.mapping.lookup.LookupException: Connection to system RUNTIME using application RUNTIME lost. Detailed information: Error accessing "http://sapdevpid01:51000/run/system/int?container=web" with user "PIREPUSER". Response code is 401, response message is "Unauthorized" at com.sap.aii.ibrep.server.lookup.LookupServiceProvider$RemoteClientDelegator.<init>(LookupServiceProvider.java:103) at com.sap.aii.ibrep.server.lookup.LookupServiceProvider$RemoteClientDelegator.<init>(LookupServiceProvider.java:86) at com.sap.aii.ibrep.server.lookup.LookupServiceProvider$RemoteClient.getSystemAccessor(LookupServiceProvider.java:73) at com.sap.aii.mapping.lookup.LookupService.getRfcAccessor(LookupService.java:258) at
    Thank you very much for advance.
    Ferran

    hi
    Check in SM59 the RFC destination is working fine
    Check the RFC communication channel is without error
    also
    Please check if the RFC is imported properly and you are using RFCLookup function in the mapping.
    Check if you have completd the parameter creation

  • Best practices for maximum performance of C# CLR scalar UDF in View

    Can anyone give some tips for best performance of a C# CLR UDF on SQL 2008 R2 or SQL 2012? Including maximizing the performance of the transition to CLR. I am using it in a View.  E.g.,
    create myview (id, name, address) as select id, dbo.MyUDF(name), address from mytable;
    In particular:
    Are there any specific C# build options or source code options? The MyUDF prototype is defined as:
        [Microsoft.SqlServer.Server.SqlFunction()]
        public static SqlString MyUDF(SqlString data)
    Is it better to build the DLL for target x64 or Any CPU?
    Does the use of a specific Target Framework have any effect? (e.g., DotNet 3.5 versus DotNet 4.0 or 4.5)
    Is there any way to inform SQL Server that the UDF is safe for Parallelism? 
    I read somewhere that using the InProc ado.net Provider might improve performance but I don't see any mention of a Provider in the documentation for Create Assembly.
    Thanks for any tips.
    Neil Weicher
    www.netlib.com

    * Does the use of a specific Target Framework have any effect? (e.g., DotNet 3.5 versus DotNet 4.0 or 4.5)
    Yes, if you select 4.0 or higher, the assembly will not load on SQL 2008 R2.
    * Is there any way to inform SQL Server that the UDF is safe for Parallelism? 
    User-defined functions (save for inline) in general is a good recipe if you want to make sure that there is no parallelism. That is, the answer to your question is no, and if there is, SQL Server does not care.
    * I read somewhere that using the InProc ado.net Provider might improve performance but I don't see any mention of a Provider in the documentation for Create Assembly.
    Not sure what you mean here, but if you mean the context connection, this is in your code, and have nothing to do with what you put in CREATE ASSEMBLY. Except that, if you connect by some other means than the context connection, the assembly needs to have
    EXTERNAL_ACCESS_PERMISSION. But are you really doing data access from your UDF?
    Erland Sommarskog, SQL Server MVP, [email protected]

  • Security question JAAS: performing EJB lookup and authorized creation how?

    Basic question is:
    How can I perform a lookup from within a servlet to a stateless EJB in the same JVM and apply credentials to this EJB, so method calls perform following the authorization rules supplied on the EJB?
    Trying to get this thing to work leads to:
      javax.ejb.AccessLocalException: anonymous is not allowed to call this EJB method,
           check your security settings (method-permission in ejb-jar.xml and
           security-role-mapping in orion-application.xmlI've checked this over and over, but cannot find any possible cause for the error. I've mapped the logical authorization role from the ejb-jar.xml to a user known in a JAZN resource - so I'm thinking my InitialContext call is wrong.
    Can somebody help me out?

    What version of OC4J are you using?
    Can you post your contents in the ejb-jar.xml for the method permissions for your EJB you are looking up ?
    Also please post the code that looks up the local EJB?
    -Debu

  • Value mapping performance using LookUp API

    All,
    We are using Value mapping look up from an external table using JDBC adapter and Lookup API. The scenario works good, but the performance is a hit for us as it is taking 7 seconds for the first step and the subsequent steps are taking much longer. In the performance header it shows that the steps "DB ENTRY QUEUING" and "DB SPLITTER QUEUING" are taking 90% of the time even though mapping execution is real quick.
    We tried the below things which did not help us analyze or isolate the problem.
    1. We increased the number of dialog processes from 3 to 8. (Optimal value should be 5)
    2. We tested the scenario using Value mapping in ID instead of external table. But it is almost taking the same time in the above two steps mentioned.
    I would like to know whether any kind of configuration settings to be done on the server like "specifying connection pool capabilities" etc...
    Any pointers would be really appreciated.
    Thanks and Regards,
    GP

    Hi,
    Have you seen this weblogs by Prasad recently:
    /people/prasad.illapani/blog/2007/03/08/performance-tuning-checks-in-sap-exchange-infrastructure
    /people/prasad.illapani/blog/2007/04/20/performance-tuning-checks-in-sap-exchange-infrastructurexi-part-ii
    Also are you doing multiple lookups or a single lookup? If you are using multiple lookup for multiple fields which has the same logic then try to use global variables.
    ---Satish

  • Cannot perform Bean lookup on signed Applet jar

    Hi All,
    I'm after developing an applet which runs from a number of jars on an Orion app server. Each one of these jars are signed and I can access the Applet okay. The problem is that I make remote reference to EJB's throughout the application. I cannot perform a Bean lookup on a signed jar. The only way it can be done is when the Client is granted all permissions. The client should pop up an option to grant permissions.

    If u are signing all the jar file along with the applet it should work
    It does work fine with me. my code given below
    note that i carry the following jar files along with my applet jar.
    orion.jar,ejb.jar,,jta.jar,jnet.jar,jsse.jar,jcert.jar,parser.jar
    and have them in my archive attribute of my html code for the applet
    also all these jars are signed
    hope this helps
    regards
    raees
    public void init()
         try
              Hashtable env = new Hashtable();
              env.put(Context.INITIAL_CONTEXT_FACTORY, "com.evermind.server.rmi.RMIInitialContextFactory");
              env.put(Context.PROVIDER_URL, "ormi://solomon:23791/helloApp");
              env.put("java.naming.security.principal", "admin");
              env.put("java.naming.security.credentials", "secret");
              Context ic = new InitialContext (env);
              HelloHome hello_home = (HelloHome)ic.lookup("HelloBean");
         Hello hello = hello_home.create ();
              System.out.println (hello.helloWorld ());
         }catch(Exception e)
              e.printStackTrace();

  • Lookup soap inside udf

    hi,
    i am tring to use soap inside udf for lookup api. i am looking at class com.sap.aii.mapping.lookup.SystemAccessor.
    is this class for soap lookup? 
    i am not clear on soap lookup  since i have not created any message interface for jdbc, rfc lookup. if i am on right way to use this class for soap lookup, do i have to create dt, mt, mi? please guide me!! how to deal with wsdl  for lookup and necessary things.
    // 1. Get a system accessor for a channel.
    SystemAccessor accessor = LookupService.getSystemAccessor(channel);
    try{
    // 2. Create a payload according to the data type.
    // Use service.getBinaryPayload() for binary payload,
    // or service.getTextPayload() for text payloads.
    Payload payload = LookupService.getXmlPayload(inputStream);
    // 3. Set the operation name and namespace; optional step, only necessary if the
    // used adapter needs these parameters.
    accessor.setOperationName(interfaceName);
    accessor.setOperationNamespace(interfaceNS);
    // 4. Execute lookup.
    Payload result = accessor.call(payload);
    // Steps 2. and 4. can be executed several times.
    }finally{
    // 5. close the accessor in order to free resources.
    if (accessor!=null) accessor.close();
    thanks
    venjamin

    Ok, I found the missing things, because I had to add to the xml tags the input fields
    from my soap lookup (like <Street>"+Street+"</Street>)
    The UDF Soap lookup is now running, but I have a problem with the special characters
    like the German ü, ä …
    I set the encoding UTF-8 in the first tag of the payload
    String SOAPxml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
    But the SOAP Receiver Adapter don´t care about this setting and the ü will be send as an ? to the target system. In my scenario I do a UDF soap lookup inside the graphical mapping to an webservice and the interface after the mapping will also call the same webservice with another operation. I use 2 communication channels. 1 for the UDF Lookup with an URL and an action. The
    second CC I use for the normal interface call after the mapping with the same URL and another action.
    In my normal graphical mapping I have also fields with special character an these fields arrive correctly in the target system. Only the fields with special character in the UDF are not
    correct, but there is no different in these 2 CC.
    Any idea?
    Kind regards
    Christoph

  • Trouble performing a lookup for the queue on JBoss/axis

    Hi all,
    I am trying to develop a webservice which can write messages to a JMS queue and read from a JMS topic. JBoss is the application server, and i have installed tomcat axis 1.1 on the server for developing the webservice.
    I am having trouble accessing looking up the queue, to be clear this is the code im using,
    QueueConnectionFactory cf_callset;
    TopicConnectionFactory cf_resultset;
    try
         Hashtable props = new Hashtable();
         props.put(Context.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory");
         props.put(Context.PROVIDER_URL,"jnp://localhost:1099");
         Context ctx = new InitialContext(props);
    cf_callset = (QueueConnectionFactory)ctx.lookup("XAConnectionFactory");
    cf_resultset = (TopicConnectionFactory) ctx.lookup("XAConnectionFactory");
    m_callSetQueue = (Queue)ctx.lookup("queue/CallSetQueue");
    m_resultSetTopic = (Topic)ctx.lookup("topic/ResultSetTopic");
    catch(NamingException ne)
         Logger log = new Logger();
         log.logError("221","Failed To Initialize JMS", ne.getStackTrace().toString());
    this code snippet throws a NamingException saying CallSetQueue not bound. but when i run this code snippet as a console application, it works just fine.
    i have also observed a strange thing.
    this class is in a different package, so i have copied this package files in to the /axis/web-inf/classes folder.
    I tried in a different way by, adding this code snippet to a method in the .jws file itself and it worked fine. im really confused as to why this is happening.
    Any help will be greatlly appreciated.
    Thanks

    Thank you for your response - I'm not sure I understand your question,  but hopefully this will help: I created a table, then dragged numeric fields into the cells from the object library. I clicked the numeric fields to name them Fed 1, Fed 2 etc.
    Does that help?

  • Can I perform a lookup to verify the value of a variable is contained in another list column?

    I am working in Sharepoint Designer and am trying to figure out how I can set a condition in an approval workflow to only complete a task if the value of a variable is contained in another list column. So if I had a list called A with column
    A1 and I am  working in the approval workflow, I only want the approval to complete if my variable is equal to any value in list A column 1. Otherwise I want to keep the approval task pending. I am very new to sharepoint so any help would be appreciated.
    Thank you.

    Hi,
    You can use the condition "if any value equals value". Please  refer below links for reference.
    http://office.microsoft.com/en-in/sharepoint-designer-help/workflow-conditions-in-sharepoint-designer-2010-a-quick-reference-guide-HA010376962.aspx
    http://www.codeproject.com/Articles/125120/Step-by-Step-Guide-in-Developing-your-own-Workflow
    Best Regards,
    Pavan Kumar Sapara.
    Please remember to mark your question as answered &Vote helpful,if this solves/helps your problem.
    s p kumar

  • Use block processor to perform lookups in alternate HFM app

    Hi All,
    I would like to use the block processor to perform attribute lookups (using functions such as GetCustomTopMember, etc) on an alternate application (ie: not the one that is connected to the FDM app in the adapter). We are pulling data out of one HFM application and pushing it into another HFM application. I need to look up attributes of the metadata in the SOURCE application. Any way to do it? Maybe set up the source app in a seperate adapter - but then how do I invoke it for the block processor?
    Any thoughts most appreciated!
    Thanks!

    Hi Chris,
    Thanks for posting and the detailed background on the project! To answer some of your questions:
    1. The FFT Express VI does use a significant amount of space. The FPGA on the myRIO is somewhat limited space-wise. Your best option may to implement the FFT for 1 channel on the FPGA and the other two on the RT side.
    2. I converted the FFT Express VI to a subVI and I am not sure if you can trim too much code from it. The subVI is also very complex so re-working it would be a significant amount of work. I could not find much documentation on M-interval input indexes / Continuous output indexes Input/Output Index Pattern mode timing. 
    I hope that this helps!
    Thanks,
    Frank
    Application Engineer
    National Instruments

  • PI 7.11 mapping lookup - data enrichment - appropriate approach?

    Hi guys,
    we just upgraded from PI 7.0 to PI 7.11.
    Now I´m facing a new scenario where an incoming order have to be processed.
    (HTTP to RFC)
    Furthermore each item of the order have to be enriched by data looked up in a SAP ERP 6.0 system.
    the lookup functionality could be accessed during RFC or ABAP Proxy
    With the new PI release we have several possibilities to implement this scenario, which are ...
    (1) graphical RFC Lookup in message mapping
    (2) ccBPM
    (3) using of the lookup API in java mapping
    (4) message mapping RFC Lookup in a UDF
    Because of performance reason I prefer to make use of the Advanced Adapter Engine, if this is possible.
    Further there should only one lookup request for all items of the order instead of each order item.
    I tried to implement possiblity (1), but it seems to be hard to fill the request table structure of the RFC function module. All examples in SDN only uses simple (single) input parameters instead of tables. Parsing the result table of the RFC seems to be tricky as well.
    Afterwards I tried to implement approach (3) using an SOAP adapter as Proxy with the protocol XI 3.0.
    (new functionality in PI 7.11)
    But this ends up in a crazy error message so it seems that SOAP adapter could not used as proxy adapter in this case.
    ccBPM seems also be an good and transparent approach, because there is no need of complex java code or lookup api.
    So  the choice is not so easy.
    What´s the best approach for this scenario??
    Are my notes to the approach correct or do I use/interpret it wrong?
    Any help, ideas appreciated
    Kind regards
    Jochen

    Hi,
    the error while trying to use the soap channel for proxy communication is ....
    com.sap.aii.mapping.lookup.LookupException: Exception during processing the payload. Error when calling an adapter by using the communication channel SOAP_RCV_QMD_100_Proxy (Party: , Service: SAP_QMD_MDT100_BS, Object ID: 579b14b4c36c3ca281f634e20b4dcf78) XI AF API call failed. Module exception: 'com.sap.engine.interfaces.messaging.api.exception.MessagingException: java.io.IOException: Unexpected length of element <sap:Error><sap:Code> = XIProxy; HTTP 200 OK'. Cause Exception: 'java.io.IOException: Unexpected length of element <sap:Error><sap:Code> = XIProxy; HTTP 200 OK'.
    so this feature seems not to work for soap lookups, isn´t it.
    Kind regards
    Jochen

  • How can I use a Lookup task to lookup from my SQL Result set and have a join

    So in my Control Flow, I have an Execute SQL Task which gets my Table result set. I then have a Foreach Loop Container that iterates through the result set and a Data Flow. The first task in the Data Flow is an OLE DB Source SQL Command that retrieves data
    columns associated with my result set. I then do a Derived Column so I can SUBSTRING from one of my data columns and now I want to perform a Lookup to my Application Database.
    How do I code my Lookup task to utilize my SQL Result set variable and match on it? I cannot use the GUI for the Lookup task as my Lookup has to have some JOINS in it.
    Thanks for your review and am hopeful for a reply.

    Can you expand on that? I'm sorry but I am new and a novice to the SSIS world and I want to do this as best I can and as efficiently as I can. Are you saying that Rajen's way suggested above is the way to go?
    A little background....external data from a 3rd party client. I'v staged that external data to a SQL Server staging table. I have to try and match that data up to our database using SSN, DOB, and Gender...and if I can't match that way then I have to try
    and match by Name. I need to make sure that there is only one and only one account for that match. If I cannot match and match one and only one, then I'll create rows on a DataAnomaly Table. If I do match, then I have to check and make sure that there is only
    one and only one Member span for that match. Similarly handle the data anomaly and then check and make sure there is a "Diabetes" claim and similarly handle the DataAnomaly accordingly.
    That's where I'm at. Sooooo are you saying to use Rajen's suggestion? I don't think I can do that because I need multiple SQL tasks and I cannot connect multiple OLE DB Source tasks.
    Any help and suggestions are greatly appreciated.
    Thanks.

  • 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.

  • When we go for a UDF

    Hi,
       this is an  FAQ.. so, can you please provide me the solution for this.. I'm using PI 7.0 in which scenario we need to go for UDF..  normally in PI  for everything standard functions are there.. even though.. some times we need to go for an UDF's.. can anybody  give the scenarios.. when exactly we need to go for a n UDF..
    how can we sya this with better answer..
    Thanks
    babu

    Hi Babu,
    As u r aware that UDF is the functinality provided by XI where we can not fulfill the requirement by Std functions.
    Let me give you few example:
    1) UDF is required when we want to do lookup in R3,which can not be done with std function.
    Within an XI mapping it is a common requirement to be able to perform data lookups on-the-fly. In particular, there may be a need to look up some data that is maintained in an R/3 application.
    In the error handling topic we have seen the different validations which need to be performed on file. This can be done through Lookup.
    Some use cases:
    •     Look up material number from table MARA.
    •     Look up cost center budget.
    •     Look up employee information.
    •     Look up unit-of-measure (UOM) information from table t006a.
    •     Lookup for raising an alert.
    In this case we need to write the UDF for the same.
    2) UDF is used when you want to get the file value dynamically from the File adapter that time you have to go for UDF.
    3) When there is a requirement where you need to do the comparision of input value with some value and based on that comparision you need to return some different value.
    4) You can use USF for raising alert.
    5) You can use UDF for calling passing values to other java code.
    There are many examples but it depends upon the requirement.
    Thnx
    Chirag

Maybe you are looking for