Skip to content

Use SQL Query for updated stock items

Updated October 15, 2026about 1 min read

Choose a custom SQL query in SAP Business One that finds the items whose stock has changed.

By default, Junipeer finds changed items by looking at stock movements (such as goods receipts, goods issues, deliveries and returns). This can miss updates. A custom query is more reliable, but needs some setup in SAP Business One – ask Junipeer support for help.

Choose from the list. It shows the saved queries in your SAP Business One whose name starts with junipeer..

Good to know

  • The query must return ItemCode, and use the parameter fromDate and, ideally, fromTime. Without a time, only the date is used.

  • Queries whose name doesn't start with junipeer. are not shown in the list.

  • Example query: SELECT DISTINCT m.[ItemCode] FROM [OINM] m WHERE (m.[DocDate] > :fromDate) OR (m.[DocDate] = :fromDate AND m.[DocTime] >= :fromTime)

  • The format of the parameters is set in Format for fromDate parameter in SQL query for updated stock items and Format for fromTime parameter in SQL query for updated stock items.

Did this article help you?