<?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: Query on selection screen in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/query-on-selection-screen/m-p/6120663#M1363753</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN __default_attr="blue" __jive_macro_name="color"&gt;Hey dear, 
small correction to your code.
&lt;PRE&gt;&lt;CODE&gt;REPORT ZTEST_PROGRAM.
TABLES: MARA.
SELECT-OPTIONS: S_MATNR FOR MARA-MATNR.
PARAMETERS: P_C TYPE C.
PARAMETERS: P_CHK AS CHECKBOX USER-COMMAND CHK.

SELECT-OPTIONS: S_DATE FOR SY-DATUM DEFAULT SY-DATUM.

AT SELECTION-SCREEN.
  IF P_CHK = 'X'.
    CLEAR S_DATE[].
  ELSE.
    CLEAR S_DATE[]."Clearing selection table.
    S_DATE-LOW = SY-DATUM.
    APPEND S_DATE.
  ENDIF.

AT SELECTION-SCREEN OUTPUT.
  IF S_DATE[] IS NOT INITIAL.
    P_CHK = ''.
  ENDIF.
  LOOP AT S_MATNR.
    IF S_MATNR-LOW = '000000000000000030' AND S_MATNR-HIGH = '000000000000000040'.
      P_C = 'A'.
      EXIT.
    ENDIF.
    CASE S_MATNR-LOW.
      WHEN '000000000000000050'.
        P_C = 'P'.
      WHEN '000000000000000065'.
        P_C = 'X'.
      WHEN '000000000000000087'.
        P_C = 'N'.
    ENDCASE.
  ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;
Thanks
Venkat.O&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 10 Sep 2009 03:15:38 GMT</pubDate>
    <dc:creator>venkat_o</dc:creator>
    <dc:date>2009-09-10T03:15:38Z</dc:date>
    <item>
      <title>Query on selection screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/query-on-selection-screen/m-p/6120661#M1363751</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please give me the solutions to the following in selection screen:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. In selection-screen there is one select-options and one parameter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now,if the select-opotions range is given 30 to 40 then, the parameter should be populated with 'A'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the select -options is given the value 50, then the value should be 'P'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the select-optons is given the value 65,then the value should be 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if the select-options is given the value 87, then the value should be 'N'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) In the selection - screeen there is one check box and select-options.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By default the check-box will be deselected and select-options will be defaulted with system date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, when the checkbox is selected the select-options should be empty.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And again, when the checkbox is deselected then again the select-optons should be populated with system date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know solutions to the above asap.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All points will be awarded.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanking you in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;A.Srinivas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Sep 2009 02:20:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/query-on-selection-screen/m-p/6120661#M1363751</guid>
      <dc:creator>former_member518089</dc:creator>
      <dc:date>2009-09-10T02:20:12Z</dc:date>
    </item>
    <item>
      <title>Re: Query on selection screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/query-on-selection-screen/m-p/6120662#M1363752</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Srinu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try below code. I have used matnr in select-options. Change it according to your data element.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLES: mara.&lt;/P&gt;&lt;P&gt;SELECT-OPTIONS: s_matnr FOR mara-matnr.&lt;/P&gt;&lt;P&gt;PARAMETERS: p_c TYPE c.&lt;/P&gt;&lt;P&gt;PARAMETERS: p_chk AS CHECKBOX USER-COMMAND chk.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT-OPTIONS: s_date FOR sy-datum DEFAULT sy-datum.&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN.&lt;/P&gt;&lt;P&gt;  IF p_chk = 'X'.&lt;/P&gt;&lt;P&gt;    CLEAR s_date[].&lt;/P&gt;&lt;P&gt;  ELSE.&lt;/P&gt;&lt;P&gt;    s_date-low = sy-datum.&lt;/P&gt;&lt;P&gt;    APPEND s_date.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN OUTPUT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF s_date[] IS NOT INITIAL.&lt;/P&gt;&lt;P&gt;    p_chk = ''.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;  LOOP AT s_matnr.&lt;/P&gt;&lt;P&gt;    IF s_matnr-low = '000000000000000030' AND s_matnr-high = '000000000000000040'.&lt;/P&gt;&lt;P&gt;      p_c = 'A'.&lt;/P&gt;&lt;P&gt;      exit.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;    CASE s_matnr-low.&lt;/P&gt;&lt;P&gt;      WHEN '000000000000000050'.&lt;/P&gt;&lt;P&gt;        p_c = 'P'.&lt;/P&gt;&lt;P&gt;      WHEN '000000000000000065'.&lt;/P&gt;&lt;P&gt;        p_c = 'X'.&lt;/P&gt;&lt;P&gt;      WHEN '000000000000000087'.&lt;/P&gt;&lt;P&gt;        p_c = 'N'.&lt;/P&gt;&lt;P&gt;    ENDCASE.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Sep 2009 03:09:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/query-on-selection-screen/m-p/6120662#M1363752</guid>
      <dc:creator>awin_prabhu</dc:creator>
      <dc:date>2009-09-10T03:09:59Z</dc:date>
    </item>
    <item>
      <title>Re: Query on selection screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/query-on-selection-screen/m-p/6120663#M1363753</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN __default_attr="blue" __jive_macro_name="color"&gt;Hey dear, 
