cancel
Showing results for 
Search instead for 
Did you mean: 

Exception handling for Inbound Synchronous Proxy

Former Member
0 Kudos

Hi All,

I am implementing inbound synchronous proxy which has inbound ,outbound and fault message ( same of SAP-PI).

I am calling a FM inside inside the method. All the business logic is coded in the FM which also handles the exception.

The exception raised in the FM is captured in the MESSAGE table of type BAPIRET2.

During testing I found that the exception raised inside the FM( Message Table) is not passed to Fault message

which is in the proxy method( If sy-subrc <> 0, raise excption type MT_FaultMessage was coded after FM).

I found 5 instance under the Fault message exception.IF_MESSAGEGET_TEXT , IF_MESSAGEGET_LONGTEXT ,IF_AI_APPLICATION_FAULT~GET_RT_FAULT_TEXT,

GET_SOURCE_POSITION and CONSTRUCTOR.

Kindly provide the input how to pass the error text captured in MESSAGE TABLE of FM to the exception message MT_FaultMessage of Proxy

Regards

Alice Rebecca

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member184681
Active Contributor
0 Kudos

Hi Alice,

An error in proxy class is just a class-based exception, raised by the proxy implementing class. So based on the errors table from your FM, you need to use the statement:

RAISE EXCEPTION TYPE cx_... [EXPORTING ... fi = ai ...].

Search here for more information on ABAP Exception Classes if required:

http://help.sap.com/saphelp_470/helpdata/en/55/bff20efe8c11d4b54a006094b9456f/frameset.htm

Hope this helps,

Grzegorz

Former Member
0 Kudos

Dear Experts,

Thanks for the response.

Scenario:

SOAP <-> SAP-PI <-> SAP ECC

I am not able to handle the system error in inbound proxy. The standard ExchangeFault created in XI only captures application error i.e. class CX_AI_APPLICATION_FAULT

I want class CX_AI_SYSTEM_FAULT so that it can capture the system error.

We have the standard ExchangeFaultData in SAP-XI which captures the application fault.

Do we have standard message type in SAP XI which can capture system fault error if not how can we create customised one?

I need the suggestions and input very urgently. Thanks in advance!!!

Closing the thread.

Regards

Alice Rebecca

Edited by: Alice@xi on Jan 19, 2012 1:50 PM

baskar_gopalakrishnan2
Active Contributor
0 Kudos

>Do we have standard message type in SAP XI which can capture system fault error if not how can we create customised one?

XI Fault message structure is to display the application error and not system errors.

>I want class CX_AI_SYSTEM_FAULT so that it can capture the system error.

We use fault message response structure to capture the response of the application error. There is no message structure or class available to capture system exceptions. You need to just handle as is.

Former Member
0 Kudos

Your input was helpful.