<?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 problem in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-problem/m-p/4928069#M1149689</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have a field MATNR in SELECT-OPTIONS but without passing it in query i selected the data in itab.&lt;/P&gt;&lt;P&gt;after getting data in itab now i want if user put the value in selection-screen then it must show only those selected values in output, so i did coding like..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;code: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT ITAB.&lt;/P&gt;&lt;P&gt;IF MATNR-LOW NE ''. &lt;/P&gt;&lt;P&gt;IF ITAB-MATNR NE MATNR-LOW.&lt;/P&gt;&lt;P&gt;DELETE ITAB.&lt;/P&gt;&lt;P&gt;CLEAR ITAB.&lt;/P&gt;&lt;P&gt;CONTINUE.&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;it is working for single value, but when i give 15 or 20 values then again its showing for single value.&lt;/P&gt;&lt;P&gt;can anyone please help me?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards saurabh.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 16 Dec 2008 08:59:11 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-12-16T08:59:11Z</dc:date>
    <item>
      <title>Select-options problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-problem/m-p/4928069#M1149689</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have a field MATNR in SELECT-OPTIONS but without passing it in query i selected the data in itab.&lt;/P&gt;&lt;P&gt;after getting data in itab now i want if user put the value in selection-screen then it must show only those selected values in output, so i did coding like..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;code: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT ITAB.&lt;/P&gt;&lt;P&gt;IF MATNR-LOW NE ''. &lt;/P&gt;&lt;P&gt;IF ITAB-MATNR NE MATNR-LOW.&lt;/P&gt;&lt;P&gt;DELETE ITAB.&lt;/P&gt;&lt;P&gt;CLEAR ITAB.&lt;/P&gt;&lt;P&gt;CONTINUE.&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;it is working for single value, but when i give 15 or 20 values then again its showing for single value.&lt;/P&gt;&lt;P&gt;can anyone please help me?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards saurabh.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Dec 2008 08:59:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-problem/m-p/4928069#M1149689</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-16T08:59:11Z</dc:date>
    </item>
    <item>
      <title>Re: Select-options problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-problem/m-p/4928070#M1149690</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;u can pass the directly in select query like where matnr = MATNR-LOW . if you want any internal calulations you need to use seperate internal table and query with full data.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Dec 2008 09:02:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-problem/m-p/4928070#M1149690</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-16T09:02:58Z</dc:date>
    </item>
    <item>
      <title>Re: Select-options problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-problem/m-p/4928071#M1149691</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; when ever you use select option, you have to use IN operator for that it will work like bwlow code, i hope you requirement will meet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT ITAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF ITAB-MATNR IN MATNR.&lt;/P&gt;&lt;P&gt;DELETE ITAB.&lt;/P&gt;&lt;P&gt;CLEAR ITAB.&lt;/P&gt;&lt;P&gt;CONTINUE.&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>Tue, 16 Dec 2008 09:06:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-problem/m-p/4928071#M1149691</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-16T09:06:46Z</dc:date>
    </item>
    <item>
      <title>Re: Select-options problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-problem/m-p/4928072#M1149692</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Plz change ur code as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
LOOP AT ITAB.
* IF MATNR-LOW NE ''. 
* IF ITAB-MATNR NE MATNR-LOW.
IF MATNR IS NOT INITIAL.
  IF ITAB-MATNR NOT IN MATNR.
    DELETE ITAB.
    CLEAR ITAB.
    CONTINUE.
  ENDIF.
ENDIF.
ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this is clear.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Suhas Saha on Dec 16, 2008 10:09 AM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Suhas Saha on Dec 16, 2008 10:10 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Dec 2008 09:08:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-problem/m-p/4928072#M1149692</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2008-12-16T09:08:31Z</dc:date>
    </item>
    <item>
      <title>Re: Select-options problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-problem/m-p/4928073#M1149693</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use :: Delete ITAB where MATNR NOT IN  MATNR.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Dec 2008 09:09:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-problem/m-p/4928073#M1149693</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-16T09:09:15Z</dc:date>
    </item>
    <item>
      <title>Re: Select-options problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-problem/m-p/4928074#M1149694</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Saurab,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check the below code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
TABLES : MARA.
DATA : BEGIN OF T_MARA OCCURS 0,
        MATNR TYPE MARA-MATNR,
        MTART TYPE MARA-MTART,
        NAME(5),
       END OF T_MARA.
SELECT-OPTIONS : S_MATNR FOR MARA-MATNR.

SELECT MATNR
       MTART FROM MARA INTO TABLE T_MARA
             UP TO 200 ROWS.
IF NOT S_MATNR[] IS INITIAL.
  LOOP AT T_MARA.
    IF T_MARA-MATNR IN S_MATNR[].
      DELETE T_MARA INDEX SY-TABIX.
    ENDIF.
  ENDLOOP.
ENDIF.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Dec 2008 09:17:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-problem/m-p/4928074#M1149694</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-16T09:17:52Z</dc:date>
    </item>
    <item>
      <title>Re: Select-options problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-problem/m-p/4928075#M1149695</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;You can use IN and NOT IN statement instead of NE.&lt;/P&gt;&lt;P&gt;Try it.&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;Chris Gu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Dec 2008 09:21:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-problem/m-p/4928075#M1149695</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-16T09:21:57Z</dc:date>
    </item>
    <item>
      <title>Re: Select-options problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-problem/m-p/4928076#M1149696</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Saurabh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can directly code as below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Delete ITAB where matnr not in MATNR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Zafar Ali&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Dec 2008 09:24:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-problem/m-p/4928076#M1149696</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-16T09:24:43Z</dc:date>
    </item>
  </channel>
</rss>

