Physical Inventory in SAP Business One: Step-by-Step Counting and Posting - featured image

Publications

Physical Inventory in SAP Business One: Step-by-Step Counting and Posting

Hector Pincheira

Hector Pincheira

CIO | CTO
Digital Strategy & Technology Innovation

items

Every year, many companies discover the same uncomfortable truth: what the system says and what is actually in the warehouse do not match. Learning to run the SAP Business One physical inventory correctly is the difference between a reliable close and decision-making built on false data. So in this step-by-step tutorial I show you how to set up the count, record the results, post the differences and, on top of that, audit the gaps with SQL queries ready for SQL Server and SAP HANA.

SAP Business One physical inventory - worker counting stock in the warehouse
The physical count is the moment when the reality of the warehouse meets the ERP data.

Why physical inventory decides the health of your company

Inventory is usually the largest asset on the balance sheet of an industrial or distribution company. Yet many organizations treat it as an annual formality. As a result, they carry differences that distort cost of sales, inflate fictitious profits and make MRP plan on quantities that do not exist.

When system stock does not reflect the warehouse, the problem is not an accounting one: it is strategic. A buyer reorders material that is already sitting in excess, or a sales rep promises a shipment that cannot be delivered. That way, an inventory gap turns into a commercial and reputational cost. So mastering the SAP Business One physical inventory is not a warehouse chore: it is a management control tool.

SAP Business One splits the process into two clear documents: the Inventory Counting, where you record what you actually counted, and the Inventory posting, where you adjust the stock and generate the journal entry. This separation also lets you review and approve the differences before touching accounting, which is essential for internal control.

Prerequisites before starting the count

Before opening the first document, it pays to prepare the ground. First, define authorizations: only specific profiles should post differences, because that step moves money in the books. Second, decide the counting strategy: full warehouse, item group, bin location or cycle counting.

The minimum requirements are: permissions in Inventory > Inventory Transactions > Inventory Counting; inventory-managed items; and, if you work with batches or serial numbers, being clear that the count is done at that level of detail. It is also advisable to freeze warehouse movements during the count so a sale does not alter stock while you are counting.

Step-by-step tutorial for counting in SAP Business One

Step 1: Create the Inventory Counting document

Navigate to Inventory > Inventory Transactions > Inventory Counting. Then select the items and the warehouse to count. You can filter by item range, by group or by bin location. SAP Business One will automatically bring in the system stock quantity for each line.

tick the checkbox Frozen if you want to block movements on those items while the count runs. That way you guarantee the system snapshot does not change between the moment you print the count sheets and the moment you record the results.

Step 2: Record the counted quantities

Enter in the counted quantity column what your team actually found. If you use several counters for the same item, SAP Business One compares the results against each other and against system stock, highlighting the largest difference. For example, if two counters report 98 and 100 units against a system that says 105, you see both discrepancies immediately.

SAP Business One physical inventory - warehouse shelving organized for counting
A count organized by bin location reduces errors and speeds up recording in the ERP.

Step 3: Analyze the differences before posting

This is the step that separates companies that merely count from those that actually control. Before adjusting, extract and analyze the differences with SQL. That way you prioritize the gaps by financial impact and spot patterns before touching accounting. The counting document is stored in tables OINC (header) and INC1 (lines).

SQL Server

-- Count differences sorted by magnitude (SQL Server)
SELECT
    T0."DocEntry"                               AS "CountNo",
    T0."CountDate"                              AS "Date",
    T1."ItemCode"                               AS "Item",
    T2."ItemName"                               AS "Description",
    T1."WhsCode"                                AS "Warehouse",
    T1."InStock"                                AS "System",
    T1."Counted"                                AS "Counted",
    (T1."Counted" - T1."InStock")               AS "Difference",
    (T1."Counted" - T1."InStock")
        * ISNULL(T3."AvgPrice", 0)              AS "ValueImpact"
FROM OINC T0
INNER JOIN INC1 T1 ON T0."DocEntry" = T1."DocEntry"
INNER JOIN OITM T2 ON T1."ItemCode" = T2."ItemCode"
LEFT  JOIN OITW T3 ON T1."ItemCode" = T3."ItemCode"
                  AND T1."WhsCode"  = T3."WhsCode"
WHERE T0."DocEntry" = '[%0]'
  AND T1."Counted" <> T1."InStock"
ORDER BY ABS(T1."Counted" - T1."InStock") DESC;

SAP HANA

-- Count differences sorted by magnitude (SAP HANA)
SELECT
    T0."DocEntry"                               AS "CountNo",
    T0."CountDate"                              AS "Date",
    T1."ItemCode"                               AS "Item",
    T2."ItemName"                               AS "Description",
    T1."WhsCode"                                AS "Warehouse",
    T1."InStock"                                AS "System",
    T1."Counted"                                AS "Counted",
    (T1."Counted" - T1."InStock")               AS "Difference",
    (T1."Counted" - T1."InStock")
        * IFNULL(T3."AvgPrice", 0)              AS "ValueImpact"
FROM OINC T0
INNER JOIN INC1 T1 ON T0."DocEntry" = T1."DocEntry"
INNER JOIN OITM T2 ON T1."ItemCode" = T2."ItemCode"
LEFT  JOIN OITW T3 ON T1."ItemCode" = T3."ItemCode"
                  AND T1."WhsCode"  = T3."WhsCode"
WHERE T0."DocEntry" = :DocEntry
  AND T1."Counted" <> T1."InStock"
ORDER BY ABS(T1."Counted" - T1."InStock") DESC;

