<?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 values into DB Table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-values-into-db-table/m-p/5649852#M1285512</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Since MANDT is the only key field, it will insert only one record from the internal table. So, choose appropriate key fields and then try to execute the statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Siva.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 13 May 2009 08:45:46 GMT</pubDate>
    <dc:creator>sivasatyaprasad_yerra</dc:creator>
    <dc:date>2009-05-13T08:45:46Z</dc:date>
    <item>
      <title>Insert values into DB Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-values-into-db-table/m-p/5649849#M1285509</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;              I am trying to insert values directly in DB table using Insert statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the example code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      INSERT zsd_ord_conf_log FROM TABLE it_log ACCEPTING DUPLICATE KEYS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;     LOOP AT it_log INTO wa_log.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;       INSERT into zsd_ord_conf_log values wa_log. "ACCEPTING DUPLICATE KEYS.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;       COMMIT WORK.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;       CLEAR wa_log.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;     ENDLOOP.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I try both ways above, It insert one only record initially after that, its not allowing any.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MANDT is the only primary key in this table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it anything I need to maintain at the technical settings.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 May 2009 08:23:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insert-values-into-db-table/m-p/5649849#M1285509</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-13T08:23:04Z</dc:date>
    </item>
    <item>
      <title>Re: Insert values into DB Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-values-into-db-table/m-p/5649850#M1285510</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi sapgeek007,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Updating a DB Table using INSERT Key word is not best practise.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And I could't see any DB table in to code.&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;Suneel G&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 May 2009 08:30:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insert-values-into-db-table/m-p/5649850#M1285510</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-13T08:30:28Z</dc:date>
    </item>
    <item>
      <title>Re: Insert values into DB Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-values-into-db-table/m-p/5649851#M1285511</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;since mandt is only primary key, it wont allow you to enter any values with same mandt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INSERT target FROM TABLE itab [ACCEPTING DUPLICATE KEYS].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This writes all lines of the internal table to the database table in one single operation. If one or more lines cannot be inserted because the database already contains a line with the same primary key, a runtime error occurs. You can prevent the runtime error occurring by using the addition ACCEPTING DUPLICATE KEYS.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 May 2009 08:32:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insert-values-into-db-table/m-p/5649851#M1285511</guid>
      <dc:creator>former_member188827</dc:creator>
      <dc:date>2009-05-13T08:32:33Z</dc:date>
    </item>
    <item>
      <title>Re: Insert values into DB Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-values-into-db-table/m-p/5649852#M1285512</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Since MANDT is the only key field, it will insert only one record from the internal table. So, choose appropriate key fields and then try to execute the statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Siva.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 May 2009 08:45:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insert-values-into-db-table/m-p/5649852#M1285512</guid>
      <dc:creator>sivasatyaprasad_yerra</dc:creator>
      <dc:date>2009-05-13T08:45:46Z</dc:date>
    </item>
    <item>
      <title>Re: Insert values into DB Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-values-into-db-table/m-p/5649853#M1285513</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; Hi sapgeek007,&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; Updating a DB Table using INSERT Key word is not best practise.&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; And I could't see any DB table in to code.&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; Regards,&lt;/P&gt;&lt;P&gt;&amp;gt; Suneel G&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;He's updating a custom Z table so using INSERT is fine.  The Z DB table is in the code.....   &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As mentioned, the problem is that the table doesn't have a proper key - each table record needs to have a unique key to identify it and if the key is MANDT it will only allow a single record to be created in each client.  Read the SAP help on creating database tables.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 May 2009 09:34:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insert-values-into-db-table/m-p/5649853#M1285513</guid>
      <dc:creator>christine_evans</dc:creator>
      <dc:date>2009-05-13T09:34:13Z</dc:date>
    </item>
    <item>
      <title>Re: Insert values into DB Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-values-into-db-table/m-p/5649854#M1285514</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if MANDT is only primary key then always one record will be inserted in table because in any client all the records have same MANDT value ( Client ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So solution is use combination of fields with MANDT as primarykey so data will be inserted in table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Chintan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 May 2009 09:56:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insert-values-into-db-table/m-p/5649854#M1285514</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-13T09:56:32Z</dc:date>
    </item>
    <item>
      <title>Re: Insert values into DB Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-values-into-db-table/m-p/5649855#M1285515</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Solved&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jun 2009 02:37:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insert-values-into-db-table/m-p/5649855#M1285515</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-09T02:37:05Z</dc:date>
    </item>
  </channel>
</rss>

