OITM table in SAP Business One (Items (item master data))
OITM is the SAP Business One item master table: one row per item with its code, name, group, flags and the stock totals for all warehouses together. Stock per warehouse is in OITW and prices are in ITM1, both joined on ItemCode.
OITM key fields
| Field | What it holds |
|---|---|
ItemCode | Item key. Joins to OITW, ITM1 and every document line table. |
ItemName | Item description. |
ItmsGrpCod | Item group. Joins to OITB.ItmsGrpCod. |
OnHand | Stock in all warehouses together. |
IsCommited | Quantity on open sales orders, all warehouses (spelled with one t). |
OnOrder | Quantity on open purchase orders, all warehouses. |
AvgPrice | Item cost used for stock valuation (moving average items). |
InvntItem | Y if the item is an inventory item. |
SellItem | Y if the item can be sold. |
PrchseItem | Y if the item can be purchased. |
MinLevel | Minimum stock level set on the item. |
CodeBars | Barcode of the item. |
How OITM relates to other tables
OITM is master data, not a document, so it has no line table. Related tables use ItemCode as the foreign key: OITW holds one row per item and warehouse, ITM1 one row per item and price list, and OITB is the item group. Every document line table (RDR1, INV1, PCH1…) points back to OITM through ItemCode.
Common joins
OITM T0 INNER JOIN OITW T1 ON T0.ItemCode = T1.ItemCode (stock per warehouse)OITM T0 INNER JOIN ITM1 T2 ON T0.ItemCode = T2.ItemCode (prices, filter T2.PriceList)OITM T0 INNER JOIN OITB T3 ON T0.ItmsGrpCod = T3.ItmsGrpCod (item group)
When you use the OITM table
OITM is the starting point for stock lists, price checks, reorder reports and item exports to e-commerce or a portal. Filter InvntItem = 'Y' when you only want stock items, and SellItem = 'Y' for items that appear on sales documents.
Example query: inventory items with stock and group
SQL Server
SELECT T0.ItemCode, T0.ItemName, T1.ItmsGrpNam, T0.OnHand, T0.IsCommited, T0.OnOrder, T0.OnHand - T0.IsCommited AS Available FROM OITM T0 INNER JOIN OITB T1 ON T0.ItmsGrpCod = T1.ItmsGrpCod WHERE T0.InvntItem = 'Y' ORDER BY T0.ItemCode
SAP HANA (column names in double quotes)
SELECT T0."ItemCode", T0."ItemName", T1."ItmsGrpNam", T0."OnHand", T0."IsCommited", T0."OnOrder", T0."OnHand" - T0."IsCommited" AS "Available" FROM OITM T0 INNER JOIN OITB T1 ON T0."ItmsGrpCod" = T1."ItmsGrpCod" WHERE T0."InvntItem" = 'Y' ORDER BY T0."ItemCode"
Paste either version in Tools → Queries → Query Generator. Need the other dialect for your own query? Use the SQL to HANA converter.
Common pitfall: OITM.OnHand is the total of every warehouse
OITM.OnHand adds up all warehouses, including ones you may not sell from (returns, transit, quality). For availability per warehouse, read OITW instead and filter the warehouses you need. See Stock by warehouse query.
Ready-made queries that use OITM
- Stock by warehouse: On hand, committed, ordered and available quantity per item and warehouse.
- Items below minimum stock: Inventory items whose on-hand quantity is below the minimum level set on the item.
- Inventory value by warehouse: Stock quantity multiplied by the item average cost, totalled per warehouse.
- Items with no price in a price list: Sales items that have a zero price in the chosen price list.
- Slow-moving items (no sales in 90 days): Items with stock on hand that have not been invoiced in the last 90 days.
Related tables
OITW (Item stock per warehouse) · INV1 (A/R Invoice (lines)) · OCRD (Business Partners) · search all SAP Business One tables
Sources: SAP Business One documentation and SDK (DI API database tables reference), SAP Help Portal.
Ready to get started?
Tell us what you need. You get a clear technical answer, a fixed scope and a price, usually within 24 hours.
