<?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: Capture Selection-screen events in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/capture-selection-screen-events/m-p/5070857#M1178116</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Uwe!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, &lt;/P&gt;&lt;P&gt;Tatyana&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 21 Jan 2009 13:43:59 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-01-21T13:43:59Z</dc:date>
    <item>
      <title>Capture Selection-screen events</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/capture-selection-screen-events/m-p/5070855#M1178114</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear SAP friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have created OOP report.&lt;/P&gt;&lt;P&gt;At the runtime the program creates toolbar and adds pushbuttons to it.&lt;/P&gt;&lt;P&gt;Every button has fcode assigned.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On button click the below method is called.&lt;/P&gt;&lt;P&gt;The below statement "CALL SELECTION-SCREEN 1200 STARTING AT 10 10" calls selection screen as popup.&lt;/P&gt;&lt;P&gt;I need to capture when User closes the selection popup and when he clicks Cancel button located in the selection popup.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please advise.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Tatyana.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;METHOD  handle_pushbutton_click.
CASE fcode.
      WHEN 'CHECKS_EXP'.
        CALL SELECTION-SCREEN 1200 STARTING AT 10 10.
        PERFORM at_selection_1200.
        CHECK w_continue = abap_true.
        PERFORM build_options_range.
        PERFORM build_options_norange.
        PERFORM start_selection_1200.
        PERFORM fcat_init_1200.

        w_title = 'Checks -&amp;gt; Expenditures'.
        PERFORM set_layout USING w_title.
        PERFORM getdata_1200.

        DESCRIBE TABLE lt_rpt LINES w_count.      " Get number of records.
        PERFORM populate_selection USING w_count.

ENDDCASE.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Jan 2009 20:23:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/capture-selection-screen-events/m-p/5070855#M1178114</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-20T20:23:42Z</dc:date>
    </item>
    <item>
      <title>Re: Capture Selection-screen events</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/capture-selection-screen-events/m-p/5070856#M1178115</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Tatyana&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following sample report &lt;STRONG&gt;ZUS_SDN_OO_REPORT_SELSCREEN&lt;/STRONG&gt; should simulate your scenario.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you push the EXECUTE button you will find ok-code='CRET'.&lt;/P&gt;&lt;P&gt;If you close the popup or push the CANCEL button ok-code=' ' (space; empty). This way you know that the popup was closed by the user.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp; Report  ZUS_SDN_OO_REPORT_SELSCREEN
*&amp;amp;
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp; Thread: Capture Selection-screen events
*&amp;amp; &amp;lt;a class="jive_macro jive_macro_thread" href="" __jive_macro_name="thread" modifiedtitle="true" __default_attr="1205127"&amp;gt;&amp;lt;/a&amp;gt;
*&amp;amp;---------------------------------------------------------------------*

REPORT  zus_sdn_oo_report_selscreen.


*----------------------------------------------------------------------*
*       CLASS lcl_myclass DEFINITION
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
CLASS lcl_myclass DEFINITION.

  PUBLIC SECTION.
    CLASS-DATA:
      md_okcode   TYPE ui_func.

    CLASS-METHODS:
      handle_pushbutton_click.

ENDCLASS.                    "lcl_myclass DEFINITION


*----------------------------------------------------------------------*
*       CLASS lcl_myclass IMPLEMENTATION
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
CLASS lcl_myclass IMPLEMENTATION.

  METHOD handle_pushbutton_click.
    DATA: ld_msg    TYPE bapi_msg.
    BREAK-POINT.

    CLEAR: lcl_myclass=&amp;gt;md_okcode.

    DO.
      CALL SELECTION-SCREEN 1200 STARTING AT 10 10.

      EXIT.
    ENDDO.

    CONCATENATE 'ok-code =' md_okcode INTO ld_msg
      SEPARATED BY space.
    MESSAGE ld_msg TYPE 'I'.

    MESSAGE 'Continue after SelScreen' TYPE 'S'.
  ENDMETHOD.                    "handle_pushbutton_click

ENDCLASS.                    "lcl_myclass IMPLEMENTATION



SELECTION-SCREEN BEGIN OF SCREEN 1200.
PARAMETERS:
  p_bukrs   TYPE bukrs.
SELECTION-SCREEN END OF SCREEN 1200.

AT SELECTION-SCREEN OUTPUT.
  BREAK-POINT.
  CLEAR: syst-ucomm.

AT SELECTION-SCREEN.
  BREAK-POINT.
  lcl_myclass=&amp;gt;md_okcode = syst-ucomm.


START-OF-SELECTION.

  lcl_myclass=&amp;gt;handle_pushbutton_click( ).


END-OF-SELECTION.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;  Uwe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Jan 2009 22:23:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/capture-selection-screen-events/m-p/5070856#M1178115</guid>
      <dc:creator>uwe_schieferstein</dc:creator>
      <dc:date>2009-01-20T22:23:52Z</dc:date>
    </item>
    <item>
      <title>Re: Capture Selection-screen events</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/capture-selection-screen-events/m-p/5070857#M1178116</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Uwe!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, &lt;/P&gt;&lt;P&gt;Tatyana&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Jan 2009 13:43:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/capture-selection-screen-events/m-p/5070857#M1178116</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-21T13:43:59Z</dc:date>
    </item>
  </channel>
</rss>

