<?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: INSERT dbtab FROM TABLE itab in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-dbtab-from-table-itab/m-p/832647#M43681</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;It depends upon Redo log file size in Oracle.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Venkat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 16 Nov 2004 17:01:59 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2004-11-16T17:01:59Z</dc:date>
    <item>
      <title>INSERT dbtab FROM TABLE itab</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-dbtab-from-table-itab/m-p/832641#M43675</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;Does anybody know if there is an upper limit of records in an internal table when to update a db table. (Ex. internal table contain 1.000.000 records)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We are using DB2. Is there an upper limit? Would it be better split the internal table and update fewer records each time? What about performance?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Keld Gregersen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Nov 2004 13:40:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insert-dbtab-from-table-itab/m-p/832641#M43675</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2004-11-16T13:40:02Z</dc:date>
    </item>
    <item>
      <title>Re: INSERT dbtab FROM TABLE itab</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-dbtab-from-table-itab/m-p/832642#M43676</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;splitting the table should make no difference. In fact it should cost some performance, because you would have several database accesses instead of one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In Open SQL data to be read and to be written is transported in &amp;lt;b&amp;gt;packages&amp;lt;/b&amp;gt; between the database server and the application server anyway! You can configure the size of the packages using profile parameters (for example, the standard value for Oracle is 65 KB).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Nov 2004 13:51:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insert-dbtab-from-table-itab/m-p/832642#M43676</guid>
      <dc:creator>retired_member</dc:creator>
      <dc:date>2004-11-16T13:51:47Z</dc:date>
    </item>
    <item>
      <title>Re: INSERT dbtab FROM TABLE itab</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-dbtab-from-table-itab/m-p/832643#M43677</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Keld,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is an upperlimit to the number of records, but it is not easy to determine. This limit actually is the 2Gb memory limit that each session holds as a maximum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So you'll need to know how much your program occupies in memory, the size of your internal table record and so on. A good alternative is to assume that program, overhead and such hold about half of your memory available, thus leaving about 1Gb for your internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Say your internal table record is 512 bytes wide (standard unindexed table) you would be able to hold about 2million records on a non-unicode system and about 1million records on a unicode system.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Of course there are many systems with data that exceeds such a limit, so SAP provides us with a way to do our trick with internal tables but limited to a certain amount (with each pass).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The ABAP code would look something like this:&lt;/P&gt;&lt;P&gt;DATA: my_table TYPE db_table OCCURS 0,&lt;/P&gt;&lt;P&gt;      my_record TYPE db_table.&lt;/P&gt;&lt;P&gt;SELECT *&lt;/P&gt;&lt;P&gt;  INTO TABLE my_table&lt;/P&gt;&lt;P&gt;  FROM db_table &amp;lt;b&amp;gt;PACKAGE SIZE 10000&amp;lt;/b&amp;gt;.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Process resulttable&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  LOOP AT my_table INTO my_record.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  Do our trick here&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    PERFORM our_trick USING my-record.&lt;/P&gt;&lt;P&gt;    MODIFY my_table FROM my_record.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Of course we can use the entire table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  PERFORM our_tricks TABLES my_table.&lt;/P&gt;&lt;P&gt;ENDSELECT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using PACKAGE SIZE n will fill the internal table with each pass in the SELECT loop with n records (in the example with 10.000 records).&lt;/P&gt;&lt;P&gt;The SELECT loop is passed each n records once, filling the internal table. You can do your work with that table.&lt;/P&gt;&lt;P&gt;Keep in mind, that the same restrictions apply as with normal SELECT loops.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Via testing you'll need to find out what value for PACKAGE SIZE will give the best performance. Under normal conditions values above 100 and below 10000 give the best results (in my experience).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this gives a clue for your work.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rob.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Nov 2004 14:58:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insert-dbtab-from-table-itab/m-p/832643#M43677</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2004-11-16T14:58:58Z</dc:date>
    </item>
    <item>
      <title>Re: INSERT dbtab FROM TABLE itab</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-dbtab-from-table-itab/m-p/832644#M43678</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi mr. Keller,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your reply. Using one insert statement will reduce the "fetches" between application and database server to a minimum, but what I tried to ask for was: can the database system (ex. DB2) handle (insert/update)&lt;/P&gt;&lt;P&gt; 1.000.000 records in one DB LUW (is there a "db roll-back area" that might "run full" or so big that it would influence performance or .....).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Keld Gregersen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Nov 2004 15:08:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insert-dbtab-from-table-itab/m-p/832644#M43678</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2004-11-16T15:08:41Z</dc:date>
    </item>
    <item>
      <title>Re: INSERT dbtab FROM TABLE itab</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-dbtab-from-table-itab/m-p/832645#M43679</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rob,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your answer, but my problem is not the size of the internal table, but if the database system can handle insert/update of 1.000.000 records in one DB LUW. See my response to Mr. Keller.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Keld Gregersen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Nov 2004 15:23:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insert-dbtab-from-table-itab/m-p/832645#M43679</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2004-11-16T15:23:16Z</dc:date>
    </item>
    <item>
      <title>Re: INSERT dbtab FROM TABLE itab</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-dbtab-from-table-itab/m-p/832646#M43680</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;yes there are such limitations. It's either the rollback segments or e.g. the number of locks, a DB can manage.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Those limitations are database and configuration specific.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In order to be on the safe side, you must find out the limitations of your DB and split your data to packages that are well below the maximum size and insert those to the database table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Horst Keller&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Nov 2004 15:24:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insert-dbtab-from-table-itab/m-p/832646#M43680</guid>
      <dc:creator>retired_member</dc:creator>
      <dc:date>2004-11-16T15:24:10Z</dc:date>
    </item>
    <item>
      <title>Re: INSERT dbtab FROM TABLE itab</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-dbtab-from-table-itab/m-p/832647#M43681</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;It depends upon Redo log file size in Oracle.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Venkat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Nov 2004 17:01:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insert-dbtab-from-table-itab/m-p/832647#M43681</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2004-11-16T17:01:59Z</dc:date>
    </item>
  </channel>
</rss>

