<?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: program to update 2 database tables in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/program-to-update-2-database-tables/m-p/9492121#M1746224</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I hope these are custom tables...&lt;BR /&gt;use update/modify statement (depending on your requirement)it would return a sy-subrc if it is 0 go ahead and update the second database table, if not then roll back , if both returns a sy-subrc as 0 then only commit work else put a roll back.&lt;BR /&gt;look for abap help F1 for how to use update/modify syntaxes and uses.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 05 Jun 2013 14:18:29 GMT</pubDate>
    <dc:creator>former_member193464</dc:creator>
    <dc:date>2013-06-05T14:18:29Z</dc:date>
    <item>
      <title>program to update 2 database tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/program-to-update-2-database-tables/m-p/9492119#M1746222</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have requirement where i need to update records in&amp;nbsp; 2 database tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My first doubt is can we update 2 database tables at same time with code.. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or if not..how do we do it one after another??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and suppose if i am doing database update 1 after another// &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if first database table update is not happened, i want to stop the database update of second table???how can i achieve it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and if first database table update is done successfully. 2nd dbtable also should get updated...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Jun 2013 14:02:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/program-to-update-2-database-tables/m-p/9492119#M1746222</guid>
      <dc:creator>former_member391265</dc:creator>
      <dc:date>2013-06-05T14:02:21Z</dc:date>
    </item>
    <item>
      <title>Re: program to update 2 database tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/program-to-update-2-database-tables/m-p/9492120#M1746223</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are these Z tables?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If not, then think very hard before doing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If they were however say za and zb.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A simple logic of:&lt;/P&gt;&lt;P&gt;Lock za&lt;/P&gt;&lt;P&gt;Lock zb&lt;/P&gt;&lt;P&gt;Update za from waza&lt;/P&gt;&lt;P&gt;update zb from wazb&lt;/P&gt;&lt;P&gt;If either fail roll back&lt;/P&gt;&lt;P&gt;else commit&lt;/P&gt;&lt;P&gt;unlock za&lt;/P&gt;&lt;P&gt;unlock zb&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;could be very reasonable.&amp;nbsp; That puts za and zb in the same LUW.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Would you please explain in more detail what you fully need.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Neal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Jun 2013 14:14:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/program-to-update-2-database-tables/m-p/9492120#M1746223</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-06-05T14:14:05Z</dc:date>
    </item>
    <item>
      <title>Re: program to update 2 database tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/program-to-update-2-database-tables/m-p/9492121#M1746224</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I hope these are custom tables...&lt;BR /&gt;use update/modify statement (depending on your requirement)it would return a sy-subrc if it is 0 go ahead and update the second database table, if not then roll back , if both returns a sy-subrc as 0 then only commit work else put a roll back.&lt;BR /&gt;look for abap help F1 for how to use update/modify syntaxes and uses.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Jun 2013 14:18:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/program-to-update-2-database-tables/m-p/9492121#M1746224</guid>
      <dc:creator>former_member193464</dc:creator>
      <dc:date>2013-06-05T14:18:29Z</dc:date>
    </item>
    <item>
      <title>Re: program to update 2 database tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/program-to-update-2-database-tables/m-p/9492122#M1746225</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;You can update two or 'N' database tables at the same time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the other Query please refer Neal's or Manoj's Answer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Ankit.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Jun 2013 17:26:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/program-to-update-2-database-tables/m-p/9492122#M1746225</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-06-05T17:26:44Z</dc:date>
    </item>
  </channel>
</rss>

