BASIS Program Custom development Mass upload

Mass Background Job Scheduling from Excel

Short answer: A custom program that schedules dozens of background jobs in one go from an Excel file after a go-live, a system copy or the opening of a new company code, with program, variant, step user, start time and period. Rows with the same job name are created as a multi-step job; program, variant and user are checked in advance, and no job is created in test mode.

Estimated effort
S · 3–5 working days
System
ECC and S/4HANA
Tables
5
Scope
Global
Built by
NeKuDos Teknoloji
Last updated

Why is the standard not enough?

SM36 defines jobs one by one, step by step on the screen; setting up hundreds of periodic jobs from a list takes hours and is prone to typos. After a system copy, BTCTRNS1/BTCTRNS2 only suspend and release existing jobs; they do not load a new job plan. This program loads the approved job plan list directly and keeps the result of each row in a log.

Who uses it? BASIS administrators, and project and support teams rebuilding the job schedule after a go-live or system copy.

Closest standard alternatives

  • SM36 Schedule Background Job. Defines jobs one by one on screen; no bulk scheduling from a file or pre-checks.
  • SM37 Job Selection Overview. Monitors and changes scheduled jobs; it does not load a new job plan.

Tables used

The tables the program reads and updates. ECC and S/4HANA differences are marked separately.

TableRoleAccessSystem
TBTCOBackground Job Status OverviewJob header; created through JOB_OPEN and JOB_CLOSEWriteECC + S/4
TBTCPBackground Job Step OverviewJob steps; added through JOB_SUBMITWriteECC + S/4
TRDIRABAP Program DirectoryCheck of program existence and typeReadECC + S/4
VARIDVariant DirectoryExistence check for the variantReadECC + S/4
USR02User Logon DataType and lock status of the step userReadECC + S/4

BAPIs and functions used

  • JOB_OPENOpen Background Job. Opens a new background job and returns the job count
  • JOB_SUBMITAdd Step to Background Job. Adds a step with program, variant and step user to the job
  • JOB_CLOSEClose and Release Background Job. Sets start time, period and target server, closes and releases the job
  • BP_JOB_READRead Background Job Data. Reads existing jobs with the same name
  • BP_JOB_DELETEDelete Background Job. Deletes the old scheduled job when the replace option is on

Selection screen parameters

ParameterDescriptionTypeReference fieldRequiredExample
P_FILEJob plan file (XLSX or CSV)Single value—YesC:\temp\is_plani.xlsx
P_TESTTest mode (check without creating jobs)Checkbox—NoX
P_RELEARelease jobs immediatelyCheckbox—NoX
P_REPLReplace scheduled jobs with the same nameCheckbox—No—
S_USTYPAllowed step user typesRange / multipleUSR02-USTYPNoB, S

Input file columns

The columns of the upload template and the SAP fields they are written to. Columns with an asterisk are mandatory.

#ColumnTarget fieldRequired
1Job nameTBTCO-JOBNAMEYes
2Job classTBTCO-JOBCLASSNo
3ProgramTBTCP-PROGNAMEYes
4VariantTBTCP-VARIANTNo
5Step userTBTCP-AUTHCKNAMYes
6Start dateTBTCO-SDLSTRTDTYes
7Start timeTBTCO-SDLSTRTTMYes
8Period (days)TBTCO-PRDDAYSNo
9Period (hours)TBTCO-PRDHOURSNo
10Period (months)TBTCO-PRDMONTHSNo
11Target serverTBTCO-EXECSERVERNo

Sample upload file

1Job name *Job classProgram *VariantStep user *Start date *Start time *Period (days)Period (hours)Period (months)Target server
2BASIS_IS_GECMISI_TEMIZLIKCRSBTCDEL230_GUNBATCH_BASIS11/18/202601:00:00100
3BASIS_SPOOL_TEMIZLIKCRSPO104114_GUNBATCH_BASIS11/18/202601:30:00100
4SD_FATURA_VADE_LISTESIBSDBILLDLTUM_ORGBATCH_SD11/18/202603:15:00040sapapp02
A view built with fictional sample data; not real system data.

