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
Similar Messages
-
Exception handling in rfcs and bapis
exception handling in rfcs and bapis
Hi Jayakrishna,
In General , there are non execptions in BAPIs, because of the reason, that the exception raised in a SAP envoronment may not mean anything for a non SAP initiator. All the exception situations would only fill the return table(TYpe BAPIRET2 or something like that). If you read that table after the call to the bapi, you can understand what has gone wrong.
Regards,
Ravi -
Mapping Exception Issue with RFC LookUp
Hi,
My scenario is Idoc To file, in my idoc user who created a purchase order filed is not there but in xml file i want the user who create that PO, for this i am using RFC LooUp. I want the user who created a purchase order.
Graphical Mapping looks like below.
Belnr-->User Defined Function--
>UserName
Please find the code bloew:
String DBTABLE = "EKKO";
String lookUpField = "ERNAM";
String WHERE_CLAUSE = " EBELN "" = "" ' "a" ' " ;
JCO.Repository mRepository;
JCO.Client mConnection = JCO.createClient(
"500",
"RFCUSER",
"abc1234",
"EN",
"cxylo06",
"05");
// connect to SAP
mConnection.connect();
// create repository
mRepository = new JCO.Repository( "GenericRFCMappingLookup", mConnection );
// create function template to select data from any table
JCO.Function function = null;
IFunctionTemplate ft = mRepository.getFunctionTemplate("RFC_READ_TABLE");
function = ft.getFunction();
// Obtain parameter list for function
JCO.ParameterList input = function.getImportParameterList();
// Pass function parameters
// set import parameters table name and RFC
input.setValue( DBTABLE, "QUERY_TABLE");
input.setValue( "," , "DELIMITER");
//Fill the where clause of the table
JCO.ParameterList tabInput = function.getTableParameterList();
JCO.Table inputTable = tabInput.getTable("OPTIONS");
inputTable.appendRow();
inputTable.setValue(WHERE_CLAUSE,"TEXT");
mConnection.execute( function );
//Find the position of the field that has to be lookedUp
JCO.Table lookupFieldPos = function.getTableParameterList().getTable("FIELDS");
int pos = -1;
for (int i = 0; i < lookupFieldPos.getNumRows(); i++)
lookupFieldPos.setRow(i);
if (lookupFieldPos.getString("FIELDNAME").equals(lookUpField))
pos = i;
//Get the exact lookupvalue from the position obtained above
JCO.Table valueSet = function.getTableParameterList().getTable("DATA");
valueSet.setRow(0);
String resultSet = valueSet.getString("WA");
result.addValue(resultSet);
mConnection.disconnect();
I am not aware of java coding so kindly make necessary modifications.
Kindly suggest what changes i need to do to execute perfectly.
Your help will be greatly apprecited.
Regards,
VenkatHi Venkat,
If you use the JCO connection to get the value from RFC, it would be a problem in futherly like when you move this interface DEV to Q, then you need to change the connection parameters to establish the JCO connection.Same in Production environment too.It is not advisable to do JCO lookup. Go for RFC lookup as the link given by Farooq.
Create Reciever RFC communication channel and take the XML signature of u r RFC by importing that RFC under imported objects.Create an UDF, for this see the sample code which is exisitng in document to pass the Export parameter to RFC.
In this way u r RFC channel establish the connection to R3 and your RFC will execute and return the value.U just need to change the Reciever RFC channel parameters respective of environment.
Cheers
Veera -
BPM Exception handling for RFC errors
Hi all
I have to handle the exception which would be like below:
com.sap.aii.af.ra.ms.api.DeliveryException: error while processing message to remote system:com.sap.aii.af.rfc.core.client.RfcClientException: could not get a client from JCO.Pool: com.sap.mw.jco.JCO$Exception: (102) RFC_ERROR_COMMUNICATION: Connect to SAP gateway failed
I am trying to put Block step and things are not working fine. Can anyone please explain me the steps to trap the exception?
My scenario has synchronous call to RFC FM.
Rightnow i have inserted Exception branch in my Block step and put the send step to write the error file. I have put the Synchronous SEND step as part of block. This is not working.
Help please??Hello Samuel,
Just to close this thread and finish up my own search, where I met your discussion, here I'm quoting two experts of this forum:
"you cannot catch the exception's value in the XI "
(see posting from Michal Krawczyk, Jun 12, 2006, in thread catch the exception)
"The content of a fault message are not accessible inside a BPM."
(see posting from Bhavesh Kantilal, Oct 3, 2007, in thread Notify user about Exception in BPM)
Regards,
Dennis -
How to check was the object bound or not without exception handling?
context.lookup("someName");throws NameNotFoundException in case object was not bound to someName.
How to check was the object bound or not without exception handling?context.lookup("someName");throws NameNotFoundException in case object was not bound to someName.
How to check was the object bound or not without exception handling? -
Handling PI 7.1 RFC Lookup Exception in Graphical Mapping
Dear Experts,
I would like to know the better way of handling PI 7.1 - RFC Lookup Exception in Graphical Mapping without using BPM. Say I perform a RFC Lookup from PI 7.1 Graphical Mapping and it fails due to RFC server down. In this case I suppose the RFC exception would be returned as response to the mapping? But, am really not sure how this response (RFC Exception) could be effectively used. Please clarify.
Thanks,
Hussain.
Edited by: HussainShaik on Oct 26, 2009 8:24 AMHi Hussain,
I am not sure if I understood you query completely.
IF the RFC look up raised some exception then how this is going to impact your interface will depend your mapping (which you did in ESR)
(the following is adopted from help.sap,com)
If you handled exceptions by selecting Use Exceptions checkbox in the function properties of the standard function, the mapping editor adds an additional parameter in red (the bottommost return parameter) to the standard function in the data-flow editor. If you do not assign a target field to this return parameter, ignore the RFC exceptions (the message mapping is not terminated at runtime). Otherwise the mapping runtime transfers the exception as an XML structure and it can then be evaluated in a user-defined function, for example. If there is no exception, the mapping runtime transfers an empty context.
If you have not selected the Use Exceptions checkbox, the mapping runtime terminates the message mapping if an exception occurs during the RFC lookup.
Is this you are looking here?
Also check this thread and help.sap site
Re: SAP-PI - RFC call to SAP backend system
http://help.sap.com/saphelp_nwpi71/helpdata/en/33/1ec6ced273493a993a80c2301c03da/content.htm
Regards
Suraj -
Exception during processing the payload in RFC Lookup through XSLT
Hi All,
We are working on a scenario which does a RFC lookup through the XSLT mapping.
While testing the XSL in he Interface mapping an Exception is generated:
19:06:32 Start of test
Call XSLT processor with stylsheet UKMGetKeyMapLatest.xsl.
START APPLICATION TRACE ***
reqNode<?xml version="1.0" encoding="UTF-8"?><rfc:UKM_GET_KEY_MAPPINGS xmlns:rfc="urn:sap-com:document:sap:rfc:functions"><UKM_GET_KEY_MAPPING_Request>
<b><b><b>LookupException com.sap.aii.mapping.lookup.LookupException: Exception during processing the payload.Problem when calling an adapter by using communication channel RFC_RCV_UKMS_TO_ISV_CSV_CSV (Party: , Service: RM_DEV_PI_ISV_001, Object ID: c09e707cfb253c8997dc2451cb83e3cd) XI AF API call failed. Module exception: 'error while processing the request to rfc-client: com.sap.aii.af.rfc.afcommunication.RfcAFWException: error while processing message to remote system:com.sap.aii.af.rfc.core.client.RfcClientException: could not convert request from XML to RFC:com.sap.mw.jco.JCO$Exception</b></b></b>: (130) JCO_ERROR_XML_PARSER: Unexpecting end of buffer after <UKM_GET_KEY_MAPPING_Request>'. Cause Exception: 'error while processing message to remote system:com.sap.aii.af.rfc.core.client.RfcClientException: could not convert request from XML to RFC:com.sap.mw.jco.JCO$Exception: (130) JCO_ERROR_XML_PARSER: Unexpecting end of buffer after <UKM_GET_KEY_MAPPING_Request>'. com.sap.aii.mapping.lookup.LookupException: Problem when calling an adapter by using communication channel RFC_RCV_UKMS_TO_ISV_CSV_CSV (Party: , Service: RM_DEV_PI_ISV_001, Object ID: c09e707cfb253c8997dc2451cb83e3cd) XI AF API call failed. Module exception: 'error while processing the request to rfc-client: com.sap.aii.af.rfc.afcommunication.RfcAFWException: error while processing message to remote system:com.sap.aii.af.rfc.core.client.RfcClientException: could not convert request from XML to RFC:com.sap.mw.jco.JCO$Exception: (130) JCO_ERROR_XML_PARSER: Unexpecting end of buffer after <UKM_GET_KEY_MAPPING_Request>'. Cause Exception: 'error while processing message to remote system:com.sap.aii.af.rfc.core.client.RfcClientException: could not convert request from XML to RFC:com.sap.mw.jco.JCO$Exception: (130) JCO_ERROR_XML_PARSER: Unexpecting end of buffer after <UKM_GET_KEY_MAPPING_Request>'. at com.sap.aii.ibrun.server.lookup.AdapterProxyLocal.process(AdapterProxyLocal.java:96) at com.sap.aii.ibrun.server.lookup.SystemAccessorInternal.call(SystemAccessorInternal.java:47) at com.sap.aii.ibrun.server.lookup.SystemAccessorHmiServer.process(SystemAccessorHmiServer.java:141) at com.sap.aii.ibrun.server.lookup.SystemAccessorHmiServer.process(SystemAccessorHmiServer.java:74) at com.sap.aii.utilxi.hmis.server.HmisServiceImpl.invokeMethod(HmisServiceImpl.java:169) at com.sap.aii.utilxi.hmis.server.HmisServer.process(HmisServer.java:178) at com.sap.aii.utilxi.hmis.web.HmisServletImpl.processRequestByHmiServer(HmisServletImpl.java:296) at com.sap.aii.utilxi.hmis.web.HmisServletImpl.processRequestByHmiServer(HmisServletImpl.java:211) at com.sap.aii.utilxi.hmis.web.workers.HmisInternalClient.doWork(HmisInternalClient.java:70) at com.sap.aii.utilxi.hmis.web.HmisServletImpl.doWork(HmisServletImpl.java:496) at com.sap.aii.utilxi.hmis.web.HmisServletImpl.doPost(HmisServletImpl.java:634) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401) at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266) at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:387) at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:365) at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:944) at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:266) at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95) at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:160) at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33) at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(Native Method) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170) Root Cause: com.sap.aii.af.service.api.AFException: XI AF API call failed. Module exception: 'error while processing the request to rfc-client: com.sap.aii.af.rfc.afcommunication.RfcAFWException: error while processing message to remote system:com.sap.aii.af.rfc.core.client.RfcClientException: could not convert request from XML to RFC:com.sap.mw.jco.JCO$Exception: (130) JCO_ERROR_XML_PARSER: Unexpecting end of buffer after <UKM_GET_KEY_MAPPING_Request>'. Cause Exception: 'error while processing message to remote system:com.sap.aii.af.rfc.core.client.RfcClientException: could not convert request from XML to RFC:com.sap.mw.jco.JCO$Exception: (130) JCO_ERROR_XML_PARSER: Unexpecting end of buffer after <UKM_GET_KEY_MAPPING_Request>'. at com.sap.aii.af.service.api.AdapterAccess.sendMsg(AdapterAccess.java:214) at com.sap.aii.af.service.api.AdapterAccess.call(AdapterAccess.java:99) at com.sap.aii.ibrun.server.lookup.AdapterProxyLocal.process(AdapterProxyLocal.java:87) at com.sap.aii.ibrun.server.lookup.SystemAccessorInternal.call(SystemAccessorInternal.java:47) at com.sap.aii.ibrun.server.lookup.SystemAccessorHmiServer.process(SystemAccessorHmiServer.java:141) at com.sap.aii.ibrun.server.lookup.SystemAccessorHmiServer.process(SystemAccessorHmiServer.java:74) at com.sap.aii.utilxi.hmis.server.HmisServiceImpl.invokeMethod(HmisServiceImpl.java:169) at com.sap.aii.utilxi.hmis.server.HmisServer.process(HmisServer.java:178) at com.sap.aii.utilxi.hmis.web.HmisServletImpl.processRequestByHmiServer(HmisServletImpl.java:296) at com.sap.aii.utilxi.hmis.web.HmisServletImpl.processRequestByHmiServer(HmisServletImpl.java:211) at com.sap.aii.utilxi.hmis.web.workers.HmisInternalClient.doWork(HmisInternalClient.java:70) at com.sap.aii.utilxi.hmis.web.HmisServletImpl.doWork(HmisServletImpl.java:496) at com.sap.aii.utilxi.hmis.web.HmisServletImpl.doPost(HmisServletImpl.java:634) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401) at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266) at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:387) at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:365) at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:944) at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:266) at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95) at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:160) at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33) at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(Native Method) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
END APPLICATION TRACE ***
TransfromerException during XSLT processing:
javax.xml.transform.TransformerException: com.sap.engine.lib.xml.util.NestedException: Illegal number of arguments or types of arguments in a call of function 'lookup:getNodeContent'. at com.sap.engine.lib.jaxp.TransformerImpl.transform(TransformerImpl.java:251) at com.sap.aii.ibrep.server.mapping.ibrun.RepMappingTransformer.transform(RepMappingTransformer.java:150) at com.sap.aii.ibrep.server.mapping.ibrun.RepXSLTMapping.execute(RepXSLTMapping.java:81) at com.sap.aii.ibrep.server.mapping.ibrun.RepMappingHandler.run(RepMappingHandler.java:80) at com.sap.aii.ibrep.server.mapping.rt.MappingHandlerAdapter.run(MappingHandlerAdapter.java:107) at com.sap.aii.ibrep.server.mapping.ServerMapService.transformInterfaceMapping(ServerMapService.java:127) at com.sap.aii.ibrep.server.mapping.ServerMapService.transform(ServerMapService.java:104) at com.sap.aii.ibrep.sbeans.mapping.MapServiceBean.transform(MapServiceBean.java:40) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0_0.transform(MapServiceRemoteObjectImpl0_0.java:167) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0_0p4_Skel.dispatch(MapServiceRemoteObjectImpl0_0p4_Skel.java:104) at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:320) at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:198) at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:129) at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33) at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(Native Method) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170) Caused by: com.sap.engine.lib.xml.util.NestedException: Illegal number of arguments or types of arguments in a call of function 'lookup:getNodeContent'. at com.sap.engine.lib.xsl.xpath.ETFunction.evaluate(ETFunction.java:106) at com.sap.engine.lib.xsl.xpath.XPathProcessor.innerProcess(XPathProcessor.java:56) at com.sap.engine.lib.xsl.xpath.XPathProcessor.process(XPathProcessor.java:43) at com.sap.engine.lib.xsl.xpath.XPathProcessor.process(XPathProcessor.java:51) at com.sap.engine.lib.xsl.xslt.XSLValueOf.process(XSLValueOf.java:76) at com.sap.engine.lib.xsl.xslt.XSLNode.processFromFirst(XSLNode.java:296) at com.sap.engine.lib.xsl.xslt.XSLElement.process(XSLElement.java:248) at com.sap.engine.lib.xsl.xslt.XSLNode.processFromFirst(XSLNode.java:296) at com.sap.engine.lib.xsl.xslt.XSLElement.process(XSLElement.java:248) at com.sap.engine.lib.xsl.xslt.XSLNode.processFromFirst(XSLNode.java:296) at com.sap.engine.lib.xsl.xslt.XSLElement.process(XSLElement.java:248) at com.sap.engine.lib.xsl.xslt.XSLNode.processFromFirst(XSLNode.java:296) at com.sap.engine.lib.xsl.xslt.XSLElement.process(XSLElement.java:248) at com.sap.engine.lib.xsl.xslt.XSLNode.processFromFirst(XSLNode.java:296) at com.sap.engine.lib.xsl.xslt.XSLElement.process(XSLElement.java:248) at com.sap.engine.lib.xsl.xslt.XSLNode.processFromFirst(XSLNode.java:296) at com.sap.engine.lib.xsl.xslt.XSLTemplate.process(XSLTemplate.java:272) at com.sap.engine.lib.xsl.xslt.XSLStylesheet.process(XSLStylesheet.java:463) at com.sap.engine.lib.xsl.xslt.XSLStylesheet.process(XSLStylesheet.java:431) at com.sap.engine.lib.xsl.xslt.XSLStylesheet.process(XSLStylesheet.java:394) at com.sap.engine.lib.jaxp.TransformerImpl.transformWithStylesheet(TransformerImpl.java:398) at com.sap.engine.lib.jaxp.TransformerImpl.transform(TransformerImpl.java:240) ... 18 more -
com.sap.engine.lib.xml.util.NestedException: Illegal number of arguments or types of arguments in a call of function 'lookup:getNodeContent'. at com.sap.engine.lib.xsl.xpath.ETFunction.evaluate(ETFunction.java:106) at com.sap.engine.lib.xsl.xpath.XPathProcessor.innerProcess(XPathProcessor.java:56) at com.sap.engine.lib.xsl.xpath.XPathProcessor.process(XPathProcessor.java:43) at com.sap.engine.lib.xsl.xpath.XPathProcessor.process(XPathProcessor.java:51) at com.sap.engine.lib.xsl.xslt.XSLValueOf.process(XSLValueOf.java:76) at com.sap.engine.lib.xsl.xslt.XSLNode.processFromFirst(XSLNode.java:296) at com.sap.engine.lib.xsl.xslt.XSLElement.process(XSLElement.java:248) at com.sap.engine.lib.xsl.xslt.XSLNode.processFromFirst(XSLNode.java:296) at com.sap.engine.lib.xsl.xslt.XSLElement.process(XSLElement.java:248) at com.sap.engine.lib.xsl.xslt.XSLNode.processFromFirst(XSLNode.java:296) at com.sap.engine.lib.xsl.xslt.XSLElement.process(XSLElement.java:248) at com.sap.engine.lib.xsl.xslt.XSLNode.processFromFirst(XSLNode.java:296) at com.sap.engine.lib.xsl.xslt.XSLElement.process(XSLElement.java:248) at com.sap.engine.lib.xsl.xslt.XSLNode.processFromFirst(XSLNode.java:296) at com.sap.engine.lib.xsl.xslt.XSLElement.process(XSLElement.java:248) at com.sap.engine.lib.xsl.xslt.XSLNode.processFromFirst(XSLNode.java:296) at com.sap.engine.lib.xsl.xslt.XSLTemplate.process(XSLTemplate.java:272) at com.sap.engine.lib.xsl.xslt.XSLStylesheet.process(XSLStylesheet.java:463) at com.sap.engine.lib.xsl.xslt.XSLStylesheet.process(XSLStylesheet.java:431) at com.sap.engine.lib.xsl.xslt.XSLStylesheet.process(XSLStylesheet.java:394) at com.sap.engine.lib.jaxp.TransformerImpl.transformWithStylesheet(TransformerImpl.java:398) at com.sap.engine.lib.jaxp.TransformerImpl.transform(TransformerImpl.java:240) at com.sap.aii.ibrep.server.mapping.ibrun.RepMappingTransformer.transform(RepMappingTransformer.java:150) at com.sap.aii.ibrep.server.mapping.ibrun.RepXSLTMapping.execute(RepXSLTMapping.java:81) at com.sap.aii.ibrep.server.mapping.ibrun.RepMappingHandler.run(RepMappingHandler.java:80) at com.sap.aii.ibrep.server.mapping.rt.MappingHandlerAdapter.run(MappingHandlerAdapter.java:107) at com.sap.aii.ibrep.server.mapping.ServerMapService.transformInterfaceMapping(ServerMapService.java:127) at com.sap.aii.ibrep.server.mapping.ServerMapService.transform(ServerMapService.java:104) at com.sap.aii.ibrep.sbeans.mapping.MapServiceBean.transform(MapServiceBean.java:40) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0_0.transform(MapServiceRemoteObjectImpl0_0.java:167) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0_0p4_Skel.dispatch(MapServiceRemoteObjectImpl0_0p4_Skel.java:104) at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:320) at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:198) at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:129) at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33) at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(Native Method) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
19:06:42 End of test <b></b>
Can any one please help in sorting this out?
Thanks in advance.
Sri..check with this:
<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/05a3d62e-0a01-0010-14bc-adc8efd4ee14">https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/05a3d62e-0a01-0010-14bc-adc8efd4ee14</a> -
Hi Experts,
I have a query in Graphical RFC Lookup function.
I am working on Pi 7.1 and scenario is File to Idoc.
In the file, material number is coming, and I have to find out the corresponding Customer number from ECC table using RFC Lookup.
I know how to use RFC lookup.
But here issue is, if Customer Number is not maintained in the ECC table for the incoming material number, then exception should be thrown and processing should be stopped at that moment.
Please tell me how to throw this exception and hence fail the mapping.
-Supriya.Hi ,
I guess you want to fail the message transformation at Message mapping level with Red Error in Monitoring , If LOOKUP return Nothing ...
What You can Do Is , Instead of RFC LOOKUP Function , Use UDF Based RFC LOOKUP , and Inside UDF you can easily raise exception.
Or
In Grapphical Message mapping pass the result from RFCLOOKUP To a 1..1 Target , if during transfermation if 1..1 node will not get any value , so mapping will get failed automatoicaly ..
hope the idea Helps
regards
PS -
Exception thrown by RFC To be handled in BPM
Hi All ,
I am trying the scenario.
Http Client -> XI-->BPM -
> RFC
<- <-- <-------
The whole communication is Synchronous.
So I have
One Outbound Synchronous Interface
One Inbound Synchronous Interface.
Two Abstract Synchronous Interface for BPM.
And 4 Abstract Asynchronous Interfaces for the containers which is to used in BPM.
(Two for request and two for response )
For simple Request Response Messages from the RFC my Scenario is working perfectly.
But I Introduced an Exception in RFC, So my Rfc is Throwing an Exception Message which needs to be returned back to Http Client.
Now my problem is only Synchronous interfaces have the option of fault messages in which the exception message can be included. So how do I pass the Exception message to Http Client via BPM , Because Containers require Asynchronous Interfaces and they are not accepting fault messages.
Has Anyone tried this kind of exception handling in BPM,
Please Help Me.
Yomesh.Hi Saravana,
first of all thanks for ur reply,
In my scenario there are two reciever systems(SAP and JDE) and call to both the systems is synchronous. I am merging the responses from both systems into one using BPM. Thats why I needed BPM.
Now About exception handling that is required because if response from one system is not there then also the BPM process should not terminate .It should give the output from other system and an error message for first one to the HTTP client.
I think now the scenario is clear for you,
Please see if you can help me with that.
Thanks,
Yomesh -
An exception handler is obligatory for synchronous RFC communication
I am getting the error "An exception handler is obligatory for synchronous RFC communication" when I try to activate an Integration Process. Under a synchronous Send step, under Exceptions, I have System Error and the RFC.Exception Application Error to be handled. For both I have given the same Exception handler block. Is this not allowed? Why am I not able to go to same Exception handler block in case of both System Error as well as Application Error?
Thanksyou are right, it was erroring out due to the next step. Now if there is system error or exception, it will go to the exception branch. Here I need to have the ability to restart the process from this point after being alerted and having fixed the issue. So I am thinking of doing the send step again in the exception branch. But since the application error initially will exist soon after the alert is issued, this step will complete as I cannot handle application error a second time (this is where it was giving that error that exception handler was mandatory).
Is there a way in which I can stop/fail the process after the exception branch gives the alert so that I can restart the failed branch again? -
How to implement Exception Handling error in IDoc to File and RFC to File
Hi,
We are implementing the two below scenarios :
1. IDOC to File
2. RFC to File
We have to implement the Exception Handling for the above two cases. Kindly could you provide the inputs to implement the Exception Handling for the above two cases.
Please provide the precious inputs to implement this.
Thanks,
RameshHi Ramesh,
The exception handling for idocs
http://help.sap.com/saphelp_nw04/helpdata/en/dc/6b7f1543d711d1893e0000e8323c4f/frameset.htm
Exception handling in File to IDoc Scenario
For RFCs
Re: Passing SAP Exceptions to a sync SOAP Call
Error Handling when using RFC
Exception Handling while Calling RFC - BPM
handle exceptions in remote function modules
Regards,
Prateek -
Hello,
i have the following scenario:
RFC receiver adapter (synchronous) <> XI <> JDBC receiver adapter (to MS SQL-database)
Is it possible to catch JDBC-exceptions, e.g. "duplicate primary key" and pass it to the calling rfc adapter?
thanks for your help
ChristianHello,
still my problem is the exception handling of the synchronous JDBC - call.
If an error occurs I get the error "no payload found" in sxmb_moni_bpe
I think this is a problem of where the error occur, in the SOAP header
In sxmb_moni i get the following Error:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
- <!-- Aufruf eines Adapters
-->
- <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
<SAP:Category>XIAdapterFramework</SAP:Category>
<SAP:Code area="MESSAGE">GENERAL</SAP:Code>
<SAP:P1 />
<SAP:P2 />
<SAP:P3 />
<SAP:P4 />
<SAP:AdditionalText>com.sap.aii.af.ra.ms.api.DeliveryException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'KUNDEN' (structure 'STATEMENT_NAME'): com.microsoft.sqlserver.jdbc.SQLServerException: Verletzung der PRIMARY KEY-Einschränkung 'PK_Kunden'. Ein doppelter Schlüssel kann in das 'dbo.KUNDEN'-Objekt nicht eingefügt werden.</SAP:AdditionalText>
<SAP:ApplicationFaultMessage namespace="" />
<SAP:Stack />
<SAP:Retry>M</SAP:Retry>
</SAP:Error>
Has anybody got any idea where my mistake is?#
I´m at loss.
If you need further information, contact me. I´ll send you the required informations.
Thanks and regards
Christian -
Hi,
I have a Syn-RFC call in my BPM. I would appreciate help regarding the exception handling on the RFC.
Ideally the RETURN parameter in RFC will be populated if theres an error. The BPM needs to check if there are entries in RETURN, if so then stall the message in MONI as error and mail support with contents of RETURN. only if RETURN is empty (success), it should go ahead with next step.
Thanks.What ERP version are you working with?
If 4.7+, consider using ABAP Proxy instead of RFC.
There, you can define a fault message in the interface and it will be triggered if there is an exception at server application.
Regards,
Henrique. -
Hi there,
after playing a bit with external xml files provided by my
application i'm ready to go to the next topic on my ToDo-List.
How could one implement a good and stable technique for
exception handling? I'm talking about the interaction from spry to
our Web Framework which throws an error sometimes.
My current idea is that the server side framework could
return some kind of Error XML format which contains the exception
message and so on. This would require functions on client side to
precheck the server output.
Imho the best place for this is inside the XMLDataSet
constructor. When catching some bad XML file internal error
messages could be send using the already existing techniques OR by
providing an public function which then should be overriden by an
selfwritten one, e.g. to put it into my own `error box`.
Also, some kind of internal statemachine in XMLDataSet may
help a lot. That way each access to functions which aren't working
at the moment could be loggend and catched by an selfwritten
function.
I hope you get the idea,
what do you think?
Best regards,
SebastianBetter error handling and error handling hooks is on the list
of things to do.
The way I see it, there are several types of errors that can
occur:
1. Server returns valid XML, but it's XML that describes an
error instead of the data requested.
- I believe this is what Sebastian was mentioning. I was
actually thinking of allowing a hook for developers to catch and
handle this case and perhaps leverage the states mechanism to let
them change the dynamic region markup used to display the error
since the data references in this error XML would be different.
2. The server returns an error. (Invalid URL or Server Error)
- This could be handled with states, but we need to expose
some data references, or set the data set to contain a known data
set schema that would allow the designer to show more info about
the error.
3. The server returns XML but uses a mime-type that is not
understood by Spy or the XML parsing code built-into the browser.
- I believe it was Doug [?] that had a patch that *always*
forced the data set to try and parse the XML string in the response
if the response didn't contain an XML DOM. My one paranoia about
that is that the server could actually be returning something that
is not XML, in which we would still fail and perhaps choke
somewhere else. I need to do some testing in that area.
I was thinking perhaps we should add something to the
XMLDataSet constructor that allowed a user to specify mime-types
for formats they knew were XML, but didn't use one of the standard
XML formats.
4. The browser chokes on "not-well-formed" XML.
- This is an interesting problem. IE silently fails when the
parser chokes, but Mozilla creates an XML DOM tree that reports the
error which does *not* match the XML string from the request
response. I had to add code to spry to detect when this happens.
5. An exception is thrown during Spry processing of XML data.
- This will require more programming on our part to handle
more cases.
--== Kin ==-- -
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.
Maybe you are looking for
-
Hi I had this problem before and you helped fix it. I just bought an updated Iphone and now it says my itunes purchases are disabled. They also put spelled my name wrong and I do not have any mail coming thru. Please help me!!!!
-
Why can't I connect to the game server
why can't I connect to the game server from my ipod touch?
-
Alright, in detail, I haven't used Firefox for a while because my old version stopped working. Not sure what happened to it or why but, long story short, I ended up going back to IE(ugh) and never looked back. Sometime later, an update was installed
-
I would like to be able read pdf files on icloud drive
i have pdf files on my iCloud drive and I cant read them. How can I read them?
-
How can I generate pulse trains whenever the value of the gate changes?
I need to generate pulse train both at the rising edge and falling of the gate signal. My DAQ board has only two counters. Have a nice day, Jun