cancel
Showing results for 
Search instead for 
Did you mean: 

Proxy Interface Exception Handling

Former Member
0 Kudos

Hi,

We have a scenario where at end of day an XML of the transactions is being sent to SAP, and the records of the XML are posted in SAP.

Each record of the XML is of one of the three types 01, 02 or 03.

Now the current scenario is that when even one of the three types is posted and there is an error in the other types the status of the XML in SXMB_MONI is showing as successful, but what we want is that if there is an error in posting any one of the types and the other types are posted the status of the XML in SXMB_MONI should be error.

What we have done is that within the interface, when there is an error in posting any of the records, the log message is populated to an internal table. and at the end of the interface if the internal table is not initial an exception is raised.

The relevant code is posted in the attachment.

Now, what do I have to do so that when this exception is raised the status of the XML should show as error in SXMB_MONI?

Best regards,

SN

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

Remove the create object part and directly raise the exception as

RAISE EXCEPTION TYPE ZPI_CX_MT_FAULT_VI

      EXPORTING

        standard = ERROR_STRUCTURE.

Check this doc below

How to Handle Application Exception in ABAP Proxy - Ruslim Chang

Answers (1)

Answers (1)

iaki_vila
Active Contributor
0 Kudos

Hi Sandeep,

I think you are not using PI, because inside PI you can rise exceptions too. From ECC side the way is the way mentioned by Indrajit. Have you think to control the errors with another way, i don't like so much the exceptions, may be to control it with a error state and later to create a report to show all the incidences, not only the structure one's.

Regards.