<?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: Forcing timeout of RFC function call in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/forcing-timeout-of-rfc-function-call/m-p/6456614#M1414904</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Seems I was on the right track.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The timeout stuff is:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
..
    CALL FUNCTION 'RFC_GET_SYSTEM_INFO'
      DESTINATION 'NONE'
      STARTING NEW TASK destination
      PERFORMING return_form ON END OF TASK
..
..

WAIT UNTIL data_received = 'X' UP TO timeout SECONDS.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the reply though as it backs up what I'm doing.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 23 Dec 2009 15:56:44 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-12-23T15:56:44Z</dc:date>
    <item>
      <title>Forcing timeout of RFC function call</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/forcing-timeout-of-rfc-function-call/m-p/6456610#M1414900</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have an abap that calls a function module in another SAP system which returns relevant data for my ABAP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sometimes, due to data issues, the called function module gets in some sort of loop where it will eventually timeout.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way to call the function module with some sort of timeout value in the calling system, or having some sort of timeoue value in the called system?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All this needs to happen in the background.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Dec 2009 14:57:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/forcing-timeout-of-rfc-function-call/m-p/6456610#M1414900</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-23T14:57:04Z</dc:date>
    </item>
    <item>
      <title>Re: Forcing timeout of RFC function call</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/forcing-timeout-of-rfc-function-call/m-p/6456611#M1414901</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;maybe you could use function module RFC_VERIFY_DESTINATION just before calling your RFC fm.&lt;/P&gt;&lt;P&gt;Check this weblog:&lt;/P&gt;&lt;P&gt;/people/sap.user72/blog/2005/07/01/my-new-best-friend-mr-rfcverifydestination&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;Edited by: Pablo Casamayor on Dec 23, 2009 4:27 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Dec 2009 15:13:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/forcing-timeout-of-rfc-function-call/m-p/6456611#M1414901</guid>
      <dc:creator>former_member182371</dc:creator>
      <dc:date>2009-12-23T15:13:35Z</dc:date>
    </item>
    <item>
      <title>Re: Forcing timeout of RFC function call</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/forcing-timeout-of-rfc-function-call/m-p/6456612#M1414902</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry, I should have been more detailed in what I need and what the issue is.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There isn't an issue with the RFC destination itself.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need a method of performing a timeout of an RFC call after X seconds if the RFC call hasn't returned within X seconds.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This quick test seems to work:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
REPORT  ztimeouttest.

Data:   results_received TYPE c,
  timeout type i,
  start type tims,
  stop type tims.


start = SY-UZEIT.
timeout = 5.

CLEAR: results_received.
call function 'RS_TREE_SLEEP'
  starting new task 'check'
  performing receive_result on end of task
  exporting
    TIME_BETWEEN_REFRESH = 50.

WAIT UNTIL results_received = 'X' UP TO timeout SECONDS.

stop =  SY-UZEIT.
IF sy-subrc = 8.    "timeout
  write:/ 'Timeout.  Started at ', start,  ' ended at ', stop.
endif.



FORM receive_result USING iv_taskname.
  RECEIVE RESULTS FROM FUNCTION 'RS_TREE_SLEEP'.



  results_received = 'X'.
endform.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Dec 2009 15:37:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/forcing-timeout-of-rfc-function-call/m-p/6456612#M1414902</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-23T15:37:57Z</dc:date>
    </item>
    <item>
      <title>Re: Forcing timeout of RFC function call</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/forcing-timeout-of-rfc-function-call/m-p/6456613#M1414903</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;in the weblog i´ve included it says:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Oh, another really nice feature is the TIMEOUT default is set to 60 (seconds) so you can really fine tune your connection settings to get the performance you want, I mean no sense in pulling a huge set of data over if your connection takes to long now is it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe you could have a look at code of RFC_VERIFY_DESTINATION fm and try to imitate the behaviour of parameter TIMEOUT for your fm.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Dec 2009 15:45:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/forcing-timeout-of-rfc-function-call/m-p/6456613#M1414903</guid>
      <dc:creator>former_member182371</dc:creator>
      <dc:date>2009-12-23T15:45:47Z</dc:date>
    </item>
    <item>
      <title>Re: Forcing timeout of RFC function call</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/forcing-timeout-of-rfc-function-call/m-p/6456614#M1414904</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Seems I was on the right track.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The timeout stuff is:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
..
    CALL FUNCTION 'RFC_GET_SYSTEM_INFO'
      DESTINATION 'NONE'
      STARTING NEW TASK destination
      PERFORMING return_form ON END OF TASK
..
..

WAIT UNTIL data_received = 'X' UP TO timeout SECONDS.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the reply though as it backs up what I'm doing.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Dec 2009 15:56:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/forcing-timeout-of-rfc-function-call/m-p/6456614#M1414904</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-23T15:56:44Z</dc:date>
    </item>
    <item>
      <title>Re: Forcing timeout of RFC function call</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/forcing-timeout-of-rfc-function-call/m-p/6456615#M1414905</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;have you checked this?:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_banking60/helpdata/en/22/0425e0488911d189490000e829fbbd/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_banking60/helpdata/en/22/0425e0488911d189490000e829fbbd/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_banking60/helpdata/en/22/0425e0488911d189490000e829fbbd/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_banking60/helpdata/en/22/0425e0488911d189490000e829fbbd/frameset.htm&lt;/A&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;Edited by: Pablo Casamayor on Dec 23, 2009 4:59 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Dec 2009 15:58:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/forcing-timeout-of-rfc-function-call/m-p/6456615#M1414905</guid>
      <dc:creator>former_member182371</dc:creator>
      <dc:date>2009-12-23T15:58:37Z</dc:date>
    </item>
  </channel>
</rss>

