Skip to Content
0
Former Member
Aug 04, 2008 at 01:54 PM

Sample code Inbound IDOC error processing

129 Views

Can some body help me with sample error processing code for an Inbound IDOC? I will have to process an incoming DEBMAS IDOC using a custom function module which inturn calls the function module IDOC_INPUT_DEBITOR and a few other BAPIs that doesn't have the IDOC_STATUS Internal table passed any where.

I also want to know the places where I have to incorporate this error processing code within the custom function module. While I do know what is the processing that I have to do and also that statuses 60, 56 and 51 are to be checked. But I am trying to understand how can we code checking the status of IDOC.

How about this, do you think, this works?

data: l_idoc_status like line of IDOC_STATUS.

read table IDOC_STATUS into l_idoc_status with key status = 51.

if sy-subrc = 0.

perform send_email_notification.

endif.

Thanks much in advance.