<?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: Logic for Exiting a Screen in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/logic-for-exiting-a-screen/m-p/12211632#M1982886</link>
    <description>&lt;P&gt;I called the screen when a specific radio button is pressed, I am calling it before the function of the radio button. I just created an additional selection screen and called it.&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN BEGIN OF SCREEN 500 TITLE title AS WINDOW.&lt;BR /&gt;PARAMETERS: p_price LIKE mbew-verpr OBLIGATORY DEFAULT '5000',&lt;BR /&gt; p_capcur LIKE t001-waers OBLIGATORY DEFAULT 'USD'.&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN: END OF SCREEN 500. &lt;/P&gt;&lt;P&gt;FORM 1920_mbew_data_pricing.&lt;BR /&gt; title = 'Enter Local Price'.&lt;BR /&gt;&lt;BR /&gt; CALL SELECTION-SCREEN '0500' STARTING AT 10 10.&lt;/P&gt;</description>
    <pubDate>Tue, 30 Jun 2020 09:09:46 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2020-06-30T09:09:46Z</dc:date>
    <item>
      <title>Logic for Exiting a Screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/logic-for-exiting-a-screen/m-p/12211630#M1982884</link>
      <description>&lt;P&gt;I have added a selection screen in the program and every time i hit the exit button the program just executes, I want to go back to the original screen when I hit the exit button.&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/1818916-local-pricing.png" /&gt;&lt;/P&gt;
  &lt;P&gt;&lt;IMG alt="" /&gt;&lt;/P&gt;
  &lt;P&gt;is there logic for that?&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jun 2020 08:45:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/logic-for-exiting-a-screen/m-p/12211630#M1982884</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2020-06-30T08:45:21Z</dc:date>
    </item>
    <item>
      <title>Re: Logic for Exiting a Screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/logic-for-exiting-a-screen/m-p/12211631#M1982885</link>
      <description>&lt;P&gt;Hello &lt;SPAN class="mention-scrubbed"&gt;catienza11&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Please provide additional information.&lt;/P&gt;&lt;P&gt;How do you call the screen? How do you handle the buttons being pressed?&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;Mateusz</description>
      <pubDate>Tue, 30 Jun 2020 08:51:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/logic-for-exiting-a-screen/m-p/12211631#M1982885</guid>
      <dc:creator>MateuszAdamus</dc:creator>
      <dc:date>2020-06-30T08:51:55Z</dc:date>
    </item>
    <item>
      <title>Re: Logic for Exiting a Screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/logic-for-exiting-a-screen/m-p/12211632#M1982886</link>
      <description>&lt;P&gt;I called the screen when a specific radio button is pressed, I am calling it before the function of the radio button. I just created an additional selection screen and called it.&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN BEGIN OF SCREEN 500 TITLE title AS WINDOW.&lt;BR /&gt;PARAMETERS: p_price LIKE mbew-verpr OBLIGATORY DEFAULT '5000',&lt;BR /&gt; p_capcur LIKE t001-waers OBLIGATORY DEFAULT 'USD'.&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN: END OF SCREEN 500. &lt;/P&gt;&lt;P&gt;FORM 1920_mbew_data_pricing.&lt;BR /&gt; title = 'Enter Local Price'.&lt;BR /&gt;&lt;BR /&gt; CALL SELECTION-SCREEN '0500' STARTING AT 10 10.&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jun 2020 09:09:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/logic-for-exiting-a-screen/m-p/12211632#M1982886</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2020-06-30T09:09:46Z</dc:date>
    </item>
    <item>
      <title>Re: Logic for Exiting a Screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/logic-for-exiting-a-screen/m-p/12211633#M1982887</link>
      <description>&lt;P&gt;Hello  &lt;SPAN class="mention-scrubbed"&gt;catienza11&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;Here's an example of how you can handle it.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;TABLES:
  sscrfields.

PARAMETERS: p_test TYPE char1.

SELECTION-SCREEN BEGIN OF SCREEN 500 TITLE title AS WINDOW.
PARAMETERS: p_price  LIKE mbew-verpr OBLIGATORY DEFAULT '5000',
            p_capcur LIKE t001-waers OBLIGATORY DEFAULT 'USD'.
SELECTION-SCREEN: END OF SCREEN 500.

START-OF-SELECTION.
  WRITE 'Report executed'.

AT SELECTION-SCREEN.
  CASE sy-dynnr.
    WHEN '0500'.
      " do some specific actions
    WHEN '1000'.
      CASE sscrfields-ucomm.
        WHEN 'ONLI'.
          PERFORM show_subscreen.
          IF sy-subrc = 0.
            " do nothing, proceed with logic.
          ELSE.
            CLEAR sscrfields-ucomm.
          ENDIF.
      ENDCASE.
  ENDCASE.

FORM show_subscreen.
  title = 'Enter Local Price'.
  CALL SELECTION-SCREEN '0500' STARTING AT 10 10.
ENDFORM.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;As always, I encourage to search and read the &lt;A href="https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapcall_selection_screen.htm"&gt;SAP Help documentation&lt;/A&gt; on the topic. It describes the meaning of SY-SUBRC: &lt;/P&gt;&lt;UL&gt;&lt;LI&gt;0 - The user selected the function Execute or Execute + Print on the selection screen. &lt;/LI&gt;&lt;LI&gt;4 - User chose Back, Exit, or Cancel on the selection screen.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Kind regards,&lt;/P&gt;Mateusz</description>
      <pubDate>Tue, 30 Jun 2020 09:46:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/logic-for-exiting-a-screen/m-p/12211633#M1982887</guid>
      <dc:creator>MateuszAdamus</dc:creator>
      <dc:date>2020-06-30T09:46:35Z</dc:date>
    </item>
  </channel>
</rss>

