cancel
Showing results for 
Search instead for 
Did you mean: 

How to handle RFC Lookup Exception

former_member188885
Active Participant
0 Kudos

Hi All,

My Scenario is IDOC to IDOC and the IDOC is created in the target based on the RFC lookup functionality.

I have used the conversion function (RFC Lookup: graphical) in my mapping.

At present mapping error is got, if the lookup table is not having any data.

I have to create RFC lookup alerts in this case. If i have to use a UDF for this, how can i trigger alerts if data is maintained in the table.

I am new to writing UDF... so it would be helpful if you could provide your suggestions.

Message was edited by: Lavanya R

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Lavanya,

Try the below udf

if (inputValue == null || "".equals(inputValue)){

throw new RuntimeException ("No Value from RFC Lookup");

}else {

returninputValue;

}

This UDF checks the output from the RFC lookup and returns exception in mapping if no value found.

"InputValue" is an argument type in UDF.

Hope this help.

Regards

Anand Shankar

rajasekhar_reddy14
Active Contributor
0 Kudos

    Add one more Mail receiver in your scenario and in mapping level call 2nd receiver based on RFC look up results.

very simple right.

Shabarish_Nair
Active Contributor
0 Kudos

are you using the standard function? if so you will not be able to handle the exception and take further action except to fail it in mapping

instead use the lookup API and in a try catch block handle the exception and take required action - http://help.sap.com/javadocs/pi/pi711sp03/com/sap/aii/mapping/lookup/LookupException.html

former_member188885
Active Participant
0 Kudos

Yes... i am using the standard function.

Thank you for the referance link.