<?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: database consistency INSERT and UPDATE in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/database-consistency-insert-and-update/m-p/5820127#M1314758</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;refer LUW...PERFORM on COMMIT&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 26 Jun 2009 14:56:11 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-06-26T14:56:11Z</dc:date>
    <item>
      <title>database consistency INSERT and UPDATE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/database-consistency-insert-and-update/m-p/5820125#M1314756</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the following FORM:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM save_data&lt;/P&gt;&lt;P&gt;.... ...&lt;/P&gt;&lt;P&gt;    INSERT  z_table1.&lt;/P&gt;&lt;P&gt;......&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  find some info *****&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;.....&lt;/P&gt;&lt;P&gt;    UPDATE z_table2 SET ... WHERE ...&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;ENDFORM. "save_data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When running this code, apparently it is has happened the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After performing the "INSERT z_table1" the network connection to the SAP server was lost and the "UPDATE z_table2" was not performed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since after an INSERT the system always performs COMMIT, the result is a logical inconsistency because z_table2 was not UPDATEd.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;¿How can I avoid this situation to happen again in the future?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jun 2009 14:22:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/database-consistency-insert-and-update/m-p/5820125#M1314756</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-26T14:22:17Z</dc:date>
    </item>
    <item>
      <title>Re: database consistency INSERT and UPDATE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/database-consistency-insert-and-update/m-p/5820126#M1314757</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt; Since after an INSERT the system always performs COMMIT, the result is a logical inconsistency because z_table2 was not UPDATEd.&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;There is no automatic COMMIT after an INSERT. That is done explicitly by you (with a COMMIT ststement) or implicitly when the program ends.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jun 2009 14:53:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/database-consistency-insert-and-update/m-p/5820126#M1314757</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-26T14:53:39Z</dc:date>
    </item>
    <item>
      <title>Re: database consistency INSERT and UPDATE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/database-consistency-insert-and-update/m-p/5820127#M1314758</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;refer LUW...PERFORM on COMMIT&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jun 2009 14:56:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/database-consistency-insert-and-update/m-p/5820127#M1314758</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-26T14:56:11Z</dc:date>
    </item>
    <item>
      <title>Re: database consistency INSERT and UPDATE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/database-consistency-insert-and-update/m-p/5820128#M1314759</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Read the documentation about transaction processing and the update task and Logical Units of Work.  LUW.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jun 2009 14:56:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/database-consistency-insert-and-update/m-p/5820128#M1314759</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2009-06-26T14:56:18Z</dc:date>
    </item>
    <item>
      <title>Re: database consistency INSERT and UPDATE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/database-consistency-insert-and-update/m-p/5820129#M1314760</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;Do as Guys suggested above. First read about&lt;/P&gt;&lt;P&gt;[DB LUW|http://help.sap.com/saphelp_46c/helpdata/en/41/7af4bca79e11d1950f0000e82de14a/frameset.htm]&lt;/P&gt;&lt;P&gt;[SAP LUW|http://help.sap.com/saphelp_46c/helpdata/en/41/7af4bfa79e11d1950f0000e82de14a/frameset.htm] thereafter.&lt;/P&gt;&lt;P&gt;As Rob said, &lt;STRONG&gt;DB COMMIT&lt;/STRONG&gt; will only be triggered when:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Implicitly&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;- system displays a screen&lt;/P&gt;&lt;P&gt;- dialog message is displayed&lt;/P&gt;&lt;P&gt;- RFC call is executed &lt;/P&gt;&lt;P&gt;- new transaction is called (CALL TRANSACTION) or new report is executed (SUBMIT)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Explicitly&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;- by COMMIT statement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Generally DB COMMIT is triggered once &lt;STRONG&gt;work process&lt;/STRONG&gt; is released. Here when you execute one statement after another within one &lt;STRONG&gt;DB LUW&lt;/STRONG&gt; it will either execute all or nothing. Refer above links and the topic will become more clear. Good practice would be using &lt;EM&gt;bundling&lt;/EM&gt; methods to perform DB activites within one &lt;STRONG&gt;SAP LUW&lt;/STRONG&gt; (also explained above).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Marcin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jun 2009 20:23:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/database-consistency-insert-and-update/m-p/5820129#M1314760</guid>
      <dc:creator>MarcinPciak</dc:creator>
      <dc:date>2009-06-26T20:23:09Z</dc:date>
    </item>
    <item>
      <title>Re: database consistency INSERT and UPDATE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/database-consistency-insert-and-update/m-p/5820130#M1314761</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Marcin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You gave me the clue:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A COMMIT was performed because there was a &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MESSAGE iNNN&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Right after the INSERT and before the UPDATE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've placed that MESSAGE after all Data Base operations ara performed, so I expect this problem wont happen again in the future.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you all for yor contributions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Jun 2009 08:37:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/database-consistency-insert-and-update/m-p/5820130#M1314761</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-29T08:37:54Z</dc:date>
    </item>
  </channel>
</rss>

