<?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 data from dynamic table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-data-from-dynamic-table/m-p/4006655#M957117</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Anuj&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just imagine that &amp;lt;lt_abc&amp;gt; has a field named 'ABC'. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;U can use a statement like that :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DELETE &amp;lt;lt_abc&amp;gt;  WHERE 'ABC' NOT IN RANGE_FOR_ABC.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do not forget to write fieldname ABC between single commas.&lt;/P&gt;&lt;P&gt;And here range_for_abc is a range for field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------" /&gt;&lt;P&gt;The result code will look like that :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"first fill range for the table X :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ranges : range_for_abc for x_table-abc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at X_table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    range_for_abc-sign = 'I'.&lt;/P&gt;&lt;P&gt;    range_for_abc-option = 'EQ'.&lt;/P&gt;&lt;P&gt;    range_for_abc-low = X_table.&lt;/P&gt;&lt;P&gt;    append range_for_abc.&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;"than delete the records not in this range :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;delete &amp;lt;lt_abc&amp;gt; where 'ABC' not in range_for_abc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 09 Jun 2008 14:00:17 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-06-09T14:00:17Z</dc:date>
    <item>
      <title>delete data from dynamic table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-data-from-dynamic-table/m-p/4006653#M957115</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 a dynamic table ( a field symbol reference) , and i want to delete some entries from it . How can i do that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for example a table is  &amp;lt;lt_abc&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now i want to delete from this table all entries whcih are not having minimum one entry in table X.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anuj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jun 2008 10:43:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-data-from-dynamic-table/m-p/4006653#M957115</guid>
      <dc:creator>former_member196517</dc:creator>
      <dc:date>2008-06-09T10:43:58Z</dc:date>
    </item>
    <item>
      <title>Re: delete data from dynamic table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-data-from-dynamic-table/m-p/4006654#M957116</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;hope this help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT &amp;lt;table&amp;gt; INTO &amp;lt;s_table&amp;gt; .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    assign component 'MATNR' of structure &amp;lt;s_table&amp;gt; to &amp;lt;f_1&amp;gt; .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    SELECT SINGLE * FROM MARA&lt;/P&gt;&lt;P&gt;      WHERE MATNR = &amp;lt;f_1&amp;gt; .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;      LOOP AT &amp;lt;table&amp;gt; INTO &amp;lt;s_table2&amp;gt; .&lt;/P&gt;&lt;P&gt;          assign component 'MATNR' of structure &amp;lt;s_table2&amp;gt; to &amp;lt;f_2&amp;gt; .&lt;/P&gt;&lt;P&gt;          CHECK &amp;lt;f_1&amp;gt; = &amp;lt;f_2&amp;gt; .&lt;/P&gt;&lt;P&gt;          DELETE &amp;lt;table&amp;gt; INDEX sy-tabix.&lt;/P&gt;&lt;P&gt;        ENDLOOP.&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jun 2008 12:29:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-data-from-dynamic-table/m-p/4006654#M957116</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-09T12:29:17Z</dc:date>
    </item>
    <item>
      <title>Re: delete data from dynamic table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-data-from-dynamic-table/m-p/4006655#M957117</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Anuj&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just imagine that &amp;lt;lt_abc&amp;gt; has a field named 'ABC'. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;U can use a statement like that :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DELETE &amp;lt;lt_abc&amp;gt;  WHERE 'ABC' NOT IN RANGE_FOR_ABC.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do not forget to write fieldname ABC between single commas.&lt;/P&gt;&lt;P&gt;And here range_for_abc is a range for field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------" /&gt;&lt;P&gt;The result code will look like that :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"first fill range for the table X :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ranges : range_for_abc for x_table-abc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at X_table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    range_for_abc-sign = 'I'.&lt;/P&gt;&lt;P&gt;    range_for_abc-option = 'EQ'.&lt;/P&gt;&lt;P&gt;    range_for_abc-low = X_table.&lt;/P&gt;&lt;P&gt;    append range_for_abc.&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;"than delete the records not in this range :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;delete &amp;lt;lt_abc&amp;gt; where 'ABC' not in range_for_abc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jun 2008 14:00:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-data-from-dynamic-table/m-p/4006655#M957117</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-09T14:00:17Z</dc:date>
    </item>
  </channel>
</rss>

