BASIS Report Custom development ALV report

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

  • SM37 Job Selection Overview. Lists jobs by status and date; no comparison with the historical average, start delay or count of consecutive cancellations.
  • ST03N Workload and Performance Statistics. Gives background workload as aggregated statistics; it does not produce a findings list per job.

Tables used

The tables the report reads and their join fields. ECC and S/4HANA differences are marked separately.

TableRoleJoinSystem
TBTCOBackground Job Status OverviewJob header: status, planned and actual start, end, server (driving table)—ECC + S/4
TBTCPBackground Job Step OverviewJob steps: program, variant and step userTBTCP-JOBNAME = TBTCO-JOBNAME AND TBTCP-JOBCOUNT = TBTCO-JOBCOUNTECC + S/4
TRDIRTProgram Title TextsTitle of the step programTRDIRT-NAME = TBTCP-PROGNAME AND TRDIRT-SPRSL = SY-LANGUECC + S/4

Selection screen parameters

ParameterDescriptionTypeReference fieldRequiredExample
S_JOBNMJob nameRange / multipleTBTCO-JOBNAMENoFI_*
S_SDLUSScheduling userRange / multipleTBTCO-SDLUNAMENoBATCH_FI
S_STRTDStart dateRange / multipleTBTCO-STRTDATEYes16.11.2026 – 17.11.2026
S_PROGStep programRange / multipleTBTCP-PROGNAMENo—
P_DEVPCTRuntime deviation threshold (%)Single value—No50
P_REFDAYReference period (days)Single value—No30
P_ACTMINLong-running active job threshold (min)Single value—No120
P_CANCShow cancelled jobsCheckbox—NoX

Output columns

#ColumnSource
1Job nameTBTCO-JOBNAME
2StatusTBTCO-STATUS
3Scheduled byTBTCO-SDLUNAME
4Step programTBTCP-PROGNAME
5Program titleTRDIRT-TEXT
6VariantTBTCP-VARIANT
7Step userTBTCP-AUTHCKNAM
8Start dateTBTCO-STRTDATE
9Start timeTBTCO-STRTTIME
10Runtime (min)Calculated End − start (active job: now − start)
11Average runtime (min)Calculated Average of finished runs in the last N days
12Deviation %Calculated (Runtime − average) ÷ average × 100
13Start delay (min)Calculated Actual start − TBTCO-SDLSTRTDT/SDLSTRTTM
14Consecutive cancellationsCalculated Number of consecutive cancelled recent runs of a periodic job
15ServerTBTCO-REAXSERVER

Sample output

Job nameStatusScheduled byStep programProgram titleVariantStep userStart dateStart timeRuntime (min)Average runtime (min)Deviation %Start delay (min)Consecutive cancellationsServer
FI_PAYMENT_PROPOSAL_DAILYABATCH_FISAPF110SPayment program (background)DAILY_1000BATCH_FI11/17/202602:00:0536-5002sapapp01
MRP_NIGHTLY_PLANT1000FBATCH_PPRMMRP000MRP total planningPLANT_1000BATCH_PP11/17/202601:00:022149512500sapapp02
IDOC_INBOUND_ORDERSRBATCH_EDIRBDAPP01Process inbound IDocsORDERS_INBATCH_EDI11/17/202605:30:00148121,133300sapapp01
SD_BILLING_DUE_LISTFBATCH_SDSDBILLDLBilling due listALL_ORGSBATCH_SD11/17/202603:15:0041388750sapapp02
A view built with fictional sample data; not real system data.

How does the report work?

  1. 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.
  2. 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).
  3. 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.
  4. 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.
  5. 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.
  6. 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 Package Custom

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 …

5 components · v1.0

Related reports

BASIS Program Custom Background program

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 …

NRIV · TNRO

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.

Related report: Cancelled and Long-Running Background Jobs Report