Skip to Content
Author's profile photo Former Member

Waits in Batch Jobs – Implementation

Many times, a batch process will push large amounts of data into SAP, very quickly.  Commit processes can have queues.  Lock processes can have queues.  Where there are queues, they can get backed up (overloaded).  Your batch job may have steps that are dependent on each other.  They can then fail because the first process is still stuck in queue even though the step is finished.  How do you wait a bit before carrying out the next step?

This program will seem dumb, but if it works…  Well I leave it to you.

REPORT z_bc_wait.
* Number of seconds to wait
  p_sec LIKE sy-subrc.
*                    START-OF-SELECTION                                *
* Wait for the seconds specified in the initial screen

Set a variant for, say 60 seconds.

If you have a job with steps like:

Without Z_BC_WAIT.png

Suppose you are worried that 2 is not complete when 3 starts and dito 3 and 4, 5 and 6.

Change the job steps to:

With Z_BC_WAIT.png

I hope that you find this helpful!

Neal Wilhite

Assigned Tags

      1 Comment
      You must be Logged on to comment or reply to a post.
      Author's profile photo Dario del Rincon
      Dario del Rincon

      Please check that there's a standard program that can do the same: RSWAITSEC

      I hope this helps.