<?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: at selection screen in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/at-selection-screen/m-p/3409107#M818727</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;Any user action on selection screen triggers this AT SELECTION-SCREEN event......&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;U can use it for validating the input parameter values and if are not correct u can throw an error..........etc&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN has a plenty of additions too...(see keyword docu F1 hlp )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is a piece of code that uses the &lt;STRONG&gt;output&lt;/STRONG&gt; addition of &lt;STRONG&gt;AT SELECTION-SCREEN&lt;/STRONG&gt; to disable a chk box when the other chk box is selected...........&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;PARAMETERS: cbox1 AS CHECKBOX USER-COMMAND rad,
            cbox2 AS CHECKBOX USER-COMMAND rad.

AT SELECTION-SCREEN OUTPUT.
  CASE 'X'.
    WHEN cbox1.
      LOOP AT SCREEN.
        CHECK screen-name = 'CBOX2'.
        screen-input = 0.
        MODIFY SCREEN.
      ENDLOOP.
    WHEN cbox2.
      LOOP AT SCREEN.
        CHECK screen-name = 'CBOX1'.
        screen-input = 0.
        MODIFY SCREEN.
      ENDLOOP.
  ENDCASE.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;jose.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 23 Feb 2008 03:46:51 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-02-23T03:46:51Z</dc:date>
    <item>
      <title>at selection screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/at-selection-screen/m-p/3409105#M818725</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;&lt;/P&gt;&lt;P&gt;I am new in ABAP. can anyone explain about  what is the use of  &lt;STRONG&gt;at selection screen&lt;/STRONG&gt;  event with code examples.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks and regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Navneeth.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 23 Feb 2008 02:21:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/at-selection-screen/m-p/3409105#M818725</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-23T02:21:29Z</dc:date>
    </item>
    <item>
      <title>Re: at selection screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/at-selection-screen/m-p/3409106#M818726</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;AT SELECTION-SCREEN selscreen_event. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;This statement defines event blocks for different events selscreen_event that are triggered by the ABAP runtime environment during selection screen processing. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Selection screen events occur immediately before sending a selection screen and after certain user actions on a displayed selection screen. They assist in selection screen processing in the ABAP program. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN is triggered at least twice during actions on selection screens that are linked into another selection screen as a subscreen - first for the linked selection screen itself, and then for the linking selection screens. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note &lt;/P&gt;&lt;P&gt;The event blocks after AT SELECTION-SCREEN are implemented internally as procedures. Declarative statments in these event blocks create local data. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT demo_at_selection_screen. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Global data &lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: sflight_tab TYPE TABLE OF sflight, &lt;/P&gt;&lt;P&gt;      sflight_wa  LIKE LINE  OF sflight_tab. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Selection screens &lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PARAMETERS p_carrid TYPE spfli-carrid. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN BEGIN OF SCREEN 500. &lt;/P&gt;&lt;P&gt;  SELECT-OPTIONS s_conn FOR sflight_wa-connid. &lt;/P&gt;&lt;P&gt;  DATA s_conn_wa LIKE LINE OF s_conn. &lt;/P&gt;&lt;P&gt;SELECTION-SCREEN END OF SCREEN 500. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Handling selection screen events &lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN ON p_carrid. &lt;/P&gt;&lt;P&gt;  IF p_carrid IS INITIAL. &lt;/P&gt;&lt;P&gt;    MESSAGE 'Please enter a value' TYPE 'E'. &lt;/P&gt;&lt;P&gt;  ENDIF. &lt;/P&gt;&lt;P&gt;  AUTHORITY-CHECK OBJECT 'S_CARRID' &lt;/P&gt;&lt;P&gt;                      ID 'CARRID' FIELD p_carrid &lt;/P&gt;&lt;P&gt;                      ID 'ACTVT'  FIELD '03'. &lt;/P&gt;&lt;P&gt;  IF sy-subrc = 4. &lt;/P&gt;&lt;P&gt;    MESSAGE 'No authorization for carrier' TYPE 'E'. &lt;/P&gt;&lt;P&gt;  ELSEIF sy-subrc &amp;lt;&amp;gt; 0. &lt;/P&gt;&lt;P&gt;    MESSAGE 'Error in authority check' TYPE 'A'. &lt;/P&gt;&lt;P&gt;  ELSE. &lt;/P&gt;&lt;P&gt;    IF sy-ucomm = 'ONLI'. &lt;/P&gt;&lt;P&gt;      CALL SELECTION-SCREEN '0500'. &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;AT SELECTION-SCREEN. &lt;/P&gt;&lt;P&gt;  IF sy-dynnr = '0500'. &lt;/P&gt;&lt;P&gt;    IF s_conn IS INITIAL. &lt;/P&gt;&lt;P&gt;      MESSAGE 'Please enter values' TYPE 'W'. &lt;/P&gt;&lt;P&gt;    ELSE. &lt;/P&gt;&lt;P&gt;      SELECT * &lt;/P&gt;&lt;P&gt;             FROM sflight &lt;/P&gt;&lt;P&gt;             INTO TABLE sflight_tab &lt;/P&gt;&lt;P&gt;             WHERE carrid = p_carrid AND &lt;/P&gt;&lt;P&gt;                   connid IN s_conn. &lt;/P&gt;&lt;P&gt;      IF sy-subrc &amp;lt;&amp;gt; 0. &lt;/P&gt;&lt;P&gt;        MESSAGE 'No flights found' TYPE 'E'. &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;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Main program &lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;START-OF-SELECTION. &lt;/P&gt;&lt;P&gt;  ... &lt;/P&gt;&lt;P&gt;**********************************************************************&lt;/P&gt;&lt;P&gt;if working in SAP . JUST Write AT SELECTION SCREEN and press F1 help .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 23 Feb 2008 02:53:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/at-selection-screen/m-p/3409106#M818726</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-23T02:53:25Z</dc:date>
    </item>
    <item>
      <title>Re: at selection screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/at-selection-screen/m-p/3409107#M818727</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;Any user action on selection screen triggers this AT SELECTION-SCREEN event......&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;U can use it for validating the input parameter values and if are not correct u can throw an error..........etc&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN has a plenty of additions too...(see keyword docu F1 hlp )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is a piece of code that uses the &lt;STRONG&gt;output&lt;/STRONG&gt; addition of &lt;STRONG&gt;AT SELECTION-SCREEN&lt;/STRONG&gt; to disable a chk box when the other chk box is selected...........&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;PARAMETERS: cbox1 AS CHECKBOX USER-COMMAND rad,
            cbox2 AS CHECKBOX USER-COMMAND rad.

