<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Sample code Inbound IDOC error processing in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/sample-code-inbound-idoc-error-processing/m-p/4245013#M1013250</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;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. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How about this, do you think, this works?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;data: l_idoc_status like line of IDOC_STATUS.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;read table IDOC_STATUS into l_idoc_status with key status = 51.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;if sy-subrc = 0.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;perform send_email_notification.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;endif.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks much in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 04 Aug 2008 13:54:01 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-08-04T13:54:01Z</dc:date>
    <item>
      <title>Sample code Inbound IDOC error processing</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sample-code-inbound-idoc-error-processing/m-p/4245013#M1013250</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;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. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How about this, do you think, this works?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;data: l_idoc_status like line of IDOC_STATUS.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;read table IDOC_STATUS into l_idoc_status with key status = 51.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;if sy-subrc = 0.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;perform send_email_notification.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;endif.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks much in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Aug 2008 13:54:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sample-code-inbound-idoc-error-processing/m-p/4245013#M1013250</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-04T13:54:01Z</dc:date>
    </item>
    <item>
      <title>Re: Sample code Inbound IDOC error processing</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sample-code-inbound-idoc-error-processing/m-p/4245014#M1013251</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;LOOP AT idoc_status WHERE status = '56' OR status = '60' OR status = '63'&lt;/P&gt;&lt;P&gt;  OR status = '65' OR status = '67' OR status = '68' OR status = '59'&lt;/P&gt;&lt;P&gt;  OR status = '72'  OR status = '51'.&lt;/P&gt;&lt;P&gt;    PERFORM send_email_notification.&lt;/P&gt;&lt;P&gt;    RETURN.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a better way of writing this code?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Aug 2008 14:27:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sample-code-inbound-idoc-error-processing/m-p/4245014#M1013251</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-05T14:27:26Z</dc:date>
    </item>
  </channel>
</rss>

