SAP PP / MM ERROR  |  Message No. M7021

SAP Error M7021: Deficit of BA Restricted-Use Stock (Full Fix Guide)

Example message: "Deficit of BA Restr.-use 253.840 KG: 26 1254 LR01 SALI001" - the exact material, plant, storage location, and batch numbers in your own error will differ, but the fix below is identical.

This common error, "Shortfall below the specified stock level or quantity amounting to 253.840 KG," means that the available restricted-use stock is lower than the required quantity for a particular transaction. This guide covers the exact fix using MMBE and MB1C, then goes deeper into what restricted-use stock actually is, how it differs from quality inspection stock, batch status management, a real business scenario, and a full prevention checklist.

✅ Possible Causes

SAP error M7021: Deficit of BA Restricted-use stock

🔧 Solution: MB1C - Check Stock First in MMBE

Check stock availability across the different categories (Unrestricted, Quality Inspection, Blocked, Restricted-use) in MMBE first. If stock is genuinely not available, create it manually as a documented correction.

1

If stock is not available - for example, requiring 253.840 KG when the required production quantity is 253.840 KG - create stock manually.

Go to MB1C - Create Stock Manually.

Tcode: MB1C

Select Movement Type - 561

Select Plant - 1254

SAP MB1C movement type 561 stock creation selection screen
2
  • Select Material No - 26
  • Select Qty - 253.840 KG
  • Select Unit of Entry - KG
  • Select Storage Location - LR01
  • Select Batch - SALI001
  • Select Plant - 1254
  • Select Amount (Local Currency) - 500000
  • Select Save / Post
SAP MB1C stock entry screen with quantity, storage location, and batch fields SAP MB1C posting confirmation for restricted-use stock creation
3

Then go to MMBE and check stock.

SAP MMBE stock overview confirming restricted-use quantity after correction
4

Save once the restricted-use quantity in MMBE covers the amount required, then retry the original posting.

🔍 What "Restricted-Use" Stock Actually Means

Restricted-use is a batch status in SAP, separate from the standard unrestricted, quality inspection, and blocked stock categories. It exists specifically for batch-managed materials and is controlled through a material master setting called batch status management. When batch status management is active for a material, every batch is flagged as either "unrestricted" (freely usable) or "restricted" (excluded from normal availability), and this flag can be set manually, changed as part of a QM usage decision, or driven by batch classification rules depending on how your organization has configured it.

The key distinction from quality inspection stock is important: quality inspection stock is a separate stock category created automatically at goods receipt when a material has an active inspection setup, and it moves into unrestricted-use once an inspector completes a usage decision. Restricted-use, by contrast, is a status applied directly to a batch and can apply even to stock that already has a "clean" quality history - for example, a batch deliberately held back from general use for business reasons rather than a pending quality check.

❓ Common Reasons a Batch Gets Marked Restricted-Use

⚙️ How Batch Status Management Is Configured

Also Batch status management is switched on per material in the material master's Batch Management or Plant Data/Storage 1 view (depending on your SAP version), alongside the standard batch management indicator. Once active, every batch of that material carries an explicit status field that can be viewed and changed in MSC2N (Change Batch). Changing a batch from unrestricted to restricted - or back again - is itself a stock-relevant transaction, and SAP records it as a movement (often using movement type 344/343 pairs conceptually similar to the quality-inspection transfer posting, though the exact movement types depend on configuration).

Because the restriction lives on the batch, not on the storage location or stock category alone, MMBE will show the restricted-use quantity as its own line within the batch's stock overview, separate from unrestricted and quality inspection quantities for the very same batch. This is exactly why a plant-level total can look sufficient while the specific batch a transaction needs sits entirely in restricted-use - the total misleads unless you check the breakdown by status.

📑 Restricted-Use vs Quality Inspection vs Blocked Stock

CategoryHow It's SetTypical TriggerHow It's Released
Quality InspectionAutomatic, via inspection setup on the material masterGoods receipt of a material requiring inspectionQM usage decision (QA32) or transfer posting (MIGO 321)
Blocked StockManual or automatic, via movement or rejection during usage decisionFailed inspection, damaged goods, return awaiting dispositionTransfer posting once a disposition decision is made
Restricted-UseBatch status field, set manually or via batch status management rulesBusiness hold, customer reservation, expiry-driven restriction, pending reviewBatch status change back to unrestricted (MSC2N) once the hold is lifted

