How to pause the ABAP program execution for given number of seconds
Study the following self-explanatory code to pause the ABAP program execution for a given number of seconds:
PARAMETERS: P_TIME TYPE I.
WRITE: / 'DELAY IN SECONDS:', P_TIME.
* Get the Run time.
WRITE: / 'START TIME:', SY-UZEIT.
* Pause execution for P_TIME seconds.
CALL FUNCTION 'RZL_SLEEP'
SECONDS = P_TIME
ARGUMENT_ERROR = 1
OTHERS = 2.
IF SY-SUBRC <> 0.
WRITE:/ 'ERROR WITH SLEEP
WRITE: / 'END TIME:', SY-UZEIT.
This was first published in April 2005
Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.