Adjust Cost - Item Entries loops

Hi,
I’m bumping my head on the follwing problem in Navision 3.70b, native database.
Since last friday the Adjust Cost funcion loops on the entries of a specific item when it comes to the second level cycle.
Something similar had happened a few months ago, but then somebody had posted three shipping documents with a posting date far in the future, then had run the cost adjustment which had spread the funny date every where. Once I managed to correct all the dates on all the affected entries the problem had deasppaered.
Now doesn’t seem to be the case. Not only there are neither wrong posting dates nor other strange entries related to that item, but I’ve rescued a backup previous to the day that the problem has occurred first and restored into a new database and run the cost adjustment. The codeunit doesn’t loop, but if I try to compare the entries of the item where the loop occurs I can’t any difference. Nothing new has been posted since July 7 for the offending item!
So far, I’ve compared entries from tables 32, 337, 339, 5802. Which else might I check?

Some more infos - the item costing method is average (they do evaluate everything with the average method in this company - which is the first cause of my headaches! [:@] ); the item ledger entry types are all outputs and sales but for a single positive adjustment posted in May. There are a couple of reversed shipping documents, but they are also old things. [:(]

Might be the cause of the loop be from a different entry than the ones that can be seen on the dialog window while loop occurs?

Anybody did experience anything similar?

BTW - I should install and migrate to version 4.02 next week, but the financial users need to perform a financial statement at July 31 before the system can be stopped. [:’(]

Hi Anna

Not much help I am afraid but I have read in the old forum of numerous different versions hitting endless loops in certain circumstances and these being resolved by hot fixes. I am not sure if you have any applied or if it is a known issue but if you can check the issued hot fixes against what you are on I would recommend it.

I’m afraid here the hot fix is the b version. [^o)] Anyway, since I’m going to apply 4.02 very soon, I’d be content to kick this damned codeunit to its end so that the users can have their financial statement and clear the place. [:P]

Anyway, I’ve found out what’s changed - a production order, which had been dormant for a long while, was eventually switched to finished. On this order there are two outputs which give a finished quantity greater than the expected ine and… a positive adjustement which (by will or by accident I still have to discover) has the document no. = prod. order no.
I tried to change that document no. on table 32 and table 5802. Right now the cost adjustment is running. Let’s cross fingers. [:P]

Hi
just for your information, I’m still looking for a solution. I’ve tested the same scenario in nav 4.02 and the loop occurs also there. So much for bug fixing! [:@]
Is there any way to exclude a production order from the cost adjustement?

Anna,

Have you tried to make sure all the elements are invoiced? We had a problem in adjust cost taking 15 minutes on one item. In our cases there had been a large number of receipts which had all been issued out in one go. As soon as the receipts had been invoiced the adjust cost ran very quickly (after the initial run through). We invoiced by adding a postive and negative receipt to the order and invoicing the negative and original receipt as a zero invoice.

Not sure it helps in your situation, but I may guess that if the everything is invoiced (purchases and sales) it will run afterwards.

Regards

Richard

Thank you, Richard.
Unfortunately, I don’t think this is the case. The item has 16 output entries from 3 different production orders. There are about 30 sales entries (shipping documents all invoiced but one which has been undone - invoices are separate documents) and a positive adjustment.
Until last friday one of the production orders was in released status, although the last output for had been posted a while ago, and the cost adjustment ran smoothly. As soon as that order status changed to finished the adjustment routine went crazy.
It loops at level 2 in 3.70b and at level 4 in 4.02, but it loops anyway.
I’m not sure I understand exactly the process, but I think the loop occurs when it values the sales entries by appliyng them against output entries. Somewhere in the process it forgets what has already done and goes back to the first entry. [:(]

OK, it was only a guess. Our problem was at level 1, but level 2 seems to relate to productions orders (3.7) and just thought it may be similar if a component was not invoiced as it will be looping through to see if there is now a final cost to post. Anyway worth a try I thought, best of luck…