<?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: Need Error msg on selection screen in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-error-msg-on-selection-screen/m-p/6300236#M1390996</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 using &lt;/P&gt;&lt;P&gt;1. AT SELECTION-SCREEN ON ,variable name&amp;gt; OR&lt;/P&gt;&lt;P&gt;2.Message s000(zmsg) with "gfgbhgbn" display like E. Will definetly help you out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pooja&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 21 Oct 2009 05:09:55 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-10-21T05:09:55Z</dc:date>
    <item>
      <title>Need Error msg on selection screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-error-msg-on-selection-screen/m-p/6300233#M1390993</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello frnds,&lt;/P&gt;&lt;P&gt;                   I need to display a error msg on selection screen if no data is found for the inputs on the selection screen.&lt;/P&gt;&lt;P&gt;If i give the error msg in START-OF-SELECTION then after error msg the screen does not remain on the selection screen bt comes back to sap start screen.&lt;/P&gt;&lt;P&gt;                   N if i display my error msg in AT SELECTION SCREEN event den the msg is called even when the user presses enter on the selection screen.&lt;/P&gt;&lt;P&gt;                    I need to display error msg n also the selection screen to be displayed bt nt when user presses enter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Currently im checking sy-ucomm in AT LINE SELECTION and running it only when its ONLI i.e execute.... Kindly suggest some other ways of doing it&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Oct 2009 01:55:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-error-msg-on-selection-screen/m-p/6300233#M1390993</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-21T01:55:52Z</dc:date>
    </item>
    <item>
      <title>Re: Need Error msg on selection screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-error-msg-on-selection-screen/m-p/6300234#M1390994</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;This is always a fun one to work with.  I would remove your message from the selection scree and in your program after start of selection when you figure out there is no data you can use this FM to pop up a message.  POPUP_TO_DISPLAY_VALUE.  Once closed it should go back to the selection scree.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;JB&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Oct 2009 03:19:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-error-msg-on-selection-screen/m-p/6300234#M1390994</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-21T03:19:35Z</dc:date>
    </item>
    <item>
      <title>Re: Need Error msg on selection screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-error-msg-on-selection-screen/m-p/6300235#M1390995</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;Use the display like E addition to a success message. It will come back to the selection screen&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
MESSAGE 'Error Message' TYPE 'S' display like 'E'.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Vikranth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Oct 2009 04:06:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-error-msg-on-selection-screen/m-p/6300235#M1390995</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-21T04:06:29Z</dc:date>
    </item>
    <item>
      <title>Re: Need Error msg on selection screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-error-msg-on-selection-screen/m-p/6300236#M1390996</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 using &lt;/P&gt;&lt;P&gt;1. AT SELECTION-SCREEN ON ,variable name&amp;gt; OR&lt;/P&gt;&lt;P&gt;2.Message s000(zmsg) with "gfgbhgbn" display like E. Will definetly help you out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pooja&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Oct 2009 05:09:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-error-msg-on-selection-screen/m-p/6300236#M1390996</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-21T05:09:55Z</dc:date>
    </item>
    <item>
      <title>Re: Need Error msg on selection screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-error-msg-on-selection-screen/m-p/6300237#M1390997</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;An alternative approach is to use an &lt;STRONG&gt;INFORMATION MESSAGE&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Refer:-&lt;/P&gt;&lt;P&gt;In the START-OF-SELECTION i put a select query and if no data is found i need to display a message and come back to selection scren.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
START-OF-SELECTION
  SELECT &amp;lt;field1, field2, ....&amp;gt;
  FROM mara
  INTO it_material
  WHERE &amp;lt;condition&amp;gt;.
  
  IF sy-subrc NE 0.
    MESSAGE 'No Data Found' TYPE 'I'.  "&amp;lt;--display you message here
    STOP. "&amp;lt;--this will take you to END-OF-SELECTION
  ENDIF.

  IF NOT it_material[] IS INITIAL.
    "other code
  ENDIF.

