Skip to Content

proxy error handling - synchronous

Hello,

I am working on ECC proxy->PO->Web service and sending back response from web service to proxy.

Here in outbound proxy is synchronous, the data is also coming into this.

Now the problem to handle the errors, from the outbound interface when response received we are calling BAPI in it, if BAPI fails then we have to fail the proxy also, but BAPI failed after proxy is successful.

How to fail Proxy when BAPI failed?

Or can we use fault message type outbound synchronous proxy? But for fault message type filling ABAPers cannot find the method to write code as it is not inbound proxy.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Apr 19, 2016 at 08:53 AM

    Hello Khaja,

    If my understanding is right, once the Proxy is called and the response is received back from PI, you make a BAPI call in your ABAP report. If the BAPI call fails, you would like to then set the entire PI response as an error message? Is this understanding correct?

    If yes, well, what you are trying is logically wrong - you have made the ECC -> PI -->Webservice call  and the same is successful. What you are then doing is post processing within ECC and this has no bearing on the Interface actually triggered and is being done post your Proxy call. The BAPI error should be handled within your ABAP report triggering the Proxy call but it cannot set the proxy call as error as the call was actually successful!

    Regards

    Bhavesh

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Khaja,

      As Inaki and Bhavesh have already stated, you cannot fail something that has already completed.  Any sort of fault tolerance as a result the BAPI call has to be handled explicitly by the calling program so any information can be reported back to a user/system (whatever the requirement is).

      Regards,

      Ryan Crosby