small correction to your code.
&lt;PRE&gt;&lt;CODE&gt;REPORT ZTEST_PROGRAM.
TABLES: MARA.
SELECT-OPTIONS: S_MATNR FOR MARA-MATNR.
PARAMETERS: P_C TYPE C.
PARAMETERS: P_CHK AS CHECKBOX USER-COMMAND CHK.

SELECT-OPTIONS: S_DATE FOR SY-DATUM DEFAULT SY-DATUM.

AT SELECTION-SCREEN.
  IF P_CHK = 'X'.
    CLEAR S_DATE[].
  ELSE.
    CLEAR S_DATE[]."Clearing selection table.
    S_DATE-LOW = SY-DATUM.
    APPEND S_DATE.
  ENDIF.

AT SELECTION-SCREEN OUTPUT.
  IF S_DATE[] IS NOT INITIAL.
    P_CHK = ''.
  ENDIF.
  LOOP AT S_MATNR.
    IF S_MATNR-LOW = '000000000000000030' AND S_MATNR-HIGH = '000000000000000040'.
      P_C = 'A'.
      EXIT.
    ENDIF.
    CASE S_MATNR-LOW.
      WHEN '000000000000000050'.
        P_C = 'P'.
      WHEN '000000000000000065'.
        P_C = 'X'.
      WHEN '000000000000000087'.
        P_C = 'N'.
    ENDCASE.
  ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;
Thanks
Venkat.O&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Sep 2009 03:15:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/query-on-selection-screen/m-p/6120663#M1363753</guid>
      <dc:creator>venkat_o</dc:creator>
      <dc:date>2009-09-10T03:15:38Z</dc:date>
    </item>
    <item>
      <title>Re: Query on selection screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/query-on-selection-screen/m-p/6120664#M1363754</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Srinu , &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can achive the same by using events of report.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Search in google or sdn for details.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can also use F1 help on at selection-screen , initialization etc.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Sep 2009 03:40:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/query-on-selection-screen/m-p/6120664#M1363754</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-10T03:40:13Z</dc:date>
    </item>
    <item>
      <title>Re: Query on selection screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/query-on-selection-screen/m-p/6120665#M1363755</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;PRE&gt;&lt;CODE&gt; TABLES: vbak.

SELECT-OPTIONS: so_vbeln FOR vbak-vbeln.
PARAMETER: p_value TYPE c.

SELECT-OPTIONS: so_date FOR sy-datum DEFAULT sy-datum.
PARAMETER: p_chk AS CHECKBOX.



AT SELECTION-SCREEN OUTPUT.

  LOOP AT so_vbeln.
    IF so_vbeln-low = '0000000030'.
      p_value = 'A'.
    ENDIF.
    IF so_vbeln-low = '0000000050'.
      p_value = 'P'.
    ENDIF.

    IF so_vbeln-low = '0000000065'.
      p_value = 'X'.
    ENDIF.

    IF so_vbeln-low = '0000000087'.
      p_value = 'N'.
    ENDIF.
  ENDLOOP.

AT SELECTION-SCREEN.
  IF p_chk = 'X'.
    REFRESH so_date.

  ENDIF.
  IF p_chk &amp;lt;&amp;gt; 'X'.
    so_date-low = sy-datum.
    APPEND so_date.
  ENDIF. &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Jk on Sep 10, 2009 6:27 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Sep 2009 04:27:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/query-on-selection-screen/m-p/6120665#M1363755</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-10T04:27:43Z</dc:date>
    </item>
  </channel>
</rss>

