<?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: wait up to n seconds in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/wait-up-to-n-seconds/m-p/2695191#M623753</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is no operating system sleep involved.&lt;/P&gt;&lt;P&gt;The WP is available to perform other work after roll-out of the user's context.&lt;/P&gt;&lt;P&gt;See note 1063061.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If it's a batch job, it doesn't roll-out as there is no GUI Time in batch jobs.&lt;/P&gt;&lt;P&gt;If it's a batch job with RFC, it just sits and waits for the RFC (stopped: RFC).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Darryl&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 07 Jan 2014 13:53:34 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2014-01-07T13:53:34Z</dc:date>
    <item>
      <title>wait up to n seconds</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/wait-up-to-n-seconds/m-p/2695186#M623748</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi folks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;question regarding the abap wait-statement. If I say WAIT UP TO 5 SECONDS, the process is not occupied and then magically re-awakes after the specified 5 seconds.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;During this time - do I have some chance to find the waiting program? Background is that I had an endless loop which I could not stop since it appeared for about half a second every 5 seconds in SM50, which was too short for me to stop or debug it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any hints appreciated. Cheers, Nils&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Aug 2007 11:36:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/wait-up-to-n-seconds/m-p/2695186#M623748</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-14T11:36:25Z</dc:date>
    </item>
    <item>
      <title>Re: wait up to n seconds</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/wait-up-to-n-seconds/m-p/2695187#M623749</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;In SM50 if you look at the status then you might get the Waiting program&lt;/P&gt;&lt;P&gt;&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; Sudheer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Aug 2007 11:45:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/wait-up-to-n-seconds/m-p/2695187#M623749</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-14T11:45:37Z</dc:date>
    </item>
    <item>
      <title>Re: wait up to n seconds</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/wait-up-to-n-seconds/m-p/2695188#M623750</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nope, no entry in SM50 at all. As soon as the wait is over, process shows up in SM50.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The idea of the wait is to not block a process, so this is fine with me. I just need some other way to find out that someone is waiting somewhere.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Nils&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Aug 2007 11:57:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/wait-up-to-n-seconds/m-p/2695188#M623750</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-14T11:57:06Z</dc:date>
    </item>
    <item>
      <title>Re: wait up to n seconds</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/wait-up-to-n-seconds/m-p/2695189#M623751</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For anyone else finding this thread, you can't see the waiting program because it is rolled out of the work process until the specified time has elapsed.&lt;/P&gt;&lt;P&gt;The "WAIT UP TO n SECONDS." statement causes the time spent waiting to be accumulated on the "ROLL WAIT TIME" statistic on the records shown in STAD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Happy new year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Darryl&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Jan 2014 12:15:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/wait-up-to-n-seconds/m-p/2695189#M623751</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-01-03T12:15:11Z</dc:date>
    </item>
    <item>
      <title>Re: wait up to n seconds</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/wait-up-to-n-seconds/m-p/2695190#M623752</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nils,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WAIT interrrupts the process and issues an operating system SLEEP which makes the process invisible. If it's a batch job, you can cancel it. If it's online, use SM04, soubleclick the user and delete the user session.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And: Be aware that a SLEEP closes database cursors and works as an implicit commit. Any INSERTs,&amp;nbsp; UPDATEs &lt;SPAN class="L0S31"&gt;and DELETEs are commited to the database and can not be rolled back.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S31"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S31"&gt;Regards&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S31"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S31"&gt;Clemens.&lt;BR /&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Jan 2014 14:14:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/wait-up-to-n-seconds/m-p/2695190#M623752</guid>
      <dc:creator>Clemenss</dc:creator>
      <dc:date>2014-01-03T14:14:55Z</dc:date>
    </item>
    <item>
      <title>Re: wait up to n seconds</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/wait-up-to-n-seconds/m-p/2695191#M623753</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is no operating system sleep involved.&lt;/P&gt;&lt;P&gt;The WP is available to perform other work after roll-out of the user's context.&lt;/P&gt;&lt;P&gt;See note 1063061.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If it's a batch job, it doesn't roll-out as there is no GUI Time in batch jobs.&lt;/P&gt;&lt;P&gt;If it's a batch job with RFC, it just sits and waits for the RFC (stopped: RFC).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Darryl&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Jan 2014 13:53:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/wait-up-to-n-seconds/m-p/2695191#M623753</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-01-07T13:53:34Z</dc:date>
    </item>
    <item>
      <title>Re: wait up to n seconds</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/wait-up-to-n-seconds/m-p/2695192#M623754</link>
      <description>&lt;P&gt;There is an elegant solution.&lt;/P&gt;&lt;P&gt;This code simulates a wait up but is visible in SM50. Very simple and efficient.&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/1761522-r1.jpg" /&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;  method set_waiting.
    data: l_1 type timestampl,
          l_2 type timestampl,
          l_3 type timestampl.

    data: l_v1 type p decimals 3,
          l_v2 type p decimals 3.
    get time stamp field l_1.
    do.
      l_v1 = l_v2 / 5.
      get time stamp field l_2.
      l_3 = l_2 - l_1.
      if l_3 &amp;gt; i_seconds.
        exit.
      endif.
    enddo.
    write l_3.
  endmethod.&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 10 Jan 2020 01:17:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/wait-up-to-n-seconds/m-p/2695192#M623754</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2020-01-10T01:17:21Z</dc:date>
    </item>
  </channel>
</rss>

