cancel
Showing results for 
Search instead for 
Did you mean: 

How to receive RFC calls exceptions

Former Member
0 Kudos

Hi,

My english is bad, sorry.

I have a RFC call to access data from a NIF. In the function that performs the 'select' I have created an exception if the NIF does not exist, is called 'NO_DATA'. How I recibe this exception in Web Dynpro?

Thanks,

Regards,

Rubén Gutiérrez.

Accepted Solutions (1)

Accepted Solutions (1)

former_member185879
Active Contributor
0 Kudos

Hello bifusion,

What you can do is, create a return table with name ET_RETURN under TABLES table. whatever the exception you are getting, add that in that table(E for Error, S for Success like that) and pass it to webdynpro.

In Webdynpro Loop that table, check the Type of the message and display it accordingly.

you can use BAPIRET2 as a structure for ET_RETURN.

Regards

Nizamudeen SM

Answers (3)

Answers (3)

Former Member
0 Kudos

Thanks to all.

Former Member
0 Kudos

Hi,

use Try {

}catch{} for displaying or calling exceptions.

just search with try and catch in SDN Forums you will gte all the helpful links.

Regards,

Govindu

Former Member
0 Kudos

Hi,

In your remote enabled function module, under Tables tab you can

add a table type attribute which can hold the return messages.

ET_Return like bapiret2

In webdynpro loop through the RFM return message node and print the messages.

Sample Code:

for(int i=0;i<wdcontext.nodereturn.size();i++)

{

String message = wdcontext.nodereturnElement.getAttributeValue("Message");

if ("S".equals(wdcontext.nodereturnElement.getAttributeValue("S")))

{

msgManager.reportSuccess(message);

}

else if("E".equals(wdcontext.nodereturnElement.getAttributeValue("E")))

{

msgManager.reportException(message,false);

errorRaised = false;

}

else if("W".equals(wdcontext.nodereturnElement.getAttributeValue("W")))

{

msgManager.reportWarning(message);

}

}

Regards,

Bala Baskaran.S