<?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: Updating multiple records into database table using update statement in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/updating-multiple-records-into-database-table-using-update-statement/m-p/8564334#M1659342</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;Can u tell what data are u having in the internal table ?&lt;/P&gt;&lt;P&gt;Does the internal table have all the key field of the DB table which u want to update ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If u have the all key field then u can use below logic &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;LOOP at it where xyz = ' '.

UPDATE ztable 
    SET    xyz = 'X' 
    WHERE  id = it-id "Here u have to add all table key fields
    and        xyz = ' '.

ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Madhukar Shetty&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 23 Feb 2012 06:23:31 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2012-02-23T06:23:31Z</dc:date>
    <item>
      <title>Updating multiple records into database table using update statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/updating-multiple-records-into-database-table-using-update-statement/m-p/8564329#M1659337</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a program  where in i want to update mutiple records into &lt;STRONG&gt;database table&lt;/STRONG&gt; from an &lt;STRONG&gt;internal table&lt;/STRONG&gt; using update statement. i want to update only 1 field into that DB table.&lt;/P&gt;&lt;P&gt;I want to set a field xyz = 'X' where xyz = ' '. &lt;/P&gt;&lt;P&gt; Does anybody have solution for that?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Feb 2012 05:24:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/updating-multiple-records-into-database-table-using-update-statement/m-p/8564329#M1659337</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-02-23T05:24:23Z</dc:date>
    </item>
    <item>
      <title>Re: Updating multiple records into database table using update statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/updating-multiple-records-into-database-table-using-update-statement/m-p/8564330#M1659338</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;This is very simple. No matter how many fields you want to update if you put all your data into internal table with updated values and use update statement againest this internal table automatically only those fields you modified will change in the database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
UPDATE DBtable FROM TABLE Internal table.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Aswath.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Feb 2012 05:32:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/updating-multiple-records-into-database-table-using-update-statement/m-p/8564330#M1659338</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-02-23T05:32:41Z</dc:date>
    </item>
    <item>
      <title>Re: Updating multiple records into database table using update statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/updating-multiple-records-into-database-table-using-update-statement/m-p/8564331#M1659339</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want to update a single field xyz passing an internal table along with condition in the  same update statement.Is it possible ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Feb 2012 06:02:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/updating-multiple-records-into-database-table-using-update-statement/m-p/8564331#M1659339</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-02-23T06:02:55Z</dc:date>
    </item>
    <item>
      <title>Re: Updating multiple records into database table using update statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/updating-multiple-records-into-database-table-using-update-statement/m-p/8564332#M1659340</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Navya,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can do like this.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

Loop at Itab into wa.

if condition on workarea whatever condition you have.

update dbtable from workarea.

endloop.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If this is not your requirment please provide what condition you have and how you want to update.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;Aswath.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Feb 2012 06:12:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/updating-multiple-records-into-database-table-using-update-statement/m-p/8564332#M1659340</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-02-23T06:12:54Z</dc:date>
    </item>
    <item>
      <title>Re: Updating multiple records into database table using update statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/updating-multiple-records-into-database-table-using-update-statement/m-p/8564333#M1659341</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;Update Table name&lt;/P&gt;&lt;P&gt;  set xyz = 'X'&lt;/P&gt;&lt;P&gt;  where xyz = ''.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Gopi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Feb 2012 06:16:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/updating-multiple-records-into-database-table-using-update-statement/m-p/8564333#M1659341</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-02-23T06:16:31Z</dc:date>
    </item>
    <item>
      <title>Re: Updating multiple records into database table using update statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/updating-multiple-records-into-database-table-using-update-statement/m-p/8564334#M1659342</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;Can u tell what data are u having in the internal table ?&lt;/P&gt;&lt;P&gt;Does the internal table have all the key field of the DB table which u want to update ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If u have the all key field then u can use below logic &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;LOOP at it where xyz = ' '.

