on 05-30-2012 5:33 AM
Hi Experts,
I have a scenario where SAP R/3 system calls PI via ABAP Proxy. This is a Async communication.
SAP R/3 -------->(ABAP Proxy) PI (JMS)-------> Biztalk.
Now I want to trigger email from SAP R/3 code when PI system is down or RFC destination for PI is down.
In my ABAP proxy code (in SAP R/3 system) I have used try-catch block and caught system exception. But this exception is never caught.
How to change the code to handle the exception? Is there any other alternative way to handle my case?
* Set the Queue
TRY.
v_o_async_mess ?= v_o_proxy->get_protocol( if_wsprotocol=>async_messaging ).
v_o_async_mess->set_serialization_context( c_queue_id ).
* Call the proxy method
CALL METHOD v_o_proxy->pi_proxy_method
EXPORTING
output = x_prxy.
*Commit the transaction
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = c_x.
CATCH cx_ai_system_fault INTO v_o_fault.
v_err_msg = v_o_fault->get_text( ).
CATCH cx_ai_application_fault INTO v_o_app_fault.
v_err_msg = v_o_app_fault->get_text( ).
ENDTRY.
Thanks
Gopal
IMO, you cannot catch system exceptions. You can catch application exceptions as fault message. YOu can use ccbpm to get both system and application acknowledgements. But in your case proxy cannot be used in ccbpm. Hope that helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
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.