on 01-12-2010 3:51 PM
Hi,
I've been going through documentation regarding the RFC receiver adapter and have created a test RFC to try it out.
So what I've done is , I've created a RFC which raises a class exception as follows.
data OREF type ref to CX_MAPPING_FAULT.
try.
raise exception type CX_MAPPING_FAULT
exporting ERROR_TEXT = 'This is the reason'
ERROR_CODE = 'ID Text'
TEXTID = 'Test'.
catch CX_MAPPING_FAULT into OREF.
raise exception OREF.
endtry.
In PI, I map the exception to a fault message but all I keep getting back from the rfc is the following... so my exception text is never sent back... am I doing something wrong ?
<rfc:YTEST_RFC_EXCEPTIONS.Exception xmlns:rfc="urn:sap-com:document:sap:rfc:functions"><Name>RFC_ERROR_SYSTEM_FAILURE</Name><Text>An exception that could not be caught occurred.</Text><Message><ID>RFC_ERROR_SYSTEM_FAILURE</ID><Number>null</Number></Message></rfc:YTEST_RFC_EXCEPTIONS.Exception>
Is this really the way to send back application errors from RFC's to PI ? Using global exeptions seems to not return any text.
Is there a way to take BAPI_RET and generate an fault from that in the mapping ?...
Thanks
Thierry
Hi,
>>>Is there a way to take BAPI_RET and generate an fault from that in the mapping ?...
have a look at my blog how:
/people/michal.krawczyk2/blog/2007/04/26/xipi-throwing-generic-exceptions-from-any-type-of-mapping
Regards,
Michal Krawczyk
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
will open customer message for this issue.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So here is where I'm at with this problem.
What I get back as an exception from the RFC call , I can map to the Fault Message without any problems.
The problem I have is that when I call the RFC, the RFC doesn't return the exception I defined but a RFC_ERROR_SYSTEM_FAILURE exception.
In sm21 of the abap system , this is what I get :
An exception that could not be caught occurred.
Causes
The exception 'CX_AI_APPLICATION_FAULT' was raised but was not caught at any
stage in the
call hierarchy.
Here is the code of my rfc...
FUNCTION YTEST_RFC_EXCEPTIONS.
*"----
""Interface locale :
*" IMPORTING
*" VALUE(ZINPUT) TYPE CHAR10
*" EXPORTING
*" VALUE(ZOUTPUT) TYPE CHAR10
*" RAISING
*" CX_AI_APPLICATION_FAULT
*"----
data OREF type ref to CX_AI_APPLICATION_FAULT.
data TEXT type STRING.
data ID type MPG_ERRCODE.
try.
raise exception type CX_AI_APPLICATION_FAULT
exporting TEXTID = 'Test'.
catch CX_AI_APPLICATION_FAULT into OREF.
raise exception OREF.
endtry.
ENDFUNCTION.
Any help would be appreciated.
Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
69 | |
8 | |
8 | |
6 | |
6 | |
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.