<?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 Execute a RFC function module within the threshold time limit in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/execute-a-rfc-function-module-within-the-threshold-time-limit/m-p/11416577#M1926263</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We have a requirement where we have to run a bunch of routines inside a RFC FM fetching various KPIs of the system (Basis KPIs) from an external system. But we don't want to burden the system by making performance intensive routines inside this RFC call.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, the requirement is to call a FM and execute the RFC FM only if the entire execution time(runtime) is below a certain threshold ( &amp;lt; 500 ms).&lt;/P&gt;&lt;P&gt;If the runtime of the FM is going to take &amp;gt; 500 ms, we want to default certain KPIs or issue a system alert..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can this be done ? Please share some ideas.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Shareen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 12 Dec 2015 03:50:36 GMT</pubDate>
    <dc:creator>former_member125661</dc:creator>
    <dc:date>2015-12-12T03:50:36Z</dc:date>
    <item>
      <title>Execute a RFC function module within the threshold time limit</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/execute-a-rfc-function-module-within-the-threshold-time-limit/m-p/11416577#M1926263</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We have a requirement where we have to run a bunch of routines inside a RFC FM fetching various KPIs of the system (Basis KPIs) from an external system. But we don't want to burden the system by making performance intensive routines inside this RFC call.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, the requirement is to call a FM and execute the RFC FM only if the entire execution time(runtime) is below a certain threshold ( &amp;lt; 500 ms).&lt;/P&gt;&lt;P&gt;If the runtime of the FM is going to take &amp;gt; 500 ms, we want to default certain KPIs or issue a system alert..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can this be done ? Please share some ideas.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Shareen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 12 Dec 2015 03:50:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/execute-a-rfc-function-module-within-the-threshold-time-limit/m-p/11416577#M1926263</guid>
      <dc:creator>former_member125661</dc:creator>
      <dc:date>2015-12-12T03:50:36Z</dc:date>
    </item>
    <item>
      <title>Re: Execute a RFC function module within the threshold time limit</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/execute-a-rfc-function-module-within-the-threshold-time-limit/m-p/11416578#M1926264</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;Interesting problem, but I'm not sure what you mean.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"If the runtime of the FM is going to take &amp;gt; 500 ms, we want to default certain KPIs or issue a system alert."&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can you know what the runtime will be, &lt;EM&gt;before&lt;/EM&gt; you execute the RFC?&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Please explain further.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 12 Dec 2015 08:51:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/execute-a-rfc-function-module-within-the-threshold-time-limit/m-p/11416578#M1926264</guid>
      <dc:creator>paul_bakker2</dc:creator>
      <dc:date>2015-12-12T08:51:18Z</dc:date>
    </item>
    <item>
      <title>Re: Execute a RFC function module within the threshold time limit</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/execute-a-rfc-function-module-within-the-threshold-time-limit/m-p/11416579#M1926265</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I know we cannot pre-empt the runtime of a FM before we actually call..&lt;/P&gt;&lt;P&gt;But the idea is..call a FM and this FM shouldn't run for more than 500 ms..If it is going to exceed 500 ms, abandon the FM processing and exit with the message 'Query time exceeded 500 ms'&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 12 Dec 2015 18:29:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/execute-a-rfc-function-module-within-the-threshold-time-limit/m-p/11416579#M1926265</guid>
      <dc:creator>former_member125661</dc:creator>
      <dc:date>2015-12-12T18:29:58Z</dc:date>
    </item>
    <item>
      <title>Re: Execute a RFC function module within the threshold time limit</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/execute-a-rfc-function-module-within-the-threshold-time-limit/m-p/11416580#M1926266</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Shareen,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sounds like you need the main FM to call the second one asynchronously starting a new task. See the help for CALL FUNCTION ... STARTING NEW TASK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's some sample code. Here my timeout was in seconds but you could adapt the WAIT statement to handle a shorter timeout.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;FUNCTION ...&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp; ADD 1 TO gv_task_no.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp; lv_timeout = 1.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;* Call the maybe slow function.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp; CALL FUNCTION 'ZMAYBE_SLOW'&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; STARTING NEW TASK gv_task_no&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PERFORMING fm_response ON END OF TASK&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; EXCEPTIONS&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; communication failure = 1&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; system_failure&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = 2.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;*&amp;nbsp;&amp;nbsp; Waiting for the fm to complete.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DO lv_timeout TIMES.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF gv_completed = 'X'.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; EXIT.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ENDIF.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WAIT UNTIL gv_completed = 'X' UP TO 1 SECONDS.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ENDDO.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;ENDFUNCTION.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;*----------------------------------------------------------------------*&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;FORM fm_response USING taskname TYPE any.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp; RECEIVE RESULTS FROM FUNCTION 'ZMAYBE_SLOW'&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; IMPORTING&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; es_result&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = gs_result&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; EXCEPTIONS&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; communication failure = 1&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; system_failure&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = 2.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp; IF sy-subrc = 1.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; gv_message = &lt;SPAN style="font-family: 'courier new', courier; font-size: 11px;"&gt;'&lt;/SPAN&gt;Sy-subrc 1 - Communication failure'.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp; ELSEIF sy-subrc = 2.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; gv_message = &lt;SPAN style="font-family: 'courier new', courier; font-size: 11px;"&gt;'&lt;/SPAN&gt;Sy-subrc 2 - System failure'.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp; ENDIF.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp; gv_completed = 'X'.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;ENDFORM.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 13 Dec 2015 18:46:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/execute-a-rfc-function-module-within-the-threshold-time-limit/m-p/11416580#M1926266</guid>
      <dc:creator>paulcapper</dc:creator>
      <dc:date>2015-12-13T18:46:42Z</dc:date>
    </item>
  </channel>
</rss>

