<?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 ALV from function module in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/return-to-alv-from-function-module/m-p/7703979#M1578274</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rob,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is not within the control framework, it's a screen called outside of it belonging to a function group! The screen must be closed to go back to ALV!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Klaus Babl on Feb 28, 2011 7:04 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 28 Feb 2011 06:04:44 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2011-02-28T06:04:44Z</dc:date>
    <item>
      <title>Return to ALV from function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/return-to-alv-from-function-module/m-p/7703974#M1578269</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi to all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm new in this forum. My name is Guido and I'm working with Abap from 6 months ago and I whish to greet all of you. Now I have a problem that I try to explain simply. I have created a report with 2 screens: the first one is a selction screen and the second one is an ALV.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the ALV I have added a button "Details" and on pressing it a new screen is opened. This screen is "created" in a function module developed by me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All works fine but there is a problem: I'm not able to return from the screen of the function module to the ALV(second screen of my report). I try to use "Leave to transaction" or "Submit" calls but in all cases the screen displayed is the selection screen(first screen of my report).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note also that the selction screen has some obligatory fields so I can't use the "Leave to tansaction..AND SKIP FIRST SCREEN" or "Call tansaction..AND SKIP FIRST SCREEN" call. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is a way to solve this problem? Any suggestion?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance for the help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Feb 2011 09:55:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/return-to-alv-from-function-module/m-p/7703974#M1578269</guid>
      <dc:creator>guido_bertoldi</dc:creator>
      <dc:date>2011-02-25T09:55:34Z</dc:date>
    </item>
    <item>
      <title>Re: Return to ALV from function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/return-to-alv-from-function-module/m-p/7703975#M1578270</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 looks like you have forgotten to create an Intercae and a Status in SE41 for your function pool to leave the screen with EXIT-Commands.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At PBO you have to set a status with SET PF-STATUS and at PAI you need a module for leaving the screen. Define EXIT-Commands e.g. for BACK, CANCEL and ABORT ...&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;Klaus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Feb 2011 10:18:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/return-to-alv-from-function-module/m-p/7703975#M1578270</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-02-25T10:18:41Z</dc:date>
    </item>
    <item>
      <title>Re: Return to ALV from function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/return-to-alv-from-function-module/m-p/7703976#M1578271</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have created a PAI and a PBO for all my screen. In the PAI of the screen created with the function module I use for the Back button the commands(calls) that I have indicated in my first message but the problem remains.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Feb 2011 10:36:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/return-to-alv-from-function-module/m-p/7703976#M1578271</guid>
      <dc:creator>guido_bertoldi</dc:creator>
      <dc:date>2011-02-25T10:36:34Z</dc:date>
    </item>
    <item>
      <title>Re: Return to ALV from function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/return-to-alv-from-function-module/m-p/7703977#M1578272</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;And how do you work on your exit button code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;E.g.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
IF OKCODE EQ 'BACK'.
  LEAVE TO SCREEN 0.
ENDIF:
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How did you define the OKCODE field on your fm screen?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PLease check that you have defined one in SE51 and that you process your exit code.&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;Klaus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Feb 2011 10:48:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/return-to-alv-from-function-module/m-p/7703977#M1578272</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-02-25T10:48:03Z</dc:date>
    </item>
    <item>
      <title>Re: Return to ALV from function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/return-to-alv-from-function-module/m-p/7703978#M1578273</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;From the documentation for LEAVE TO SCREEN:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt;This statement must not be used when handling events of the Control Framework. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Feb 2011 15:28:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/return-to-alv-from-function-module/m-p/7703978#M1578273</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-02-25T15:28:26Z</dc:date>
    </item>
    <item>
      <title>Re: Return to ALV from function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/return-to-alv-from-function-module/m-p/7703979#M1578274</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rob,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is not within the control framework, it's a screen called outside of it belonging to a function group! The screen must be closed to go back to ALV!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Klaus Babl on Feb 28, 2011 7:04 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Feb 2011 06:04:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/return-to-alv-from-function-module/m-p/7703979#M1578274</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-02-28T06:04:44Z</dc:date>
    </item>
    <item>
      <title>Re: Return to ALV from function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/return-to-alv-from-function-module/m-p/7703980#M1578275</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Klaus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I haven't define an exit code in the screen of the fm. I use a global data called WA_OK_CODE defined in the top included of the function group. The code used for the exit is the next one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WA_OK_CODE = SY-UCOMM.&lt;/P&gt;&lt;P&gt;CASE WA_OK_CODE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    WHEN 'BACK'.&lt;/P&gt;&lt;P&gt;      SET SCREEN 0.&lt;/P&gt;&lt;P&gt;      LEAVE SCREEN.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Mar 2011 09:48:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/return-to-alv-from-function-module/m-p/7703980#M1578275</guid>
      <dc:creator>guido_bertoldi</dc:creator>
      <dc:date>2011-03-01T09:48:48Z</dc:date>
    </item>
    <item>
      <title>Re: Return to ALV from function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/return-to-alv-from-function-module/m-p/7703981#M1578276</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One thing I don't catch here. You said you have two screens - one selection screen and another with ALV. Then you said that you have added &lt;EM&gt;details&lt;/EM&gt; buton which trigger new screen. So how many screen do you really have. Where is the ALV placed - is it selection screen?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If so than whenever you return from FG screen your program ends and shows initial screen which is selection screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You need something like&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"selection screen&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;call screen 100.  "next screen also set as 100&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"pbo screen 100&lt;/P&gt;&lt;P&gt;ALV here&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"pai screen 100&lt;/P&gt;&lt;P&gt;call function ....&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;"in function&lt;/P&gt;&lt;P&gt;call screen 200 with ALV details&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"pai screen 200&lt;/P&gt;&lt;P&gt;LEAVE TO SCREEN 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Doing it like that you will get the processing back to ALV.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Marcin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Mar 2011 14:19:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/return-to-alv-from-function-module/m-p/7703981#M1578276</guid>
      <dc:creator>MarcinPciak</dc:creator>
      <dc:date>2011-03-01T14:19:00Z</dc:date>
    </item>
    <item>
      <title>Re: Return to ALV from function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/return-to-alv-from-function-module/m-p/7703982#M1578277</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have resolved the problem by myself. I use the following "workaround":&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I create a "dummy" program in which I call the function modules with the Details screen. In the "real" program from the ALV screen I use the "call transaction &amp;lt;dummy program&amp;gt;" and all works fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks to all for the answers.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Mar 2011 08:13:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/return-to-alv-from-function-module/m-p/7703982#M1578277</guid>
      <dc:creator>guido_bertoldi</dc:creator>
      <dc:date>2011-03-08T08:13:08Z</dc:date>
    </item>
  </channel>
</rss>

