|
| 1 | +--- |
| 2 | +title: Troubleshoot Common Issues During Inventory Closing, Recalculating, and Reverse Operations |
| 3 | +description: Resolve common inventory closing, recalculation, and reverse operation errors in Dynamics 365 Supply Chain Management. Get step-by-step troubleshooting guidance for SQL issues, fiscal periods, and more. |
| 4 | +ms.date: 11/26/2025 |
| 5 | +ms.search.form: InventClosing |
| 6 | +ms.reviewer: soumyamoydas, kamaybac, aevengir, v-shaywood |
| 7 | +ms.search.region: Global |
| 8 | +ms.search.validFrom: 2021-05-31 |
| 9 | +ms.dyn365.ops.version: 10.0.43 |
| 10 | +ms.custom: sap:Cost management\Issues with inventory closing and recalculation |
| 11 | +--- |
| 12 | +# Troubleshoot inventory closing, recalculation, and reverse operations |
| 13 | + |
| 14 | +This article explains how to troubleshoot common errors that occur during inventory closing, recalculation, or reverse operations in Microsoft Dynamics 365 Supply Chain Management. |
| 15 | + |
| 16 | +## Another closing or adjustment is in progress |
| 17 | + |
| 18 | +### Symptoms |
| 19 | + |
| 20 | +An inventory closing or recalculation fails and generates the following error message: |
| 21 | + |
| 22 | +> Another closing or adjustment has not finished yet |
| 23 | +
|
| 24 | +Also, a new closing or recalculation voucher isn't created in the [Closing and Adjustment](/dynamics365/finance/localizations/russia/rus-inventory-adjustment-wizard) form. |
| 25 | + |
| 26 | +### Cause |
| 27 | + |
| 28 | +This issue occurs if you try to run a new closing or recalculation while a previous closing or voucher execution is still in progress. |
| 29 | + |
| 30 | +### Solution |
| 31 | + |
| 32 | +Wait for the previous closing or voucher process to finish before you run a new closing or recalculation. |
| 33 | + |
| 34 | +## Can't select a record in current client sessions |
| 35 | + |
| 36 | +### Symptoms |
| 37 | + |
| 38 | +An inventory closing, recalculation, or reverse fails and generates the following error message: |
| 39 | + |
| 40 | +> Batch task failed: Cannot select a record in Current client sessions (SysClientSessions). Sessionld: 0, 0. The SQL database has issued an error. |
| 41 | +
|
| 42 | +### Cause |
| 43 | + |
| 44 | +This issue might be caused by Microsoft SQL Server database unavailability, deadlocks, blockings, or other errors. |
| 45 | + |
| 46 | +### Solution |
| 47 | + |
| 48 | +Usually, these issues are transient and don't cause any data corruption. Retry the operation. |
| 49 | + |
| 50 | +## Duplicate reverse is not allowed |
| 51 | + |
| 52 | +### Symptoms |
| 53 | + |
| 54 | +An inventory reverse fails and generates the following error message: |
| 55 | + |
| 56 | +> Another Inventory \<OperationType\> reverse for voucher \<VoucherID\> is running. Duplicate reverse is not allowed |
| 57 | +
|
| 58 | +### Cause |
| 59 | + |
| 60 | +This issue occurs if you try to run the reversal or cancelation of multiple closing or recalculation vouchers at the same time. You must carry out reversals sequentially. This method prevents any inventory and ledger data corruption because of concurrent updates of adjustments, settlements, or postings. |
| 61 | + |
| 62 | +### Solution |
| 63 | + |
| 64 | +Always run the reversal of vouchers one at a time, and wait for each reversal to finish before proceeding to the next one. |
| 65 | + |
| 66 | +This issue can also occur if a previous reversal execution doesn't finish successfully, the [batch job](/dynamics365/fin-ops-core/dev-itpro/sysadmin/priority-based-batch-scheduling#batch-jobs) generates errors, and then you try to run a new reverse of the original voucher. This behavior can occur because of system issues, programs that stop responding, system or SQL server unavailability, and similar issues. In such cases, contact Microsoft Support or your partner. |
| 67 | + |
| 68 | +## Inventory closing can't proceed |
| 69 | + |
| 70 | +### Symptoms |
| 71 | + |
| 72 | +An inventory closing or recalculation fails and generates the following error message: |
| 73 | + |
| 74 | +> Inventory closing can't proceed because available physical on-hand inventory on item \<Item\> is currently negative, which isn't allowed according to its item model group |
| 75 | +
|
| 76 | +You can view this error in the inventory closing logs. For more information on accessing closing logs, see [Inventory close](/dynamics365/supply-chain/cost-management/inventory-close#the-inventory-close-log). |
| 77 | + |
| 78 | +### Cause |
| 79 | + |
| 80 | +This error can occur because of data corruption in the posted inventory transactions. This error occurs when the on-hand physical or financial inventory becomes negative, which isn't allowed as per the item’s [Item Model Group](/dynamics365/supply-chain/cost-management/inventory-costing-faq#item-model-groups) configuration. |
| 81 | + |
| 82 | +Usually, the system flags this error while posting transactions for an item that results in negative on-hand inventory, not during inventory closing or recalculation. But if you manually intervene, migrate data, or update the database directly, these checks are skipped. In this scenario, the error can occur during the stock closing process. |
| 83 | + |
| 84 | +### Solution |
| 85 | + |
| 86 | +1. Review the inventory transactions for the item mentioned in the error message to identify the cause of this issue. |
| 87 | + 1. If it's necessary, based on your business requirements, enable the negative physical or financial inventory. |
| 88 | + 1. Alternatively, you can post manual adjustments to balance out the inventory transactions that cause a negative inventory. |
| 89 | +1. After you fix the transactions, run a [consistency check](/dynamics365/supply-chain/inventory/inventory-onhand-consistency-check) for that item: |
| 90 | + 1. Go to **System administration** > **Periodic tasks** > **Database** > **Consistency check**. |
| 91 | + 1. In the consistency check dialog box, set **Check/Fix** to **Fix error**. |
| 92 | + 1. If you want only to identify inconsistencies but not make any changes, set **Check/Fix** to **Check**. |
| 93 | + 1. Set **Module** to **Inventory management**. |
| 94 | + 1. Expand the **Item** tree, and select the checkboxes for **Inventory transactions** and **On-hand**. |
| 95 | + 1. Open the More menu (...), and select **Dialog**. |
| 96 | + 1. Use the dialog box to filter for the item that's mentioned in the error message. |
| 97 | + 1. Run the consistency check. |
| 98 | + |
| 99 | + > [!NOTE] |
| 100 | + > If it's necessary, you can run the check as a batch process in the background. |
| 101 | +
|
| 102 | +1. After the consistency check finishes, you can view the final fix logs from the [batch job](/dynamics365/fin-ops-core/dev-itpro/sysadmin/priority-based-batch-scheduling#batch-jobs) logs or in the notification panel. |
| 103 | +1. After you complete the consistency check, resume the closing or recalculation operation. |
| 104 | + |
| 105 | +## Failure when closing stock |
| 106 | + |
| 107 | +### Symptoms |
| 108 | + |
| 109 | +An inventory closing or recalculation fails and generates the following error message: |
| 110 | + |
| 111 | +> Close stock - processing level \<Level\> with a total of \<Total\> bundles |
| 112 | +
|
| 113 | +### Cause |
| 114 | + |
| 115 | +This error usually occurs because of: |
| 116 | + |
| 117 | +- Business data corruption because of manual database interventions |
| 118 | +- Manual changes to the decimal precision in the customized version |
| 119 | +- Incorrect [exchange rate](/dynamics365/business-central/finance-set-up-currencies#exchange-rates) configurations while posting source documents and similar issues |
| 120 | + |
| 121 | +### Solution |
| 122 | + |
| 123 | +1. Identify the item and inventory transactions that's causing this error. |
| 124 | +1. Run a [consistency check](/dynamics365/supply-chain/inventory/inventory-onhand-consistency-check) for that item for on-hand and inventory transactions. |
| 125 | + 1. Go to **System administration** > **Periodic tasks** > **Database** > **Consistency check**. |
| 126 | + 1. In the consistency check dialog box, set **Check/Fix** to **Fix error**. |
| 127 | + **Note:** If you want only to identify inconsistencies but not make any changes, set **Check/Fix** to **Check**. |
| 128 | + 1. Set **Module** to **Inventory management**. |
| 129 | + 1. Expand the **Item** tree, and select the checkboxes for **Inventory transactions** and **On-hand**. |
| 130 | + 1. Open the More menu (...), and select **Dialog**. |
| 131 | + 1. Use the dialog box to filter for the item that's causing the error. |
| 132 | + 1. Run the consistency check. |
| 133 | + |
| 134 | + > [!NOTE] |
| 135 | + > If it's necessary, you can run the check as a batch process in the background. |
| 136 | +
|
| 137 | +1. After the consistency check finishes, you can view the final fix logs from the [batch job](/dynamics365/fin-ops-core/dev-itpro/sysadmin/priority-based-batch-scheduling#batch-jobs) logs or in the notification panel. |
| 138 | +1. After you complete the consistency check, resume the closing or recalculation operation. |
| 139 | + |
| 140 | +## Fiscal period is not open |
| 141 | + |
| 142 | +### Symptoms |
| 143 | + |
| 144 | +An inventory closing, recalculation, reverse, or journal posting (such as an [inventory journal](/dynamics365/supply-chain/inventory/inventory-journals), [production orders](/dynamics365/business-central/production-about-production-orders), [purchase orders](/dynamics365/field-service/create-purchase-order), [sales orders](/dynamics365/sales/create-edit-order-sales), or similar postings) fails and generates the following message: |
| 145 | + |
| 146 | +> Fiscal period for \<Date\> is not open |
| 147 | +
|
| 148 | +### Solution |
| 149 | + |
| 150 | +Verify the [ledger calendar](/dynamics365/finance/general-ledger/configure-ledger#configuring-calendars-for-the-ledger) period status: |
| 151 | + |
| 152 | +1. Go to **General Ledger** > **Calendars** > **Ledger calendars**. |
| 153 | +1. Select the required ledger period, and then verify the period status for the [legal entities](/dynamics365/guidance/organizational-strategy/define-organizational-strategy#legal-entity) that are experiencing issues. |
| 154 | + **Note:** The period status should be set to **Open** to enable the posting of any adjustments. |
| 155 | +1. After you update the period status, resume the inventory operation. |
| 156 | + |
| 157 | +## Account number for transaction type does not exist |
| 158 | + |
| 159 | +### Symptoms |
| 160 | + |
| 161 | +An inventory closing or recalculation fails with the following error message: |
| 162 | + |
| 163 | +> Account number for transaction type \<Type\> does not exist |
| 164 | +
|
| 165 | +### Solution |
| 166 | + |
| 167 | +Verify that the main account is set up for the specified [transaction type](/dynamics365/business-central/dev-itpro/developer/properties/devenv-transactiontype-property#remarks): |
| 168 | + |
| 169 | +1. Go to **Inventory Management** > **Setup** > **Posting** > **Posting**. |
| 170 | +1. Verify that the main account is set up for the transaction type mentioned in the error message. |
| 171 | + 1. For more information about how to configure transaction types for an account, see [Inventory posting profiles](/dynamics365/finance/general-ledger/inventory-posting-profiles). |
| 172 | + |
| 173 | +Also, check the financial dimensions in the [Accounting Structure Setup](/dynamics365/finance/general-ledger/configure-account-structures) for the corresponding main accounts: |
| 174 | + |
| 175 | +1. Go to **General Ledger** > **Ledger setup** > **Ledger** |
| 176 | +1. Select the account structure that's experiencing issues. |
| 177 | +1. Verify that your financial dimensions are correctly configured. Follow the guidance that's provided in [Configure account structures](/dynamics365/finance/general-ledger/configure-account-structures). |
| 178 | + |
| 179 | +After verifying your configuration, resume the closing or recalculation operation. |
| 180 | + |
| 181 | +## User can't post in module for a given date |
| 182 | + |
| 183 | +### Symptoms |
| 184 | + |
| 185 | +An inventory closing or recalculation fails and generates the following error message: |
| 186 | + |
| 187 | +> Only users in user group \<Group\> can post in module \<Module\> in the period containing the date \<Date\> |
| 188 | +
|
| 189 | +### Solution |
| 190 | + |
| 191 | +1. Go to **General Ledger** > **Calendars** > **Ledger calendars**. |
| 192 | +1. Select the required ledger period, then check the access level for the [legal entities](/dynamics365/guidance/organizational-strategy/define-organizational-strategy#legal-entity) that are experiencing issues and for the following modules: |
| 193 | + - Ledger |
| 194 | + - Sales tax |
| 195 | + - Bank |
| 196 | + - Customer |
| 197 | + - Vendor |
| 198 | + - Sales order |
| 199 | + - Purchasing |
| 200 | + - Inventory |
| 201 | + - Production |
| 202 | + - Project |
| 203 | + - Fixed assets |
| 204 | + - Payroll |
| 205 | + - Expense |
| 206 | + - Retail Headquarters |
| 207 | + - Fixed assets (Russia) |
| 208 | + - Landed cost |
| 209 | + |
| 210 | + > [!NOTE] |
| 211 | + > The default access level for all the modules is **<All>**. |
| 212 | +
|
| 213 | +1. After you update the access levels, resume the closing or recalculation operation. |
| 214 | + |
| 215 | +## An entry can't be posted or approved because of the cost budget |
| 216 | + |
| 217 | +### Symptoms |
| 218 | + |
| 219 | +An inventory closing, recalculation, or reverse operation fails during the ledger posting stage and generates the following error message: |
| 220 | + |
| 221 | +> The entry for category \<Category\> on project \<Project\> cannot be posted/approved because it would cause the cost budget to be exceeded by \<Amount\> |
| 222 | +
|
| 223 | +You can view this error in the inventory closing logs. For more information about how to access closing logs, see [Inventory close](/dynamics365/supply-chain/cost-management/inventory-close#the-inventory-close-log). |
| 224 | + |
| 225 | +### Cause |
| 226 | + |
| 227 | +This issue can occur if inventory closing, recalculation, or reverse adjustments settle the project-enabled inventory transactions. These particular adjustments or settlements exceed the [budget control](/dynamics365/finance/budgeting/budget-control-overview-configuration) price that's set for that specific project. |
| 228 | + |
| 229 | +### Solution |
| 230 | + |
| 231 | +To work around this issue: |
| 232 | + |
| 233 | +1. Go to **Project management and accounting** > **Setup** > **Project management and accounting parameters** > **Cost control**. |
| 234 | +1. Set **Budget control** to **Disabled**. |
| 235 | +1. Resume the inventory closing, recalculation, or reverse voucher. |
| 236 | +1. After the inventory operation finishes, revert **Budget control** to **Enabled**. |
| 237 | + |
| 238 | +For a more permanent solution, update the project budget control cost to meet your business requirements. |
| 239 | + |
| 240 | +## A transaction can't be reopened after being pre-closed |
| 241 | + |
| 242 | +### Symptoms |
| 243 | + |
| 244 | +An inventory closing or recalculation fails and generates the following error message: |
| 245 | + |
| 246 | +> Transaction \<TransactionID\> can't be reopened as it has already been pre-closed |
| 247 | +
|
| 248 | +### Cause |
| 249 | + |
| 250 | +This issue can occur if data corruptions exist in the inventory transactions or adjustments. The error occurs if pre-closing incorrectly posts settlements to and closes financial transactions. Pre-closing should affect only nonfinancial transactions. |
| 251 | + |
| 252 | +The inventory closing and recalculation processes implicitly run pre-closing for the nonfinancial transfers against which they have any markings. This issue most likely occurs during that process. |
| 253 | + |
| 254 | +### Solution |
| 255 | + |
| 256 | +You can identify which transactions cause this issue from the `InventTrans` table in the database. Look for records that meet the following criteria: |
| 257 | + |
| 258 | +- A value is specified for the `QtySettled` or `CostAmountSettled` fields |
| 259 | +- The `ValueOpen` field is set to `false` |
| 260 | +- The `NonFinancialTransferInventClosing` field is set to the record ID of a closing or recalculation voucher. |
| 261 | + |
| 262 | +For each problematic transaction you identify, update the following field values: |
| 263 | + |
| 264 | +- `ValueOpen = 0` |
| 265 | +- `NonFinancialTransferInventClosing = 0` |
| 266 | +- `DateClosed = 1900-01-01 00:00:00.000` |
| 267 | + |
| 268 | +After you update all problematic transactions, resume the closing or recalculation operation. |
| 269 | + |
| 270 | +> [!IMPORTANT] |
| 271 | +> When you make any direct database data modification, make the change in a lower [replica](/dynamics365/business-central/dev-itpro/administration/migration-data-replication) and verify that everything works correctly before you proceed to other replicas. |
| 272 | +
|
| 273 | +## Can't edit a record in a table |
| 274 | + |
| 275 | +### Symptoms |
| 276 | + |
| 277 | +An inventory closing, recalculation, or reverse fails and generates the following error message: |
| 278 | + |
| 279 | +> Unable to edit a record in InventSettlement table |
| 280 | +
|
| 281 | +### Cause |
| 282 | + |
| 283 | +This issue occurs if a SQL Server error prevents further execution and causes a process or [batch job](/dynamics365/fin-ops-core/dev-itpro/sysadmin/priority-based-batch-scheduling#batch-jobs) to fail. Typically, these errors are deadlocks that occur when multiple processes run at the same time. Other possible causes include SQL Server availability issues because of increased traffic, or insufficient and inappropriate indexing that causes query timeouts for long-running queries. |
| 284 | + |
| 285 | +### Solution |
| 286 | + |
| 287 | +Usually, these issues are transient. Retry the operation. |
| 288 | + |
| 289 | +Sometimes, customizations also cause deadlocks and blocking issues because of inappropriate transaction scopes and error handling. Trace the error message from the [batch job](/dynamics365/fin-ops-core/dev-itpro/sysadmin/priority-based-batch-scheduling#batch-jobs) or related processes, call stack, and SQL statement. Check whether any customizations exist. If customizations do exist, check the indexes and index fragmentation for the SQL table that's mentioned in the error message. |
0 commit comments