Start a project

Items below minimum stock

Inventory items whose on-hand quantity is below the minimum level set on the item.

Tables: OITMUse: Reorder lists for purchasing.

Tool

SELECT T0.ItemCode, T0.ItemName, T0.OnHand, T0.MinLevel, T0.MinLevel - T0.OnHand AS ShortQty,
  T0.CardCode AS PreferredVendor
FROM OITM T0
WHERE T0.InvntItem = 'Y' AND T0.MinLevel > 0 AND T0.OnHand < T0.MinLevel
ORDER BY ShortQty DESC
Need your UDFs in this report, or a dashboard? We extend it for your company.Customize it →

What this query answers

Each Monday the purchasing assistant builds the reorder list. This answers which stocked items have fallen below their minimum level, how many units are missing and which vendor to order from.

To see the full on-hand, committed and on-order picture per warehouse, use the stock by warehouse query.

Sample output

Illustrative demo values. Your columns are the same; the numbers come from your company.

ItemCodeItemNameOnHandMinLevelShortQtyPreferredVendor
A00005Toner Cartridge Black126048V10000
A00007Paper A4 Box307040V20000
A00009USB Cable 2m52520V10000
A00011Mouse Pad8157

SQL Server vs SAP HANA

Only quoting differs. Note that OITM."CardCode" is the preferred vendor field on the item, and the alias "PreferredVendor" is quoted on HANA so it keeps its casing.

Common errors and fixes

  • An item is short in one warehouse but not listed: OITM.OnHand and MinLevel are company-wide totals. If you manage inventory levels per warehouse, read OITW.MinStock and OITW.OnHand per WhsCode instead.
  • Items already on order keep appearing: The query does not subtract open purchase orders. Add AND T0.OnHand + T0.OnOrder < T0.MinLevel to ignore items that are already being replenished.
  • PreferredVendor is empty: No preferred vendor is set on the item master (Purchasing Data tab). Fill it there; the query reads OITM.CardCode.

Need this report built into SAP Business One?

A saved query answers the question once. We build SAP Business One mobile apps: warehouse scanning, stock counts, sales orders and approvals on the Service Layer. Or hire a dedicated SAP B1 developer for the whole job, fixed price per phase.

Inventory

Related queries

Table reference: OITM table (Items (item master data))

How it works

Three steps, no signup

1

Copy the right version

Use the SQL Server tab for MS SQL databases and the HANA tab for SAP B1 on HANA.

2

Open Query Generator

In SAP Business One go to Tools → Queries → Query Generator, paste and click Execute.

3

Save and share

Click Save, pick a category and give the query a name. Your team can run it from Query Manager.

FAQ

Questions about this tool

How do I run the items below minimum stock query in SAP Business One?

Copy the version that matches your database, open Tools → Queries → Query Generator, paste it in the SQL box and click Execute. Save it to reuse it later.

Which tables does this query use?

It reads OITM from the standard SAP Business One schema. No user-defined fields are needed.

Can this be turned into a dashboard or alert?

Yes. We turn queries into Crystal reports, Excel reports that refresh themselves, SAP B1 alerts or WhatsApp messages for managers.

Need this inside SAP Business One?

We build add-ons, reports and integrations for SAP B1 on SQL Server and HANA. Tell us what you need and get a fixed price, usually within 24 hours.