The result is a prioritized list: which item is off, by how much and how much money that represents. Moreover, the column ValueImpact lets you apply the Pareto principle and focus on the 20% of items that explain 80% of the gap. Note: field names (Counted, InStock) may vary by version; confirm them in the SDK reference for your installation.

Step 4: Post the differences

Once the differences have been reviewed, create the Inventory posting document based on the count. This step adjusts stock and generates the matching journal entry (shrinkage or overages). As a result, accounting and the warehouse speak the same language again. The adjustments are recorded in tables OINB e INB1.

Before confirming, define the price the adjustment will be valued at. Be careful, though: posting at the wrong price produces a distorted journal entry. That is why this step should be reserved for a profile with accounting authorization, not the warehouse team.

Audit query: put a value on the gap by warehouse

To report to management, listing items is not enough: you have to translate the gap into money. The following query summarizes the impact by warehouse and shows the largest gaps, a direct input for the closing meeting.

SQL Server

-- Top 10 largest valued gaps (SQL Server)
SELECT TOP 10
    T1."WhsCode"                                AS "Warehouse",
    T1."ItemCode"                               AS "Item",
    T2."ItemName"                               AS "Description",
    (T1."Counted" - T1."InStock")               AS "UnitDiff",
    ABS((T1."Counted" - T1."InStock")
        * ISNULL(T3."AvgPrice", 0))             AS "AbsoluteImpact"
FROM OINC T0
INNER JOIN INC1 T1 ON T0."DocEntry" = T1."DocEntry"
INNER JOIN OITM T2 ON T1."ItemCode" = T2."ItemCode"
LEFT  JOIN OITW T3 ON T1."ItemCode" = T3."ItemCode"
                  AND T1."WhsCode"  = T3."WhsCode"
WHERE T1."Counted" <> T1."InStock"
ORDER BY "AbsoluteImpact" DESC;

SAP HANA

-- Top 10 largest valued gaps (SAP HANA)
SELECT
    T1."WhsCode"                                AS "Warehouse",
    T1."ItemCode"                               AS "Item",
    T2."ItemName"                               AS "Description",
    (T1."Counted" - T1."InStock")               AS "UnitDiff",
    ABS((T1."Counted" - T1."InStock")
        * IFNULL(T3."AvgPrice", 0))             AS "AbsoluteImpact"
FROM OINC T0
INNER JOIN INC1 T1 ON T0."DocEntry" = T1."DocEntry"
INNER JOIN OITM T2 ON T1."ItemCode" = T2."ItemCode"
LEFT  JOIN OITW T3 ON T1."ItemCode" = T3."ItemCode"
                  AND T1."WhsCode"  = T3."WhsCode"
WHERE T1."Counted" <> T1."InStock"
ORDER BY "AbsoluteImpact" DESC
LIMIT 10;

Note the key difference between platforms: SQL Server uses TOP 10 at the start, while SAP HANA uses LIMIT 10 at the end. Likewise, ISNULL() becomes IFNULL(). These differences look minor, but they are the number one cause of queries that «work at one client and fail at another».

Variations and use cases

The count is not always a full sweep. For example, cycle counting divides the inventory into groups and counts a subset each week, so you never stop the whole operation. Also, for warehouses with bin locations, counting by bin location lets you audit critical sectors without shutting down the entire warehouse.

Another frequent case is counting with mass import: when you use barcode scanners or an external app, you can import the results straight into the counting document. That removes manual keying and reduces human error, usually the biggest source of false gaps.

Best practices and common mistakes

The costliest mistake is posting without analyzing. Many companies adjust everything automatically and, as a result, bury real process problems -theft, shrinkage, receiving errors- under a simple journal entry. So always run the Step 3 queries before you post.

A second mistake is not freezing movements: if you sell while you count, the difference you see will be fictitious. Also avoid counting without a clear cut-off date; the system snapshot and the paper snapshot must correspond to the same instant. Finally, do not hand the posting of differences to the same team that counts: segregation of duties is a basic principle of internal control.

As a good practice, turn the gap into a management indicator. For example, measure the valued inventory impact as a percentage of the total warehouse value in each count. That turns an annual event into a continuous improvement metric management can track over time.

Official SAP Resources

To go deeper, review the official guide How to Conduct Inventory Counting with SAP Business One on the SAP Help Portal, as well as the documentation for the windows Inventory Counting e Inventory Posting. Moreover, the SDK table reference lets you confirm the exact field names of OINC, INC1, OINB e INB1 for your version.

Conclusion: count less, control more

Running the SAP Business One physical inventory well is not about counting more often, but about turning every count into actionable information. When you separate recording from adjusting, analyze the differences with SQL and put a value on the gap, you stop reacting at the close and start leading the control of your inventory.

If you want to implement these queries in your own SAP Business One and take inventory control to management level, join the Strategic Circle at hectorpincheira.com. There you will find the complete step by step and the templates ready to adapt to your operation. What is the gap you have not measured yet worth today?

Most Read

QlikSense Hierarchy: parent-child chart of accounts expanded by levels
QlikSense Hierarchy: the Chart of Accounts That Doesn't Add Up
QlikSense Sum TOTAL: share of each family over the total
QlikSense Sum TOTAL: the Percentage That Changes When You Filter
SAP Business One Inventory Revaluation - featured image of the tutorial
SAP Business One Inventory Revaluation: Fix Wrongly Loaded Costs
Empty chamber with wooden benches: the counterweight that required being present to be used
The Veto You Had to Say in Person: Your Decisions With No Counterweight
SAP Business One customizations - featured image of the pre-upgrade audit tutorial
SAP Business One Customizations: Pre-Upgrade Audit
SAP Business One Customer Concentration - featured image of the tutorial
SAP Business One Customer Concentration: Measure Your Risk with SQL

RELATED ARTICLES