<?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: Return To Selection Screen From ALV Grid in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/return-to-selection-screen-from-alv-grid/m-p/1290843#M155270</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jerry&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You don't need to check the dynpro because the BACK is automaically manage by system for selection-screen, so you need to manage the BACK for the grid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I believe the flow of your report should be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Here you call the dynpro for the grid&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CALL SCREEN 100.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So in PAI &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE pai INPUT.&lt;/P&gt;&lt;P&gt;  save_ok_code = ok_code.&lt;/P&gt;&lt;P&gt;  CLEAR ok_code.&lt;/P&gt;&lt;P&gt;  CALL METHOD cl_gui_cfw=&amp;gt;dispatch.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  CASE save_ok_code.&lt;/P&gt;&lt;P&gt;    WHEN 'BACK' OR 'EXIT' OR 'CANCELL'.&lt;/P&gt;&lt;P&gt;       LEAVE TO SCREEN 0.&lt;/P&gt;&lt;P&gt;    WHEN OTHERS.&lt;/P&gt;&lt;P&gt;  ENDCASE.&lt;/P&gt;&lt;P&gt;ENDMODULE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The statament LEAVE TO SCREEN 0 back to the point where the CALL SCREEN is done, so the system'll automatically go to the selection-screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 17 Mar 2006 17:23:04 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-03-17T17:23:04Z</dc:date>
    <item>
      <title>Return To Selection Screen From ALV Grid</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/return-to-selection-screen-from-alv-grid/m-p/1290841#M155268</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a standard selection screen (1000) that supplies parameters to an ALV Grid.  If the user presses BACK from the Grid, I want to go to the selection screen.  If the user presses BACK from the selection screen, I want to exit the program.  However, going BACK from the selection-screen just calls the grid again.  Can someone tell me what my error is?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&amp;lt;b&amp;gt;MODULE pai INPUT.
  save_ok_code = ok_code.
  CLEAR ok_code.
  CALL METHOD cl_gui_cfw=&amp;gt;dispatch.

  CASE save_ok_code.
    WHEN 'BACK'.
      CASE sy-dynnr.
        WHEN '1000'.
          PERFORM exit_program.
        WHEN OTHERS.
          CALL SELECTION-SCREEN 1000.
      ENDCASE.
    WHEN 'EXIT' OR
         'CANCEL'.
      PERFORM exit_program.
    WHEN OTHERS.
  ENDCASE.
ENDMODULE.
&amp;lt;/b&amp;gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Mar 2006 16:58:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/return-to-selection-screen-from-alv-grid/m-p/1290841#M155268</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-17T16:58:20Z</dc:date>
    </item>
    <item>
      <title>Re: Return To Selection Screen From ALV Grid</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/return-to-selection-screen-from-alv-grid/m-p/1290842#M155269</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jerry,&lt;/P&gt;&lt;P&gt;  how do you call the ALV grid screen ?&lt;/P&gt;&lt;P&gt;I usually do something like&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

...
select-options
parameters
....

start-of-selection.

call screen '0100'.  " &amp;lt;-- This is the screen of ALV Grid

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in screen 0100 logic&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
PROCESS BEFORE OUTPUT.
  MODULE INIT_ALV.
PROCESS AFTER INPUT.
  MODULE USER_COMMAND.

MODULE USER_COMMAND INPUT.

  CASE ok_code.
    WHEN 'BACK' OR 'EXIT' OR 'CANCEL'.
      leave to screen '0000'.
    WHEN OTHERS.
  ENDCASE.
ENDMODULE.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, Manuel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Mar 2006 17:10:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/return-to-selection-screen-from-alv-grid/m-p/1290842#M155269</guid>
      <dc:creator>manuel_bassani</dc:creator>
      <dc:date>2006-03-17T17:10:59Z</dc:date>
    </item>
    <item>
      <title>Re: Return To Selection Screen From ALV Grid</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/return-to-selection-screen-from-alv-grid/m-p/1290843#M155270</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jerry&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You don't need to check the dynpro because the BACK is automaically manage by system for selection-screen, so you need to manage the BACK for the grid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I believe the flow of your report should be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Here you call the dynpro for the grid&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CALL SCREEN 100.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So in PAI &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE pai INPUT.&lt;/P&gt;&lt;P&gt;  save_ok_code = ok_code.&lt;/P&gt;&lt;P&gt;  CLEAR ok_code.&lt;/P&gt;&lt;P&gt;  CALL METHOD cl_gui_cfw=&amp;gt;dispatch.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  CASE save_ok_code.&lt;/P&gt;&lt;P&gt;    WHEN 'BACK' OR 'EXIT' OR 'CANCELL'.&lt;/P&gt;&lt;P&gt;       LEAVE TO SCREEN 0.&lt;/P&gt;&lt;P&gt;    WHEN OTHERS.&lt;/P&gt;&lt;P&gt;  ENDCASE.&lt;/P&gt;&lt;P&gt;ENDMODULE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The statament LEAVE TO SCREEN 0 back to the point where the CALL SCREEN is done, so the system'll automatically go to the selection-screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Mar 2006 17:23:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/return-to-selection-screen-from-alv-grid/m-p/1290843#M155270</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-17T17:23:04Z</dc:date>
    </item>
    <item>
      <title>Re: Return To Selection Screen From ALV Grid</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/return-to-selection-screen-from-alv-grid/m-p/1290844#M155271</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi jerry&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL SCREEN 100.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE pai INPUT. &lt;/P&gt;&lt;P&gt; save_ok_code = ok_code. &lt;/P&gt;&lt;P&gt; CLEAR ok_code. &lt;/P&gt;&lt;P&gt; CALL METHOD cl_gui_cfw=&amp;gt;dispatch.&lt;/P&gt;&lt;P&gt;CASE save_ok_code.  &lt;/P&gt;&lt;P&gt;  WHEN 'BACK'.   &lt;/P&gt;&lt;P&gt;   CASE sy-dynnr.  &lt;/P&gt;&lt;P&gt;      WHEN '1000'.  &lt;/P&gt;&lt;P&gt;        PERFORM exit_program.   &lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;      WHEN '0100'.&lt;/P&gt;&lt;P&gt;          LEAVE TO SCREEN 1000.&amp;lt;/b&amp;gt;   ENDCASE.  &lt;/P&gt;&lt;P&gt;  WHEN 'EXIT' OR  &lt;/P&gt;&lt;P&gt;       'CANCEL'.   &lt;/P&gt;&lt;P&gt;   PERFORM exit_program.  &lt;/P&gt;&lt;P&gt;  WHEN OTHERS. &lt;/P&gt;&lt;P&gt; ENDCASE.&lt;/P&gt;&lt;P&gt;ENDMODULE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;kishore&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Harikishore Sreenivasulu&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Mar 2006 17:23:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/return-to-selection-screen-from-alv-grid/m-p/1290844#M155271</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-17T17:23:40Z</dc:date>
    </item>
  </channel>
</rss>

