<?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 Re: IDoc error handling in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/idoc-error-handling/m-p/8293252#M1634976</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kiran,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SAP standard event inputErrorOccurred for objecttype IDOCAPPL is triggered when an IDoc fails. So you can trigger a workflow that inturn triggers a background event which starts a background job.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please refer URL for cretaing events in background processing.&lt;/P&gt;&lt;P&gt;[http://help.sap.com/saphelp_nw70/helpdata/en/20/2d513897110872e10000009b38f889/frameset.htm|http://help.sap.com/saphelp_nw70/helpdata/en/20/2d513897110872e10000009b38f889/frameset.htm]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Triggering Events from ABAP Programs&lt;/STRONG&gt;&lt;/U&gt; : Similar logic needs to be programmed in workflow.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA:&lt;/P&gt;&lt;P&gt;    p_eventid   TYPE btceventid,&lt;/P&gt;&lt;P&gt;    p_eventparm TYPE btcevtparm,&lt;/P&gt;&lt;P&gt;    p_server    TYPE btcserver.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Obligatory parameter: EventID.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;EventID should be an existing event already defined in transaction&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;SM64 or using CREATE method of class CL_BATCH_EVENT:&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  p_eventid   = 'SAP_TEST'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Optional parameters: event parameter and target server.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  p_eventparm = 'Event parameter'.&lt;/P&gt;&lt;P&gt;  p_server    = ''.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  CALL METHOD cl_batch_event=&amp;gt;raise&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      i_eventparm                    = p_eventparm&lt;/P&gt;&lt;P&gt;      i_server                       = p_server&lt;/P&gt;&lt;P&gt;      i_eventid                      = p_eventid&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      excpt_raise_failed             = 1&lt;/P&gt;&lt;P&gt;      excpt_server_accepts_no_events = 2&lt;/P&gt;&lt;P&gt;      excpt_raise_forbidden          = 3&lt;/P&gt;&lt;P&gt;      excpt_unknown_event            = 4&lt;/P&gt;&lt;P&gt;      excpt_no_authority             = 5&lt;/P&gt;&lt;P&gt;      OTHERS                         = 6.&lt;/P&gt;&lt;P&gt;  CASE sy-subrc.&lt;/P&gt;&lt;P&gt;    WHEN 0.&lt;/P&gt;&lt;P&gt;      EXIT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    WHEN 1 OR 2 OR 3.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Raise failed.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    WHEN 4.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Event does not exist.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    WHEN OTHERS.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Raised failed due to unknown reason.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  ENDCASE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope I didn't confuse you. Sequence is IDoc fails-&amp;gt;IDOCAPPL~inputErrorOccurred event raise by system-&amp;gt;Custom workflow to trigger background event-&amp;gt;Job scheduled with start condition as BG event.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Abhijith&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 28 Oct 2011 21:14:50 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2011-10-28T21:14:50Z</dc:date>
    <item>
      <title>IDoc error handling</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/idoc-error-handling/m-p/8293250#M1634974</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Friends , &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a standard IDoc . Is there a way to trigger a job when IDoc fails . I see there is an option called After event in SM36 . &lt;/P&gt;&lt;P&gt;Is it possible to trigger an event when IDoc fails , which in turn will trigger the job ? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have little doubt,  is the event in IDoc( Process code )  and event which triggers the background job are same ? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If this is possible , please let me know the T Code to create event which can be used in IDoc . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kiran.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Oct 2011 02:36:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/idoc-error-handling/m-p/8293250#M1634974</guid>
      <dc:creator>former_member589058</dc:creator>
      <dc:date>2011-10-28T02:36:31Z</dc:date>
    </item>
    <item>
      <title>Re: IDoc error handling</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/idoc-error-handling/m-p/8293251#M1634975</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;use SWEL to find out which event gets created when an IDOC fails&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Oct 2011 06:31:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/idoc-error-handling/m-p/8293251#M1634975</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-10-28T06:31:43Z</dc:date>
    </item>
    <item>
      <title>Re: IDoc error handling</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/idoc-error-handling/m-p/8293252#M1634976</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kiran,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SAP standard event inputErrorOccurred for objecttype IDOCAPPL is triggered when an IDoc fails. So you can trigger a workflow that inturn triggers a background event which starts a background job.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please refer URL for cretaing events in background processing.&lt;/P&gt;&lt;P&gt;[http://help.sap.com/saphelp_nw70/helpdata/en/20/2d513897110872e10000009b38f889/frameset.htm|http://help.sap.com/saphelp_nw70/helpdata/en/20/2d513897110872e10000009b38f889/frameset.htm]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Triggering Events from ABAP Programs&lt;/STRONG&gt;&lt;/U&gt; : Similar logic needs to be programmed in workflow.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA:&lt;/P&gt;&lt;P&gt;    p_eventid   TYPE btceventid,&lt;/P&gt;&lt;P&gt;    p_eventparm TYPE btcevtparm,&lt;/P&gt;&lt;P&gt;    p_server    TYPE btcserver.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Obligatory parameter: EventID.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;EventID should be an existing event already defined in transaction&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;SM64 or using CREATE method of class CL_BATCH_EVENT:&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  p_eventid   = 'SAP_TEST'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Optional parameters: event parameter and target server.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  p_eventparm = 'Event parameter'.&lt;/P&gt;&lt;P&gt;  p_server    = ''.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  CALL METHOD cl_batch_event=&amp;gt;raise&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      i_eventparm                    = p_eventparm&lt;/P&gt;&lt;P&gt;      i_server                       = p_server&lt;/P&gt;&lt;P&gt;      i_eventid                      = p_eventid&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      excpt_raise_failed             = 1&lt;/P&gt;&lt;P&gt;      excpt_server_accepts_no_events = 2&lt;/P&gt;&lt;P&gt;      excpt_raise_forbidden          = 3&lt;/P&gt;&lt;P&gt;      excpt_unknown_event            = 4&lt;/P&gt;&lt;P&gt;      excpt_no_authority             = 5&lt;/P&gt;&lt;P&gt;      OTHERS                         = 6.&lt;/P&gt;&lt;P&gt;  CASE sy-subrc.&lt;/P&gt;&lt;P&gt;    WHEN 0.&lt;/P&gt;&lt;P&gt;      EXIT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    WHEN 1 OR 2 OR 3.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Raise failed.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    WHEN 4.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Event does not exist.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    WHEN OTHERS.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Raised failed due to unknown reason.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  ENDCASE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope I didn't confuse you. Sequence is IDoc fails-&amp;gt;IDOCAPPL~inputErrorOccurred event raise by system-&amp;gt;Custom workflow to trigger background event-&amp;gt;Job scheduled with start condition as BG event.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Abhijith&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Oct 2011 21:14:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/idoc-error-handling/m-p/8293252#M1634976</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-10-28T21:14:50Z</dc:date>
    </item>
  </channel>
</rss>

