How to pause the abap program?

For testing purposes, I need my ABAP program to wait a few seconds. How can I do that?

+6
source share
3 answers

2 solutions:

1) Either use WAIT UP TO ... SECONDS .

WAIT UP TO 42 SECONDS.
WAIT UP TO '0.5' SECONDS.
  • Does the deployment and release workflow for the listener
  • Implicit database commit

Use it when CPU processes are more expensive and when implicit commit will not damage your data or cause a short dump due to an open database cursor.

2) Or use the function module ENQUE_SLEEP:

    CALL FUNCTION 'ENQUE_SLEEP'
      EXPORTING
        seconds = 42.
  • Doesn't let go of the workflow
  • Doesn't cause implicit database commit

, , SLEEP.

+19

ABAP SAP-

WAIT COMMIT, .

+3

Do you really need to pause? You can trace it by entering / h in the transaction field before executing the program, or by setting a breakpoint in the code.

+2
source

All Articles