<?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: Too many insert statements executed corresponding to one Insert statement in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/too-many-insert-statements-executed-corresponding-to-one-insert-statement/m-p/3565620#M858080</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Atish,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Actually the code is very simple. I do a loop for both the tables. Inside the loop i populate internal table (&amp;lt;lt_table&amp;gt;) with 10 records with the data for that table. And finally, using following statement i do an insert:&lt;/P&gt;&lt;P&gt;INSERT (&amp;lt;ls_data&amp;gt;-database_table) FROM TABLE &amp;lt;lt_table&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When i debug everything looks ok. This insert statement is called only twice, once for each table. I can see 10 records inserted in each table. But, ST05 shows different results.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Ankur&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 02 Apr 2008 05:16:42 GMT</pubDate>
    <dc:creator>ankur_malik</dc:creator>
    <dc:date>2008-04-02T05:16:42Z</dc:date>
    <item>
      <title>Too many insert statements executed corresponding to one Insert statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/too-many-insert-statements-executed-corresponding-to-one-insert-statement/m-p/3565618#M858078</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;I have 2 tables. The first table has 21 fields and the 2nd table has 54 fields. I am inserting 10 records each into both the tables using following insert statement: "INSERT (&amp;lt;ls_data&amp;gt;-database_table) FROM TABLE &amp;lt;lt_table&amp;gt;." This means that above mentioned Insert statement is executed once for each table.&lt;/P&gt;&lt;P&gt;But when i see SQL trace in ST05, i see that there is only 1 insert for the 1st table but for the 2nd table it shows 10 inserts.&lt;/P&gt;&lt;P&gt;Can anyone suggest where the problem is?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Best Regards,&lt;/P&gt;&lt;P&gt;Ankur&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Apr 2008 03:15:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/too-many-insert-statements-executed-corresponding-to-one-insert-statement/m-p/3565618#M858078</guid>
      <dc:creator>ankur_malik</dc:creator>
      <dc:date>2008-04-02T03:15:22Z</dc:date>
    </item>
    <item>
      <title>Re: Too many insert statements executed corresponding to one Insert statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/too-many-insert-statements-executed-corresponding-to-one-insert-statement/m-p/3565619#M858079</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;Can you show your complete code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Atish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Apr 2008 03:23:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/too-many-insert-statements-executed-corresponding-to-one-insert-statement/m-p/3565619#M858079</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-02T03:23:23Z</dc:date>
    </item>
    <item>
      <title>Re: Too many insert statements executed corresponding to one Insert statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/too-many-insert-statements-executed-corresponding-to-one-insert-statement/m-p/3565620#M858080</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Atish,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Actually the code is very simple. I do a loop for both the tables. Inside the loop i populate internal table (&amp;lt;lt_table&amp;gt;) with 10 records with the data for that table. And finally, using following statement i do an insert:&lt;/P&gt;&lt;P&gt;INSERT (&amp;lt;ls_data&amp;gt;-database_table) FROM TABLE &amp;lt;lt_table&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When i debug everything looks ok. This insert statement is called only twice, once for each table. I can see 10 records inserted in each table. But, ST05 shows different results.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Ankur&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Apr 2008 05:16:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/too-many-insert-statements-executed-corresponding-to-one-insert-statement/m-p/3565620#M858080</guid>
      <dc:creator>ankur_malik</dc:creator>
      <dc:date>2008-04-02T05:16:42Z</dc:date>
    </item>
    <item>
      <title>Re: Too many insert statements executed corresponding to one Insert statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/too-many-insert-statements-executed-corresponding-to-one-insert-statement/m-p/3565621#M858081</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;the SAP kernel has multiple layers, one is the database interface. This decides how a statement is processed against the database. I assume that your 2nd table is much wider than the 1st one (wider here means more characters / bytes per row, not more columns), or it contains a string or xstring column. In those cases the inserts could not be processed by array inserts (at least not on all databases). Then you see single row inserts in ST05. But normally you should not be concerned by the number of Insert statements. The kernel always try to optimize the performance in respect of the features of the underlying database. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards &lt;/P&gt;&lt;P&gt;Ralph&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Apr 2008 11:22:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/too-many-insert-statements-executed-corresponding-to-one-insert-statement/m-p/3565621#M858081</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-02T11:22:04Z</dc:date>
    </item>
  </channel>
</rss>

