SAP Business One: Posting Date Blocked by a Locked Period
SAP Business One Date deviates from permissible range posting period locked
Also searched as
- SAP B1 posting period locked error
- SAP Business One unlock posting period
- SAP B1 date deviates from permissible range
- SAP Business One posting period unlocked except sales
Short answer
When SAP Business One reports that the posting date deviates from the permissible range, the date falls in a posting period that is locked or in a sub-period that does not allow that type of posting. Check Administration > System Initialization > Posting Periods, confirm the period status and sub-period, and have an authorized user change it, or move the document to a date in an open period.
Applies to: SAP Business One 9.x and 10.0, SQL Server and SAP HANA, all documents with accounting impact (journal entries, invoices, goods movements)
How to find and fix the blocked period
- 1Note the posting date on the document and check the posting date versus the document date and due date fields. The posting date is the one that is checked.
- 2Open Administration > System Initialization > Posting Periods and find the period that contains that date.
- 3Read the Period Status: Unlocked, Unlocked Except Sales, Locked, or Closing Period. Unlocked Except Sales still blocks sales documents.
- 4If the period uses sub-periods, open them and check each sub-period status as well. A locked sub-period blocks postings that the main period would allow.
- 5Check the From and To dates, including the 'Posting Date From/To' range, for typing errors, for example a wrong year.
- 6Ask the finance owner whether the period may be reopened. Do not unlock a closed period only to fit one posting.
- 7If approved, set the status to Unlocked for the shortest time needed, post the document, and lock it again. If not approved, post in the current open period and document the reason.
- 8Check that your user has the authorization to post in locked periods only if that is intended. Normally it should not.
How posting periods control dates
Posting periods in Business One restrict which dates accept accounting-relevant documents. Each period has a start and end, a status, and optional sub-periods such as months inside a financial year. When you add a document, the posting date is compared with the period definitions, and a locked match rejects the document.
The status values behave differently. Unlocked allows everything. Unlocked Except Sales allows purchasing, inventory and journal postings but blocks sales documents. Locked blocks all postings by ordinary users. Closing Period is used at year end for closing entries.
Checking only the main period is a common mistake. Sub-periods can have their own status, and a locked sub-period in an unlocked main period still blocks that month.
Common causes in daily operations
Back-dated goods receipts and invoices are the usual cause. A warehouse team receives goods on the last day of the month, but the receipt is entered after finance locked the month. The receipt then has to go in the open period, and the date difference needs a note.
Another cause is a wrongly defaulted posting date. Users sometimes keep the document date from a copied document, and the copy carries a date in a locked period. Copy-to functions in Business One bring dates across, so check them after copying.
Year-end setups also trip people: a new financial year has not been created yet, so there is no period for January dates, and the error appears at the first posting of the year. Add the periods first.
SELECT "Code", "Name", "F_RefDate", "T_RefDate", "PeriodStat" FROM "OFPR" ORDER BY "F_RefDate" DESC -- sub-periods SELECT "AbsEntry", "Name", "F_RefDate", "T_RefDate", "PeriodStat" FROM "OACP"
Authorization and control
Business One lets finance control who can post to locked periods through authorizations, and in some versions through a separate period-locking authorization. This is an audit control, so changes to period status should be restricted and logged.
Use the Document Log and the audit trail to see who changed a period status and when. If a period is unlocked repeatedly for 'one quick posting', that is a process problem to fix with a cut-off calendar and an agreed late-posting route.
Integrations and the Service Layer
The same rule applies to integration postings. A job that writes journal entries or delivery notes through the Service Layer or DI API fails with this error when it runs after period lock with an old date. Have the integration use the current date or a date from a configured override, and log failures rather than dropping them.
Common pitfalls
- !Checking only the main period and missing a locked sub-period.
- !Unlocking a closed period for a single document and leaving it unlocked.
- !Assuming Unlocked Except Sales allows sales documents.
- !Copying a document and keeping its old posting date.
- !Forgetting to create the new financial year's periods before the first January posting.
- !Giving ordinary users the authorization to post in locked periods.
How an ERP-grounded AI assistant handles this
An assistant grounded in SAP Business One, such as ERPray, can read the posting period table, show the status of the period and sub-period for a given date, and list who last changed it, so finance can decide quickly. It can also scan an integration log for postings that failed because of dates. It does not unlock periods or change statuses. That is a controlled finance action, and any write-back stays behind human approval.
Frequently asked questions
Where do I unlock a posting period in SAP Business One?
Go to Administration > System Initialization > Posting Periods, select the period, and change its status. Do it only with finance approval and relock it afterwards. If sub-periods are in use, check and change those too, because they can still block the date.
What does Unlocked Except Sales mean?
It lets non-sales postings through, such as purchase documents, inventory movements and journal entries, but blocks sales documents. Teams use it during close so finance can finish adjustments while no new invoices appear in the period.
Does the error depend on document date or posting date?
The posting date drives the period check. Document date and due date are separate fields. If the error appears after copying a document, compare all three dates because users often fix the wrong one.
Can I let an integration post into a locked period?
It is possible only if the integration user has the authorization, but it weakens the control. A better design is to have the integration post with a date in the open period and keep the original date in a user field for reference.
Related
SAP F5 060: Posting Only Possible in Periods X and Y
Message F5 060 fires when a document date falls in a fiscal period that the posting period variant has not opened for that account type. Either change the document/posting date into an open period, or have Finance open the required period and account type in OB52 for the relevant variant.
Error fixFix SAP Business One Service Layer 'Invalid session' (code 301)
The Service Layer returns code 301 'Invalid session or session already timed out' when the B1SESSION cookie you send no longer maps to a live session. The usual causes are the default idle timeout (30 minutes), a missing or altered cookie, a load balancer sending the call to a different node because ROUTEID was dropped, or a restarted Service Layer. Fix it by keeping cookies on every call and re-logging in once on a 301.
Error fixFix SAP Business One 'Quantity falls below zero' (-2028) on Production Issue
SAP Business One raises 'Quantity falls below zero' (ODBC -2028) when a goods issue, including an Issue for Production, would push an item's on-hand quantity in a warehouse, or a batch or serial, below zero and negative inventory is not allowed. Fix it by receiving the stock first, correcting the warehouse or batch, or deliberately allowing negative stock for the right items.
Error fixSAP M7 021: Deficit of SL Stock Quantity
M7 021 fires during a goods issue, delivery, or confirmation when SAP checks the unrestricted-use (SL) stock for the exact plant, storage location and batch combination and finds less than what you are trying to post out. Fix the entry (batch, storage location, quantity) first; only enable negative stock or downgrade the message to a warning if the business genuinely needs to post ahead of a receipt.
Error fixSAP IDoc Status 51: Application Document Not Posted
Status 51 tells you the IDoc reached the application layer and failed to post, but the status text itself is not the error - the real cause sits in the status record's long text or the linked application log. Fix the underlying data or configuration, then reprocess the IDoc through BD87 rather than editing the status.
Error fixSAP Short Dump TIME_OUT: Maximum Runtime Exceeded
A TIME_OUT runtime error means a dialog (or RFC) work process ran longer than the maximum allowed runtime, controlled by profile parameter rdisp/max_wprun_time (600 seconds by default). The fix is almost always to move the long-running work to background processing or tune the underlying program, not to raise the timeout.
AI for ERPAI for SAP Business One, Without Sending Your Books to a Public API
Add AI to SAP Business One without sending customer data or financials to a public API. Service Layer and DI API integration, sized for an SMB budget.
Stuck on SAP Business One?
Talk to engineers who work inside SAP Business One every week, and who build private AI that answers these questions from your own ERP data.