Symptom
You find that at least one of the following actions cannot be performed in the database:
- Creating a new posting period
- Making changes to an existing posting period
- Removing an existing posting period
Scenario:
You are adding, updating or removing a posting period.
Expected behavior:
Operation is completed successfully.
Actual behavior:
You receive one or more error messages similar to these:
- You cannot remove this item; its transactions are linked to an object '20XX-XX' [Message 173-44]
- Field cannot be updated (ODBC – 1029) [Message 131-183]
- This entry already exists in the following tables 'Posting Period' (OFPR) (ODBC-2035) [Message 131-183]
Cause
This is correct system behavior. SAP Business One does not allow creating a new period if the posting date range defined in Administration → System Initialization → Posting Periods overlaps with the posting date range of a previous period for which you entered transactions.
Reasoning:
- When you create a new posting period in Administration → System Initialization → Posting Periods → New Period, the system fills in the default values in the Posting Date From and Posting Date To fields for all the periods and sub-periods according to the calendar year, that is, from 01/01/20xx to 31/12/20xx.
- Before you post any document in the period/sub-period, the Posting Date From and Posting Date To fields are editable. To accommodate the posting periods to the requirements of various country/regions and business practices, the fiscal year can start, for example, in March rather than in January.
- When editing the Posting Date From and Posting Date To of the posting period or sub-period, be aware that:
- All documents you post up to the Posting Date To value will be included in the period-end closing, financial, accounting and tax reports of the posting period.
- You cannot create a new posting period with a start posting date before an existing period.
Resolution
If you created a posting period incorrectly and already added postings, your only option is to apply the following solution:
- Restore a backup of the database that does not contain any document with posting date after the start date of the new posting period that you want to create.
- Set back the Posting Date From and Posting Date To values to the correct or natural values and create the new posting period.
- Import all the documents with posting date after the start date mentioned in step 1.
Note: If documents exist for periods that are in between the target period (period you want to create) and the original period (existing one), then SAP Business One will not allow the creation of the target period. For example, there are no transactions in the target posting period (April 2017) or in the original posting period (April 2016); however, the system will verify if there are transactions between May 2016 and March 2017. If there are such transactions, the system will not allow the creation of the target posting period.
If the period to be added is, actually, not listed in the Posting Periods window (in the OFPR table), all the existing periods for the previous years look correct, and the error you receive is the following:
This entry already exists in the following tables 'Posting Period' (OFPR) (ODBC-2035) [Message 131-183]
Then the situation is most likely caused by unsupported customizations and you should proceed as follows:
- Test the solution first in a copy of the database.
- Remove all customizations as per SAP Note 2079411.
- Go to Help → Support Desk → Restore → Restore Numbering File and choose Yes to the system message Restore Numbering File?
- When applying the solution in the productive database, ensure that all the users have logged off the database and that you have taken a full backup.
Recommendation:
We recommend that the system administrator restricts full access to the setup of posting periods. You can control access under Administration → System Initialization → General Authorizations.