Exception handling for Inbound IDocs

Dear Forum Members!

We are implementing some additional functionality to work with Inbound IDocs in CRM 4.0. For some reason, we first collect IDocs in status 64 and then trigger its processing in Z-program sequentially by calling standard FM <b>IDOC_START_INBOUND</b>.

Most of the Inbound IDocs are CRMXIF_ORDER_SAVE (Business Transactions). Sometimes we receive erroneous IDocs with, for example, Appointment Start Date before End Date.

Such IDocs block inbound processing, because the called FM is aborted, and no status change is written to the problematic IDoc.

We tried to call FM <b>IDOC_START_INBOUND</b> specifying <b>EXCEPTIONS ERROR_MESSAGE = 10</b> with no avail. The results are the same - at FM execution Abort Message Box is shown, and then control is moved from the debugger to the main SAP GUI.

Could you give an advice or a recommendation on how to intercept such types of exceptions calling SAP FM's?

Thank you very much!

My best regards, Andrei Dirotchka