Your company opened a second branch and suddenly nobody knows what each one sold. Reports get built by hand in Excel, inventory gets mixed up between warehouses and the accountant suffers at every close. The good news: SAP Business One multi-branch solves exactly this problem without creating separate databases. In this tutorial you will learn to enable it, configure it step by step and put it to work with ready-to-use SQL queries.

Why your company needs SAP Business One multi-branch
Many companies make the same mistake as they grow: they create one SAP database per branch. The result is duplicated master data, fragmented inventory and no consolidated view of the business. On top of that, every accounting close turns into a manual consolidation exercise that eats days.
The Multiple Branches functionality changes the game. With a single database you get:
- Centralized master data: one catalog of items, customers and suppliers shared by every branch.
- Traceability by branch: every marketing document (invoice, purchase order, delivery) is tagged with the branch it came from.
- Consolidated or segmented reports: you can analyze the whole business or filter by branch in seconds.
- Access control: each user only operates in the branches you assign them.
- Separate accounting by branch: journal entries and balances identifiable by business unit.
In other words, you stop managing islands of information. Which makes the decision to enable this functionality not a technical one, but a strategic one.
Prerequisites before starting
Before activating the functionality, check the following:
- SAP Business One 9.0 or higher (ideally 9.3 or 10.0), on SQL Server or SAP HANA.
- A user with superuser permissions to modify system initialization.
- A full database backup. This step is not negotiable: activation is practically irreversible once transactions have been recorded.
- A clear definition of your structure: how many branches, which warehouses belong to each one and which users operate at each location.
- Coordination with your accountant to decide whether you will use accounting dimensions or accounts segmented by branch.
The most important prerequisite, though, is conceptual: define the operating model first and touch the system second, never the other way around.
Step-by-step tutorial: configure SAP Business One multi-branch
Step 1: Enable the multiple branches functionality
First of all, go to Administration → System Initialization → Company Details → Basic Initialization tab. You will find the box there. «Enable Multiple Branches» (Enable Multiple Branches). Check it and confirm the warning message.
On activation, SAP automatically creates a main branch (Main) and assigns it every existing historical document, warehouse and user. Your current operation is not interrupted.
Step 2: Define your branches
Next, go to Administration → Setup → Financials → Branches. Create each branch with its code, name, tax ID (depending on your localization) and address details. These records are stored in the table OBPL, which we will use later in the queries.
Step 3: Assign warehouses to each branch
Then open Administration → Setup → Inventory → Warehouses and assign each warehouse to its corresponding branch. This link is key: it determines which inventory belongs to which branch and feeds the segmented reports.
Step 4: Assign users to branches
Then, in Administration → Setup → General → Users, assign each user the branches they can operate in. A sales rep at the north branch, for example, will only see and create documents for that branch. The result is fewer operational errors and stronger internal control.
Step 5: Configure numbering series by branch
Also, in Administration → System Initialization → Document Numbering you can create branch-specific series. This is mandatory in localizations with per-establishment tax requirements and, in any case, makes auditing easier.
Step 6: Operate and validate
Finally, create a test document in each branch. Check that the branch field appears in the document header and that the numbering matches the right series. From here on, every transaction is tagged with its BPLId.

