At 1:30 every night, the SAP system at an electrical parts distributor in Georgia starts the job that turns the day's deliveries into invoices. On a Monday night, there are 4,180 deliveries waiting. The sales team had shipped a large promotion that day, almost twice the usual volume.
At 2:14, the job stops. It has created 1,300 invoices. The other 2,880 deliveries, worth $410,000, are not invoiced. SAP records a short dump, an error report written when a program crashes, with the name TSV_TNEW_PAGE_ALLOC_FAILED. In plain words, the job ran out of memory. The job overview marks it as cancelled.
Nobody sees it. At 3:00, the next job in the chain sends invoices to customers by email and electronic data interchange, as it does every night. It sends the 1,300 invoices that exist and has no idea that 2,880 are missing. At 8:30, the billing team starts its day. Nothing looks wrong. At 10:15, the accounts payable team at one of the distributor's largest customers calls to ask why it has received only some of yesterday's invoices.
The worst part comes next. At 11:05, trying to fix things quickly, a billing analyst reruns the invoice job and then reruns the output job for the whole night, with the option to resend output switched on to make sure nothing is missed. The 2,880 missing invoices are created and sent. So are the 1,300 that customers already have, a second time.
I have been on the technical side of SAP operations for a long time, and this pattern is one of the most common and most avoidable problems I see. Jobs fail at night. People find out from customers. Then someone restarts the wrong thing. This post walks through that night and morning, explains why it keeps happening, and shows how to catch a failed job within minutes and restart only what is safe to repeat.
What the failure cost
The first cost is simple. The 2,880 invoices worth $410,000 went out roughly half a day late. Most of the distributor's customers pay on terms counted from the invoice date, so that money arrives a day later than it should. For one night, it is a small amount of interest. For a company with failures like this a few times a month, it shows up in days sales outstanding.
The duplicate invoices cost far more.
- 1,300 duplicate invoices went to 186 customers. Some customers' systems caught them as duplicates. Many did not.
- Three customers paid twice. Together they paid $18,400 too much, which the distributor had to refund. That took calls, approvals and a week of follow-up.
- One large customer flagged the account for review. Its accounts payable team, already annoyed by the missing invoices, put the distributor's invoices on manual review for a month. Every invoice to that customer was now paid more slowly.
- Two days of the billing team's time went into credit notes, apologies and reconciliation. Our post on matching customer payments to SAP open items shows how much work one double payment creates on the receivables side.
And the technical team lost a morning. The Basis administrator spent from 10:40 until lunch reading the dump, the job log and the system log, working out what had happened and in what order.
None of this was caused by the original failure alone. The failure was a fact of life. A job that has run fine for years hit twice its usual volume. The real damage came from finding it eight hours late, and from restarting without knowing what the job had already done.
Why nobody saw it at 2:14
SAP records everything. The cancelled job was in the job overview, SM37. The dump was in the dump analysis, ST22. The system log had a warning about memory. Every piece of evidence existed by 2:15. The problem is that nobody was looking, and the evidence was not written for the people who needed it.
Hundreds of jobs, most of them noise
The distributor's production system runs about 900 background jobs every night. A dozen or so fail on a typical night for harmless reasons, such as a cleanup job that found nothing to clean up or a report nobody reads any more. Basis used to get an email for every cancelled job. After a few months, everyone filtered those emails into a folder. The billing job's failure landed in that folder at 2:14, next to eleven others that did not matter.
The dump is written for programmers
TSV_TNEW_PAGE_ALLOC_FAILED is precise and useful to a Basis administrator. To a billing team lead, it means nothing. Nothing in the dump says "2,880 deliveries were not invoiced and $410,000 of billing is waiting". Someone has to translate it, and at 2:14 nobody is awake to do that.
Job chains keep going
The invoice job and the output job were scheduled separately, one at 1:30 and one at 3:00. The output job did not know or care whether the invoice job had finished properly. It ran, sent what it found and finished green. From the outside, the night looked half successful, which is harder to spot than a night that fails completely.
Nobody owns the result
Basis owns the system and the job schedule. The billing team owns the invoices. Neither owns the question "did last night's billing actually produce the invoices it should have?". So the first person to ask it was a customer.
Some failures do not look like failures at all
The billing job at least went red. The more dangerous case is a job that finishes green and does nothing. An interface job that processes zero records because a file never arrived, a planning run that ran against yesterday's data, or a payment proposal that selected nothing because a date was wrong all finish successfully. They are found when someone notices what is missing.