AT SELECTION-SCREEN OUTPUT.
  CASE 'X'.
    WHEN cbox1.
      LOOP AT SCREEN.
        CHECK screen-name = 'CBOX2'.
        screen-input = 0.
        MODIFY SCREEN.
      ENDLOOP.
    WHEN cbox2.
      LOOP AT SCREEN.
        CHECK screen-name = 'CBOX1'.
        screen-input = 0.
        MODIFY SCREEN.
      ENDLOOP.
  ENDCASE.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;jose.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 23 Feb 2008 03:46:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/at-selection-screen/m-p/3409107#M818727</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-23T03:46:51Z</dc:date>
    </item>
    <item>
      <title>Re: at selection screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/at-selection-screen/m-p/3409108#M818728</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;AT SELECTION-SCREEN&lt;/STRONG&gt; is used for validating the values entered in the selection-screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By using this event - you will get F4 Value,F1 Help and Screen field validation like whether data is available or not when user enters in field&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;AT SELECTION-SCREEN&lt;/STRONG&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The event AT SELECTION-SCREEN is the basic form of a whole series of events that occur while the selection screen is being processed. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The standard selection screen in an executable program or in the logical database linked to it is automatically called between the INITIALIZATION and START-OF-SELECTION events. When you call the selection screen, and when users interact with it, the ABAP runtime environment generates selection screen events, which occur between INITIALIZATION and START-OF-SELECTION. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can define event blocks for these events in your program to change the selection screen or process user input.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 23 Feb 2008 04:53:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/at-selection-screen/m-p/3409108#M818728</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-23T04:53:08Z</dc:date>
    </item>
  </channel>
</rss>