UPDATE ztable 
    SET    xyz = 'X' 
    WHERE  id = it-id "Here u have to add all table key fields
    and        xyz = ' '.

ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Madhukar Shetty&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Feb 2012 06:23:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/updating-multiple-records-into-database-table-using-update-statement/m-p/8564334#M1659342</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-02-23T06:23:31Z</dc:date>
    </item>
    <item>
      <title>Re: Updating multiple records into database table using update statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/updating-multiple-records-into-database-table-using-update-statement/m-p/8564335#M1659343</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If i use update within the loop , it would hit the database many times leads to performance issue. So is there any other solution to update from internal table with certain condition other than using loop or update  &amp;lt;database tab&amp;gt; from &amp;lt;internal tab&amp;gt;  ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Feb 2012 06:24:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/updating-multiple-records-into-database-table-using-update-statement/m-p/8564335#M1659343</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-02-23T06:24:09Z</dc:date>
    </item>
    <item>
      <title>Re: Updating multiple records into database table using update statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/updating-multiple-records-into-database-table-using-update-statement/m-p/8564336#M1659344</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 use ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;UPDATE DBtable From Internaltable where xyz = 'some'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;Aswath.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Feb 2012 06:26:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/updating-multiple-records-into-database-table-using-update-statement/m-p/8564336#M1659344</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-02-23T06:26:23Z</dc:date>
    </item>
    <item>
      <title>Re: Updating multiple records into database table using update statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/updating-multiple-records-into-database-table-using-update-statement/m-p/8564337#M1659345</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Navya,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You  can use 'MODIFY' command to update in internal table level ,it wont  update  in database level.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But if you use 'UPDATE' command it will update the data in database level.So try to use modify command .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dhaya.G&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Dhayalinie Ganesh on Feb 23, 2012 7:36 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Feb 2012 06:34:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/updating-multiple-records-into-database-table-using-update-statement/m-p/8564337#M1659345</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-02-23T06:34:30Z</dc:date>
    </item>
    <item>
      <title>Re: Updating multiple records into database table using update statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/updating-multiple-records-into-database-table-using-update-statement/m-p/8564338#M1659346</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;Then u can use &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;update &amp;lt;database tab&amp;gt; from &amp;lt;internal tab&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By having the records in the internal table where xyz = ' '  &amp;amp; internal table having all the key fields of DB&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Madhukar Shetty&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Feb 2012 06:38:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/updating-multiple-records-into-database-table-using-update-statement/m-p/8564338#M1659346</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-02-23T06:38:04Z</dc:date>
    </item>
    <item>
      <title>Re: Updating multiple records into database table using update statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/updating-multiple-records-into-database-table-using-update-statement/m-p/8564339#M1659347</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Navya,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Declare a work area type database table OR containing primary key combination.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) Use the work area to update your database table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please remember:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) MODIFY statement - if record is available in DB table, it will modify it. If record is not available, it will create a new entry.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) UPDATE statment - only to update an existing entry&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ajoy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Feb 2012 06:44:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/updating-multiple-records-into-database-table-using-update-statement/m-p/8564339#M1659347</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-02-23T06:44:26Z</dc:date>
    </item>
    <item>
      <title>Re: Updating multiple records into database table using update statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/updating-multiple-records-into-database-table-using-update-statement/m-p/8564340#M1659348</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Navya,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can refer this ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop at ITAB1 into WA1. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;read table ITAB2 into WA2 with key XYZ = WA1-XYZ .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;move WA2-field to WA1-field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;modify ITAB1 index sy-tabix from WA1 transporting field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dhaya.G&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Feb 2012 06:45:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/updating-multiple-records-into-database-table-using-update-statement/m-p/8564340#M1659348</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-02-23T06:45:30Z</dc:date>
    </item>
    <item>
      <title>Re: Updating multiple records into database table using update statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/updating-multiple-records-into-database-table-using-update-statement/m-p/13588066#M2026313</link>
      <description>&lt;P&gt;In case we are using adbc how to&amp;nbsp; update it&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jan 2024 21:43:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/updating-multiple-records-into-database-table-using-update-statement/m-p/13588066#M2026313</guid>
      <dc:creator>marapallishashi</dc:creator>
      <dc:date>2024-01-30T21:43:44Z</dc:date>
    </item>
    <item>
      <title>Re: Updating multiple records into database table using update statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/updating-multiple-records-into-database-table-using-update-statement/m-p/13594953#M2026389</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;While we're happy that you've come to SAP Community to get an answer to your question, you posted your question as an answer in an old thread.&lt;/P&gt;
&lt;P&gt;Posting in older threads is not the best way to get guidance.&lt;/P&gt;
&lt;P&gt;If you're looking for help, you should start a new discussion:&amp;nbsp;&lt;A href="https://community.sap.com/t5/application-development-discussions/bd-p/application-developmentforum-board" target="_blank"&gt;https://community.sap.com/t5/application-development-discussions/bd-p/application-developmentforum-board&lt;/A&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;Anne&lt;/P&gt;</description>
      <pubDate>Mon, 05 Feb 2024 13:40:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/updating-multiple-records-into-database-table-using-update-statement/m-p/13594953#M2026389</guid>
      <dc:creator>AnnePetteroe</dc:creator>
      <dc:date>2024-02-05T13:40:25Z</dc:date>
    </item>
  </channel>
</rss>

