Ending production order throws "Function incorrectly called"

Hi all,

when I am ending a production order, I get a error stating “Function InventModelType_StdCost.financialIssueCostValue has been incorrectly called” and preventing from ending the process. Please suggest a solution to solve this issue.

Thanks in advance,

Gopinath

InventModelType_StdCost.financialIssueCostValue, look at that method, there is a validation on inventTrans.Qty.
Qty has a value that the method is not expecting it. Try to debug and see.

Hi Kranthi,
Can u tell the relation between prodTable and inventTrans table and their quantity relation.

Thanks in advance,
Gopinath

ProdTable.InventTransId == InventTransOrigin.InventTransId
InventTransOrigin.RecId == InventTrans.InventTransOrigin.

When you create a production system will create an inventory transaction. When you post the production order the status and the cost/quantity will be updated. Example - RAF - status will be set to received and quantity will be updated to that of the RAF quantity(if you partially post the RAF then same inventTrans will split)

There will be inventory transaction for the item that consumed in that production order (through picking list).

Hi Kranthi,
Can please suggest an answer how the quantity of the inventtrans is generated when creating a production order from which table the value is assigned when creating inventory please.

Thanks in advance,

Gopinath

Look at ProdTableType.insert(). It uses InventUpd_Estimated to created the InventTrans.
I think prodTable.QtySched is to used.

Hi Kranthi,

By debugging I found that the value for quantity and cost value in the invent transaction of a item is null for one of the by product so using a job I updated the quantity and again tried to end my production order but it again pops error as shown in image. I couldnt solve this issue is ending the production order please suggest a solution to end this properly.

You should not be updating the inventTrans qty/value. It will cause in consistency.
Rather you have to identify the cause of the issue. Always try creating a similar case in a test environment and see the results.

Hi Kranthi,
Again if I create a production order then there is no error occuring and it all ended successfully, thats why I am unable to find a way. Can you suggest a solution to solve this issue , Can I change any values in inventory or what else can be done please suggest.
Thanks in advance

In such case, this could be a data issue.
What is the status of production order?
Would it be possible to recreate the production order by resetting the existing production order?

I resetted it and now it is in started state and while giving report as finish it is popping the error which i posted above the screenshot on my previous reply. that also didnt help out in finding solution. Any other way is it possible to solve this issue. please
Thanks in advance

Then you may not be using the same order, reset it to created. Try with a new production order.

Hi kranthi,
If we reset the existing production order, all the items will get reset in inventory and can we use those items in new production order? please suggest. Its a client created production order. we need to slve that order where they find an issue. So that only it is little confusing. Please suggest.
Thanks in advance

Hi,
Can Anyone tell what are all the tables which are involved in production order from start to end of the process and the relations between all those tables. Please suggest and answer.

Thanks in advance,

Since you cannot reproduce the issue, i think the issue is data issue and it is related to a particular order.

It may not be possible for someone to say what went wrong without actually looking into the data. So i am suggesting to create another production order by resetting the current.

Yes. But try it in a test environment first.