Section 5 of 10

Background Jobs

Why background processing exists, defining jobs and variants, monitoring, and why a completed job is not necessarily a successful one.

Open contents

Background jobs run without interactive input: overnight batches, scheduled interfaces, long aggregations.

Why they are needed

  • Dialog processing has a runtime limit
  • Heavy processing is better run outside business hours
  • Recurring work runs unattended
  • Execution history and logs are retained

Defining a job

Job components
ElementContent
Job nameThe identifier; adopt a naming convention
Job classA, B or C โ€” priority
StepsPrograms or external commands to run
VariantSelection values passed to the program
Start conditionWhen it runs
Target serverWhich instance executes it

Start conditions

ConditionBehaviourUse
Date and timeAt a scheduled momentNightly routines
ImmediateRight awayAd hoc long processing
After jobWhen a predecessor finishesEnforcing sequence
EventWhen an event is raisedTriggered externally
Operation modeOn a mode switchTied to operating windows

Variants

Monitoring

Job statuses
StatusMeaning
ScheduledDefined but with no start condition
ReleasedReady to run
ReadyAbout to start
ActiveRunning
FinishedCompleted normally
CancelledTerminated; check the log

When a job does not run

CauseHow to check
No free background processesSM50 for BTC availability
Job not releasedSM37 status
Insufficient authorisationThe job log in SM37
The run user is lockedSU01
Target server downSM51
Operation mode gives no BTC processesRZ04

๐Ÿ“– Unfamiliar term? Look it up in the SAP glossary.

Check your understanding

Test what you just read.

Quiz 1

Which transaction code is used to define (schedule) background jobs?

Quiz 2

Which transaction code is used to monitor and manage background jobs?

Quiz 3

What is the status when a background job terminates abnormally?

Quiz 4

Background jobs can be configured to start after another job completes.

Quiz 5

Which job class has the highest priority?

Quiz 6

A Periodic Job is automatically deleted after running once.