Does your company have multiple branches and you don't know how to ensure that each one issues documents with its own numbering? Or perhaps you started a new fiscal year and need to reset your invoice numbering from 1? The SAP Business One document numbering it is one of those configurations that, if done incorrectly, creates legal, accounting, and operational problems that are difficult to resolve. In this tutorial you will learn how to correctly configure document numbering series in SAP B1, control numbering by branch, manage fiscal periods, and check the status of your series with ready-to-execute SQL queries.
Why document numbering matters more than you think
In many Latin American countries—Chile, Mexico, Colombia, Peru—tax document numbering has a legal character. A break in the numbering or a duplicate can trigger observations during a tax audit. However, beyond regulatory compliance, proper series configuration in SAP Business One is the foundation of operational traceabilityto know which branch issued which document, in which period, and under which folio.
Furthermore, in companies with multiple warehouses, branches, or business units, it is essential that each unit operates with its own series. Otherwise, numbering conflicts, duplicate documents, and a loss of control over the origin of each transaction arise.

Prerequisites
- Access to SAP Business One with profile of superuser or System Administration permissions
- Basic knowledge of the SAP B1 Administration module
- Access to the Query Manager to execute the SQL queries
- SAP Business One version 9.x or higher (compatible with SQL Server and SAP HANA)
Step 1: Access the document numbering settings
In SAP Business One, the series settings are located in the menu Administration → System Settings → Document Numbering. On this screen, you'll see all the types of documents in the system: Sales Invoices, Purchase Orders, Deliveries, Credit Memos, and others. For each document, you can define multiple series, each with its own starting and ending number range.
For example, if you have two branches—Santiago and Concepción—you can create the series FAC-SCL-2026 for the first one and FAC-CCP-2026 for the second one, both of which are the same type of document, «Customer Invoice.» This way, each branch operates with its own folio range, without the risk of overlap.
Step 2: Create a new series of documents
To add a new series to a specific document type, follow these steps:
- Select the document type (for example, Accounts Receivable Invoice)
- Click on Add Row at the bottom of the series table
- Define the Series name: Use descriptive names such as FAC-SUC1-2026 o FAC-MTTO-2026
- Set the Starting number: typically 1 or the number at which the series begins
- Set the Final issue: the maximum allowed (for example, 99999999)
- Define the Period Indicator: links the series to the current fiscal period
- If you have Branch Active, assign the corresponding BPL ID
- Mark the series as Default whether it will be the main series of the document
Click on Update to save the changes. From that moment on, users will be able to select that series when creating documents of the configured type.
Step 3: Configure series by branch
If your company works with the functionality of Branch (Branch / Establishment) In SAP Business One, you can restrict which series each branch can use. Consequently, when a user creates an invoice from the «Santiago Norte» branch, the system will only show them the series assigned to that branch, eliminating the risk of incorrect usage.
In the settings of each series, the field BPL ID (Business Place) associates the series with a specific branch. This field is key for industrial companies with plants, warehouses, and points of sale in different locations. However, if you do not have the Branch functionality active, this field will remain empty and the series will be available to all users.

