<?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: PERFORM ... ON COMMIT and ROLLBACK in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/perform-on-commit-and-rollback/m-p/11259132#M1914458</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;The &lt;A href="http://help.sap.com/saphelp_nw70/helpdata/en/9f/dbae9c35c111d1829f0000e829fbfe/content.htm?frameset=/en/41/7af4b9a79e11d1950f0000e82de14a/frameset.htm&amp;amp;current_toc=/en/d3/2e974d35c511d1829f0000e829fbfe/plain.htm&amp;amp;node_id=239" title="http://help.sap.com/saphelp_nw70/helpdata/en/9f/dbae9c35c111d1829f0000e829fbfe/content.htm?frameset=/en/41/7af4b9a79e11d1950f0000e82de14a/frameset.htm&amp;amp;current_toc=/en/d3/2e974d35c511d1829f0000e829fbfe/plain.htm&amp;amp;node_id=239"&gt;Error Handling for Bundled Updates - ABAP Programming (BC-ABA)&lt;/A&gt;, is not very clear, but you could try if 'E' message achieves what you want in dialog. However, when executed in background, the 'E' message would still terminate execution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As others already pointed out, error in update processing should be treated as "unrecoverable error" or "system error" in SAP - as something worthy of termination. Or in other words, it's not a good idea to try to work around application errors in update processing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't know much about "BDS Barcodes" but as a general rule, it's never a good idea to try to modify SAP standard tables direcly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers&lt;/P&gt;&lt;P&gt;Janis&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 18 Aug 2015 15:15:38 GMT</pubDate>
    <dc:creator>Private_Member_7726</dc:creator>
    <dc:date>2015-08-18T15:15:38Z</dc:date>
    <item>
      <title>PERFORM ... ON COMMIT and ROLLBACK</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/perform-on-commit-and-rollback/m-p/11259128#M1914454</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello ABAP experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am quite new to SAP LUW, want to execute 2 SQL statements in one unit and didn't find anyhting in the web ...&lt;/P&gt;&lt;P&gt;So to keep it simple I have the following programme.&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/772756" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On COMMIT WORK it first executs form insert1 and then update1. &lt;/P&gt;&lt;P&gt;If sy-subrc &amp;lt;&amp;gt; 0 in from insert1 I want to do a rollback, but I am not allowed to use ROLLBACK WORK statement in that form.&lt;/P&gt;&lt;P&gt;So what possibilities do I have to raise an error without aborting the whole programme and to rollback the work?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Aug 2015 13:06:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/perform-on-commit-and-rollback/m-p/11259128#M1914454</guid>
      <dc:creator>thw</dc:creator>
      <dc:date>2015-08-18T13:06:55Z</dc:date>
    </item>
    <item>
      <title>Re: PERFORM ... ON COMMIT and ROLLBACK</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/perform-on-commit-and-rollback/m-p/11259129#M1914455</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You should perform all the validations before the COMMIT WORK statement. The INSERT statement will fail only if the key is already existing in the table. That check can be performed well in advance, not waiting for the actual INSERT to happen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Juwin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Aug 2015 13:13:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/perform-on-commit-and-rollback/m-p/11259129#M1914455</guid>
      <dc:creator>Juwin</dc:creator>
      <dc:date>2015-08-18T13:13:06Z</dc:date>
    </item>
    <item>
      <title>Re: PERFORM ... ON COMMIT and ROLLBACK</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/perform-on-commit-and-rollback/m-p/11259130#M1914456</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Agree with Juwin. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not sure what your requirement . Why would you first insert and then update the same table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Still one way can be to call the subroutine for update inside the subroutine for Insert instead of calling it in ON COMMIT based on the sy-subrc value after insert statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the INSERT has failed there is nothing to ROLLBACK as the data is not inserted in database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;R&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Aug 2015 13:48:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/perform-on-commit-and-rollback/m-p/11259130#M1914456</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-08-18T13:48:53Z</dc:date>
    </item>
    <item>
      <title>Re: PERFORM ... ON COMMIT and ROLLBACK</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/perform-on-commit-and-rollback/m-p/11259131#M1914457</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Thomas,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the forms you have passed to the update task are executed in that sequence as your PERFORM Statements. Each form has to check the returncode of the SQL Statements and if there is an error it needs to stop the update Task. So if "insert1" gets SY-SUBRC = 4 it should raise an abort message (Type A) which will automatically perform a rollback work and will stop the LUW immediately.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Oliver&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Aug 2015 14:53:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/perform-on-commit-and-rollback/m-p/11259131#M1914457</guid>
      <dc:creator>oliver_wurm</dc:creator>
      <dc:date>2015-08-18T14:53:39Z</dc:date>
    </item>
    <item>
      <title>Re: PERFORM ... ON COMMIT and ROLLBACK</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/perform-on-commit-and-rollback/m-p/11259132#M1914458</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;The &lt;A href="http://help.sap.com/saphelp_nw70/helpdata/en/9f/dbae9c35c111d1829f0000e829fbfe/content.htm?frameset=/en/41/7af4b9a79e11d1950f0000e82de14a/frameset.htm&amp;amp;current_toc=/en/d3/2e974d35c511d1829f0000e829fbfe/plain.htm&amp;amp;node_id=239" title="http://help.sap.com/saphelp_nw70/helpdata/en/9f/dbae9c35c111d1829f0000e829fbfe/content.htm?frameset=/en/41/7af4b9a79e11d1950f0000e82de14a/frameset.htm&amp;amp;current_toc=/en/d3/2e974d35c511d1829f0000e829fbfe/plain.htm&amp;amp;node_id=239"&gt;Error Handling for Bundled Updates - ABAP Programming (BC-ABA)&lt;/A&gt;, is not very clear, but you could try if 'E' message achieves what you want in dialog. However, when executed in background, the 'E' message would still terminate execution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As others already pointed out, error in update processing should be treated as "unrecoverable error" or "system error" in SAP - as something worthy of termination. Or in other words, it's not a good idea to try to work around application errors in update processing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't know much about "BDS Barcodes" but as a general rule, it's never a good idea to try to modify SAP standard tables direcly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers&lt;/P&gt;&lt;P&gt;Janis&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Aug 2015 15:15:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/perform-on-commit-and-rollback/m-p/11259132#M1914458</guid>
      <dc:creator>Private_Member_7726</dc:creator>
      <dc:date>2015-08-18T15:15:38Z</dc:date>
    </item>
    <item>
      <title>Re: PERFORM ... ON COMMIT and ROLLBACK</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/perform-on-commit-and-rollback/m-p/11259133#M1914459</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your replies.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The real programme is more complex than the one above, but it is only a interim solution, so I it's maybe a bit more dirty than usual &lt;SPAN __jive_emoticon_name="happy" __jive_macro_name="emoticon" class="jive_macro jive_emote" src="https://community.sap.com/1322/images/emoticons/happy.gif"&gt;&lt;/SPAN&gt; :&lt;/P&gt;&lt;P&gt;There are three statements on 3 different tables:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;update on table 1&lt;/LI&gt;&lt;LI&gt;insert in table 2&lt;/LI&gt;&lt;LI&gt;delete in table 3&lt;BR /&gt;=&amp;gt; table 1+2 are customer table, table 3 is a sap table, but I couldn't find functions/methods to delete, so I use sql statements.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;These statements are one unit.&lt;/P&gt;&lt;P&gt;As this programme is doing a mass processing, I thought that for every unit it is possible to catch an error and write it in a protocol without changing something in that unit ... and then going on with the next unit.&lt;/P&gt;&lt;P&gt;So if an error happens I just use MESSAGE and TYPE 'A'. This is the common way, right?&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/774591" /&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR /&gt;Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Aug 2015 13:57:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/perform-on-commit-and-rollback/m-p/11259133#M1914459</guid>
      <dc:creator>thw</dc:creator>
      <dc:date>2015-08-20T13:57:43Z</dc:date>
    </item>
  </channel>
</rss>

