The SAP Housekeeping Job Scheduler maintains data health across all four business processes (P2P, PP, MRP, OTC) by scheduling periodic background jobs in SAP and monitoring critical system areas. It runs locally via JCo RFC — no SSH into SAP needed.
Run ./jobsched.sh status to see live values. Snapshot as of initial setup:
extend-ml before January 2027.
| Property | Value |
|---|---|
| ABAP Program | RMMMPERI (MM Period Shift) |
| Variant | Z_AUTO_1710 |
| Schedule | Monthly — 1st of each month at 00:30 |
| Purpose | Opens the next MM posting period for company code 1710 |
| SAP Tcode | MMPV |
| SAP Table | MARV (BUKRS, LFGJA, LFMON) |
Variant parameters:
| Parameter | Value | Description |
|---|---|---|
I_VBUKR | 1710 | Company code |
I_ACTDAT | X | Use actual date to determine period |
I_XCOMP | X | Complete closing (full period shift) |
How jobs are created and scheduled via JCo RFC:
RS_CREATE_VARIANT cannot be called remotely, but
RS_CREATE_VARIANT_RFC can. This is the RFC-enabled version that allows
creating report variants (selection screen values) from outside SAP.
| BAPI | Purpose | Key Parameters |
|---|---|---|
RS_CREATE_VARIANT_RFC | Create report variant | CURR_REPORT, CURR_VARIANT, VARI_CONTENTS |
BAPI_XBP_JOB_OPEN | Create background job | JOBNAME → returns JOBCOUNT |
BAPI_XBP_JOB_ADD_ABAP_STEP | Add program step | ABAP_PROGRAM_NAME, ABAP_VARIANT_NAME |
BAPI_XBP_JOB_CLOSE | Release/schedule job | JOBNAME, JOBCOUNT |
BAPI_XBP_JOB_HEADER_MODIFY | Set periodic scheduling | JOB_HEADER.PERIODIC, PRDMONTHS, SDLSTRTDT |
BAPI_XBP_JOB_DELETE | Delete a job | JOBNAME, JOBCOUNT |
BAPI_XBP_JOB_START_IMMEDIATELY | Run job now | JOBNAME, JOBCOUNT |
| Table | Content | Key Fields |
|---|---|---|
TBTCO | Job catalog | JOBNAME, JOBCOUNT, STATUS, PERIODIC, SDLDATE |
TBTCP | Job steps | JOBNAME, JOBCOUNT, PROGNAME, VARIANT |
VARID | Variant catalog | REPORT, VARIANT, ENAME, EDAT |
VARIT | Variant descriptions | REPORT, VARIANT, LANGU, VTEXT |
MARV | MM period control | BUKRS, LFGJA (year), LFMON (period) |
T001B | FI posting periods | BUKRS, account type, from/to period |
CKMLPP | ML period data | KALNR, BDATJ, POPER |
CKMLCR | ML currency data | KALNR, BDATJ, POPER, CURTP |
NRIV | Number ranges | OBJECT, NRRANGENR, FROMNUMBER, TONUMBER, NRLEVEL |
| Code | Meaning | Icon |
|---|---|---|
S | Scheduled (waiting for start time) | ⏰ |
R | Active (currently running) | ▶ |
F | Finished successfully | ✓ |
A | Aborted (failed) | ✗ |
P | Planned (not yet released) | • |
Controls which period goods movements post into. Must be current or ahead of calendar month.
| Check | Condition | Error if Failed |
|---|---|---|
| Period is current | LFGJA/LFMON >= current year/month | M7 059 — posting period not open |
Automated: Job Z_MM_PERIOD_OPEN_1710 runs RMMMPERI monthly.
Controls which fiscal periods accept accounting documents (ACDOCA).
| Current Config | Status |
|---|---|
| Open from 2000/001 to 2030/012 (all account types) | No maintenance until 2030 |
Every material with ML valuation needs period rows. Missing rows cause production confirmation to fail.
| Table | Rows Required | Per Material Per Month |
|---|---|---|
CKMLPP | 1 row | KALNR + BDATJ + POPER |
CKMLCR | 2 rows | CURTP 10 (company) + CURTP 30 (group) |
extend-ml command generates a Python/hdbcli script that inserts
rows directly via HANA SQL. Run annually before the new year begins.
Number ranges for orders, documents, and planned orders. Currently all below 1% utilization.
| Object | Range | Description | Max |
|---|---|---|---|
AUFTRAG | 01 | Production / internal orders | 1,999,999 |
MATBELEG | 01 | Material documents (01xx) | 199,999,999 |
MATBELEG | 02 | Material documents (49xx) | 4,999,999,999 |
RV_BELEG | 01 | Sales documents | 4,999,999 |
PLAF | 04 | Planned orders | 4,999,999,999 |
Which health areas affect which business processes:
| Health Area | P2P | PP | MRP | OTC |
|---|---|---|---|---|
| MM Period | GR (101), IR | GI (261), GR (101) | - | PGI (601) |
| ML Periods | - | Confirm (C+/073) | - | - |
| FI Periods | Invoice posting | ACDOCA entries | - | Billing |
| Number Ranges | PO numbers | Order numbers | Planned orders | Sales orders |
Everything runs from the local Mac — no SSH into SAP servers. Client 100 for all operations.
BAPIs and RFC function modules via SAP JCo 3.
| Host | sapidess4.fivetran-internal-sales.com |
| SYSNR | 03 (port 3303) |
| Client | 100 |
| User | IDES |
| Password | (see vault) |
| Language | EN |
Required: ../SAPjco/sapjco3.jar + libsapjco3.dylib
Direct SQL via SSH tunnel (tunnel only, no server login).
| Tunnel | localhost:30015 |
| Database | FIV |
| User | SAPHANADB |
| Password | (see vault) |
ssh -f -N -L 30015:127.0.0.1:30015 root@sapidess4
Python: pip3 install hdbcli
| Command | Description |
|---|---|
setup | Create variants + schedule all periodic jobs |
status | Health dashboard: MM, FI, ML periods + number ranges |
list | List all Z_* maintenance jobs and variants |
run-now <job> | Run a specific job immediately |
delete-jobs | Remove all Z_* maintenance jobs |
extend-ml | Generate ML period extension script for next year |
Options: --verbose, --dry-run
# Compile
./compile.sh
# First time: create variants + schedule all periodic jobs
./jobsched.sh setup --verbose
# Health check dashboard
./jobsched.sh status
# List all scheduled maintenance jobs
./jobsched.sh list
# Run MM period opening immediately
./jobsched.sh run-now Z_MM_PERIOD_OPEN_1710
# Preview what delete would do
./jobsched.sh delete-jobs --dry-run
# Show ML period extension script for 2027
./jobsched.sh extend-ml
Z_MM_PERIOD_OPEN_1710. Verify with ./jobsched.sh status.
./jobsched.sh status to verify all ranges are below 75% utilization.
./jobsched.sh extend-ml and execute the generated Python script via hdbcli. Must complete before January 1st.
./jobsched.sh list to confirm periodic jobs are still active after SAP system restarts.
| Error | Fix |
|---|---|
M7 059 — Posting period not open |
Run ./jobsched.sh run-now Z_MM_PERIOD_OPEN_1710 or setup |
C+/073 — ML period missing |
Run ./jobsched.sh extend-ml and execute the Python script |
| Variant does not exist | Run ./jobsched.sh setup to recreate variants via RS_CREATE_VARIANT_RFC |
| Job status = A (aborted) | Check SM37 job log in SAP GUI; variant parameters may be incorrect |
| Number range exhausted | Extend range via tcode SNRO (very rare — ranges are below 1% used) |
RS_CREATE_VARIANT not remote |
Use RS_CREATE_VARIANT_RFC — the RFC-enabled version |
| Job not running after SAP restart | Run ./jobsched.sh list — if missing, run setup again |
HANA column-store tables use a delta store for fast writes. Over time, unmerged delta rows degrade read performance, especially for catalog queries used by the HANA Web IDE and ABAP dictionary lookups.
| Property | Value |
|---|---|
| Server | sapidess4 |
| Schedule | Every Sunday at 02:00 |
| Script | /usr/local/bin/hana_delta_merge.sh |
| Log | /var/log/hana_delta_merge.log |
| Mechanism | cron (root) |
| Credentials | hdbuserstore key DELTAMERGE (fivadm) |
| Tenant | FIV (port 30015) |
| Threshold | Tables with > 10,000 rows in delta store |
SYS.M_CS_TABLES for all tables with RAW_RECORD_COUNT_IN_DELTA > 10000MERGE DELTA OF "SCHEMA"."TABLE" for each table (quoted names handle / characters)ssh root@sapidess4 "/usr/local/bin/hana_delta_merge.sh"
ssh root@sapidess4 "cat /var/log/hana_delta_merge.log"HANA auto-merge uses conservative thresholds and can fall behind on IDES systems
where bulk loads (data generators, imports) create large delta stores. In April 2026, tables like
STERM_HEAD had 1.6M unmerged rows (last merge: June 2025), causing HANA Web IDE catalog
queries to take 16-17 seconds. After forced merge, performance returned to normal.