<?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: DELETE STATEMENT in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-statement/m-p/2537738#M576289</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;remove table i.e&lt;/P&gt;&lt;P&gt;delete table itab where k1 = v1...&lt;/P&gt;&lt;P&gt;check this one for syntax regarding delete&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sts.tuharburg.de/teaching/sap_r3/ABAP4/delete.htm" target="test_blank"&gt;http://www.sts.tuharburg.de/teaching/sap_r3/ABAP4/delete.htm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 20 Jul 2007 09:49:43 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-07-20T09:49:43Z</dc:date>
    <item>
      <title>DELETE STATEMENT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-statement/m-p/2537736#M576287</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;can some one please tell me the syntax for the delete statement?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to delete a Line from an Internal table with condition similar to :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DELETE TABLE itab WITH TABLE KEY k1 = v1 ... kn = vn. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I am gettin a syntax error: I have to mention all the filedsa defined in the int table itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;kindly point out the mistake or an alternate method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jul 2007 09:47:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-statement/m-p/2537736#M576287</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-20T09:47:07Z</dc:date>
    </item>
    <item>
      <title>Re: DELETE STATEMENT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-statement/m-p/2537737#M576288</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 TABLE itab: FROM line,&lt;/P&gt;&lt;P&gt;                   WITH TABLE KEY k1=v1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sridevi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;i&amp;gt;&amp;lt;b&amp;gt;Assign points, if useful&amp;lt;/b&amp;gt;&amp;lt;/i&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jul 2007 09:49:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-statement/m-p/2537737#M576288</guid>
      <dc:creator>sridevi_p</dc:creator>
      <dc:date>2007-07-20T09:49:33Z</dc:date>
    </item>
    <item>
      <title>Re: DELETE STATEMENT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-statement/m-p/2537738#M576289</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;remove table i.e&lt;/P&gt;&lt;P&gt;delete table itab where k1 = v1...&lt;/P&gt;&lt;P&gt;check this one for syntax regarding delete&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sts.tuharburg.de/teaching/sap_r3/ABAP4/delete.htm" target="test_blank"&gt;http://www.sts.tuharburg.de/teaching/sap_r3/ABAP4/delete.htm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jul 2007 09:49:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-statement/m-p/2537738#M576289</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-20T09:49:43Z</dc:date>
    </item>
    <item>
      <title>Re: DELETE STATEMENT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-statement/m-p/2537739#M576290</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use this, &lt;/P&gt;&lt;P&gt;DELETE itab WHERE  k1 = v1 ... kn = vn&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points.&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, 20 Jul 2007 09:50:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-statement/m-p/2537739#M576290</guid>
      <dc:creator>former_member196280</dc:creator>
      <dc:date>2007-07-20T09:50:12Z</dc:date>
    </item>
    <item>
      <title>Re: DELETE STATEMENT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-statement/m-p/2537740#M576291</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;use DELETE itab where k1 = v1 .... kn = vn.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or pass the index&lt;/P&gt;&lt;P&gt;DELETE itab index idx.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Prax&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Prax&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jul 2007 09:50:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-statement/m-p/2537740#M576291</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-20T09:50:22Z</dc:date>
    </item>
    <item>
      <title>Re: DELETE STATEMENT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-statement/m-p/2537741#M576292</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;check if this helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DELETE itab - table_key &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;... { FROM wa } &lt;/P&gt;&lt;P&gt;  | { WITH TABLE KEY {comp_name1|(name1)} = dobj1 &lt;/P&gt;&lt;P&gt;                     {comp_name2|(name2)} = dobj2 &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;You can specify the values of the search key either implicitly after FROM in a work area wa or by explicitly listing the components of the table key after TABLE KEY. &lt;/P&gt;&lt;P&gt;&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. ... WITH TABLE KEY ... &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;The work area wa must be a data object that is compatible with the row type of the internal table. The statement deletes the first internal table row whose values in the columns of the table key match those of the corresponding components of wa. If the key fields in wa are empty, no entry is 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;Note &lt;/P&gt;&lt;P&gt;Outside of classes, you can omit the FROM wa addition if the internal table has an identically named header line itab. The statement then implicitly uses the header line as the work area. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example &lt;/P&gt;&lt;P&gt;A work area scarr_wa is used to delete the table row that has the same value as p_carrid in the key field carrid. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PARAMETERS p_carrid TYPE scarr-carrid. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: scarr_tab TYPE SORTED TABLE OF scarr &lt;/P&gt;&lt;P&gt;                WITH UNIQUE KEY carrid, &lt;/P&gt;&lt;P&gt;      scarr_wa  LIKE LINE OF scarr_tab. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * &lt;/P&gt;&lt;P&gt;       FROM scarr &lt;/P&gt;&lt;P&gt;       INTO TABLE scarr_tab. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF sy-subrc = 0. &lt;/P&gt;&lt;P&gt;  scarr_wa-carrid = p_carrid. &lt;/P&gt;&lt;P&gt;  DELETE TABLE scarr_tab FROM scarr_wa. &lt;/P&gt;&lt;P&gt;ENDIF. &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;... WITH TABLE KEY ... &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;Each component of the table key must be specified either directly as comp_name1 comp_name2 ... or as a character-type data object in parentheses name1 name2 ..., which contains the name of the component in uppercase when the statement is executed. If name contains only blank characters, this component entry is ignored when the statement is executed. Every component must be assigned a data object dobj1 dobj2 ... that is compatible with or convertible to the data type of the component. The statement deletes the first internal table row whose values in the columns of the table key match those in the assigned data objects dobj1 dobj2 .... If necessary, the content of dobj1 dobj2 ... is converted to the data type of the component before the comparison. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The individual table kinds are accessed as follows: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Standard tables are searched on a linear basis &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorted tables are searched on a binary basis &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hashed tables are searched using the hash algorithm &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note &lt;/P&gt;&lt;P&gt;If a table has a non-structured row type and the entire table row is defined as the table key, you can specify the pseudo component table_line as the component. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example &lt;/P&gt;&lt;P&gt;By explicitly specifying the table key, the table row is deleted that has the same value as p_carrid in the key field carrid. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PARAMETERS p_carrid TYPE scarr-carrid. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA scarr_tab TYPE SORTED TABLE OF scarr &lt;/P&gt;&lt;P&gt;               WITH UNIQUE KEY carrid. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * &lt;/P&gt;&lt;P&gt;       FROM scarr &lt;/P&gt;&lt;P&gt;       INTO TABLE scarr_tab. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DELETE TABLE scarr_tab WITH TABLE KEY carrid = p_carrid. &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;dinesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jul 2007 09:50:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-statement/m-p/2537741#M576292</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-20T09:50:48Z</dc:date>
    </item>
    <item>
      <title>Re: DELETE STATEMENT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-statement/m-p/2537742#M576293</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;DELETE itab WITH TABLE KEY k1 = v1 ... kn = vn. &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;Pavan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jul 2007 09:52:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-statement/m-p/2537742#M576293</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-20T09:52:01Z</dc:date>
    </item>
    <item>
      <title>Re: DELETE STATEMENT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-statement/m-p/2537743#M576294</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 the following statment.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;suppose you have internal table say itab. then put query like this &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;delete itab where table filed = 'abc'.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you have to mention the internal table field in table field and also have to put the condtion to delete the record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rewards if useful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kinjal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jul 2007 09:54:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-statement/m-p/2537743#M576294</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-20T09:54:54Z</dc:date>
    </item>
  </channel>
</rss>

