The SAP Business One account determination is probably the most critical and least understood configuration in the entire system. Every invoice, every delivery and every inventory movement ends up in a G/L account the system picks automatically. And when that choice is misconfigured, the result is silent and devastating: distorted financial statements, endless accounting closes and books nobody in the company fully trusts.
I've seen companies discover, months after go-live, that the cost of sales for an entire product line was being posted to the wrong account. Nobody touched a manual journal entry. The system simply did what it had been told to do. Understanding how SAP Business One decides which account to send each transaction to is therefore not a consultant's topic: it's a direct responsibility of whoever leads finance and technology.

Why account determination defines the quality of your accounting
In SAP Business One, more than 90% of journal entries are generated automatically from marketing documents: invoices, deliveries, goods receipts, returns. The quality of your accounting therefore doesn't depend on your accountants, but on the configuration that determines which account each of those entries goes to.
There is also a multiplier effect. An error in account determination doesn't generate one incorrect transaction: it generates thousands. Every document that uses that configuration replicates the error. As a result, fixing it later means mass reclassifications, explanations to auditors and lost confidence in the reports.
For example, if the cost variance account of an item group points to an operating expense account instead of a cost account, your reported gross margin will be wrong every month, and probably nobody will catch it until an outside analysis exposes it.
Prerequisites before configuring
Before touching this configuration you need three things. First, a chart of accounts defined and validated with your accountant: account determination only assigns existing accounts, it doesn't fix a badly designed chart. Second, superuser permissions or authorization over Administration → Setup → Financials. Finally, read-only access to the database to run the audit queries we'll see below.
It's also essential to understand which determination version your company uses. SAP Business One offers two modes: the traditional one (by item, group or warehouse level) and the advancedone, available since version 9.0, which allows multidimensional rules. We'll look at both below.
How account determination works in SAP Business One
The three levels of traditional mode
In traditional mode, each item defines where it takes its G/L accounts from, through the field Set G/L Accounts By on the item master data record. There are three options, and the difference between them is strategic:
- Item Group: all accounts are inherited from the group (table OITG). It's the most maintainable option when your catalog is homogeneous.
- Warehouse: accounts are taken from the warehouse definition (OWHS/OITW). Useful when each warehouse represents a different business unit or branch.
- Item Level: each item defines its own accounts. Maximum flexibility, maximum risk of inconsistency.
Here, though, is the detail almost nobody documents: even though the method is defined per item, the effective accounts per warehouse always materialize in the table OITW (item data by warehouse). That table is therefore the source of truth for any audit.
Step 1: Review the global setting
Go Administration → System Initialization → General Settings → Inventory tab. There you'll find the default method for new items. That way you define your company standard once and stop every user from deciding on their own.
Step 2: Define the accounts by item group
In Administration → Setup → Inventory → Item Groups, Accounting tab, assign the inventory, cost of sales, revenue, variance and offsetting accounts for each group. And document every decision: six months later nobody will remember why the «Spare parts» group points to a different account.
Step 3: Review the accounts by warehouse
In Administration → Setup → Inventory → Warehouses, Accounting tab, is where you define the accounts that will be used by items set to «Warehouse». Remember, though, that if an item uses the «Item Group» method, this configuration doesn't apply to it.
Step 4: Enable advanced mode (optional, version 9.0+)
If your operation needs rules by destination country, business partner group or combinations of criteria, enable advanced account determination in Administration → System Initialization → Company Details → Basic Initialization tab, ticking Enable Advanced G/L Account Determination. You'll then be able to create rules with priorities that are evaluated in cascade: the most specific rule wins.
SQL queries to audit your account determination
The setup happens on screens, but the audit happens with SQL. Below are three essential queries. Each one includes a version for SQL Server and one for SAP HANA.
Query 1: Which method does each item use?
This query shows the distribution of determination methods across your catalog. As a result, you'll know immediately whether you have a homogeneous configuration or silent chaos.
SQL Server
-- Distribution of determination methods (SQL Server)
SELECT
CASE T0.GLMethod
WHEN 'C' THEN 'Item Group'
WHEN 'W' THEN 'Warehouse'
WHEN 'L' THEN 'Item Level'
END AS [Method],
COUNT(*) AS [Number of Items]
FROM OITM T0
WHERE T0.InvntItem = 'Y'
GROUP BY T0.GLMethod
ORDER BY COUNT(*) DESC;
SAP HANA
-- Distribution of determination methods (SAP HANA)
SELECT
CASE T0."GLMethod"
WHEN 'C' THEN 'Item Group'
WHEN 'W' THEN 'Warehouse'
WHEN 'L' THEN 'Item Level'
END AS "Method",
COUNT(*) AS "Number of Items"
FROM OITM T0
WHERE T0."InvntItem" = 'Y'
GROUP BY T0."GLMethod"
ORDER BY COUNT(*) DESC;
Query 2: Effective accounts by item and warehouse
This is the core audit query. For each item-warehouse combination it shows the inventory and cost accounts actually assigned, with their name in the chart of accounts. That way your accountant can validate the configuration without opening every record.
SQL Server
-- Effective accounts by item and warehouse (SQL Server)
SELECT
T0.ItemCode,
T1.ItemName,
T0.WhsCode,
T0.BalInvntAc AS [Inventory Acct],
T2.AcctName AS [Inventory Acct Name],
T0.SaleCostAc AS [Cost of Sales Acct],
T3.AcctName AS [Cost Acct Name]
FROM OITW T0
INNER JOIN OITM T1 ON T0.ItemCode = T1.ItemCode
LEFT JOIN OACT T2 ON T0.BalInvntAc = T2.AcctCode
LEFT JOIN OACT T3 ON T0.SaleCostAc = T3.AcctCode
WHERE T1.InvntItem = 'Y'
ORDER BY T0.ItemCode, T0.WhsCode;
SAP HANA
-- Effective accounts by item and warehouse (SAP HANA)
SELECT
T0."ItemCode",
T1."ItemName",
T0."WhsCode",
T0."BalInvntAc" AS "Inventory Acct",
T2."AcctName" AS "Inventory Acct Name",
T0."SaleCostAc" AS "Cost of Sales Acct",
T3."AcctName" AS "Cost Acct Name"
FROM OITW T0
INNER JOIN OITM T1 ON T0."ItemCode" = T1."ItemCode"
LEFT JOIN OACT T2 ON T0."BalInvntAc" = T2."AcctCode"
LEFT JOIN OACT T3 ON T0."SaleCostAc" = T3."AcctCode"
WHERE T1."InvntItem" = 'Y'
ORDER BY T0."ItemCode", T0."WhsCode";
Query 3: Detect inconsistencies against the group standard
This query detects items whose inventory account differs from the one defined in their item group. It is therefore the perfect tool for finding «custom» configurations nobody authorized.
SQL Server
-- Artículos con cuentas distintas al estándar del grupo (SQL Server)
SELECT
T0.ItemCode,
T1.ItemName,
T2.ItmsGrpNam AS [Grupo],
T0.WhsCode,
T0.BalInvntAc AS [Cta Asignada],
T2.BInvntAct AS [Cta del Grupo]
FROM OITW T0
INNER JOIN OITM T1 ON T0.ItemCode = T1.ItemCode
INNER JOIN OITG T2 ON T1.ItmsGrpCod = T2.ItmsGrpCod
WHERE T1.InvntItem = 'Y'
AND ISNULL(T0.BalInvntAc,'') <> ISNULL(T2.BInvntAct,'')
ORDER BY T2.ItmsGrpNam, T0.ItemCode;
SAP HANA
-- Artículos con cuentas distintas al estándar del grupo (SAP HANA)
SELECT
T0."ItemCode",
T1."ItemName",
T2."ItmsGrpNam" AS "Grupo",
T0."WhsCode",
T0."BalInvntAc" AS "Cta Asignada",
T2."BInvntAct" AS "Cta del Grupo"
FROM OITW T0
INNER JOIN OITM T1 ON T0."ItemCode" = T1."ItemCode"
INNER JOIN OITG T2 ON T1."ItmsGrpCod" = T2."ItmsGrpCod"
WHERE T1."InvntItem" = 'Y'
AND IFNULL(T0."BalInvntAc",'') <> IFNULL(T2."BInvntAct",'')
ORDER BY T2."ItmsGrpNam", T0."ItemCode";

