Slow-moving items (no sales in 90 days)

Items with stock on hand that have not been invoiced in the last 90 days.

Tables: OITM, INV1, OINVUse: Dead-stock clearance and discount planning.
SELECT T0.ItemCode, T0.ItemName, T0.OnHand, T0.AvgPrice, T0.OnHand * T0.AvgPrice AS StockValue
FROM OITM T0
WHERE T0.OnHand > 0 AND NOT EXISTS (
  SELECT 1 FROM INV1 T1
  INNER JOIN OINV T2 ON T1.DocEntry = T2.DocEntry
  WHERE T1.ItemCode = T0.ItemCode AND T2.DocDate >= DATEADD(day, -90, GETDATE())
)
ORDER BY StockValue DESC
Need your UDFs in this report, or a dashboard? We extend it for your company.Customize it →
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 slow-moving items (no sales in 90 days) 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, INV1, OINV 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.