Cancelled and Long-Running Background Jobs Report
Short answer: A custom ALV report that lists background jobs that were cancelled, are still running or finished far above their usual runtime, with the step program, variant, step user and a comparison with the average runtime of recent days. When night jobs go wrong, the BASIS team sees in one list in the morning what deviated and by how much.
- Estimated effort
- S · 3–4 working days
- System
- ECC and S/4HANA
- Tables
- 3
- Scope
- Global
- Built by
- NeKuDos Teknoloji
- Last updated
Why is the standard not enough?
SM37 lists jobs by status and date range and shows the duration, but it does not compare today's runtime of a job with its own historical average, does not calculate the delay against the planned start and does not show the step program and variant in the main list. How many times in a row a periodic job was cancelled is not visible either. The custom report does these comparisons and distributes the result in a morning email.
Who uses it? BASIS administrators, application support teams and business units that own critical night jobs.
Closest standard alternatives
Tables used
The tables the report reads and their join fields. ECC and S/4HANA differences are marked separately.
| Table | Role | Join | System |
|---|---|---|---|
| TBTCOBackground Job Status Overview | Job header: status, planned and actual start, end, server (driving table) | — | ECC + S/4 |
| TBTCPBackground Job Step Overview | Job steps: program, variant and step user | TBTCP-JOBNAME = TBTCO-JOBNAME AND TBTCP-JOBCOUNT = TBTCO-JOBCOUNT | ECC + S/4 |
| TRDIRTProgram Title Texts | Title of the step program | TRDIRT-NAME = TBTCP-PROGNAME AND TRDIRT-SPRSL = SY-LANGU | ECC + S/4 |
Selection screen parameters
| Parameter | Description | Type | Reference field | Required | Example |
|---|---|---|---|---|---|
| S_JOBNM | Job name | Range / multiple | TBTCO-JOBNAME | No | FI_* |
| S_SDLUS | Scheduling user | Range / multiple | TBTCO-SDLUNAME | No | BATCH_FI |
| S_STRTD | Start date | Range / multiple | TBTCO-STRTDATE | Yes | 16.11.2026 – 17.11.2026 |
| S_PROG | Step program | Range / multiple | TBTCP-PROGNAME | No | — |
| P_DEVPCT | Runtime deviation threshold (%) | Single value | — | No | 50 |
| P_REFDAY | Reference period (days) | Single value | — | No | 30 |
| P_ACTMIN | Long-running active job threshold (min) | Single value | — | No | 120 |
| P_CANC | Show cancelled jobs | Checkbox | — | No | X |
Output columns
| # | Column | Source |
|---|---|---|
| 1 | Job name | TBTCO-JOBNAME |
| 2 | Status | TBTCO-STATUS |
| 3 | Scheduled by | TBTCO-SDLUNAME |
| 4 | Step program | TBTCP-PROGNAME |
| 5 | Program title | TRDIRT-TEXT |
| 6 | Variant | TBTCP-VARIANT |
| 7 | Step user | TBTCP-AUTHCKNAM |
| 8 | Start date | TBTCO-STRTDATE |
| 9 | Start time | TBTCO-STRTTIME |
| 10 | Runtime (min) | Calculated End − start (active job: now − start) |
| 11 | Average runtime (min) | Calculated Average of finished runs in the last N days |
| 12 | Deviation % | Calculated (Runtime − average) ÷ average × 100 |
| 13 | Start delay (min) | Calculated Actual start − TBTCO-SDLSTRTDT/SDLSTRTTM |
| 14 | Consecutive cancellations | Calculated Number of consecutive cancelled recent runs of a periodic job |
| 15 | Server | TBTCO-REAXSERVER |
Sample output
| Job name | Status | Scheduled by | Step program | Program title | Variant | Step user | Start date | Start time | Runtime (min) | Average runtime (min) | Deviation % | Start delay (min) | Consecutive cancellations | Server |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FI_PAYMENT_PROPOSAL_DAILY | A | BATCH_FI | SAPF110S | Payment program (background) | DAILY_1000 | BATCH_FI | 11/17/2026 | 02:00:05 | 3 | 6 | -50 | 0 | 2 | sapapp01 |
| MRP_NIGHTLY_PLANT1000 | F | BATCH_PP | RMMRP000 | MRP total planning | PLANT_1000 | BATCH_PP | 11/17/2026 | 01:00:02 | 214 | 95 | 125 | 0 | 0 | sapapp02 |
| IDOC_INBOUND_ORDERS | R | BATCH_EDI | RBDAPP01 | Process inbound IDocs | ORDERS_IN | BATCH_EDI | 11/17/2026 | 05:30:00 | 148 | 12 | 1,133 | 30 | 0 | sapapp01 |
| SD_BILLING_DUE_LIST | F | BATCH_SD | SDBILLDL | Billing due list | ALL_ORGS | BATCH_SD | 11/17/2026 | 03:15:00 | 41 | 38 | 8 | 75 | 0 | sapapp02 |
How does the report work?
- Jobs that started within the selected date range or are still running are read from TBTCO: job name, job count, status (STATUS: A cancelled, R active, F finished), scheduling user, planned and actual start and end.
- Runtime (min) = end date/time − start date/time; for active jobs the current time is used instead of the end. Start delay = actual start − planned start (SDLSTRTDT/SDLSTRTTM).
- Reference runtime: the average of the successfully finished (F) runs of the same job name in the last N days. Deviation % = (runtime − average) ÷ average × 100.
- Jobs included: cancelled ones; those above the deviation threshold; those active for longer than the threshold. For periodic jobs, the number of consecutive cancelled runs is counted.
- The step program, variant and step user (AUTHCKNAM) are added from TBTCP and the program title from TRDIRT. For multi-step jobs, the first cancelled step is shown.
- The result is sorted by finding in ALV; double-clicking the job name opens the job log in SM37.
Performance notes
Narrow TBTCO by start date and status; calculate the reference average with a single GROUP BY query. If job history is kept for years, limit the reference period to 30 days. Run the report in the background every morning after the night jobs have finished.
Features
- ALV list (sort, filter, subtotals)
- User-specific layout variants
- Double-click drill-down to the document Double-clicking the job name opens the job log in SM37.
- Export to Excel
- Runs as a background job
- Send the result by email Each morning, job owners can receive the findings for their own jobs.
Authorization objects
- S_BTCH_ADMDisplay background jobs of all users (BASIS administrator)
- S_BTCH_JOBDisplay other users' jobs by job group
Frequently asked questions
Which jobs count as "long-running"?
There are two criteria: a finished job whose runtime exceeds its own average of the last N days by more than the threshold percentage, or a job that has been active longer than the threshold in minutes. Both thresholds are set on the selection screen.
Does the error message from the job log appear in the list?
In the basic version you jump from the job name to the SM37 job log for the error. If needed, the last error line of the log can also be read and added as a separate column; this takes about one extra day.
Does the report work on S/4HANA?
Yes. TBTCO, TBTCP and TRDIRT keep the same structure in S/4HANA. Jobs scheduled through Application Jobs (Fiori) are stored in the same tables, so they are included.
Packages that include this solution
Basis Daily System Check Pack
A five-component pack that turns the Basis team's morning check into one list: cancelled and long-running background jobs, scheduled jobs running …
Related reports
Number Range Exhaustion Alert Program (Email)
A custom background program that checks the utilization of document, material and other number ranges every night and reports by email the intervals …
Let us build this report for your system
Briefly describe your system and expectations. We will clarify the scope and come back with an effort and price quote.