Variations and use cases
These queries allow useful variations. For example, you can add the revenue accounts (the IncomeAcct column in OITW) to audit sales determination, or filter by a specific warehouse before opening a branch. And if you use advanced mode, you can cross the results against your rules to validate that the priority cascade produces the expected result.
Another frequent case: multi-country companies that need different accounts depending on the location. In that scenario, advanced determination with a destination-country criterion avoids duplicating item catalogs, which drastically reduces maintenance.
Best practices and common mistakes
First practice: standardize the method by item group whenever you can. The flexibility of item level almost never justifies its maintenance cost. Second: run the inconsistency query (Query 3) as part of your monthly close; five minutes of audit save weeks of reclassifications.
Among the most common mistakes is changing determination accounts while there is stock in transit or open documents, which produces entries split between the old and the new account. Another classic is enabling advanced determination without mentally switching off the traditional logic: advanced rules take precedence, and if nobody documents them, the system's behavior becomes inexplicable to the accounting team.
Finally, never modify these settings directly in production without testing on a test database. An account change affects every future document immediately.
Official SAP resources
To go deeper, check the official documentation: the guide on Account Determination in the SAP Help Portal and the section on G/L Account Determination: Inventory Tab.
Conclusion: automatic accounting gets audited too
Account determination is the invisible bridge between your operation and your financial statements. Treating it as a technical setting you define once and forget is therefore a strategic mistake. The three queries in this tutorial give you immediate visibility over that bridge: which method each item uses, which accounts are actually active and where there are deviations from the standard.
Run the audit this month. If you find inconsistencies, you're not facing a technical problem: you're facing an opportunity to regain control of your accounting. And if this content added value for you, in the Círculo Estratégico we keep publishing practical tutorials like this one, with code ready to run in your SAP Business One.




