Skip to Content
author's profile photo Former Member
Former Member

FM RZL_SLEEP

I have a program which executes a functionality in a loop( repeatedly). After each loop I want the program to wait for some time( say 300 secs ). I found out two function modules to be used to make the program wait.

1) RZL_SLEEP

2) AM_PING_AND_WAIT

Is there any advantage in using one over the other. I could see that RZL_SLEEP calls some C functions. Any info on these funstion modules especially RZ_SLEEP would be great.What I am lookin at is how exactly RZL_SLEEP works.

Thanks & Regards

Jijilal

Add comment
10|10000 characters needed characters exceeded

1 Answer

  • Posted on Feb 05, 2004 at 04:19 PM

    I have used RZL_SLEEP in the past and it does accomplish what you are looking for. However there are two main disadvantages to it. 1. You can only set a maximum of 5 second increments. So you are probably calling multiple sleeps within a loop. 2. You still hold the dialog work process while you sleep. To me this is the most concerning. You could be blocking a valuable dialog process for quite some time.

    On the other hand, you probably want to look at the ABAP keyword: WAIT. You can do wait up to x seconds. This keyword was really intended for use in Asynchronous RFC calls but works fine in other situations as well. The big advantage it has is that it release the dialog work process while the program is waiting.

    Add comment
    10|10000 characters needed characters exceeded