All three categories share one thing in common: none of them are counted as unrestricted-use, which is why any of the three can independently trigger a deficit error like M7021 if a transaction specifically expects that category and status to hold enough quantity.

🛠️ Restricted-Use Stock in Warehouse Management (WM) and EWM

In classic Warehouse Management (WM), batch status is an inventory management (IM) level attribute, and the WM-level quant does not automatically know a batch has been restricted unless a corresponding transfer requirement or transfer order updates the storage type. This means a WM putaway or picking strategy can sometimes still propose a restricted batch unless your configuration explicitly excludes restricted stock from picking strategies - worth confirming with your WM consultant if restricted batches keep appearing in pick lists despite being flagged restricted at the IM level.

For sites running SAP Extended Warehouse Management (EWM), stock status (unrestricted, blocked, or in QI) is managed at the EWM quant level and synchronized with ERP/S4 inventory management. Restricted-use as a batch status specifically is an ERP-side concept; if your EWM setup needs an equivalent restriction, it is typically modeled through EWM's own stock type and putaway/removal strategy configuration rather than a literal one-to-one mapping of the ERP batch status field. If restricted-use deficits keep appearing on EWM-managed materials, a stock reconciliation between EWM and ERP is usually a more productive first step than repeating the ERP-side troubleshooting in this guide.

📑 M7021 Restricted-Use vs Other Related SAP Deficit Messages

MessageStock Type ReferencedTypical Root Cause
M7021 – Deficit of BA Restr.-useRestricted-use batch statusBatch flagged restricted via MSC2N or batch status management, insufficient unrestricted equivalent available
M7021 – Deficit of BA Unrestricted-useUnrestricted-use stockGenuine stock shortage, or stock sitting in quality inspection/blocked status instead
M7021 – Deficit of BA Quality InspectionQuality inspection stockInsufficient stock still pending inspection when a QI-specific movement is attempted
M7053 – Negative stock not allowedAny category, tied to OMJ1 configurationThe negative stock control setting itself is what's blocking the posting

All of these share the same family resemblance - a deficit check preventing a posting - but the fix differs based on exactly which stock type and status the message references, which is why reading the exact wording of your own error message carefully (not just recognizing "M7021" generically) matters before choosing a fix.

📱 Restricted-Use Stock and Batch Status in SAP S/4HANA

Batch status management and the restricted-use stock category work the same way conceptually in SAP S/4HANA as in ECC, since both are governed by the same batch master and material master settings rather than anything specific to the Universal Journal. What changes in S/4HANA is the visibility: the Fiori app "Stock – Single Material" presents the same unrestricted, quality inspection, blocked, and restricted-use breakdown as MMBE in a cleaner, filterable card view, and batch attributes including status can be reviewed through the "Manage Batches" or equivalent Fiori app depending on your organization's rollout.

Because S/4HANA updates stock quantities in real time through the simplified MATDOC-based data model, a batch status change made in MSC2N is reflected instantly in MMBE or its Fiori equivalent, with no batch job delay. If a batch was just released from restricted-use and the deficit still shows, that's a strong signal the release didn't actually post correctly for the exact batch and storage location in question, rather than a system refresh delay - re-check the batch change document itself.

💰 Why Restricted-Use Status Matters for Costing and Valuation

Restricted-use stock is not simply a visibility or convenience flag - it directly affects what a material's available-to-promise and planning-relevant quantity looks like to other processes. MRP, for instance, generally does not count restricted-use stock as available supply when calculating net requirements, meaning a large restricted-use balance sitting on the shelf can still trigger MRP to propose new procurement or production, because from a planning perspective that stock effectively doesn't exist yet. This is precisely why a plant can show a comfortable total quantity in MMBE while simultaneously generating purchase requisitions for the same material - the total is misleading when a meaningful share sits in a non-unrestricted status.

From a valuation standpoint, restricted-use stock is still owned inventory and carries value on the balance sheet the same as unrestricted stock - the restriction is a usability constraint, not a write-off. However, if a batch remains restricted for an extended period without resolution, that can be a signal for inventory management or finance to review whether the stock should instead be reclassified as blocked, written down, or scrapped, since indefinitely restricted stock ties up working capital without contributing to fulfillable supply.

📈 Troubleshooting Decision Tree for M7021 (Restricted-Use)

