<?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: How to delete rows from internal table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-delete-rows-from-internal-table/m-p/2357408#M521064</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;    Use DELETE command with appropriate Key fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For Eg: Delete adjascent Duplicates from itab comparing &amp;lt;fild1 fild2.....fieldn&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward All Helpfull Answers...........&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 01 Jun 2007 04:55:10 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-06-01T04:55:10Z</dc:date>
    <item>
      <title>How to delete rows from internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-delete-rows-from-internal-table/m-p/2357400#M521056</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i have a internal table fetching some entries from a data base table plz tell me after fetchin details from database table into internal table how can i delete some entries from internal table&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Jun 2007 03:49:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-delete-rows-from-internal-table/m-p/2357400#M521056</guid>
      <dc:creator>Karan_Chopra_</dc:creator>
      <dc:date>2007-06-01T03:49:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete rows from internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-delete-rows-from-internal-table/m-p/2357401#M521057</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Karan , &lt;/P&gt;&lt;P&gt;  Use the command DELETE.&lt;/P&gt;&lt;P&gt;The syntax will be DELETE &amp;lt;ITAB&amp;gt; WHERE &amp;lt;CONDITION&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please see the help for DELETE command for more info.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Arun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Jun 2007 03:52:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-delete-rows-from-internal-table/m-p/2357401#M521057</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-01T03:52:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete rows from internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-delete-rows-from-internal-table/m-p/2357402#M521058</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you can just use the delete statement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;delete it_tab where &amp;lt;condition&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Gopi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Jun 2007 03:52:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-delete-rows-from-internal-table/m-p/2357402#M521058</guid>
      <dc:creator>gopi_narendra</dc:creator>
      <dc:date>2007-06-01T03:52:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete rows from internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-delete-rows-from-internal-table/m-p/2357403#M521059</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;depending on the conditions we can delete them&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;delete itab where field1 eq 'XXX'.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Jun 2007 03:52:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-delete-rows-from-internal-table/m-p/2357403#M521059</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-01T03:52:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete rows from internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-delete-rows-from-internal-table/m-p/2357404#M521060</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;DELETE &amp;lt;internal table Name&amp;gt; WHERE &amp;lt;condition&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;SaiRam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Jun 2007 03:54:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-delete-rows-from-internal-table/m-p/2357404#M521060</guid>
      <dc:creator>former_member196280</dc:creator>
      <dc:date>2007-06-01T03:54:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete rows from internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-delete-rows-from-internal-table/m-p/2357405#M521061</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;&amp;lt;b&amp;gt;delete  &amp;lt;field&amp;gt; from itab where &amp;lt;condition&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;modify itab.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;ravish&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;plz dont forget to reward points if helpful&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Jun 2007 03:55:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-delete-rows-from-internal-table/m-p/2357405#M521061</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-01T03:55:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete rows from internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-delete-rows-from-internal-table/m-p/2357406#M521062</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;DELETE { {FROM target [WHERE sql_cond]} &lt;/P&gt;&lt;P&gt;| {target FROM source} }. &lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;The statement DELETE deletes one or more rows from the database table specified in target. The rows that are to be deleted are specified either in a WHERE condition sql_cond or with data objects in source. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;System Fields &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The statement DELETE sets the values of the system fields sy-subrc and sy-dbcnt. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sy-subrc Meaning &lt;/P&gt;&lt;P&gt;0 A least one row was deleted. &lt;/P&gt;&lt;P&gt;4 At least one row could not be deleted, since it was not found in the database table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The statement MODIFY sets sy-dbcnt to the number of deleted rows. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DELETE dbtab - cond &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Syntax &lt;/P&gt;&lt;P&gt;... WHERE sql_cond. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;The WHERE addition uses a logical expression sql_cond to specify which rows in the database table are deleted. The same applies to the logical expression sql_cond as for the WHERE condition of the SELECT statement. If there is no row in the database that satisfies the WHERE condition, no row is deleted and sy-subrc is set to 4. If no WHERE condition is specified, all rows are deleted. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note &lt;/P&gt;&lt;P&gt;As of Release 6.10, specifying the WHERE condition is optional. Prior to Release 6.10, you had to specify the WHERE condition in this variant of the DELETE statement and you could not use dynamic logical expressions. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the following example, all an airline's flights for today in which no seats are occupied are deleted from the database table SFLIGHT (see also, example to dtab-source). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PARAMETERS p_carrid TYPE sflight-carrid. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DELETE FROM sflight &lt;/P&gt;&lt;P&gt;WHERE carrid = p_carrid AND &lt;/P&gt;&lt;P&gt;fldate = sy-datum AND &lt;/P&gt;&lt;P&gt;seatsocc = 0. &lt;/P&gt;&lt;P&gt;Syntax &lt;/P&gt;&lt;P&gt;... FROM wa|{TABLE itab}. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alternatives: &lt;/P&gt;&lt;P&gt;1. ... FROM wa &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. ... FROM TABLE itab &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;After FROM, you can specifiy a data object wa that is not table-type or an internal table itab. The content of the data objects determines the row(s) to be deleted. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alternative 1 &lt;/P&gt;&lt;P&gt;... FROM wa &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;If you specify a work area wa that is not table-type, a row is searched for in the database table whose primary key content is the same as that of the corresponding initial part of the work area. The content of the work area is not converted and is interpreted according to the structure of the database table or view. This row is deleted. The work area must meet the prerequisites for use in Open SQL statements. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If there is no row in the database with the same content as the primary key, no row is deleted and sy-subrc is set to 4. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Notes &lt;/P&gt;&lt;P&gt;The work area wa should be declared wit reference to the database table or view in the ABAP Dictionary using the length of the primary key. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the database table of view are specified statically, you do not have to specify the work area with FROM wa outside of classes if a table work area dbtab is declared for the relevant database table or view using the TABLES statement. The system then implicitly adds the FROM dbtab addition to the DELETE statement. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alternative 2 &lt;/P&gt;&lt;P&gt;... FROM TABLE itab &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;If an internal table itab is specified, the system processed all rows of the internal table according to the rules for the work area wa. The row type of the internal table must meet the prerequisites for use in Open SQLstatements. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If, for a row of the internal table, there is no row in the database with the same content as the primary key, the corresponding row is ignored and sy-subrc is set to 4. If the internal table is empty, sy-subrc is set to 0. The system field sy-dbcnt is always set to the number of rows actually deleted. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the following example, all today's flights of an airline in which no seats are occupied are deleted from the database table SFLIGHT. The client field must be in the row structure of the internal table sflight_key_tab. Otherwise it does not cover the primary key of the database table and incorrect key values will be accepted as a result. This example has the same function as that for dtab-cond, but it requires two database accesses. The deleted rows are recorded in the internal table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PARAMETERS p_carrid TYPE sflight-carrid. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES: BEGIN OF sflight_key, &lt;/P&gt;&lt;P&gt;mandt TYPE sflight-mandt, &lt;/P&gt;&lt;P&gt;carrid TYPE sflight-carrid, &lt;/P&gt;&lt;P&gt;connid TYPE sflight-connid, &lt;/P&gt;&lt;P&gt;fldate TYPE sflight-fldate, &lt;/P&gt;&lt;P&gt;END OF sflight_key. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA sflight_key_tab TYPE TABLE OF sflight_key. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT carrid connid fldate &lt;/P&gt;&lt;P&gt;FROM sflight &lt;/P&gt;&lt;P&gt;INTO CORRESPONDING FIELDS OF TABLE sflight_key_tab &lt;/P&gt;&lt;P&gt;WHERE carrid = p_carrid AND &lt;/P&gt;&lt;P&gt;fldate = sy-datum AND &lt;/P&gt;&lt;P&gt;seatsocc = 0. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DELETE sflight FROM TABLE sflight_key_tab. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Priyanka.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Jun 2007 03:56:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-delete-rows-from-internal-table/m-p/2357406#M521062</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-01T03:56:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete rows from internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-delete-rows-from-internal-table/m-p/2357407#M521063</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You can delete by using&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Delete itab where &amp;lt;condition&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and if u want to delete dublicate entries than use&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;soer itab by &amp;lt;key&amp;gt;.&lt;/P&gt;&lt;P&gt;delete adjacent duplicates from itab by comaparing &amp;lt;key&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;sudha.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward points if useful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Jun 2007 04:51:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-delete-rows-from-internal-table/m-p/2357407#M521063</guid>
      <dc:creator>S0025444845</dc:creator>
      <dc:date>2007-06-01T04:51:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete rows from internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-delete-rows-from-internal-table/m-p/2357408#M521064</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;    Use DELETE command with appropriate Key fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For Eg: Delete adjascent Duplicates from itab comparing &amp;lt;fild1 fild2.....fieldn&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward All Helpfull Answers...........&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Jun 2007 04:55:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-delete-rows-from-internal-table/m-p/2357408#M521064</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-01T04:55:10Z</dc:date>
    </item>
  </channel>
</rss>

