Showing results for 
Search instead for 
Did you mean: 


Former Member
0 Kudos

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.



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


Accepted Solutions (0)

Answers (1)

Answers (1)

Developer Advocate
Developer Advocate
0 Kudos

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.