<?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: timeout for startrfc program? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/timeout-for-startrfc-program/m-p/835906#M43843</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In short, I don't believe so.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you look at the C code for startrfc (...\sapgui\rfcsdk\text directory), you can see that it uses RFC function RfcCallReceive.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RfcCallReceive is a blocking call that has no option for timeout.  If this is not satisfactory, you could change the code to call functions RfcCall, RfcListen and RfcReceive instead (my C is rusty):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  rc = RfcCall(...);

  if rc == RFC_OK
  {
    do
    {
      // Wait for timeout or call is finished
    }
    while TimedOut || ( rc = RfcListen(...) ) == RFC_RETRY );
  }

  if !TimedOut &amp;amp;&amp;amp; ( rc == RFC_OK )
  {
    rc = RfcReceive(...);
  }
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is then your responsibility to set the internal timeout as you see fit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Scott&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 12 Oct 2004 14:23:34 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2004-10-12T14:23:34Z</dc:date>
    <item>
      <title>timeout for startrfc program?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/timeout-for-startrfc-program/m-p/835905#M43842</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a unix script, which calls a function module via the startrfc program. Sometimes the program does not terminate or at least it runs very long due to problem within the SAP system. Is there a option to start the startrfc program with a time threshold, so that it terminates, if it does not get result after a given time? (i.e. is there a "rdisp/max_wprun_time parameter" on OS level).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks in advance for your comments&lt;/P&gt;&lt;P&gt;Richard&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Oct 2004 13:55:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/timeout-for-startrfc-program/m-p/835905#M43842</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2004-10-12T13:55:34Z</dc:date>
    </item>
    <item>
      <title>Re: timeout for startrfc program?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/timeout-for-startrfc-program/m-p/835906#M43843</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In short, I don't believe so.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you look at the C code for startrfc (...\sapgui\rfcsdk\text directory), you can see that it uses RFC function RfcCallReceive.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RfcCallReceive is a blocking call that has no option for timeout.  If this is not satisfactory, you could change the code to call functions RfcCall, RfcListen and RfcReceive instead (my C is rusty):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  rc = RfcCall(...);

  if rc == RFC_OK
  {
    do
    {
      // Wait for timeout or call is finished
    }
    while TimedOut || ( rc = RfcListen(...) ) == RFC_RETRY );
  }

  if !TimedOut &amp;amp;&amp;amp; ( rc == RFC_OK )
  {
    rc = RfcReceive(...);
  }
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is then your responsibility to set the internal timeout as you see fit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Scott&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Oct 2004 14:23:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/timeout-for-startrfc-program/m-p/835906#M43843</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2004-10-12T14:23:34Z</dc:date>
    </item>
  </channel>
</rss>

