on 04-21-2010 3:25 AM
Hello,
I have a scenarion where the JCO connection Exeption has to be trapped and dispaly the user defined error message...
How to trap it..
I used the following the code, but it doesn't work.
catch (JCO.AbapException ex) {
if (ex.getKey().equalsIgnoreCase("NOT_FOUND")) {
messageMgr.reportException("Dictionary structure/table not found.",false);
System.exit(1);
}else {
messageMgr.reportException(ex.getMessage(),false);
System.exit(1);
}
}catch (JCO.Exception ex) {
ex.printStackTrace();
System.exit(1);
}
Hi Pradeep,
In web dynpr of Java, You don't need to handle JCO exceptions if you are using JCO Destination for model creation.
But if you are creating Dynamic JCO Handling in web dynpro for Java, then please have a look at [Dynamic JCO Handling|http://wiki.sdn.sap.com/wiki/display/Snippets/DynamicJCOHandling-Creation,Updationetc]
Please refer to [Exception Handling|http://help.sap.com/saphelp_nw04/helpdata/en/68/46e13d82fcfb34e10000000a114084/content.htm] and [JCo Exceptions|http://help.sap.com/saphelp_nw70ehp1/helpdata/en/f6/daea401675752ae10000000a155106/frameset.htm]
Hope it helps
Regards
Arun
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Pradeep,
If you are talking about exceptions in ABAP BAPI/Function Module; then it has to be handled at BAPI level only and populate Exception parameter so that EP application knows.
Portal Application can handle the exception based on exception resturn values.
Please let me know if my understanding is correct.
Regards,
ganga
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.