<?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: Recursive Function Calls &amp; Going Back to Previous Screen in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/recursive-function-calls-going-back-to-previous-screen/m-p/1108954#M105601</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sims, did you solved it?   Any answers helpful?&lt;/P&gt;&lt;P&gt;What did you do to solved your problem?&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>Mon, 21 Nov 2005 17:48:53 GMT</pubDate>
    <dc:creator>RichHeilman</dc:creator>
    <dc:date>2005-11-21T17:48:53Z</dc:date>
    <item>
      <title>Recursive Function Calls &amp; Going Back to Previous Screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/recursive-function-calls-going-back-to-previous-screen/m-p/1108949#M105596</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have defined a function with a screen.&lt;/P&gt;&lt;P&gt;To refresh the screen contents, I call the same function again, as shown below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      CALL function 'Z_SIMS_TEST'&lt;/P&gt;&lt;P&gt;        exporting&lt;/P&gt;&lt;P&gt;          ID_LIST = GID_LIST.&lt;/P&gt;&lt;P&gt;        LEAVE PROGRAM.&lt;/P&gt;&lt;P&gt;What it does is exit the function, and the program that called it in the first place, is there away for it to just exit the function and go back to the program that called it? I still need the function to tidy itself up, and not cause any memory leaks.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Nov 2005 17:33:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/recursive-function-calls-going-back-to-previous-screen/m-p/1108949#M105596</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-11-21T17:33:16Z</dc:date>
    </item>
    <item>
      <title>Re: Recursive Function Calls &amp; Going Back to Previous Screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/recursive-function-calls-going-back-to-previous-screen/m-p/1108950#M105597</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You might be able to use the STOP statement here.  I think STOP, may stop the entire program all together.&lt;/P&gt;&lt;P&gt;You would have to "tidy up" before the execution of this statement. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could use the EXIT statement if your check is in the main line of the function module.&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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Nov 2005 17:36:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/recursive-function-calls-going-back-to-previous-screen/m-p/1108950#M105597</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2005-11-21T17:36:56Z</dc:date>
    </item>
    <item>
      <title>Re: Recursive Function Calls &amp; Going Back to Previous Screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/recursive-function-calls-going-back-to-previous-screen/m-p/1108951#M105598</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You also might be able to RAISE an exception.&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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Nov 2005 17:43:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/recursive-function-calls-going-back-to-previous-screen/m-p/1108951#M105598</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2005-11-21T17:43:15Z</dc:date>
    </item>
    <item>
      <title>Re: Recursive Function Calls &amp; Going Back to Previous Screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/recursive-function-calls-going-back-to-previous-screen/m-p/1108952#M105599</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is what I mean......  Say you have this function module....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;


FUNCTION Z_TEST.
*"----------------------------------------------------------------------
*"*"Local interface:
*"  IMPORTING
*"     REFERENCE(SUBRC) TYPE  SY-SUBRC
*"  EXCEPTIONS
*"      AN_EXCEPTION
*"----------------------------------------------------------------------


Write:/ 'Im in the function module'.


if subrc  = 0.

Write:/
   'Im inside the check and need to come out of the function module'.

* You can use the exit statement here  to exit the 
* funciton module, if your check is in the mainline.
  exit.

* Or  you can raise an exception which will also make 
* the processing of the funcion module end.
Raise an_exception.

endif.


write:/ 'Im still in the function module after the check'.



ENDFUNCTION.


&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the call to the example function module.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
* Calling this way, will turn the check on and 
* make the function module end.
call function 'Z_TEST'
     exporting
          subrc        = '0'
     exceptions
          an_exception = 1
          others       = 2.


&lt;/CODE&gt;&lt;/PRE&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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Nov 2005 17:45:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/recursive-function-calls-going-back-to-previous-screen/m-p/1108952#M105599</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2005-11-21T17:45:59Z</dc:date>
    </item>
    <item>
      <title>Re: Recursive Function Calls &amp; Going Back to Previous Screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/recursive-function-calls-going-back-to-previous-screen/m-p/1108953#M105600</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've also tested with the STOP statement, it is working also in the the mainline of the function module.&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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Nov 2005 17:47:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/recursive-function-calls-going-back-to-previous-screen/m-p/1108953#M105600</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2005-11-21T17:47:08Z</dc:date>
    </item>
    <item>
      <title>Re: Recursive Function Calls &amp; Going Back to Previous Screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/recursive-function-calls-going-back-to-previous-screen/m-p/1108954#M105601</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sims, did you solved it?   Any answers helpful?&lt;/P&gt;&lt;P&gt;What did you do to solved your problem?&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>Mon, 21 Nov 2005 17:48:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/recursive-function-calls-going-back-to-previous-screen/m-p/1108954#M105601</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2005-11-21T17:48:53Z</dc:date>
    </item>
  </channel>
</rss>

