Database-related errors in inventory recalculation

Hi Friends,

I am facing an issue in inventory recalculation. We are using AX 2012 R3 CU9.

Due to some reason inventory recalculation was stopped and now its showing below error log

1) Cannot edit a record in Inventory settlement (InventSettlement).

An update conflict occurred due to another user process deleting the record or changing one or more fields in the record.

2) Cannot edit a record in Inventory transactions (InventTrans).

An update conflict occurred due to another user process deleting the record or changing one or more fields in the record.

3) [Microsoft][SQL Server Native Client 11.0][SQL Server]Could not find stored procedure

‘sp_PreCloseNonFinTransfer’.

4) DECLARE @ERROROUTPUT int;

EXECUTE sp_PreCloseNonFinTransfer @ERROROUTPUT OUTPUT, 5637144576, N’fwtr’, 5637177325, N’C49-FF020’, 5637152831, {ts ‘2016-02-23 00:00:00.000’}, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0;

SELECT @ERROROUTPUT;

5) Recalculate inventory - processing level 0 with a total of 0 bundles.

6) Recalculation is being paused because of an error.

7) Please fix the problem and resume the calculation.

If anyone has faced this issue please let me know how can I resolve this issue.

Thanks in advance.

Regards,

Brijen

Hi Brijen, welcome to DUG forum.

Do I understand correctly that you forcibly stopped a running recalculation and now every attempt to run it again shows the errors above? If so, please tell us more about how you stopped it and when you get these errors. If you meant something else, please tell us more about your actual scenario.

Hi Martin,

Thanks for your prompt reply. Actually we didn’t stopped recalculation manually. It was stopped automatically and when I check log on closing and adjustment for it gives above mentioned error log. I tried to resume recalculation and it’s going to batch job and batch job is ending successfully but still pending recalculation is showing in error stage only.

Regards,

Brijen

I would focus on the error about the stored procedure, because it looks the most serious. I think (without looking into AX) that the SP should be created in the same process, therefore it would suggest either a problem in database (check SQL logs to find more), or with code (the code creating the SP isn’t called for some reason).

Stored procedure ‘sp_PreCloseNonFinTransfer’ creates each time when you Synchronize Database.

Just try to run Full DB Synchronization: System administration / Periodic / Database / SQL Administration - Table action - Synchronize Database.

In case you get error with the same stored procedure sp_PreCloseNonFinTransfer try to check that OpenItemIdx index is existed and enabled in table InventTrans.