2005 Aug 08 10:29 AM
Hello,
I need to react to JCO.ABAPExceptions thrown in an Javaclass in the ABAP RFC functionmodule.
I connect Java and ABAP by the SAP JCo RFC provider service.
I generate a new JCO.ABAPException with an exceptionclass that is defined in the functionmodule in ABAP (WRONG_INPUT). But sy-subrc is always the value for 'OTHERS'.
Where is my mistake? Does SAP JCo support this way of throwing Abap exceptions?
Thanks for your help.
Jan
2005 Aug 08 10:52 AM
If the function module is RFC Enabled, I am surprised that it allows Exceptions. All RFC Enabled function modules do not have exceptions thrown, instead they use internal tables like RETURN where the error messages are stored.
Let me know if I went the wrong direction or didn't understand your problem correctly.
Regards,
Subramanian V.
2005 Aug 08 12:25 PM
Exceptions are allowed.
You can handle exceptions while using rfc functions. I do so in few function modules.
And the JCo seems to support this functionality, for in the direction J2EE=>ABAP you can distunguish between different exception classes but the other way round???
You can get the ABAP-name of the exception from java code but I need it vice versa when I call a EJB from ABAP.
Thank you
Jan