ColdLatch

Guides

How to block a batch in SAP S/4HANA after a temperature excursion

Published 6 October 2026. 7 minute read.

Short answer: post a transfer from unrestricted-use stock to blocked stock with movement type 344, for the affected material, batch, plant and storage location. Once posted, the quantity is no longer available for picking or delivery. Movement type 343 reverses it when QA releases the batch.

After a temperature excursion the urgent job is to make sure the affected stock cannot be picked. In S/4HANA there are three common ways to do that. Which one your company uses is a process decision, usually already written into your quality procedures. Confirm it with your SAP team before changing anything; the details below describe standard behaviour, and your system may be configured differently.

Option 1: transfer to blocked stock

S/4HANA keeps stock in types. The three that matter here are unrestricted-use, quality inspection and blocked. A transfer posting moves a quantity from one type to another without moving it physically.

Movement typeWhat it does
344Unrestricted-use to blocked
343Blocked back to unrestricted-use
322Unrestricted-use to quality inspection
321Quality inspection back to unrestricted-use

By hand, this is a transfer posting in transaction MIGO, or the stock transfer apps in Fiori. You enter the material, the batch, the plant, the storage location and the quantity, and post. The result is a material document: the number to keep in your excursion record.

Good for: a fast, unambiguous stop on a specific quantity in a specific place. Watch for: it blocks only the stock at that storage location. The same batch somewhere else is untouched, which is usually what you want after a cold room excursion.

Option 2: transfer to quality inspection stock

Movement type 322 moves the stock to quality inspection instead of blocked. It is equally unavailable for picking. Companies that run SAP Quality Management often prefer it, because the usage decision then releases or rejects the stock inside the same module.

Option 3: set the batch status to restricted

If batch status management is active, the batch itself can be set to restricted in the batch master (transaction MSC2N). That restricts the batch everywhere it is stored, in every plant.

Good for: a problem with the batch itself, such as a supplier recall. Less good for: a cold room excursion, where only the stock that was in that room is affected.

What makes this slow in practice

Automating it through the standard APIs

S/4HANA publishes OData services that do the same two things a person does.

  1. Read the stock. The Material Stock service (API_MATERIAL_STOCK_SRV) returns quantities by material, batch, plant, storage location and stock type. Filtering on a plant, a storage location and stock type 01 (unrestricted-use) gives the list of what is at risk.
  2. Post the transfer. The Material Document service (API_MATERIAL_DOCUMENT_SRV) creates a material document with a header and one item per batch, each with movement type 344. The service requires a CSRF token, fetched with a first request and sent back with the posting.
  3. Make it safe to retry. Networks fail halfway. Put a unique reference in the document header text (it holds 25 characters) and look for it before posting again, so a retry never blocks the same quantity twice.
  4. Keep the document number. Store the returned material document number with the excursion record.

Two details catch people out: field lengths (batch is 10 characters, plant and storage location 4, unit of measure 3), and authorisations (the technical user needs the goods movement authorisation for that movement type and plant, and nothing more).

How ColdLatch does it

This is the part of the job ColdLatch was built for. When an excursion is confirmed in a storage unit, it reads the unrestricted stock for that unit's SAP plant and storage location and proposes one block per batch. A QA user approves or rejects each with their password and a reason. Approved blocks are posted as material documents, retried safely if SAP is unreachable, and the document number is shown on the alert. For a shipment, the approved block is held and posted when the goods are received. Whether a person approves each block, or blocks are approved automatically with a system signature, is a setting your administrator signs for.

SAP, S/4HANA and Fiori are trademarks of SAP SE. ColdLatch is not affiliated with SAP. This article describes standard behaviour as we understand it; check your own configuration and SAP's documentation before relying on it.

Also: What to do when a cold room has a temperature excursion: a checklist