cancel
Showing results for 
Search instead for 
Did you mean: 

proxy error handling - synchronous

former_member190536
Participant
0 Kudos

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.

Accepted Solutions (1)

Accepted Solutions (1)

bhavesh_kantilal
Active Contributor
0 Kudos

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

former_member190536
Participant
0 Kudos

Hi Bhavesh,

here I don't want to send error message back to the PO from Proxy, I want to know whether we can fail proxy in ECC itself.?

Otherwise, when BAPI fails can we fail the proxy with Fault message.?

iaki_vila
Active Contributor
0 Kudos

Hi Khaja,

I think you should consider other option and not to raise an exception or fault message in sender proxy.

If BAPI fails you should consider to have a Z table with the calls log. Later, you can do an ALV or a report to read this table and to have a control. Also you can think to send an email to the administrators or the users, depending your business logic, to alert about this situation.

Regards.

bhavesh_kantilal
Active Contributor
0 Kudos

The call to PI is already finished with PI providing a successful response.Likewise as far as ECC is concerned the message to PI has been processed.

If you want to fail this call, you will have to handle this within the ABAP report. The ABAP proxy is no more in your control as the Proxy call is completed as per my understanding.

Like Inaki has mentioned this has to be a logic within the ECC framework as to how the error handling framework in ECC is done. You could print to SLG1, create a ALV Error framework, etc but this has to be inline with your ECC Error handling.

Regards

Bhavesh

Ryan-Crosby
Active Contributor
0 Kudos

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

Answers (0)