Batch traceability in SAP: the test you only run during a recall
There is one question that decides whether traceability works at a healthcare company, and it always takes the same shape: batch 4471 showed a deviation — where did it go?
Anyone who has lived through a recall knows the answer cannot take days. And they also know that in most environments it does — not for lack of data, but because the data is all there and nobody built the path that walks through it.
The two directions of the question, and why only one usually exists
Forward traceability. Given a batch that was produced, who received it? That is the recall question: which customers, which invoices, what quantities, and what is still in stock to be blocked.
Backward traceability. Given a batch that was delivered, what was it made of? Which raw-material batches, from which supplier, with which certificate of analysis.
In practice almost every environment handles the second reasonably well — because the production order links component to product — and stalls on the first. And the first is the one the phone is calling about.

The path exists — it just is not assembled
The forward chain crosses different tables, and that is why the answer is slow. One survey that yields more than it looks, straight against the database:
-- from the produced batch to the customer who received it
SELECT m.charg, m.matnr, m.mblnr, m.bwart,
l.vbeln, l.lfimg, k.kunnr, k.name1
FROM mseg AS m
LEFT JOIN lips AS l ON l.matnr = m.matnr
AND l.charg = m.charg
LEFT JOIN likp AS h ON h.vbeln = l.vbeln
LEFT JOIN kna1 AS k ON k.kunnr = h.kunnr
WHERE m.charg = '0000004471'
AND m.bwart IN ('601','641','101')
ORDER BY m.mblnr;
It is not elegant and it is not the final answer — it is the skeleton. The value is not the query: it is finding where the chain breaks in your environment, because it breaks in different places in every implementation.
The three most common breaks:
- Storage-location transfers without the batch — the movement happens, the batch is not carried, and from there the trail ends.
- Repacking or rework — a new batch is born with no recorded link to the batch it came from.
- A third party in the chain — a logistics operator or distributor that receives and redistributes without returning batch information.
What goes wrong, with names
Discovering the break during the recall. The worst possible moment. The team assembles the query in a hurry, sees the numbers do not add up, and spends the night rebuilding by hand what should have been a lookup.
Batch management on some materials and not others. One component without batch management in the middle of the tree is enough for backward traceability to lose a rung — and nobody notices until it matters.
Confusing batch number with unit-level identification. They are different things. Batch management answers “this set travelled together”; unit identification answers “this specific box”. A serialization requirement is not met by batch management, however good it is — that is a different level of granularity and a different project.
Traceability that only covers your own plants. Third-party stock, consignment material and whatever sits with a representative usually fall off the map — and that is exactly where the product is when a recall happens.
Where AI genuinely helps here
The trail is deterministic and should stay that way — nobody wants a model estimating where a batch went. But three expensive parts of the work are reading and comparing.
Finding where the chain breaks. Comparing what left production against what appears in deliveries, and pointing at the movements where the batch disappeared, is reconciliation at volume — exactly what automated reading with human review does well.
Reading the certificate of analysis and extracting what the system needs. Free-text documents, from different suppliers, in different layouts.
Explaining the quantity divergence. When produced does not match delivered plus stock, proposing where the difference sits shortens the investigation from days to hours.
Where it does not belong: the decision to recall, the communication to the regulator and batch release. Those three stay with people, with names and with technical accountability.
The honest limit
Well-built traceability does not prevent a quality deviation. It does not reduce the chance of one happening — it reduces the size of the damage when it does, because it lets you recall what needs recalling and only that.
And there is a limit no system solves: the chain ends where your record ends. If the distributor does not return batch information, the trail stops there — and the fix is contractual, not technical. Worth knowing before promising end-to-end traceability.
What changes with the work done properly is the kind of conversation: instead of “we are looking into it”, you say “47 customers, 12,000 units, 3,000 still in stock and already blocked”. The difference between those two sentences is one night of work — or one morning of drilling, done months earlier.
If the starting point is understanding what exists today before deciding what to change, start with the IT diagnostic. For the sector overview, see IT for healthcare. And if the immediate pain is inconsistent master data breaking the trail, the path is cleansing before the load, not during.