Remember: the goal is to make the system reflect the batch's true, appropriate status - not just to make the error disappear as quickly as possible.

🎓 Interview-Style Questions and Answers

Q: What is the functional difference between restricted-use stock and blocked stock?
Blocked stock is generally the result of a failed inspection or a rejected usage decision and typically requires a formal disposition (rework, return, scrap) before it can move anywhere else. Restricted-use stock is a batch status that can be applied and lifted more flexibly, often for business or compliance reasons short of an outright quality failure, and does not necessarily require a QM usage decision to resolve.

Q: Does MRP count restricted-use stock as available supply?
No, in standard configuration MRP typically excludes restricted-use stock from available supply when calculating net requirements, which is why a material with plenty of total stock can still generate new procurement or production proposals if most of that stock sits in restricted-use status.

Q: If you see M7021 referencing restricted-use stock, what should you check before creating stock with MB1C?
Check MMBE for the batch-level breakdown to see whether restricted-use stock already exists elsewhere, and check MSC3N to understand the batch's current status and why it may have been restricted, since the correct fix is very often a status change or transfer rather than creating new stock value.

📚 Quick Glossary of Terms Used in This Guide

💼 Real-World Scenario: A Held Batch Blocking Production

Pramod Behera a shift supervisor at a specialty chemicals plant, hit M7021 for a raw material while trying to issue components for a production order. MMBE showed a healthy total quantity for the material at the plant, so he initially assumed it was a system glitch. Drilling into the batch-level breakdown, he found that almost the entire quantity for the exact batch his production order needed sat under restricted-use status, not unrestricted.

Checking with the quality team, Arjun learned the batch had been manually restricted the previous week pending a supplier certificate of analysis that hadn't yet arrived - a routine compliance hold unrelated to any actual quality failure. Once the certificate arrived and quality released the batch back to unrestricted status in MSC2N, the production order could pull the material without any further changes. This is the everyday shape of restricted-use deficits: the stock is rarely "missing" in the way MB1C would fix - it is usually sitting exactly where it should be, waiting on a business or compliance decision that has nothing to do with the transaction that's currently blocked.

❗ Common Mistakes When Fixing M7021 for Restricted-Use Stock

Tip: Before touching MB1C, always check whether the batch shown in the error is under a restriction that a colleague - quality, planning, or warehouse - applied intentionally. A quick conversation is often faster than any transaction.

✅ Prevention Checklist for Restricted-Use Deficits

📋 Related SAP Transactions

TransactionPurpose
MMBEStock overview showing unrestricted, quality inspection, blocked, and restricted-use quantities by batch.
MB1CManually create stock (movement type 561), used only for genuine, documented corrections.
MSC2NChange batch, including changing batch status between restricted and unrestricted.
MSC3NDisplay batch, useful to confirm current batch status and attributes.
QA32Process quality inspection lots and usage decisions (for quality-inspection stock, not restricted-use).
MIGOTransfer postings between stock categories (movement type 321 for quality-to-unrestricted).

❓ Frequently Asked Questions

It means the movement you tried to post needs a quantity of restricted-use batch stock for the material, plant, storage location, and batch shown in the message, but the available restricted-use quantity is less than what's required.
Quality Inspection stock is created automatically when a material with a quality inspection setup is received, pending a usage decision. Restricted-Use stock is a separate batch status, set manually or via batch status management rules, marking a specific batch as usable only for certain purposes rather than blocked or freely available.
First check MMBE to see where the material's stock actually sits across unrestricted, quality inspection, blocked, and restricted-use categories for the batch in question. If genuine restricted-use stock exists elsewhere, transfer or reclassify it into the correct location/status; only use MB1C to manually create stock as a last resort.
Batch status management is a material master setting that lets each batch be flagged as either unrestricted or restricted. A batch changed to restricted status is removed from unrestricted availability, which is why a movement expecting restricted-use stock for that batch can trigger M7021 if the quantity available under that status is insufficient.
No. MB1C with movement type 561 should only be used when a genuine physical count confirms stock exists that the system doesn't reflect. If the stock exists but is in the wrong batch status or location, the correct fix is a batch status change (MSC2N) or a transfer posting, not creating new stock value.
Common reasons include a quality hold pending further investigation short of a full block, a batch reserved for a specific customer or use case, a batch nearing expiry that should only be used for lower-priority orders, or a manual restriction applied by quality or warehouse staff while a decision is pending.