<?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 table Update at same time in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/database-table-update-at-same-time/m-p/5472609#M1253191</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;Database table has DATE and TIME as P-key.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If Time field is a Primary key, how can you update with same value for every record&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 20 Apr 2009 10:02:58 GMT</pubDate>
    <dc:creator>former_member222860</dc:creator>
    <dc:date>2009-04-20T10:02:58Z</dc:date>
    <item>
      <title>Database table Update at same time</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/database-table-update-at-same-time/m-p/5472605#M1253187</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 to insert a given number of records in a database table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Database table has DATE and TIME as P-key.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Issue : Suppose there are 500 records.In such a case INSERT does not work on the table due to insertion at same TIME.Hence only limited number of records are inserted in table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please provide solution such that the database table is updated with all the records.I do not want to use &lt;STRONG&gt;WAIT UP TO 1 SECONDS.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in Advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Apr 2009 09:36:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/database-table-update-at-same-time/m-p/5472605#M1253187</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-20T09:36:30Z</dc:date>
    </item>
    <item>
      <title>Re: Database table Update at same time</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/database-table-update-at-same-time/m-p/5472606#M1253188</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 Modify statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think it should work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Archana&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Apr 2009 09:42:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/database-table-update-at-same-time/m-p/5472606#M1253188</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-20T09:42:02Z</dc:date>
    </item>
    <item>
      <title>Re: Database table Update at same time</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/database-table-update-at-same-time/m-p/5472607#M1253189</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Archana , &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to insert a new record in the database table and not to modify the existing record.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Apr 2009 09:44:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/database-table-update-at-same-time/m-p/5472607#M1253189</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-20T09:44:35Z</dc:date>
    </item>
    <item>
      <title>Re: Database table Update at same time</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/database-table-update-at-same-time/m-p/5472608#M1253190</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;Try this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suppose you have 500 entries in the Internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

data : lv_time type sy-uzeit.

loop at itab.

   if sy-tabix = 1.

   lv_time = sy-uzeit.
  
   else.

   lv_time = lv_time + 1.
   endif.

itab-time = lv_time.
modify itab index sy-tabix.
endloop.

modify ztable from itab.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this solves your problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Bhupal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Apr 2009 09:52:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/database-table-update-at-same-time/m-p/5472608#M1253190</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-20T09:52:10Z</dc:date>
    </item>
    <item>
      <title>Re: Database table Update at same time</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/database-table-update-at-same-time/m-p/5472609#M1253191</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;Database table has DATE and TIME as P-key.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If Time field is a Primary key, how can you update with same value for every record&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Apr 2009 10:02:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/database-table-update-at-same-time/m-p/5472609#M1253191</guid>
      <dc:creator>former_member222860</dc:creator>
      <dc:date>2009-04-20T10:02:58Z</dc:date>
    </item>
    <item>
      <title>Re: Database table Update at same time</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/database-table-update-at-same-time/m-p/5472610#M1253192</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A more reasonable way is, to add a third key in the table, e.g. SERIAL_NUMBER.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In an update, for example, 500 records:&lt;/P&gt;&lt;P&gt;First, select db by DATE+TIME, to get the maximum SERIAL_NUMBER;&lt;/P&gt;&lt;P&gt;Then, assign a SERIAL_NUMBER , sequentially, to each of your 500 records. &lt;/P&gt;&lt;P&gt;Finally, update db by DATE&lt;EM&gt;TIME&lt;/EM&gt;SERIAL_NUMBER.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Apr 2009 10:10:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/database-table-update-at-same-time/m-p/5472610#M1253192</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-20T10:10:45Z</dc:date>
    </item>
    <item>
      <title>Re: Database table Update at same time</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/database-table-update-at-same-time/m-p/5472611#M1253193</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;loop at the entries table from where you want to update and in that loop use insert statement.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;loop at itab into wa.
update dbtab using wa.
endloop&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;commit work after this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also there is no harm if date and time is the key field. you can have unique entries based on it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Lalit Mohan Gupta.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Apr 2009 15:55:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/database-table-update-at-same-time/m-p/5472611#M1253193</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-20T15:55:16Z</dc:date>
    </item>
  </channel>
</rss>