Why restarting is riskier than failing
When a job fails, the instinct is to run it again. Sometimes that is exactly right. Sometimes it is the worst thing you can do. The difference depends on what the job had already done before it stopped, and whether doing it again creates something twice.
Jobs fall into three groups, and the people restarting them need to know which group each one is in.
- Safe to repeat. The billing job is one of these. SAP will not invoice a delivery that has already been invoiced, because the delivery's billing status is updated as soon as the invoice is created. Rerunning the job picks up only the 2,880 deliveries that are still open. Many planning and reporting jobs are similar.
- Safe to repeat only from a point. The output job is one of these. Run normally, it sends output only for invoices that have not had output yet, so it would have sent just the 2,880 new invoices. Run with the resend option switched on for the whole night, it sends everything again. The same program is safe or dangerous depending on how it is started.
- Never repeat without checking. Jobs that post accounting documents without a built-in duplicate check, interface jobs that send files to banks or customers, and payment-related jobs belong here. A rerun can post twice or pay twice.
On the Monday morning, the billing analyst did the reasonable-looking thing. She reran both jobs, and switched on resend to be safe. Nobody had ever written down which group the output job belonged to, or what "to be safe" would actually do.
The jobs most likely to hurt you
Every SAP system is different, but the same few kinds of job cause most of the damage when they fail quietly.
- Billing. As in the Georgia example, a failed billing run delays invoices and cash. A partly completed run leaves customers with incomplete billing for the day.
- The planning run. When the nightly MRP run fails or runs against stale data, planners and buyers start the day working from yesterday's picture. Purchase requisitions that should have been created are missing, and shortages are found later than they should be.
- Outbound interfaces. Jobs that send order confirmations, shipping notices or invoices to customers, or purchase orders to suppliers, often fail without anyone inside the company noticing. The partner notices, usually when something they expected does not arrive.
- Inbound interfaces. Jobs that load bank statements, customer orders or supplier confirmations can finish green with zero records when a file is late or empty. Cash application, order entry and planning then run on missing data.
- Payment runs. A failed or partial payment run can leave suppliers unpaid. A careless restart can create a second payment file, which is the most expensive mistake on this list.
- Period-end jobs. Depreciation, accruals, settlement and currency revaluation jobs that fail late in a closing day can delay the whole close, and partial postings are hard to unwind.
Each of these has a clear business owner and a clear normal result, which makes them the right place to start watching.
How to catch a failed job within minutes and restart it safely
The fix does not need a new scheduler or a 24-hour operations center. It needs a short list of the jobs that matter, a way of explaining their failures in business terms, and a rule that nothing is restarted until someone knows what the job already did.
Step 1: Decide which jobs matter
Out of 900 nightly jobs, a much smaller number carry real business weight. Billing, the planning run, interfaces to customers, suppliers, banks and warehouses, payment runs and period-end closing jobs are the usual list. At the Georgia distributor, it is about 40 jobs. Each one gets a business owner, such as the billing lead for the invoice and output jobs, and a note on what it is supposed to produce.
Step 2: Watch for every kind of failure, not just red
For those 40 jobs, check every night for jobs that were cancelled, jobs that are running far longer than usual, jobs that did not start at all, and jobs that finished but produced far less than normal. A billing job that creates 1,300 invoices on a night with 4,180 deliveries due is a failure, whatever colour it shows.
Step 3: Link the failure to its cause
When a job fails, link it to the dump, the job log and the system log entries from the same minute, and explain the cause in plain words. For the billing job, that is "the job ran out of memory after creating 1,300 invoices, because tonight's 4,180 deliveries were processed as one package, almost twice the usual volume".
Step 4: Say what it means for the business
Translate the failure into the terms its owner uses. "2,880 deliveries worth $410,000 are not invoiced. The 3:00 output job will send only the 1,300 invoices that exist. Customers will receive incomplete billing for yesterday." That message is something a billing lead can act on, even half awake.
Step 5: Check what the job already did
Before any restart, find out exactly what the job created before it stopped. Here, that is 1,300 invoices, with document numbers, already posted and, if the output job has run, already sent. That single fact decides what is safe to do next.
Step 6: Propose a restart that matches the job
For each critical job, record once which group it belongs to, whether it is safe to repeat, safe from a point, or never to repeat without checking. Use that to propose a specific restart. For this night, the proposal would be to rerun billing for the 2,880 open deliveries in three smaller packages, then run output normally, without resend, so only the new invoices go out.
Step 7: Get approval from the right person
The restart runs only after the job owner or the on-call Basis administrator approves it. The proposal arrives with the evidence, so approving it takes a minute on a phone, not an hour at a desk.
Step 8: Fix the cause
Once the night is over, fix what made the job fail. Here, that means splitting large billing runs into packages and running them in parallel, so a promotion day does not exhaust memory. Record the fix with the failure, so the next person who sees the same dump knows what it means.
Step 9: Send a morning summary
Each business owner gets a short note at the start of the day: what ran, what failed, what was restarted and what still needs a decision. The billing lead should never find out about a failed billing run from a customer again.

