<?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 in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options/m-p/6748156#M1459618</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guru's,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am more or less novice in abap and I have an issue with one of my selections. &lt;/P&gt;&lt;P&gt;In fact &lt;/P&gt;&lt;P&gt;I select a value from my select-option and I execute my report, the report execute well the isntructions and the good value are displayed. After that I remove the value from the select-option and I re-run the report. All values are displayed now. Untill here, everything wokrs fine but what is strange is when I want to put again a value in this selection-option, the report takes all value and also my value that I have inserted. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anybody has an idea from where is my problem? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;FORM at_selection_screen.

  TYPES: BEGIN OF ty_kstar,
          kstar TYPE cskb-kstar,
         END OF ty_kstar.

  DATA: li_kstar2 TYPE STANDARD TABLE OF ty_kstar
          WITH HEADER LINE.

  REFRESH: li_kstar2.
  SELECT kstar
          FROM cskb
          INTO TABLE li_kstar2
          WHERE kstar in s_kstar
          and   katyp IN  ('21','31','41','42','43','50','51','52','61').

  IF sy-subrc IS INITIAL.

    LOOP AT li_kstar2.

      CLEAR r_kstar.
      r_kstar-sign = 'I'.
      r_kstar-option = 'EQ'.
      r_kstar-low = li_kstar2-kstar.

      APPEND r_kstar.

    ENDLOOP.
    REFRESH s_kstar.
    CLEAR s_kstar.
    s_kstar[] = r_kstar[].
  ELSE.

    "message no data found
  ENDIF.

ENDFORM. "at_selection_Screen&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you in advance for your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MohameD.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 31 Mar 2010 12:51:07 GMT</pubDate>
    <dc:creator>mrahhaoui</dc:creator>
    <dc:date>2010-03-31T12:51:07Z</dc:date>
    <item>
      <title>Select-options</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options/m-p/6748156#M1459618</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guru's,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am more or less novice in abap and I have an issue with one of my selections. &lt;/P&gt;&lt;P&gt;In fact &lt;/P&gt;&lt;P&gt;I select a value from my select-option and I execute my report, the report execute well the isntructions and the good value are displayed. After that I remove the value from the select-option and I re-run the report. All values are displayed now. Untill here, everything wokrs fine but what is strange is when I want to put again a value in this selection-option, the report takes all value and also my value that I have inserted. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anybody has an idea from where is my problem? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;FORM at_selection_screen.

  TYPES: BEGIN OF ty_kstar,
          kstar TYPE cskb-kstar,
         END OF ty_kstar.

  DATA: li_kstar2 TYPE STANDARD TABLE OF ty_kstar
          WITH HEADER LINE.

  REFRESH: li_kstar2.
  SELECT kstar
          FROM cskb
          INTO TABLE li_kstar2
          WHERE kstar in s_kstar
          and   katyp IN  ('21','31','41','42','43','50','51','52','61').

  IF sy-subrc IS INITIAL.

    LOOP AT li_kstar2.

      CLEAR r_kstar.
      r_kstar-sign = 'I'.
      r_kstar-option = 'EQ'.
      r_kstar-low = li_kstar2-kstar.

      APPEND r_kstar.

    ENDLOOP.
    REFRESH s_kstar.
    CLEAR s_kstar.
    s_kstar[] = r_kstar[].
  ELSE.

    "message no data found
  ENDIF.

ENDFORM. "at_selection_Screen&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you in advance for your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MohameD.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Mar 2010 12:51:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options/m-p/6748156#M1459618</guid>
      <dc:creator>mrahhaoui</dc:creator>
      <dc:date>2010-03-31T12:51:07Z</dc:date>
    </item>
    <item>
      <title>Re: Select-options</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options/m-p/6748157#M1459619</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;s_kstar[] = r_kstar[].&lt;/P&gt;&lt;P&gt;why you are doing this step.&lt;/P&gt;&lt;P&gt;please remove this&lt;/P&gt;&lt;P&gt;i don't know why you are populating the value  in to select-option table.&lt;/P&gt;&lt;P&gt;cheers&lt;/P&gt;&lt;P&gt;S.Janagar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Mar 2010 13:04:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options/m-p/6748157#M1459619</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-31T13:04:21Z</dc:date>
    </item>
    <item>
      <title>Re: Select-options</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options/m-p/6748158#M1459620</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;clear select option&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Mar 2010 13:25:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options/m-p/6748158#M1459620</guid>
      <dc:creator>mrahhaoui</dc:creator>
      <dc:date>2010-03-31T13:25:01Z</dc:date>
    </item>
  </channel>
</rss>

