<?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 data into ztable in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-data-into-ztable/m-p/5715100#M1297221</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Probably itab has entries with duplicated key, so that's why you are "losing" those 200 entries.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 25 May 2009 14:18:51 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-05-25T14:18:51Z</dc:date>
    <item>
      <title>insert data into ztable</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-data-into-ztable/m-p/5715099#M1297220</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i have itab with 1200 lines&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and i make&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab.&lt;/P&gt;&lt;P&gt;insert into ztable values itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and at the end i get 1000 lines, where  are the 200 lines and how i can catch them..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 May 2009 14:15:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insert-data-into-ztable/m-p/5715099#M1297220</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-25T14:15:46Z</dc:date>
    </item>
    <item>
      <title>Re: insert data into ztable</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-data-into-ztable/m-p/5715100#M1297221</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Probably itab has entries with duplicated key, so that's why you are "losing" those 200 entries.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 May 2009 14:18:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insert-data-into-ztable/m-p/5715100#M1297221</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-25T14:18:51Z</dc:date>
    </item>
    <item>
      <title>Re: insert data into ztable</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-data-into-ztable/m-p/5715101#M1297222</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt; simply check the sy-subrc value after the insert instruction.&lt;/P&gt;&lt;P&gt;If it's different from 0, the record is not inserted. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Probably the destination table is type standard/sorted table with unique key.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;P&gt;Andrea&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 May 2009 14:20:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insert-data-into-ztable/m-p/5715101#M1297222</guid>
      <dc:creator>andrea_galluccio2</dc:creator>
      <dc:date>2009-05-25T14:20:39Z</dc:date>
    </item>
    <item>
      <title>Re: insert data into ztable</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-data-into-ztable/m-p/5715102#M1297223</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;First you have to know the usage of insert:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INSERT INTO &amp;lt;target&amp;gt; &amp;lt;lines&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It allows you to insert one or more lines into the database table &amp;lt;target&amp;gt;. You can only insert lines into an ABAP Dictionary view if it only contains fields from one table, and its maintenance status is defined as Read and change. You may specify the database table &amp;lt;target&amp;gt; either statically or dynamically&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hence there might be chance that there already exists record with same key and hence the data is not inserted..Instead use MODIFY statement....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To insert lines into a database table regardless of whether there is already a line in the table with the same primary key, use the following: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODIFY &amp;lt;target&amp;gt; &amp;lt;lines&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the database table contains no line with the same primary key as the line to be inserted, MODIFY works like INSERT, that is, the line is added.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the database already contains a line with the same primary key as the line to be inserted, MODIFY works like UPDATE, that is, the line is changed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For performance reasons, you should use MODIFY only if you cannot distinguish between these two options in your ABAP program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can add or change one or more lines &amp;lt;lines&amp;gt; in a database table &amp;lt;target&amp;gt;. You can only insert or change lines in an ABAP Dictionary view if it only contains fields from one table, and its maintenance status is defined as Read and change. You may specify the database table &amp;lt;target&amp;gt; either statically or dynamically.&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;Shiva&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 May 2009 14:22:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insert-data-into-ztable/m-p/5715102#M1297223</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-25T14:22:27Z</dc:date>
    </item>
    <item>
      <title>Re: insert data into ztable</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-data-into-ztable/m-p/5715103#M1297224</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sikken,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check sy-subrc value after INSERT statement.You can find the list which does not have 0 as sy-subrc.&lt;/P&gt;&lt;P&gt;Check the definition of database table whether it has primary key(s). If you want to insert any entry with duplicate entries to primary key will not insert the entry to database table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Otherwise, you the following statement to add records to database table from internal table at one shot&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;INSERT dbtab FROM TABLE itab&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Vinay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 May 2009 14:23:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insert-data-into-ztable/m-p/5715103#M1297224</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-25T14:23:04Z</dc:date>
    </item>
    <item>
      <title>Re: insert data into ztable</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-data-into-ztable/m-p/5715104#M1297225</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;jus check ig ur passing the values to the same set of primary keys.&lt;/P&gt;&lt;P&gt;for example: if u insert data into the table for a set of primary keys and u again insert data for the same set of primary keys, then it will jus over write the existing entry with new entry.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 May 2009 14:23:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insert-data-into-ztable/m-p/5715104#M1297225</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-25T14:23:33Z</dc:date>
    </item>
    <item>
      <title>Re: insert data into ztable</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-data-into-ztable/m-p/5715105#M1297226</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;Instead of insert use &lt;STRONG&gt;modify&lt;/STRONG&gt; statement....then in case the key is duplicate, your record that you want to add will update the Ztable and when the key wiil not match it will add new rows to the ztable&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab into wa.&lt;/P&gt;&lt;P&gt;modify ztab from wa index sy-tabix.&lt;/P&gt;&lt;P&gt;clear wa.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Prinan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 May 2009 14:27:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insert-data-into-ztable/m-p/5715105#M1297226</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-25T14:27:29Z</dc:date>
    </item>
    <item>
      <title>Re: insert data into ztable</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-data-into-ztable/m-p/5715106#M1297227</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;what are the key fields of the database table...also let me know how u have declared the internal table...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;SG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 May 2009 14:37:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insert-data-into-ztable/m-p/5715106#M1297227</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-25T14:37:22Z</dc:date>
    </item>
  </channel>
</rss>