The same night, handled this way
Run the Monday night again.
At 2:14, the billing job is cancelled. At 2:16, the failure is detected, because the billing job is on the critical list. By 2:20, the cause is linked: a memory dump after 1,300 invoices, with 4,180 deliveries due against a normal night of around 2,200. The business effect is spelled out: 2,880 deliveries worth $410,000 not invoiced. The proposal is ready: rerun billing for the 2,880 open deliveries in three packages, then run output normally without resend.
At 2:22, the on-call Basis administrator gets the message on her phone. She reads it, sees the evidence and approves at 2:31. The three billing packages run between 2:35 and 3:10, and all 2,880 invoices are created. The 3:00 output job is held until billing has finished, then runs at 3:15 and sends only the new invoices. Each customer receives each invoice exactly once.
At 8:30, the billing lead's morning summary says that the billing job failed at 2:14 for lack of memory, that it was restarted in three packages with approval at 2:31, that all 4,180 invoices were created and sent once, and that splitting large runs is now on Basis's list. Nobody calls at 10:15.
What changes for the business and for IT
- Failures found in minutes, not hours. The critical jobs are watched, and their owners hear about problems before customers do.
- Fewer self-inflicted problems. Restarts match what each job can safely repeat, so a failure does not turn into duplicate invoices, double postings or a second payment file.
- Cash on time. Billing, payment and interface jobs that recover overnight keep invoices and payments on schedule.
- Less noise for Basis. Forty jobs that matter, explained in plain words, replace an inbox of 900 alerts that everyone has learned to ignore.
- A record for audits. Every failure, restart and approval is recorded, which matters for jobs that create financial documents.
- Fixes that stick. Each failure is linked to its cause and fix, so repeat failures are recognized and solved, not rediscovered.
When a person should take over
Some failures should never be handled by a proposal and an approval on a phone. A failed payment run, a job that may have posted accounting documents twice, or anything involving a bank file needs someone at a desk who can check the details. The right answer there is to stop, hold the next jobs in the chain and wake the right person, not to restart anything.
The same applies to failures that point to something bigger, such as a database running out of space, a full file system or repeated failures across many jobs at once. Those are system problems, not job problems, and the Basis team needs to see them as a whole rather than as a list of separate failures.
The goal is not to restart everything automatically. It is to make sure that every failure of a job that matters is seen quickly, understood in business terms and handled by someone who knows what a restart will do.
How Artificio watches SAP jobs
Artificio's job failure and short dump analysis agent watches background jobs and short dumps in SAP ECC and SAP S/4HANA around the clock. It explains what failed and why, links each dump to the job or user behind it, and checks job history and the documents created before proposing anything. It proposes restarts only where a job is safe to repeat, and runs them only after Basis or the job owner approves.
Failed jobs often sit next to other quiet failures. Artificio's IDoc monitoring agent finds failed inbound and outbound IDocs, explains each error and reprocesses only after a duplicate check and approval. The queue monitoring agent does the same for stuck queues between SAP and warehouse systems, and the support ticket agent picks up the tickets users raise when something is missing and returns them with a diagnosis. Our post on choosing between IDocs and APIs explains why integration failures look so different from job failures, and The Overnight Backlog covers the scheduled work that keeps running while the office is empty.
As with every Artificio agent, nothing is restarted or changed in SAP without a named person approving it. That is how Artificio's human-in-the-loop approvals work. You can read how Artificio connects to SAP and handles access on the SAP security and data handling page, and see the full list of SAP AI agents.
A practical way to start
- List the jobs that matter. Ask finance, sales, supply chain and IT which nightly jobs would hurt if they failed. Expect 30 to 60 out of hundreds.
- Give each one an owner and an expected result. Who needs to know if it fails, and what should it produce on a normal night?
- Mark each one for restart safety. Safe to repeat, safe from a point, or never repeat without checking. Write down how to restart the ones in the middle group safely.
- Look at last month's failures. Pull the cancelled jobs and dumps for those 40 or so jobs from the last month, and check how each was found and how long it took.
- Watch for jobs that finish but do too little. Compare each critical job's output with its normal range, and treat a big shortfall as a failure.
- Turn off the noise. Stop sending alerts for jobs nobody cares about, so the ones that matter stand out.
- Hold dependent jobs. Make jobs that depend on each other wait for the previous one to finish properly, so output, interfaces and postings never run on half the data.
If you would like to see how Artificio watches your critical SAP jobs, explains failures in business terms and proposes only safe restarts, request a demo. We will look at last month's job failures with you and show you what your team would have seen at 2:16.