<?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: Update table in db in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-table-in-db/m-p/5766301#M1305742</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Ankur,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but how will i know if the record is already exist in the table.&lt;/P&gt;&lt;P&gt;I need to know that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;Michael&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 22 Jun 2009 10:29:13 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-06-22T10:29:13Z</dc:date>
    <item>
      <title>Update table in db</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-table-in-db/m-p/5766298#M1305739</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 need to provide method that update records in the DB ,&lt;/P&gt;&lt;P&gt;in some cases i get values:&lt;/P&gt;&lt;P&gt;1. to create new records in the table. like create new employee&lt;/P&gt;&lt;P&gt;2. record is already exist in the table (part of it) but need to update some fields on it&lt;/P&gt;&lt;P&gt;like if i had employee and i need to update the employee or cell number,adress .&lt;/P&gt;&lt;P&gt;3. recorded is already exist in the table wity the same .&lt;/P&gt;&lt;P&gt;the recorded is that need to update is exactly the same with persistence record&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is the best way to handle such of thing?&lt;/P&gt;&lt;P&gt;with read before update or like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     INSERT gc_db_tab_objects FROM ls_object.&lt;/P&gt;&lt;P&gt;      IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;        UPDATE gc_db_tab_objects FROM ls_objects.&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jun 2009 09:27:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-table-in-db/m-p/5766298#M1305739</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-22T09:27:56Z</dc:date>
    </item>
    <item>
      <title>Re: Update table in db</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-table-in-db/m-p/5766299#M1305740</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You can use MODIFY statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ankur Parab&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jun 2009 09:29:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-table-in-db/m-p/5766299#M1305740</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-22T09:29:08Z</dc:date>
    </item>
    <item>
      <title>Re: Update table in db</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-table-in-db/m-p/5766300#M1305741</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;Please use "MODIFY".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This does both Insert and Update.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When the record is available in DB, then Update is done;  Else, Insert record into DB is done.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgds,&lt;/P&gt;&lt;P&gt;Ramani N&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jun 2009 09:34:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-table-in-db/m-p/5766300#M1305741</guid>
      <dc:creator>former_member229729</dc:creator>
      <dc:date>2009-06-22T09:34:24Z</dc:date>
    </item>
    <item>
      <title>Re: Update table in db</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-table-in-db/m-p/5766301#M1305742</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Ankur,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but how will i know if the record is already exist in the table.&lt;/P&gt;&lt;P&gt;I need to know that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;Michael&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jun 2009 10:29:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-table-in-db/m-p/5766301#M1305742</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-22T10:29:13Z</dc:date>
    </item>
    <item>
      <title>Re: Update table in db</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-table-in-db/m-p/5766302#M1305743</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This message was moderated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jun 2009 10:43:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-table-in-db/m-p/5766302#M1305743</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-22T10:43:07Z</dc:date>
    </item>
    <item>
      <title>Re: Update table in db</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-table-in-db/m-p/5766303#M1305744</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;If you want to know if your record exists in the database, then write a query checking with your key fields to find if it already exists. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODIFY statement on the database works either ways. If there is no record, then it inserts one, else it appends one.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jun 2009 10:43:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-table-in-db/m-p/5766303#M1305744</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-22T10:43:26Z</dc:date>
    </item>
    <item>
      <title>Re: Update table in db</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-table-in-db/m-p/5766304#M1305745</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You dont need to find out if the record exists or not before using "MODIFY" statement.&lt;/P&gt;&lt;P&gt;Modify inserts the record if its not already available, else it will update.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In effect, MODIFY = INSERT + UPDATE functionalities.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you need  to know at all before modifying, you can query the database.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jun 2009 11:53:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-table-in-db/m-p/5766304#M1305745</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-22T11:53:08Z</dc:date>
    </item>
  </channel>
</rss>

