<?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 Error out the ABAP program execution in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-out-the-abap-program-execution/m-p/6452193#M1413995</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have an ABAP program which transfers data from a file to a database table thru function module in packages of 50,000 records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Upon the successful completion of this ABAP program, I start dependent processes.&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sometimes the function module does not transfer the data and returns the exception back to the ABAP program - which is an expected scenario. Currently when ever an exception is received in the function module, I stop the ABAP program with a &lt;STRONG&gt;STOP&lt;/STRONG&gt; statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The ABAP program stops, &lt;STRONG&gt;which meets my first objective&lt;/STRONG&gt;. But what happens is, if you look at the job log --&amp;gt; it is Completed in terms of program execution and the dependent processes automatically start - &lt;STRONG&gt;which is not meeting my second objective&lt;/STRONG&gt;. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;My second objective&lt;/STRONG&gt; is to force the ABAP program to error out in such a way that .........&lt;/P&gt;&lt;P&gt;1) The program execution is stopped &lt;/P&gt;&lt;P&gt;2) If I look at the job log it should not be Completed (I am looking for something like Cancelled so that the dependent process do not get started automatically) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Is it possible to error out the ABAP program execution by raising an exception or something&lt;/STRONG&gt;, so that when i look at the job log - it shows Cancelled and not Completed?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know if you have any questions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;RK.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 17 Jan 2010 03:46:06 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-01-17T03:46:06Z</dc:date>
    <item>
      <title>Error out the ABAP program execution</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-out-the-abap-program-execution/m-p/6452193#M1413995</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have an ABAP program which transfers data from a file to a database table thru function module in packages of 50,000 records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Upon the successful completion of this ABAP program, I start dependent processes.&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sometimes the function module does not transfer the data and returns the exception back to the ABAP program - which is an expected scenario. Currently when ever an exception is received in the function module, I stop the ABAP program with a &lt;STRONG&gt;STOP&lt;/STRONG&gt; statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The ABAP program stops, &lt;STRONG&gt;which meets my first objective&lt;/STRONG&gt;. But what happens is, if you look at the job log --&amp;gt; it is Completed in terms of program execution and the dependent processes automatically start - &lt;STRONG&gt;which is not meeting my second objective&lt;/STRONG&gt;. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;My second objective&lt;/STRONG&gt; is to force the ABAP program to error out in such a way that .........&lt;/P&gt;&lt;P&gt;1) The program execution is stopped &lt;/P&gt;&lt;P&gt;2) If I look at the job log it should not be Completed (I am looking for something like Cancelled so that the dependent process do not get started automatically) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Is it possible to error out the ABAP program execution by raising an exception or something&lt;/STRONG&gt;, so that when i look at the job log - it shows Cancelled and not Completed?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know if you have any questions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;RK.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 17 Jan 2010 03:46:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-out-the-abap-program-execution/m-p/6452193#M1413995</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-17T03:46:06Z</dc:date>
    </item>
    <item>
      <title>Re: Error out the ABAP program execution</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-out-the-abap-program-execution/m-p/6452194#M1413996</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, RK&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check the Value of &lt;STRONG&gt;SY-SUBRC&lt;/STRONG&gt; before the execution of the dependent process, if it is &lt;STRONG&gt;0 (Zero)&lt;/STRONG&gt; mean no exception than continue execution of dependent process and if &lt;STRONG&gt;SY-SUBRC&lt;/STRONG&gt; value is other than 0 Zero mean there is some exception than not execute the dependent process. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope you will get some idea to solve out your problem,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please Reply if your scenario is else one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Faisal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 17 Jan 2010 07:54:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-out-the-abap-program-execution/m-p/6452194#M1413996</guid>
      <dc:creator>faisalatsap</dc:creator>
      <dc:date>2010-01-17T07:54:50Z</dc:date>
    </item>
    <item>
      <title>Re: Error out the ABAP program execution</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-out-the-abap-program-execution/m-p/6452195#M1413997</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;use MESSAGE TYPE 'E' or 'A' instead of STOP statement. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Adrian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 17 Jan 2010 15:17:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-out-the-abap-program-execution/m-p/6452195#M1413997</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-17T15:17:37Z</dc:date>
    </item>
    <item>
      <title>Re: Error out the ABAP program execution</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-out-the-abap-program-execution/m-p/6452196#M1413998</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you schedule it in background, then it shows the status as cnacelled automatically, completed when everything gets over.&lt;/P&gt;&lt;P&gt;So you can schedule the job and then read the job status.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 17 Jan 2010 16:46:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-out-the-abap-program-execution/m-p/6452196#M1413998</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2010-01-17T16:46:52Z</dc:date>
    </item>
    <item>
      <title>Re: Error out the ABAP program execution</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-out-the-abap-program-execution/m-p/6452197#M1413999</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Faisal,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your response.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using the abap program as a part of my process chain in SAP BI. &lt;STRONG&gt;So whenever sy-subrc = 0, currently I am using a stop statement.&lt;/STRONG&gt; The job logs says Completed and it starts the dependent steps in my process chain --&amp;gt; which is not meeting my objective.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: RK on Jan 17, 2010 6:24 PM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: RK on Jan 17, 2010 7:46 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 17 Jan 2010 17:14:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-out-the-abap-program-execution/m-p/6452197#M1413999</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-17T17:14:11Z</dc:date>
    </item>
    <item>
      <title>Re: Error out the ABAP program execution</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-out-the-abap-program-execution/m-p/6452198#M1414000</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Keshav,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since I am using the STOP statement, the job is completed as "Finished" and not "Cancelled".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Raj.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 17 Jan 2010 17:26:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-out-the-abap-program-execution/m-p/6452198#M1414000</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-17T17:26:37Z</dc:date>
    </item>
    <item>
      <title>Re: Error out the ABAP program execution</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-out-the-abap-program-execution/m-p/6452199#M1414001</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Adrian,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks - This is exactly what I was looking for, it works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For some reason &lt;STRONG&gt;Messages&lt;/STRONG&gt; skipped my mind and I was looking at raising &lt;STRONG&gt;Exceptions&lt;/STRONG&gt; &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Solution:&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc NE 0.&lt;/P&gt;&lt;P&gt;  message id 'abc' type 'E' number 000.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;RK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: RK on Jan 17, 2010 7:47 PM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: RK on Jan 17, 2010 7:50 PM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: RK on Jan 17, 2010 7:52 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 17 Jan 2010 17:33:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-out-the-abap-program-execution/m-p/6452199#M1414001</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-17T17:33:41Z</dc:date>
    </item>
  </channel>
</rss>

