on 01-03-2011 12:57 PM
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.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks to all.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
24 | |
11 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.