<?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: how to break the execution within a function in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-break-the-execution-within-a-function/m-p/4356002#M1037102</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;While callin the function module, you can use&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
    CALL FUNCTION 'func name'
      STARTING NEW TASK w_taskname
      DESTINATION c_none
      PERFORMING f_formname ON END OF TASK
      EXPORTING

     IMPORTING

      EXCEPTIONS.

    IF SY-SUBRC EQ 0.

WAIT UNTIL w_confirm EQ 'X' UP TO 100 SECONDS.

    ENDIF.


**********************************
FORM f_formname USING us_taskname TYPE any.

  RECEIVE RESULTS FROM FUNCTION &amp;lt;func_name&amp;gt;
     IMPORTING
      EXCEPTIONS

IF SY-SUBRC EQ 0.
MOVE 'X' TO W_CONFIRM.
ENDIF.

ENDFORM.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 14 Aug 2008 14:54:54 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-08-14T14:54:54Z</dc:date>
    <item>
      <title>how to break the execution within a function</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-break-the-execution-within-a-function/m-p/4356001#M1037101</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Fox,&lt;/P&gt;&lt;P&gt;I have a function which sometime needs more than 10 minutes to deliver a result. In order to limit the processing time, I need to abort the function and return a flag to to another system to indicate kind of "time out". How can I do this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers!&lt;/P&gt;&lt;P&gt;Kami&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Aug 2008 14:46:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-break-the-execution-within-a-function/m-p/4356001#M1037101</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-14T14:46:05Z</dc:date>
    </item>
    <item>
      <title>Re: how to break the execution within a function</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-break-the-execution-within-a-function/m-p/4356002#M1037102</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;While callin the function module, you can use&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
    CALL FUNCTION 'func name'
      STARTING NEW TASK w_taskname
      DESTINATION c_none
      PERFORMING f_formname ON END OF TASK
      EXPORTING

     IMPORTING

      EXCEPTIONS.

    IF SY-SUBRC EQ 0.

WAIT UNTIL w_confirm EQ 'X' UP TO 100 SECONDS.

    ENDIF.


**********************************
FORM f_formname USING us_taskname TYPE any.

  RECEIVE RESULTS FROM FUNCTION &amp;lt;func_name&amp;gt;
     IMPORTING
      EXCEPTIONS

IF SY-SUBRC EQ 0.
MOVE 'X' TO W_CONFIRM.
ENDIF.

ENDFORM.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Aug 2008 14:54:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-break-the-execution-within-a-function/m-p/4356002#M1037102</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-14T14:54:54Z</dc:date>
    </item>
    <item>
      <title>Re: how to break the execution within a function</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-break-the-execution-within-a-function/m-p/4356003#M1037103</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;Check system date and time at the start of FM , check the time and date at the part of the code where you want to set the flag. If it exceeds your time limit, say 10 mins, pass a flag to the calling program ot unit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Kartavya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Aug 2008 15:03:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-break-the-execution-within-a-function/m-p/4356003#M1037103</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-14T15:03:37Z</dc:date>
    </item>
    <item>
      <title>Re: how to break the execution within a function</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-break-the-execution-within-a-function/m-p/4356004#M1037104</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, first thanks you very much for your feedback.&lt;/P&gt;&lt;P&gt;Actually this function itself is a RFC function however the part that takes very long is a PERFORM so is there any possibility to receive a feedback whenever the PERFORM takes very long? Once again the structure is like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FUNCTION search.&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;PERFORM get_data TABLES i_table CHANGING i_table&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;ENDFUNCTION&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*********************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SO the PERFORM get_data is the one part which sometime take very long time to process.&lt;/P&gt;&lt;P&gt;Any idea ?&lt;/P&gt;&lt;P&gt;Thanks for you help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Aug 2008 08:41:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-break-the-execution-within-a-function/m-p/4356004#M1037104</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-15T08:41:56Z</dc:date>
    </item>
  </channel>
</rss>

