# Fix SAP Business One 'Quantity falls below zero' (-2028) on Production Issue

> Source: https://netray.co/erp-help/sapb1-quantity-falls-below-zero-production-issue-fix
> Publisher: Netray (netray.co), AI and integration engineering for ERP and manufacturing systems.
> Section: ERP Help

## Short answer

SAP Business One raises 'Quantity falls below zero' (ODBC -2028) when a goods issue, including an Issue for Production, would push an item's on-hand quantity in a warehouse, or a batch or serial, below zero and negative inventory is not allowed. Fix it by receiving the stock first, correcting the warehouse or batch, or deliberately allowing negative stock for the right items.

## Kind

error

## System

sap

## Erp

SAP Business One

## Module

Production / Inventory

## Query

SAP Business One Quantity falls below zero ODBC -2028 issue for production

## Alternate Queries

- SAP B1 quantity falls below zero -2028
- issue for production negative inventory SAP Business One
- SAP B1 allow negative stock production order
- SAP Business One backflush quantity falls below zero

## Applies To

SAP Business One 9.x and 10.0, SQL Server and SAP HANA, Issue for Production, Receipt from Production, goods issue and delivery documents

## Steps

### How to resolve the error

**Items:**

Note the item code in the error text and the document you were posting (Issue for Production, Delivery, Goods Issue).

Open the item's Inventory Data tab and check On Hand per warehouse. The issue draws from the warehouse on the production order component line, not necessarily the item default.

Open the production order (Production > Production Order) and check the Warehouse column on the component line. Change it to the warehouse that holds the stock if it was wrong.

If the item is batch or serial managed, check the batch or serial availability. Total warehouse stock can be positive while the selected batch is empty.

Check the posting date. Stock that was received after the date you are issuing on is not yet available at that date if the system checks by date.

Receive or transfer the missing stock (Goods Receipt, Goods Receipt PO, Inventory Transfer) and retry the issue.

If your process legitimately goes negative, review Administration > System Initialization > Document Settings (or General Settings > Inventory) for the Allow Negative Stock control and the per-item setting, and decide with finance before changing it.

## Sections

### Why the system blocks this

**Body:**

Business One keeps the inventory quantity per item and per warehouse. A document that would reduce it below zero is rejected when negative stock is not allowed, because the system cannot value the issue without stock to relieve. The same mechanism applies to batches and serial numbers, so the error can show up even when the warehouse total looks fine.

In production, the common trigger is the issue method. If components are set to Backflush, they are issued automatically when you post a Receipt from Production. If the finished goods are received before the raw materials were purchased and received, the backflush issue fails with this error and blocks the receipt.

### Wrong warehouse or wrong batch

**Body:**

Production order component lines have their own warehouse. They default from the item master or the BOM, and users often change the header warehouse without changing component lines. The issue then draws from a warehouse with no stock.

For batch items, the error often points to a specific batch allocation. On the issue document, open Batches and check the quantity allocated against each batch. Allocating more than a batch holds fails, even if another batch in the same warehouse has plenty.

**Code:**

SELECT T0."ItemCode", T0."WhsCode", T0."OnHand"
FROM "OITW" T0
WHERE T0."ItemCode" = '[%0]' AND T0."OnHand" <> 0

-- batch level
SELECT "ItemCode", "WhsCode", "BatchNum", "Quantity"
FROM "OIBT"
WHERE "ItemCode" = '[%0]' AND "Quantity" > 0

### Posting date and sequencing problems

**Body:**

Receipts and issues post on the document date. If a receipt is dated tomorrow and the issue is dated today, the quantity is not there yet when the issue is evaluated in a date-sensitive check. Align the dates, or post the receipt with the correct earlier date if the physical movement happened first.

Also watch for unposted draft goods receipts. A user who created a draft but never added the real document leaves the system short while the shelf is full.

### Allowing negative stock responsibly

**Body:**

Some shops choose to allow negative inventory so the shop floor is not blocked by late receipts. The cost is valuation noise: items issued before they were received are valued at a moving average or standard that may be wrong, and the correction happens later through revaluation.

If you allow it, do it per item group or item rather than company-wide, and run a negative stock report regularly so it is cleaned up. Decide this with finance, since it changes cost of goods and period close.

## Pitfalls

- Checking total on hand across warehouses instead of the warehouse on the component line.
- Ignoring batch or serial availability when the warehouse total is positive.
- Posting Receipt from Production with backflush components before purchased materials are received.
- Turning on Allow Negative Stock company-wide to silence one error.
- Leaving goods receipts in draft status so physical stock never reaches the system.
- Dating the receipt after the issue and then wondering why available stock is zero.

## Ai Angle

An assistant grounded in SAP Business One, such as ERPray, can answer the question you actually have when this error appears: 'which component, in which warehouse or batch, is short for production order 1234?' It reads OWOR, WOR1, OITW and OIBT, shows the query, and lists the shortage, any draft receipts that would cover it, and the posting dates involved. It stays read-only. Any correction, such as an inventory transfer, goes to a person for approval.

## Faq

### What does ODBC -2028 mean in SAP Business One?

**Answer:** It is the code that accompanies the 'Quantity falls below zero' message. The system refuses a document that would make an item's quantity in a warehouse, or in a batch or serial, negative. The error text names the item, which tells you where to start looking.

### Why does the error appear when I post a Receipt from Production?

**Answer:** Likely because components are set to Backflush. The receipt triggers an automatic issue of the components, and if a component has no stock in the component line's warehouse, the whole receipt fails. Receive the missing material or change the issue method to Manual.

### Can I allow negative inventory for just some items?

**Answer:** The setting is controlled in the company inventory settings and can also be controlled at item level. Use it narrowly and agree it with finance, because negative stock distorts item cost until the missing receipt is posted and revalued.

### Why does it fail when total stock looks sufficient?

**Answer:** Because Business One checks per warehouse, and for batch or serial items per batch or serial. Stock held in a different warehouse, or in a batch not selected on the document, does not count toward the line being issued.

## Search terms

sap business one quantity falls below zero, sap b1 -2028, issue for production negative inventory, sap b1 allow negative stock, sap b1 backflush error, sap business one production order issue, sap b1 batch quantity falls below zero, receipt from production error, sap business one inventory negative, sap b1 component warehouse production order

---
Talk to an engineer: https://netray.co/contact?intent=erp_ai | Machine catalog: https://netray.co/agent/catalog.json