Step 4: Manage the period indicator
The Period Indicator It is one of the most important and least understood concepts in numbering setup in SAP B1. It determines which fiscal period each series belongs to. To configure it, go to Administration → System Definition → Period Indicators.
Consequently, upon the start of a new fiscal year, the correct process is as follows:
- Create a new period indicator (for example, «2026»)
- Go to "Document Numbering" and add new series associated with that period
- Set the new series as default
- The previous year's series are automatically locked when the active period changes
However, a very common mistake is Do not create the new period on time, so that users do not start the fiscal year by issuing documents under the previous period, thereby mixing document numbers from different years. Therefore, this process must be completed before the end of the year and validated by the administration team.
Step 5: Check the status of the series via SQL (NNM1 table)
The SAP Business One document numbering is stored primarily in the table NNM1. Understanding this table will allow you to monitor the status of your series at all times—something the graphical interface doesn't always show clearly. Below are three queries ready to run in the SAP B1 Query Manager.
View all series configured by document type
SQL Server
-- NNM1: Document numbering series in SAP Business One
-- ObjectCode: 13=Invoice, 15=Delivery, 18=Order, 20=PO, 21=Goods Receipt
SELECT
N.ObjectCode AS DocumentType,
N.Series AS SeriesCode,
N.SeriesName AS SeriesName,
N.InitNum AS InitialNumber,
N.NextNum AS NextNumber,
N.LastNum AS LastNumber,
(N.LastNum - N.NextNum + 1) AS AvailableNumbers,
N.Locked AS Locked,
N.PeriodIndicator AS Period,
N.BPLid AS Branch,
N.Remark AS Remark
FROM NNM1 N
WHERE N.ObjectCode IN ('13','15','16','17','18','19','20','21','22','23','24')
ORDER BY N.ObjectCode, N.SeriesSAP HANA
-- NNM1: Document Numbering Series in SAP Business One (HANA)
SELECT
N."ObjectCode" AS "DocumentType",
N."Series" AS "SeriesCode",
N."SeriesName" AS "SeriesName",
N."InitNum" AS "InitialNumber",
N."NextNum" AS "Next Number",
N."LastNum" AS "Last Number",
(N."LastNum" - N."NextNum" + 1) AS "Available Numbers",
N."Locked" AS "Locked",
N."PeriodIndicator" AS "Period",
N."BPLid" AS "Branch",
N."Remark" AS "Comment"
FROM NNM1 N
WHERE N."ObjectCode" IN ('13','15','16','17','18','19','20','21','22','23','24')
ORDER BY N."ObjectCode", N."Series""Preventive alert — series with few numbers available
This query is essential for proactive monitoring. First, it defines a threshold (1,000 numbers in the example) and displays all active series that are about to expire. Therefore, run it monthly as part of your SAP B1 administration routine.
SQL Server
-- Active series with fewer than 1,000 available numbers
-- Adjust the value 1,000 based on your transaction volume
SELECT
N.ObjectCode AS DocumentType,
N.SeriesName AS SeriesName,
N.NextNum AS NextNumber,
N.LastNum AS FinalNumber,
(N.LastNum - N.NextNum + 1) AS AvailableNumbers,
N.PeriodIndicator AS Period,
N.BPLid AS Branch,
-- Percentage of capacity used
CAST(
(CAST(N.NextNum - N.InitNum AS FLOAT) /
NULLIF(N.LastNum - N.InitNum + 1, 0)) * 100
AS DECIMAL(5,2)) AS PercentageUsed
FROM NNM1 N
WHERE (N.LastNum - N.NextNum + 1) < 1000
AND N.Locked = 'N'
ORDER BY AvailableNumbers ASCSAP HANA
-- Active series with less than 1000 numbers available (HANA)
SELECT
N."ObjectCode" AS "DocumentType",
N."SeriesName" AS "SeriesName",
N."NextNum" AS "NextNumber",
N."LastNum" AS "FinalNumber",
(N."LastNum" - N."NextNum" + 1) AS "AvailableNumbers",
N."PeriodIndicator" AS "Period",
N."BPLid" AS "Branch",
CAST(
(CAST(N."NextNum" - N."InitNum" AS DECIMAL(10,2)) /
NULLIF(N."LastNum" - N."InitNum" + 1, 0)) * 100
AS DECIMAL(5,2)) AS "PercentageUsed"
FROM NNM1 N
WHERE (N."LastNum" - N."NextNum" + 1) < 1000
AND N."Locked" = 'N'
ORDER BY "AvailableNumbers" ASCQuery 3: History of Documents Issued by Series (Customer Invoices)
This query joins the NNM1 table with the OINV table (Customer Invoices) to show how many documents were issued for each series over the past 12 months. This allows you to understand the rate at which numbers are being used and to project when you’ll need to expand or renew a series.
SQL Server
-- Documents issued by series in Customer Invoices (last 12 months)
SELECT
N.SeriesName AS Series,
COUNT(I.DocEntry) AS TotalInvoices,
MIN(I.DocNum) AS FirstNumber,
MAX(I.DocNum) AS LastNumber,
MIN(I.DocDate) AS FirstDate,
MAX(I.DocDate) AS LastDate,
-- Monthly average of documents
CAST(COUNT(I.DocEntry) / 12.0 AS DECIMAL(10,2)) AS MonthlyAverage
FROM OINV I
INNER JOIN NNM1 N ON I.Series = N.Series
AND N.ObjectCode = '13'
WHERE I.DocDate >= DATEADD(YEAR, -1, GETDATE())
AND I.CANCELED = 'N'
GROUP BY N.SeriesName
ORDER BY TotalInvoices DESCSAP HANA
-- Documents issued by series in A/R Invoices (last 12 months) - HANA
SELECT
N."SeriesName" AS "Series",
COUNT(I."DocEntry") AS "TotalInvoices",
MIN(I."DocNum") AS "FirstNumber",
MAX(I."DocNum") AS "LastNumber",
MIN(I."DocDate") AS "FirstDate",
MAX(I."DocDate") AS "LastDate",
CAST(COUNT(I."DocEntry") / 12.0 AS DECIMAL(10,2)) AS "MonthlyAverage"
FROM OINV I
INNER JOIN NNM1 N ON I."Series" = N."Series"
AND N."ObjectCode" = '13'
WHERE I."DocDate" >= ADD_YEARS(CURRENT_DATE, -1)
AND I."CANCELED" = 'N'
GROUP BY N."SeriesName"
ORDER BY "TotalInvoices" DESC
Common Use Cases
Case 1: Change in Fiscal Year — Renewing Series Without Losing History
At the beginning of each year, many companies need to reset the numbering of their documents to 1. The correct procedure is: Create the new period indicator, then add new series in "Document Numbering" for that period, and set them as the default. Do not remove the old series; they will simply remain inactive for that period. Documents issued under the previous series remain searchable and printable.
Case 2: New operational branch
When opening a new branch, create specific series for each type of document that that branch will issue. For example, if the «Antofagasta» branch issues invoices and dispatch guides, create the series FAC-ANT-2026 and GD-ANT-2026, both with the BPL ID corresponding to that branch. This way, you not only control the numbering but also achieve geographic traceability in all your reports.
Case 3: Expanding the range of an active series
If a series is about to run out, you can increase its final number directly on the Document Numbering screen, as long as the new range does not conflict with another series. However, if you need a final number that exceeds the field limit, you'll need to create a new series and set it as the default from that point on.
Best practices and common mistakes
1. Never use generic names like «Series1» or «Default». Consequently, if you face an audit, you won't be able to explain which branch, period, or business unit issued which document. Use descriptive naming conventions: FAC-SUC1-2026, OC-PLANT-2026.
2. Monitor the stock of available numbers monthly. If a series reaches its final number, SAP B1 will not allow the issuance of more documents with that series and the operational process stops. Therefore, Query 2 of this tutorial must be part of your administration routine.
3. Do not confuse the internal DocNum with the tax folio number. In SAP B1, the DocNum It is the internal system number. For electronic invoicing (DTE in Chile, CFDI in Mexico, DIAN in Colombia, etc.), country-specific add-ons or additional fields are required. The DocNum and the tax folio can—and often must—be different.
4. Beware of blocked series. A blocked series (Locked = 'Y') cannot be used for new documents. However, documents already issued with that series remain accessible. Never unlock a series from the previous year to issue documents in the new period; that mixes tax and accounting records from different years.
5. Document every series you create. Use the «Remark» field in NNM1 to record who created the series, when, and why. Additionally, keep an external record of the numbering ranges assigned by tax authorities, especially in electronic invoicing environments.
Official SAP resources
- SAP Business One Help Center — Official documentation on document numbering and fiscal period configuration
- SAP Community: Business One — Forums with real cases of series configuration in production environments
- SAP Support Portal — SAP Note on Document Numbering and Branch Management in SAP B1
Conclusion
The SAP Business One document numbering It seems like a simple configuration, but it has a direct impact on tax compliance, operational traceability, and your company's credibility during an audit. Do not leave it to chance or configure it just once without reviewing it again.
As a result of applying what you learned today: configure your series with descriptive names, broad ranges, well-defined periods, and monitor them with the SQL queries from the NNM1 table. The SAP B1 Query Manager is your ally to maintain total control without depending on manual reports or visual reviews that always arrive late.
If you are a member of Strategic Circle, you have access to all SAP Pro tutorials on this blog, where we dive deep into the most technical and strategic aspects of SAP Business One. Ready to take your mastery of SAP B1 to the next level?