Result list columns

#ColumnSource
1RowCalculated Row number in the file
2Job nameTBTCO-JOBNAME
3Job countTBTCO-JOBCOUNT
4ProgramTBTCP-PROGNAME
5VariantTBTCP-VARIANT
6Step userTBTCP-AUTHCKNAM
7Planned startTBTCO-SDLSTRTDT
8Job statusTBTCO-STATUS
9ResultCalculated Created / Replaced / Test / Skipped / Error
10MessageCalculated Check or job function message

Sample result list

RowJob nameJob countProgramVariantStep userPlanned startJob statusResultMessage
1BASIS_IS_GECMISI_TEMIZLIK01001500RSBTCDEL230_GUNBATCH_BASIS11/18/2026SCreatedDaily job released
2BASIS_SPOOL_TEMIZLIK01001501RSPO104114_GUNBATCH_BASIS11/18/2026SReplacedOld job with the same name deleted, new one created
3SD_FATURA_VADE_LISTESISDBILLDLTUM_ORGBATCH_SD11/18/2026ErrorVariant TUM_ORG not found for the program
A view built with fictional sample data; not real system data.

How does the program work?

  1. The file is read; consecutive rows with the same job name are grouped as steps of one job.
  2. Checks: the program exists in TRDIR and is executable (SUBC = 1); the variant exists in VARID; the step user exists in USR02, is not locked and has an allowed type (default: system or service user); the start time is not in the past.
  3. Depending on the selection, scheduled (P) or released (S) jobs with the same name are found with BP_JOB_READ and deleted with BP_JOB_DELETE if the replace option is on; otherwise the row is skipped.
  4. In test mode only the check results are listed. In a real run the job is opened with JOB_OPEN and each step is added with JOB_SUBMIT with program, variant and step user.
  5. JOB_CLOSE sets the start date/time, the period (minutes, hours, days, weeks, months) and the target server; depending on the selection the job is released immediately or left as scheduled.
  6. The result is shown per row in ALV: job count, status and message; double-clicking the job name opens SM37.

Performance notes

Job creation is fast; a few hundred jobs are set up in under a minute. Read the checks once for the distinct programs, variants and users in the file. On a production system, always use test mode and an approved job plan before the real run.

Features

  • Test mode (check without posting) Test mode runs program, variant, user and time checks without creating jobs.
  • ALV list (sort, filter, subtotals)
  • Line-by-line result and error log
  • Download failed lines as a separate file Failed rows can be downloaded in the same template, corrected and uploaded again.
  • Double-click drill-down to the document Double-clicking the job name opens SM37.

Authorization objects

  • S_BTCH_JOBCreate and release jobs in the job group (RELE)
  • S_BTCH_NAMRun a step under another user name
  • S_BTCH_ADMDelete and change jobs of other users

Frequently asked questions

Can I export the current job plan and load it into another system?

Yes, an export option in the same template can be added: released periodic jobs in the source system are written to a file, edited and loaded in the target system. This takes about one extra day.

Can event-triggered jobs be scheduled as well?

The basic template covers time-based starts. By adding event ID and parameter columns to the file, event-triggered jobs can also be scheduled with JOB_CLOSE; predecessor job chains can be added the same way.

Can spool recipients or print parameters be provided?

Yes. Columns for printer, print immediately and spool list recipient per step can be added; JOB_SUBMIT supports these print parameters.

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 Report Custom ALV report

Cancelled and Long-Running Background Jobs Report

A custom ALV report that lists background jobs that were cancelled, are still running or finished far above their usual runtime, with the step …

TBTCO · TBTCP · TRDIRT

Let us build this program 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: Mass Background Job Scheduling from Excel