<?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 Select-options &amp; internal table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-internal-table/m-p/2379880#M528085</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 want to use the select option data filter with the internal table. Can anybody help me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My program looks something like ........&lt;/P&gt;&lt;P&gt;Report zSelectOptionWithItab&lt;/P&gt;&lt;P&gt;tables : kna1.&lt;/P&gt;&lt;P&gt;data : itab like kna1 occurs 0 with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select-options : s_kunnr for kna1-kunnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;start-of-selection.&lt;/P&gt;&lt;P&gt;  select kunnr from kna1 into corresponding fields of table itab up to 50 rows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;end-of-selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  loop at itab where kunnr &amp;gt;= s_kunnr-low or kunnr &amp;lt;= s_kunnr-high.&lt;/P&gt;&lt;P&gt;    write : / itab-kunnr.&lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you could look at the program I have an Internal table named Itab which has data for 50 customers.&lt;/P&gt;&lt;P&gt;In the selection screen I have a customer field. I want to delete all the recorss from ther itab for the given selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Consider the test case:&lt;/P&gt;&lt;P&gt;      1. s_kunnr-low = 20&lt;/P&gt;&lt;P&gt;         s_kunnr-high = 40&lt;/P&gt;&lt;P&gt;        option is INCLUDE&lt;/P&gt;&lt;P&gt;This should delete records 20 to 40 from itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Test case 2. &lt;/P&gt;&lt;P&gt;          s_kunnr-low = 20&lt;/P&gt;&lt;P&gt;         s_kunnr-high = 40&lt;/P&gt;&lt;P&gt;        option is EXCLUDE&lt;/P&gt;&lt;P&gt;This should delete all records EXCLUDING 20 to 40 from itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will award points for the right answer.&lt;/P&gt;&lt;P&gt;Good luck!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 13 Jun 2007 10:29:49 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-06-13T10:29:49Z</dc:date>
    <item>
      <title>Select-options &amp; internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-internal-table/m-p/2379880#M528085</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 want to use the select option data filter with the internal table. Can anybody help me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My program looks something like ........&lt;/P&gt;&lt;P&gt;Report zSelectOptionWithItab&lt;/P&gt;&lt;P&gt;tables : kna1.&lt;/P&gt;&lt;P&gt;data : itab like kna1 occurs 0 with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select-options : s_kunnr for kna1-kunnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;start-of-selection.&lt;/P&gt;&lt;P&gt;  select kunnr from kna1 into corresponding fields of table itab up to 50 rows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;end-of-selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  loop at itab where kunnr &amp;gt;= s_kunnr-low or kunnr &amp;lt;= s_kunnr-high.&lt;/P&gt;&lt;P&gt;    write : / itab-kunnr.&lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you could look at the program I have an Internal table named Itab which has data for 50 customers.&lt;/P&gt;&lt;P&gt;In the selection screen I have a customer field. I want to delete all the recorss from ther itab for the given selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Consider the test case:&lt;/P&gt;&lt;P&gt;      1. s_kunnr-low = 20&lt;/P&gt;&lt;P&gt;         s_kunnr-high = 40&lt;/P&gt;&lt;P&gt;        option is INCLUDE&lt;/P&gt;&lt;P&gt;This should delete records 20 to 40 from itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Test case 2. &lt;/P&gt;&lt;P&gt;          s_kunnr-low = 20&lt;/P&gt;&lt;P&gt;         s_kunnr-high = 40&lt;/P&gt;&lt;P&gt;        option is EXCLUDE&lt;/P&gt;&lt;P&gt;This should delete all records EXCLUDING 20 to 40 from itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will award points for the right answer.&lt;/P&gt;&lt;P&gt;Good luck!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jun 2007 10:29:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-internal-table/m-p/2379880#M528085</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-13T10:29:49Z</dc:date>
    </item>
    <item>
      <title>Re: Select-options &amp; internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-internal-table/m-p/2379881#M528086</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 stmt..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Test case1:&lt;/P&gt;&lt;P&gt;Delete itab where kunnr in s_kunnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Test case2:&lt;/P&gt;&lt;P&gt;Delete itab where kunnr NOT in s_kunnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vigneswaran S&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jun 2007 10:33:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-internal-table/m-p/2379881#M528086</guid>
      <dc:creator>former_member491305</dc:creator>
      <dc:date>2007-06-13T10:33:57Z</dc:date>
    </item>
    <item>
      <title>Re: Select-options &amp; internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-internal-table/m-p/2379882#M528087</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;After select stmt give this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;if flag = 'EXCLUDE'.