SQL queries to put your branches to work
Configuring is only half the job. The real value shows up when you turn the data into decisions. So here are three essential queries, each in both versions: SQL Server and SAP HANA.
Query 1: Monthly sales by branch
This query answers the most basic and most urgent question: how much does each branch sell month by month?
SQL Server
-- Monthly sales by branch (last 12 months)
SELECT
B.BPLName AS Branch,
YEAR(I.DocDate) AS Year,
MONTH(I.DocDate) AS Month,
COUNT(I.DocEntry) AS Documents,
SUM(I.DocTotal) AS TotalSales
FROM OINV I
INNER JOIN OBPL B ON I.BPLId = B.BPLId
WHERE I.CANCELED = 'N'
AND I.DocDate >= DATEADD(MONTH, -12, GETDATE())
GROUP BY B.BPLName, YEAR(I.DocDate), MONTH(I.DocDate)
ORDER BY Branch, Year, Month
SAP HANA
-- Monthly sales by branch (last 12 months)
SELECT
B."BPLName" AS "Branch",
YEAR(I."DocDate") AS "Year",
MONTH(I."DocDate") AS "Month",
COUNT(I."DocEntry") AS "Documents",
SUM(I."DocTotal") AS "TotalSales"
FROM OINV I
INNER JOIN OBPL B ON I."BPLId" = B."BPLId"
WHERE I."CANCELED" = 'N'
AND I."DocDate" >= ADD_MONTHS(CURRENT_DATE, -12)
GROUP BY B."BPLName", YEAR(I."DocDate"), MONTH(I."DocDate")
ORDER BY "Branch", "Year", "Month"
The table OINV holds customer invoices and the field BPLId identifies the issuing branch. We exclude cancelled documents so they do not distort the analysis.
Query 2: Inventory value by branch
You also need to know how much capital is tied up at each location.
SQL Server
-- Inventory value by branch and warehouse
SELECT
B.BPLName AS Branch,
W.WhsCode AS Warehouse,
W.WhsName AS WarehouseName,
SUM(S.OnHand) AS StockUnits,
SUM(S.OnHand * S.AvgPrice) AS InventoryValue
FROM OITW S
INNER JOIN OWHS W ON S.WhsCode = W.WhsCode
INNER JOIN OBPL B ON W.BPLid = B.BPLId
WHERE S.OnHand > 0
GROUP BY B.BPLName, W.WhsCode, W.WhsName
ORDER BY InventoryValue DESC
SAP HANA
-- Inventory value by branch and warehouse
SELECT
B."BPLName" AS "Branch",
W."WhsCode" AS "Warehouse",
W."WhsName" AS "WarehouseName",
SUM(S."OnHand") AS "StockUnits",
SUM(S."OnHand" * S."AvgPrice") AS "InventoryValue"
FROM OITW S
INNER JOIN OWHS W ON S."WhsCode" = W."WhsCode"
INNER JOIN OBPL B ON W."BPLid" = B."BPLId"
WHERE S."OnHand" > 0
GROUP BY B."BPLName", W."WhsCode", W."WhsName"
ORDER BY "InventoryValue" DESC
This way you immediately spot branches sitting on excess stock while others lose sales to stockouts. That imbalance is idle money.
Query 3: Gross margin by branch
Finally, selling more does not always mean earning more. This query compares the real profitability of each branch.
SQL Server
-- Gross margin by branch (current year)
SELECT
B.BPLName AS Branch,
SUM(L.LineTotal) AS NetSales,
SUM(L.GrssProfit) AS GrossMargin,
CASE WHEN SUM(L.LineTotal) > 0
THEN SUM(L.GrssProfit) * 100.0 / SUM(L.LineTotal)
ELSE 0 END AS MarginPct
FROM INV1 L
INNER JOIN OINV I ON L.DocEntry = I.DocEntry
INNER JOIN OBPL B ON I.BPLId = B.BPLId
WHERE I.CANCELED = 'N'
AND YEAR(I.DocDate) = YEAR(GETDATE())
GROUP BY B.BPLName
ORDER BY MarginPct DESC
SAP HANA
-- Gross margin by branch (current year)
SELECT
B."BPLName" AS "Branch",
SUM(L."LineTotal") AS "NetSales",
SUM(L."GrssProfit") AS "GrossMargin",
CASE WHEN SUM(L."LineTotal") > 0
THEN SUM(L."GrssProfit") * 100.0 / SUM(L."LineTotal")
ELSE 0 END AS "MarginPct"
FROM INV1 L
INNER JOIN OINV I ON L."DocEntry" = I."DocEntry"
INNER JOIN OBPL B ON I."BPLId" = B."BPLId"
WHERE I."CANCELED" = 'N'
AND YEAR(I."DocDate") = YEAR(CURRENT_DATE)
GROUP BY B."BPLName"
ORDER BY "MarginPct" DESC
This report often reveals surprises: the branch that invoices the most is not always the one that leaves the most margin. Expansion decisions should therefore look at profitability, not just volume.
Variations and use cases
The multi-branch model adapts to a range of scenarios. For example:
- Retail with multiple stores: each store is a branch with its own document series and its own warehouse. Reports compare store performance instantly.
- Manufacturers with a plant and commercial offices: the plant runs purchasing and production; the offices run sales. Each flow stays separate without losing consolidation.
- Regional distributors: branches by geographic area with their own inventory, ideal for measuring turnover and stockouts by region.
- Tax requirements per establishment: in several Latin American localizations, each establishment requires its own tax numbering. Branch-level series solve this requirement natively.
You can also combine branches with cost centers: the branch segments the operation and the cost center segments the accounting analysis. They are complementary tools, not mutually exclusive ones.
Best practices and common mistakes
After seeing several implementations, these are the mistakes that come up most often:
- Activating without a backup or a plan. Activation is practically irreversible. Back up first, click second.
- Not assigning warehouses correctly. A warehouse in the wrong branch contaminates every inventory report. Check the assignment before you go live.
- Forgetting the numbering series. Without branch-level series, documents get mixed together and the tax audit gets complicated.
- Giving every user access to every branch. That cancels out the internal control the feature provides. Assign only what is needed.
- Not testing on a test database. Any structural setting must be validated first in a test environment. No exceptions.
The least obvious best practice, on the other hand, is organizational: name someone per branch responsible for data quality. Technology tags the transactions; people make sure they are recorded properly.

Official SAP resources
- SAP Help Portal: Enabling Multiple Branches
- OBPL table reference (SAP Business One SDK)
- SAP Community: SAP Business One forums
Conclusion: one database, the whole business
Enabling multi-branch in SAP Business One is not just ticking a box. It is organizing your company structure inside the system: branches defined, warehouses assigned, users controlled and numbering clean. The result is what every management team needs: seeing the whole business without losing the detail of each location.
If your company runs separate databases per branch, this is the moment to rethink it. Run the queries in this tutorial, measure what you are not seeing today, and take the step.
Want more tutorials like this one? In the Circulo Estrategico I publish practical SAP Business One guides with ready-to-use code you can apply directly to your operation. And if you have questions about your multi-branch setup, leave them in the comments.




