<?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: Selection Screen in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen/m-p/893692#M53847</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;put the following code inside the AT SELECTION-SCREEN event.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

if not p_file is initial.
OPEN DATASET p_file FOR INPUT IN BINARY MODE.
IF sy-subrc &amp;lt;&amp;gt; 0. " error when file can't be open.
MESSAGE e005(zmsgfide).
ENDIF.
endif.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Rich Heilman&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 18 Mar 2005 18:59:58 GMT</pubDate>
    <dc:creator>RichHeilman</dc:creator>
    <dc:date>2005-03-18T18:59:58Z</dc:date>
    <item>
      <title>Selection Screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen/m-p/893688#M53843</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;I  issue a error message in my report when the user enters a wrong file name in p_file, but when the error message is display the status of my selection screen disappears and I don't have other option but to end my program manually ( /n ) and restart it again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there and way to recall my screen and restart the process (like when you use chain....endchain in dynpros)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks in advanced,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fidel.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Mar 2005 16:33:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen/m-p/893688#M53843</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-03-18T16:33:15Z</dc:date>
    </item>
    <item>
      <title>Re: Selection Screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen/m-p/893689#M53844</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Looks like you are issuing this message in the START-OF-SELECTION event. Try AT SELECTION-SCREEN ON P_FILE instead. Validate the filename here and issue the message there. This will allow you to stay in the selection screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Srinivas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Mar 2005 16:58:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen/m-p/893689#M53844</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-03-18T16:58:21Z</dc:date>
    </item>
    <item>
      <title>Re: Selection Screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen/m-p/893690#M53845</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can also do the validation in the AT SELECTION-SCREEN event.  That will allow the user to change all the fields and not just the p_file field.  Before you issue the message, set the cursor:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SET CURSOR FIELD 'P_FILE'.
MESSAGE E001.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Make sure that the field name is all caps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let us know how it goes.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Mar 2005 17:29:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen/m-p/893690#M53845</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-03-18T17:29:43Z</dc:date>
    </item>
    <item>
      <title>Re: Selection Screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen/m-p/893691#M53846</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks guys, but the only way that I can't tell that the user entered a wrong file name is after the open dataset command (since the file could be anywhere and the user is the one that knows where it is) and from there I control what happens. Here is the code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM initialization .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  OPEN DATASET p_file FOR INPUT IN BINARY MODE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF sy-subrc &amp;lt;&amp;gt; 0. " error when file can't be open.&lt;/P&gt;&lt;P&gt;    MESSAGE e005(zmsgfide).&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.                    " initialization&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;after that error I can't do nothing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Fidel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Mar 2005 18:45:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen/m-p/893691#M53846</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-03-18T18:45:00Z</dc:date>
    </item>
    <item>
      <title>Re: Selection Screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen/m-p/893692#M53847</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;put the following code inside the AT SELECTION-SCREEN event.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

if not p_file is initial.
OPEN DATASET p_file FOR INPUT IN BINARY MODE.
IF sy-subrc &amp;lt;&amp;gt; 0. " error when file can't be open.
MESSAGE e005(zmsgfide).
ENDIF.
endif.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Rich Heilman&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Mar 2005 18:59:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen/m-p/893692#M53847</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2005-03-18T18:59:58Z</dc:date>
    </item>
    <item>
      <title>Re: Selection Screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen/m-p/893693#M53848</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rich....You solved my problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you guys for helping me out, specially you Rich.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fidel Peralta.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Mar 2005 19:09:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen/m-p/893693#M53848</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-03-18T19:09:16Z</dc:date>
    </item>
    <item>
      <title>Re: Selection Screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen/m-p/893694#M53849</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The initialization event happens before the selection screen is presented so the user has no access to the p_file parameter.  Use the AT SELECTION SCREEN event as Rich has described.  If the user hits ENTER several times, you will be opening the file over and over again.  Instead you can check the value of SY-UCOMM and see if it is 'ONLI' indicating that the user has hit the Execute button.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CORRECTION: I failed to notice that your initialization was a FORM and not the event INITIALIZATION.  Sorry for the confusion.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Charles Folwell&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Mar 2005 19:09:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen/m-p/893694#M53849</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-03-18T19:09:28Z</dc:date>
    </item>
    <item>
      <title>Re: Selection Screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen/m-p/893695#M53850</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No problem Charles.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 19 Mar 2005 17:21:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen/m-p/893695#M53850</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-03-19T17:21:00Z</dc:date>
    </item>
  </channel>
</rss>

