cancel
Showing results for 
Search instead for 
Did you mean: 

FAULT MT - Catch statement

former_member474221
Participant
0 Kudos

Hi,

I have a sync proxy to proxy scenario.

I am handling an exception in my client proxy ...

CATCH z_cx_test_fault INTO lo_cx_test_fault.

txt = lo_cx_test_fault->get_text( ).

WRITE txt

I am sending back some fault text and fault detail message in the fault MT from the receiver proxy

however the txt variable that is printed here only shows a text called " application error" instead of the the text that i have sent inside the fault MT from the receiver proxy..

Accepted Solutions (1)

Accepted Solutions (1)

baskar_gopalakrishnan2
Active Contributor
0 Kudos

After sproxy, you will see the methods for fault message and use the fault message structure variables. Simple Write statement in the abap if for the debug.

former_member474221
Participant
0 Kudos

hi bhaskar,

I will have to use the method get_text as there are no useful attributes in the attribute section of thee fault MT class...

there is an attribute called "textid" but how do it use it to reterieve the actual "faulttext" and "faultdetail"

Answers (1)

Answers (1)

Former Member
0 Kudos

Dear Hema

Are you using a standard Fault MT or is it a customized one?

Generally the text "Application Error" is populated in following way in standard fault message

<SAP:Category>Application</SAP:Category>

<SAP:Code area="UNKNOWN">APPLICATION_ERROR</SAP:Code>

I think you should create a MT of Fault Message Type and make necessary changes in the proxy to handle that

Sourabh

Former Member
0 Kudos

You can not use WRITE statment. You need to fill in Fault Message variables. These are sent back to PI.

Andrzej