OITB table in SAP Business One (Item Groups)

OITB is the SAP Business One item groups table: one row per item group, keyed by ItmsGrpCod, with the group name, the inventory valuation method and the default G/L accounts (inventory, cost of goods sold, revenue and more). Items point to their group through OITM.ItmsGrpCod.

OITB key fields

FieldWhat it holds
ItmsGrpCodItem group number, the key. OITM.ItmsGrpCod points to it.
ItmsGrpNamItem group name.
LockedN = changeable, Y = locked.
InvntSysInventory valuation method: A = moving average, S = standard, F = FIFO.
BalInvntAcInventory account. Joins to OACT.AcctCode.
SaleCostAcCost of goods sold account.
RevenuesAcRevenue account.
ExpensesAcExpense account.
PriceDifAcPrice difference account.
PlaningSysPlanning method: M = MRP, N = none.
PrcrmntMtdProcurement method: B = buy, M = make.
MinOrdrQty / OrdrMulti / LeadTimeMinimum order quantity, order multiple and lead time defaults.

How OITB relates to other tables

OITB is master data with no line table. Every item in OITM belongs to one group through OITM.ItmsGrpCod. The account columns (BalInvntAc, SaleCostAc, RevenuesAc and the others) all point to OACT.AcctCode, so you can show the account names next to each group.

Common joins

  • OITB T0 LEFT JOIN OITM T1 ON T1.ItmsGrpCod = T0.ItmsGrpCod (items in the group)
  • OITB T0 LEFT JOIN OACT T2 ON T2.AcctCode = T0.BalInvntAc (inventory account name)
  • OITB T0 LEFT JOIN OACT T3 ON T3.AcctCode = T0.SaleCostAc (COGS account name)

When you use the OITB table

Use OITB to group sales, stock and valuation reports by item group, to check that every group has the right inventory and COGS accounts before go-live, and to find groups with no items or with the wrong valuation method.

Example query: item groups with valuation method, accounts and number of items

SQL Server

SELECT T0.ItmsGrpCod, T0.ItmsGrpNam, T0.InvntSys, T0.BalInvntAc, T0.SaleCostAc,
  T0.RevenuesAc, COUNT(T1.ItemCode) AS Items
FROM OITB T0
LEFT JOIN OITM T1 ON T1.ItmsGrpCod = T0.ItmsGrpCod
GROUP BY T0.ItmsGrpCod, T0.ItmsGrpNam, T0.InvntSys, T0.BalInvntAc, T0.SaleCostAc, T0.RevenuesAc
ORDER BY T0.ItmsGrpNam

SAP HANA (column names in double quotes)

SELECT T0."ItmsGrpCod", T0."ItmsGrpNam", T0."InvntSys", T0."BalInvntAc", T0."SaleCostAc",
  T0."RevenuesAc", COUNT(T1."ItemCode") AS "Items"
FROM OITB T0
LEFT JOIN OITM T1 ON T1."ItmsGrpCod" = T0."ItmsGrpCod"
GROUP BY T0."ItmsGrpCod", T0."ItmsGrpNam", T0."InvntSys", T0."BalInvntAc", T0."SaleCostAc", T0."RevenuesAc"
ORDER BY T0."ItmsGrpNam"

Paste either version in Tools → Queries → Query Generator. Need the other dialect for your own query? Use the SQL to HANA converter.

Common pitfall: Reading item group names from OITM

OITM stores only the group number (ItmsGrpCod), not the name. Join OITB to show ItmsGrpNam in reports, and use a LEFT JOIN from OITB when you want to see empty groups too. The accounts on OITB are group defaults; check them before posting the first stock documents. See OITM table (item master).

Ready-made queries that use OITB

Questions about the OITB table

How do I get the item group name for an item in SAP B1?

Join OITB on OITB.ItmsGrpCod = OITM.ItmsGrpCod and read OITB.ItmsGrpNam.

What do the InvntSys values in OITB mean?

A = moving average, S = standard and F = FIFO: the default inventory valuation method of the group.

Where are the G/L accounts of an item group stored?

In OITB columns such as BalInvntAc (inventory), SaleCostAc (cost of goods sold), RevenuesAc and ExpensesAc. They point to OACT.AcctCode.

Related tables

OITM (Items (item master data)) · OACT (G/L Accounts (chart of accounts)) · OMRC (Manufacturers) · 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.