2 MSGID or 2time RFC Lookup is better in SAP XI
For an single interface is it better to have lookup done twice one in Enhanced Receiver Determination and one in mapping to complete the interface flow.....
or
do all the lookup only once and resubmit the message at all data to another interface which will do enhanced receiver and send data to mapping
for a single interface is it better to have 2 MSGID created for runtime to avoid twice RFC lookup.....or create only 1 MSGID but have two RFC lookup.....in terms of performacne which is better.
Proxy will alwaays be better option in this case, as it is adapter less framework, and communication happens directly with XI central integration engine. So it is always fast communication and gives good performance.
But still you should consider other factors, you may consider using RFC as well, as sometime we go for RFC/IDOC as this are the standard interfaces already available rather than creating structure...
May be you can share more info on what type/volume data are you planning to send via XI?
Hope this cleart your doubt..
Divyesh
Similar Messages
-
RFC Lookup Error --- error executing simple look up
Hi all,
Below is the error when displaying the queue of the UDF.
RuntimeException in Message-Mapping transformation: Exception:[java.lang.RuntimeException: Error during MEI RFC Lookup] in class com.sap.xi.tf._MM_COND_A03_TO_MT_PRICELIST_ method callRFC$[com.sap.aii.mappingtool.tf3.CBufIter@32523252, com.sap.aii.mappingtool.tf3.CBufIter@32c732c7, com.sap.aii.mappingtool.tf3.CBufIter@333c333c, com.sap.aii.mappingtool.tf3.CBufIter@33c133c1, com.sap.aii.mappingtool.tf3.CBufIter@4bb84bb8, com.sap.aii.mappingtool.tf3.CBufIter@50ef50ef, com.sap.aii.mappingtool.tf3.CBufIter@51645164, com.sap.aii.mappingtool.tf3.CBufIter@51d951d9]
But when i test the mapping by passing input parameters the UDF responses with the output parameters and with the following error
Request MEILookup XML: <?xml version="1.0" encoding="UTF-8"?><ns0:ZRFC_MEI_PUBLISH_PRICELIST xmlns:ns0="urn:sap-com:document:sap:rfc:functions"><T_PRICELIST><item><KBETR_IN>1580.00</KBETR_IN><KUNAG_IN>0010000048</KUNAG_IN><KUNWE_IN>0020002894</KUNWE_IN><KSCHL_IN>ZSBP</KSCHL_IN><MATNR_IN>12648R-0090</MATNR_IN></item></T_PRICELIST></ns0:ZRFC_MEI_PUBLISH_PRICELIST>
Response MEI Lookup XML: <?xml version="1.0" encoding="UTF-8"?><rfc:ZRFC_MEI_PUBLISH_PRICELIST.Response xmlns:rfc="urn:sap-com:document:sap:rfc:functions"><T_ERR_MESSAGES_OUT></T_ERR_MESSAGES_OUT><T_PRICELIST><item><PARVW_OUT>BT</PARVW_OUT><KUNNR_OUT>0010000048</KUNNR_OUT><DATBI_OUT>2008-08-17</DATBI_OUT><DATAB_OUT>9999-12-31</DATAB_OUT><KBETR_OUT>1580.00</KBETR_OUT></item></T_PRICELIST></rfc:ZRFC_MEI_PUBLISH_PRICELIST.Response>
getKey=item==getValue=<item><KOTABNR_IN>910</KOTABNR_IN><DATBI_IN>20080817</DATBI_IN><DATAB_IN>99991231</DATAB_IN><KBETR_IN>1580.00</KBETR_IN><KUNAG_IN>0010000048</KUNAG_IN><KUNWE_IN>0020002894</KUNWE_IN><KSCHL_IN>ZSBP</KSCHL_IN><PARVW_OUT>BT</PARVW_OUT><KUNNR_OUT>0010000048</KUNNR_OUT><MATNR_IN>12648R-0090</MATNR_IN><DATBI_OUT>2008-08-17</DATBI_OUT><DATAB_OUT>9999-12-31</DATAB_OUT><KBETR_OUT>1580.00</KBETR_OUT></item>
Runtime exception during processing target field mapping /ns0:MT_PRICELIST. The message is: Exception:[java.lang.RuntimeException: Error during MEI RFC Lookup] in class com.sap.xi.tf._MM_COND_A03_TO_MT_PRICELIST_ method callRFC$[, , , , com.sap.aii.mappingtool.tf3.rt.FunctionWrapper@37883788, com.sap.aii.mappingtool.tf3.rt.FunctionWrapper@5ea95ea9, , ] com.sap.aii.mappingtool.tf3.MessageMappingException: Runtime exception during processing target field mapping /ns0:MT_PRICELIST. The message is: Exception:[java.lang.RuntimeException: Error during MEI RFC Lookup] in class com.sap.xi.tf._MM_COND_A03_TO_MT_PRICELIST_ method callRFC$[, , , , com.sap.aii.mappingtool.tf3.rt.FunctionWrapper@37883788, com.sap.aii.mappingtool.tf3.rt.FunctionWrapper@5ea95ea9, , ] at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:350)Hi Mahesh,
I have tested the RFC and i have taken the input from the function module...the RFC is working good, the comm channel is good...
below is the error when i tested my mapping... (the output from the function module is also correct)... i need to use hashmap to store the output...
Request MEILookup XML:
<?xml version="1.0" encoding="UTF-8"?>
<ns0:ZRFC_MEI_PUBLISH_PRICELIST xmlns:ns0="urn:sap-com:document:sap:rfc:functions">
<T_PRICELIST>
<item>
<KOTABNR_IN>910</KOTABNR_IN>
<DATBI_IN>20080817</DATBI_IN>
<DATAB_IN>99991231</DATAB_IN>
<KBETR_IN>1580.00</KBETR_IN>
<KUNAG_IN>0010000048</KUNAG_IN>
<KUNWE_IN>0020002894</KUNWE_IN>
<KSCHL_IN>ZSBP</KSCHL_IN>
<MATNR_IN>12648R-0090</MATNR_IN>
</item>
</T_PRICELIST>
</ns0:ZRFC_MEI_PUBLISH_PRICELIST>
Response MEI Lookup XML: <?xml version="1.0" encoding="UTF-8"?>
<rfc:ZRFC_MEI_PUBLISH_PRICELIST.Response xmlns:rfc="urn:sap-com:document:sap:rfc:functions">
<T_ERR_MESSAGES_OUT></T_ERR_MESSAGES_OUT>
<T_PRICELIST>
<item>
<KOTABNR_IN>910</KOTABNR_IN>
<DATBI_IN>20080817</DATBI_IN>
<DATAB_IN>99991231</DATAB_IN>
<KBETR_IN>1580.00</KBETR_IN>
<KUNAG_IN>0010000048</KUNAG_IN>
<KUNWE_IN>0020002894</KUNWE_IN>
<KSCHL_IN>ZSBP</KSCHL_IN>
<PARVW_OUT>BT</PARVW_OUT>
<KUNNR_OUT>0010000048</KUNNR_OUT>
<MATNR_IN>12648R-0090</MATNR_IN>
<DATBI_OUT>2008-08-17</DATBI_OUT>
<DATAB_OUT>9999-12-31</DATAB_OUT>
<KBETR_OUT>1580.00</KBETR_OUT>
</item>
</T_PRICELIST>
</rfc:ZRFC_MEI_PUBLISH_PRICELIST.Response>
getKey=item==getValue=<item><KOTABNR_IN>910</KOTABNR_IN><DATBI_IN>20080817</DATBI_IN><DATAB_IN>99991231</DATAB_IN><KBETR_IN>1580.00</KBETR_IN><KUNAG_IN>0010000048</KUNAG_IN><KUNWE_IN>0020002894</KUNWE_IN><KSCHL_IN>ZSBP</KSCHL_IN><PARVW_OUT>BT</PARVW_OUT><KUNNR_OUT>0010000048</KUNNR_OUT><MATNR_IN>12648R-0090</MATNR_IN><DATBI_OUT>2008-08-17</DATBI_OUT><DATAB_OUT>9999-12-31</DATAB_OUT><KBETR_OUT>1580.00</KBETR_OUT></item>
Runtime exception during processing target field mapping /ns0:MT_PRICELIST/row. The message is: Exception:[java.lang.RuntimeException: Error during MEI RFC Lookup] in class com.sap.xi.tf._MM_COND_A03_TO_MT_PRICELIST_ method callRFC$[, , , , com.sap.aii.mappingtool.tf3.rt.FunctionWrapper@6d486d48, com.sap.aii.mappingtool.tf3.rt.FunctionWrapper@7bcf7bcf, , ] -
RFC lookup in User Defiened Function
Hi
Is there somewhere a step by step that shows everything needed to make a RFC call in a user defined function?
Thanx,
Jan>
Chirag Gohil wrote:
> check this.
> Rfc lookup:
> https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a03e7b02-eea4-2910-089f-8214c6d1b439
> https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/70d90a91-3cf4-2a10-d189-bfd37d9c3231
>
> chirag
I tried the second link and everything works fine but it does not get the data from the rfc.. Is there a way I can debug the user defined function? Testing doesn't return any issues. -
PI 7.1: RFC Lookup Graphically in BPM
Hi,
I want to do a RFC lookup to XI abap stack in my graphical mapping.
The problem is my mapping is defined in a transformation step inside my BPM, and I'm not able to link my RFC CC to the Import parameter. Has anyone experience with this sort of flow yet, is this even possible because I don't have a receiver agreement because it's BPM?
I only can link following Container Element types: Simple Type / Abstract Interface / Receiver
SAP Library don't even talk about BPM's for the lookups:
http://help.sap.com/saphelp_nwpi71/helpdata/en/33/1ec6ced273493a993a80c2301c03da/frameset.htm
Any help would be appreciated,
Wouter.hi,
check this links
The specified item was not found.
SAP PI 7.1 Mapping Enhancements Series: Graphical Support for JDBC and RFC Lookups
RFC lookups https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/xi/xi-code-samples/xi%20mapping%20lookups%20rfc%20api.pdf
This blog and article deals with calling your RFC from your JAVA MAPPING / User Defined Function.
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/801376c6-0501-0010-af8c-cb69aa29941c
Use this crazy piece for any RFC Mapping Lookups!
regards
srinivas -
Is is possibel to do an RFC Lookup from The Graphical Mapping?
Greetings,
While doing a message mapping I need to get the value from R3 system using an RFC, is it is possible ?Hi
we can do by using rfc look ups
Lookup in mapping is the feature provided by SAP to lookup the data in the target R/3 or DB systems with the API provided.
You need to write UDF in order to implement the API's provided by SAP.Consider the below example
VendorNumber-UDF--CURR
The scenario is legacy to SAP. The legacy system doesn't provide the currency details. But the target field need's to be populated with currency value.
"The business rules says there are values maintained in SAP Table where if you pass VendorNumber it will return thr currency to you"
So what you can do? You can write UDF implementing SAP Provided API's and do a lookup in the SAP System and get back the currency value and populate them in CURR field.
I hope it clears a bit.
Please find the below blogs
DB Lookup: /people/siva.maranani/blog/2005/08/23/lookup146s-in-xi-made-simpler
RFC Lookup:https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a03e7b02-eea4-2910-089f-8214c6d1b439
There are three types of look ups u can do
RFC look up
SOAP look up
JDBC look up
What is Lookup and why we need:
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.
The purpose of the lookup may be:
To perform application-level validation of the data, before sending it to the backend.
To populate fields of the XML document with some additional data found in the backend application.
This is a form of value transformation.
The "value mappings" offered by XI are not adequate in this case, since the data would have to be manually entered in the Integration Directory.
There are two ways in which we can do lookup:
Call lookup method from GUI mapping.
Call lookup method from XSLT mapping.
Lookup method from GUI mapping can be called using any of the following ways.
RFC lookup using JCO (without communication channel)
/people/sravya.talanki2/blog/2005/12/21/use-this-crazy-piece-for-any-rfc-mapping-lookups
RFC lookup with communication channel.
/people/alessandro.guarneri/blog/2006/03/27/sap-xi-lookup-api-the-killer
Lookup using JDBC adapter.
/people/siva.maranani/blog/2005/08/23/lookup146s-in-xi-made-simpler
/people/sap.user72/blog/2005/12/06/optimizing-lookups-in-xi
CSV file lookup.
/people/sundararamaprasad.subbaraman/blog/2005/12/09/making-csv-file-lookup-possible-in-sap-xi
Lookups with XSLT - https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/8e7daa90-0201-0010-9499-cd347ffbbf72
/people/sravya.talanki2/blog
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/05a3d62e-0a01-0010-14bc-adc8efd4ee14
DB lookup - /people/siva.maranani/blog/2005/08/23/lookup146s-in-xi-made-simpler
SOAP Lookup - /people/bhavesh.kantilal/blog/2006/11/20/webservice-calls-from-a-user-defined-function
You can refer to these links.
/people/alessandro.guarneri/blog/2006/03/27/sap-xi-lookup-api-the-killer Absolute stealer.
/people/siva.maranani/blog/2005/08/23/lookup146s-in-xi-made-simpler
For Java APIs and also here you can map that how many types of lookups are possible in XI.
http://help.sap.com/javadocs/NW04/current/pi/com/sap/aii/mapping/lookup/package-summary.html -
Hi all,
my requirement is based on PO I need to retrieve the corresponding TAXCodes.
For this I wrote an FM to fetch taxcodes based on PO.
In Xi part what needs to be done let me know.
Thanks SrinivasSP10 of XI 3.0 or PI 7.0?
in XI/PI it can be done via the lookup api. have a look @
RFC Lookup -
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a03e7b02-eea4-2910-089f-8214c6d1b439
info: in PI 7.1 you can do it via a standard function itself. -
Hi Flocks
I am new to this technology and I am practicing all the scenarios like File, IDoc, RFC, JDBC, SOAP ect...
Can anybody explain me about JDBC or RFC Lookups and help how to configure them.
Regards
KrishnaHi,
Here are few links will give cleare picture about Lookups in XI...
RFC Lookup.
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a03e7b02-eea4-2910-089f-8214c6d1b439
SAP XI Lookup API: the Killer - The specified item was not found.
DB lookup - /people/siva.maranani/blog/2005/08/23/lookup146s-in-xi-made-simpler
SOAP Lookup - Webservice Calls From a User Defined Function.
Check this weblogs with some screenshots on how to achieve this:
Use this crazy piece for any RFC Mapping Lookups!
Optimizing Lookup's in XI
Wrapping your Mapping Lookup API code in easy-to-use Java classes
How to check JDBC SQL Query Syntax and verify the query results inside a User Defined Function of the Lookup API
/people/sravya.talanki2/blog
Re: Table lookup instead of fixed value mapping
http://help.sap.com/saphelp_nw04/helpdata/en/cf/406642ea59c753e10000000a1550b0/content.htm
How to check JDBC SQL Query Syntax and verify the query results inside a User Defined Function of the Lookup API -
http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm
Lookups with XSLT - https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/8e7daa90-0201-0010-9499-cd347ffbbf72
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/05a3d62e-0a01-0010-14bc-adc8efd4ee14
Regards,
Raj -
RFC lookups&JDBC in 7.3
Hi friends,
Iam new to 7.3 so how can i use rfc and jdbc lookup in7.3 and rfc and jdbc can i use as graphical functions in different adapters
please help me on this
Regards,
Rajendar KHi Rajendar,
This doc is best for learning RFC lookup
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/20befc9a-aa72-2b10-ae9b-b0988791d457?QuickLink=index&…
and rfc and jdbc can i use as graphical functions in different adapters
you have to use rfc channel for rfc look up and soap cc for soap look up. if i did not get you please explain.
Regards,
Muni. -
RFC lookup to PI system or other ERP system.Which is better?
Hello experts,
I have a scenario[RFC>PI(RFCLOOKUP,SOAP LOOKUP)->SOAP] where I have to fetch or update the data in the table using RFC lookup in the mapping.
To store or update the data ,I have created a table in PI system and through RFC LOOKUP I am fetching the data in the message mapping.
Some PI developers prefers not to create this elements in the PI system and suggested a way to create them in the ERP.
I wanted to crosscheck with you all whether Lookup to PI system is better or to ERP system in terms of performance, security and std maintenance.
-Conceptually, they see PI as a communication tool, not the best option for storing data, which is an ERP function.
some prefer ERP option to Simplify the upgrade / system patching processes. As No Z-Objects makes the checking process much easier and there is no need to adapt those objects to the new release environment.
I appreciate your valuable suggestions.Hello Souvik,
Thank you so much for your reply.
But in my case the RFC lookup will be executed twice because the authorization data(token ans sign values which is stored in PI) is valid for 12 hours.
if I find that these data is expired ,I have to do a soap lookup to get these details from a webservice and also have to update the same in the PI table using RFC lookup.All these activities are done in message mapping.
so first RFC LOOKUP is used to fetch the data and if expired,I get these details from a webservice and update(executing second time RFC LOOKUP) in PI table ,so that next time when request comes ,I will fetch these details from PI table instead from webservice to send message to the receiver.
same functionality is required for 4-5 scenarios,all acessing the same PI table.
So Kindly advice considering these situation,will the performance,security,maintenance be good when doing RFC lookup to other ERP instead of doing RFC lookup to PI system .
Kind Regards,
Kubra. -
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
PratichiHi,
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 -
How to use payload from standard RFC MessageType in a RFC Lookup function
Hello
We have a DB sender to call an BAPI. The DB receiver gets the BAPI response.
It is an easy scenario with one mapping.
But the RFC Mapping Lookup is very awful. You have to rebuild all open and close tags to get the RFC payload. A lot of concat functions are a must. The error search in such a mapping is not easy and seems like EAI developing 1990 (Hand am Arm).
Ok, it is better as a BPM, but it is not well for first level support person and release changes and trouble shooting.
How can I use a XML payload from first mapping in my RFC Mapping lookup (second mapping)? There must be a way with two mappings and an easy RFC lookup.
Currently (one mapping):
DB sender format -> ( RFC lookup self-made RFC XML structure) DB receiver format
My dream (two mappings):
DB sender format -> RFC SAP XI standard Format ->(RFC lookup by using Payload from first mapping) DB receiver format
I hope someone can help me with an example.
DanielHi Daniel,
If i understood correctly, urs is a 'Asynch' scenario JDBC to JDBC with a RFC lookup in Mapping.
If its so, then i think wat u r expecting can be done. In Interface Mapping, u can add more than one message mappings.
So first do a Mapping for DB sender format - RFC input standard format,
then another one for RFC sender Format - RFC receiver format, (look up code goes in this mapping).
Then third one from RFC receiver format to DB receiver format.
The order n which u add in Interface Mapping is also important. This is a suggestion, i havent tried this, but still i think u can give it a try.
Regards,
P.Venkat -
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 -
Hi experts,
In my File to IDoc Scenario , How can I create RFC lookups using the Ztables of SAP R/3 in XI.
Please give me any suggestions.
Regards,
SriSree,
Can you please brief about your requirement.
If I am not wrong..you need a lookup before posting idoc in R/3 system. I think its better to write a code in User Exit on R/3 side rather than calling a R/3 RFC function module from SAP XI. This approach will slow down your process.
Its better if you can find an user exit before posting idoc and write a code for lookup data.
Let me know if you need more details.
Nilesh -
Hi,
Since Sp14 , one can do an RFC Lookup using the Lookup API and the RFC adapter for cross referencing.One can also do a JCO call directly to get the corss referencing data.
My question is ,which among the 2 approaches is a better option and why?
Looking forward to some valuable tips and information,
Regards,
BhaveshHi Bhavesh,
You could check this out..
http://help.sap.com/saphelp_erp2005/helpdata/en/0f/f084429fb4aa1ae10000000a1550b0/frameset.htm
P.S Please mark helpful answers -
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
-
I removed Adobe application manager? Is that okay?
Just want to know if it will effect Adobe After Effects CS6? Yes/No? Removed it cause I dont need it.
-
Has anyone used the Mac migration assistant to flawlessly move CC 2014 apps to a new Mac? I've read some older threads where people ran into problems and had to completely re-install CC. I ordered a new iMac and am just wondering the best way to set
-
CD Drive is active but doesn't detect discs
Hello, I'm working on my Thinkpad T41 with Windows XP Prof. SP3 (actual updates) since some years and it worked fine. Now the CD / DVD drive doesn't read any discs. Neither inside of Windows, nor at startup. - the drive is shown in the Windows XP dev
-
Will flash work on a macbook pro?
Does flash work on a macbook pro? If not, how do you view various videos on line that require flash?
-
Hello Guys, I have a Cluster BizTalk environment with clustered send ports. Firewall is configured to allow connections from/to cluster IP. But when send ports are calling an external service, requests are getting blocked as it's not coming from Clus