END-OF-SELECTION.

  IF NOT it_material[] IS INITIAL.
    "other code
  ENDIF.  
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since conditions are used in END-OF-SELECTION as well so no code will be executed when no data is found.&lt;/P&gt;&lt;P&gt;So an information message is displayed to user and no further code is executed and the selection screen is returned after user clicks on the information message.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know in case of confusion.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Tarun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Oct 2009 05:20:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-error-msg-on-selection-screen/m-p/6300237#M1390997</guid>
      <dc:creator>I355602</dc:creator>
      <dc:date>2009-10-21T05:20:28Z</dc:date>
    </item>
    <item>
      <title>Re: Need Error msg on selection screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-error-msg-on-selection-screen/m-p/6300238#M1390998</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Amit,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;just code the following into your code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;while performing select in the perform:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select f1 f2&lt;/P&gt;&lt;P&gt;from DB&lt;/P&gt;&lt;P&gt;into table itab&lt;/P&gt;&lt;P&gt;where f1 in so_f1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if itab[] is not initial.&lt;/P&gt;&lt;P&gt;coding....&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;MESSAGE S000(DB) WITH TEXT-010.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this would solve the problem....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Oct 2009 05:24:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-error-msg-on-selection-screen/m-p/6300238#M1390998</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-21T05:24:29Z</dc:date>
    </item>
    <item>
      <title>Re: Need Error msg on selection screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-error-msg-on-selection-screen/m-p/6300239#M1390999</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;AT SELECTION-SCREEN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF SSCRFIELDS-UCOMM = 'ONLI'..&lt;/P&gt;&lt;P&gt;      &lt;/P&gt;&lt;P&gt;     if &amp;lt; condiction &amp;gt; true.&lt;/P&gt;&lt;P&gt;      SSCRFIELDS-UCOMM = ' ' .&lt;/P&gt;&lt;P&gt;      message 'error' type 'E'.&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;Edited by: Pramoth CG on Oct 21, 2009 11:15 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Oct 2009 05:31:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-error-msg-on-selection-screen/m-p/6300239#M1390999</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-21T05:31:33Z</dc:date>
    </item>
    <item>
      <title>Re: Need Error msg on selection screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-error-msg-on-selection-screen/m-p/6300240#M1391000</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Amit,&lt;/P&gt;&lt;P&gt;Try this&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN.&lt;/P&gt;&lt;P&gt;  PERFORM TESTRUN_CHECK USING TESTRUN .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM TESTRUN_CHECK USING    P_TESTRUN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if p_testrun ne 'X' .&lt;/P&gt;&lt;P&gt;   message w999(zm) with text-503 ."#EC *&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN.&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="----" /&gt;&lt;P&gt; -&lt;/P&gt;&lt;HR originaltext="----" /&gt;&lt;P&gt;etc&lt;/P&gt;&lt;P&gt;  SELECT SINGLE * FROM T001 WHERE BUKRS = P_BUKRS.&lt;/P&gt;&lt;P&gt;  IF SY-SUBRC NE 0 .&lt;/P&gt;&lt;P&gt;    MESSAGE E999(ZM) WITH    TEXT-500 .&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-----------" /&gt;&lt;P&gt;AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_INPUT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;from kallam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Oct 2009 05:40:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-error-msg-on-selection-screen/m-p/6300240#M1391000</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-21T05:40:24Z</dc:date>
    </item>
    <item>
      <title>Re: Need Error msg on selection screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-error-msg-on-selection-screen/m-p/6300241#M1391001</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Amit,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As per your requirement, you can use the below code at the Event START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;Have a look at the below code snippet and you will have an idea.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1)    SELECTION-SCREEN begin of block b1.&lt;/P&gt;&lt;P&gt;           PARAMETER: p_input TYPE text100.&lt;/P&gt;&lt;P&gt;           PARAMETER: p_input1 TYPE text100.&lt;/P&gt;&lt;P&gt;       SELECTION-SCREEN end of block b1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;       START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;         IF p_input IS INITIAL OR p_input1 IS INITIAL.&lt;/P&gt;&lt;P&gt;            MESSAGE 'NO VALUES IN SELECTION SCREEN' TYPE 'I'.&lt;/P&gt;&lt;P&gt;            LEAVE TO LIST-PROCESSING.&lt;/P&gt;&lt;P&gt;         ENDIF.&lt;/P&gt;&lt;P&gt;       END-OF-SELECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suppose, if you are ought to achieve this requirement in a report program and if a T-Code is assigned to it, then you can use the below one too.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2)    SELECTION-SCREEN begin of block b1.&lt;/P&gt;&lt;P&gt;           PARAMETER: p_input TYPE text100.&lt;/P&gt;&lt;P&gt;           PARAMETER: p_input1 TYPE text100.&lt;/P&gt;&lt;P&gt;       SELECTION-SCREEN end of block b1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;       START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;         IF p_input IS INITIAL OR p_input1 IS INITIAL.&lt;/P&gt;&lt;P&gt;            MESSAGE 'NO VALUES IN SELECTION SCREEN' TYPE 'I'.&lt;/P&gt;&lt;P&gt;            LEAVE TO CURRENT TRANSACTION.&lt;/P&gt;&lt;P&gt;         ENDIF.&lt;/P&gt;&lt;P&gt;       END-OF-SELECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In both the cases you will be back to the selection screen  after displaying the message.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sudha.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Oct 2009 11:50:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-error-msg-on-selection-screen/m-p/6300241#M1391001</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-21T11:50:42Z</dc:date>
    </item>
    <item>
      <title>Re: Need Error msg on selection screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-error-msg-on-selection-screen/m-p/6300242#M1391002</link>
      <description>&lt;P&gt;Message 'Error Message' type 'S' display like 'E'.&lt;/P&gt;&lt;P&gt;EXIT.&lt;/P&gt;&lt;P&gt;Type S will process the next line but exit will take you out from current processing. Display like 'E' will show the error like message on screen.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Feb 2022 11:25:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-error-msg-on-selection-screen/m-p/6300242#M1391002</guid>
      <dc:creator>former_member792745</dc:creator>
      <dc:date>2022-02-28T11:25:50Z</dc:date>
    </item>
  </channel>
</rss>