delete table itab where kunnr between s_kunnr-low and s_kunnr-high. 
else.
delete table itab where kunnr NOT between s_kunnr-low and s_kunnr-high. 
endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jun 2007 10:34:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-internal-table/m-p/2379882#M528087</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-13T10:34:20Z</dc:date>
    </item>
    <item>
      <title>Re: Select-options &amp; internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-internal-table/m-p/2379883#M528088</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you can do like this...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at s_kunnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if s_kinnr-sign = 'I'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;delete itab where kunnr between s_kunnr-low and s_kunnr-high.&lt;/P&gt;&lt;P&gt;elseif s_kunnr-sign = 'E'.&lt;/P&gt;&lt;P&gt;delete itab where kunnr not between s_kunnr-low and s_kunnr-high.&lt;/P&gt;&lt;P&gt;endif.&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;shiba dutta&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jun 2007 10:35:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-internal-table/m-p/2379883#M528088</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-13T10:35:13Z</dc:date>
    </item>
    <item>
      <title>Re: Select-options &amp; internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-internal-table/m-p/2379884#M528089</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;Try this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for case 1:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;delete itab where kunnr in s_kunnr.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for case 2:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;delete itab where kunnr not in s_kunnr.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---" /&gt;&lt;P&gt;Patil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jun 2007 10:35:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-internal-table/m-p/2379884#M528089</guid>
      <dc:creator>santhosh_patil</dc:creator>
      <dc:date>2007-06-13T10:35:53Z</dc:date>
    </item>
    <item>
      <title>Re: Select-options &amp; internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-internal-table/m-p/2379885#M528090</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;LOOP AT so_werks.&lt;/P&gt;&lt;P&gt;    IF NOT so_werks-low IS INITIAL.&lt;/P&gt;&lt;P&gt;      READ TABLE l_t_werks WITH KEY so_werks-low.&lt;/P&gt;&lt;P&gt;      IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;        IF so_werks-option = 'NE' OR so_werks-sign = 'E'.&lt;/P&gt;&lt;P&gt;          SELECT SINGLE werks INTO l_f_werks FROM t001w&lt;/P&gt;&lt;P&gt;                                             WHERE werks = so_werks-low.&lt;/P&gt;&lt;P&gt;        ENDIF.&lt;/P&gt;&lt;P&gt;        IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;          SET CURSOR FIELD 'SO_WERKS-LOW'.&lt;/P&gt;&lt;P&gt;          MESSAGE e892(m7) WITH so_werks-low.&lt;/P&gt;&lt;P&gt;        ENDIF.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    IF NOT so_werks-high IS INITIAL.&lt;/P&gt;&lt;P&gt;      READ TABLE l_t_werks WITH KEY so_werks-high.&lt;/P&gt;&lt;P&gt;      IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;        IF so_werks-option = 'NE' OR so_werks-sign = 'E'.&lt;/P&gt;&lt;P&gt;          SELECT SINGLE werks INTO l_f_werks FROM t001w&lt;/P&gt;&lt;P&gt;                                            WHERE werks = so_werks-high.&lt;/P&gt;&lt;P&gt;        ENDIF.&lt;/P&gt;&lt;P&gt;        IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;          SET CURSOR FIELD 'SO_WERKS-HIGH'.&lt;/P&gt;&lt;P&gt;          MESSAGE e892(m7) WITH so_werks-high.&lt;/P&gt;&lt;P&gt;        ENDIF.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check this code..you can use this as per ur requirement...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Praveen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jun 2007 11:20:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-internal-table/m-p/2379885#M528090</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-13T11:20:11Z</dc:date>
    </item>
  </channel>
</rss>

