How to make an abap program pause?

2019-04-08 08:04发布

For testing purposes I need my ABAP program to wait for few seconds. How can this be done?

标签: sap abap
3条回答
淡お忘
2楼-- · 2019-04-08 08:39

Do you really need it to pause? You could trace through it by entering /h into the transaction field before you execute the program or by setting a breakpoint in the code.

查看更多
beautiful°
3楼-- · 2019-04-08 08:40

ABAP WAIT UP TO SAP Documentation

WAIT statement has an implicit COMMIT which is something that should be avoided.

查看更多
forever°为你锁心
4楼-- · 2019-04-08 09:05
WAIT UP TO 42 SECONDS.
  • Does a roll-out and releases the work process to the listener
  • Does an implicit Database commit

Use when CPU processes are at a premium and when the implicit commit will not corrupt your data or cause a short dump because of an open database cursor.

    CALL FUNCTION 'ENQUE_SLEEP'
      EXPORTING
        seconds              = 42.
  • Does not release the work process
  • Does not cause an implicit Database commit

Use when you cannot afford an implicit commit, and the system can handle the work process(es) being tied up for the duration of the SLEEP command.

查看更多
登录 后发表回答