Skip to Content
avatar image
Former Member

Passing SAP Exceptions to a sync SOAP Call

Hi,

I have a scenario in which I have exposed a RFC as a Web service through XI. My sender is SOAP sender who invokes XI which inturn calls the RFC in SAP.

When there is any Error or exception triggered from SAP i.e invalid userid or Insufficient Authorization error I want to capture these errors and send it back to the Sender SOAP system.

I understand that I can use Fault messages but the fault message would be triggered only when my RFC throws an Exception. IF SAP triggers an exception even before the call reaches the RFC then how do I handle these errors??

Pls advice.

Thanks

Ashish

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    May 13, 2005 at 03:00 AM

    Hi Ashish,

    <b><i> When there is any Error or exception triggered from SAP i.e invalid userid or Insufficient Authorization error I want to capture these errors and send it back to the Sender SOAP system.</i></b>

    for this i would advice you to create a tables parameter in RFC of type bapiret1. And update this structure for all the errors occuring with in RFC. BY doing so when an errors occurs in RFC, bapiret is filled and returned to xi which then sent to the soap sender.

    <b><i> understand that I can use Fault messages but the fault message would be triggered only when my RFC throws an Exception. IF SAP triggers an exception even before the call reaches the RFC then how do I handle these errors??</i></b>

    We have had mixed success with fault messages. But we have found the following characteristic very consistent: we defined in RFC an exception as application exception, which is raised for unhandled exceptions and mapped this to fault message. So when an exception is raised in RFC or while getting to RFC, the message is marked as hard error in SXMB_MONI(different icon). The only downside is that the soap sender gets an error "adaptor failure".

    Hope it helps,

    Thanks,

    Naveen

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      hi.

      u have given the proper answer but there u hav mapped fault message to application_error (exception)

      then how u will map the error came from tables return bapi.

      waiting for you.

      regards.

      seeta.

  • avatar image
    Former Member
    Nov 20, 2007 at 10:34 PM

    Hi, can anyone tell me if the solution with APPLICATION_ERROR and bapi return table worked for this problem right now I'm having the exact problem, thanks in advance.

    Regards,

    Julio Cesar

    Add comment
    10|10000 characters needed characters exceeded