Average Cost Not Calculating on PO Receipt

Doogie

Active Member
Using JDE 8.11 we have an issue where the Average Cost is not being updated on receipt of a Purchase Order. The Last In cost is updated, but average cost remains unaffected. The System Constants are set correctly and we have had a specialist review this to no benefit. Would appreciate if anyone else has similar experience. Thanks in advance.
 
First thing I would check is UDC 40/AV and see if P4312 is set to a Y. We also have P4314 set to yes as well.
 
Stats - thanks.
Turns out the issue was caused by a 'bug' (bad coding) that prevents the Weighted Average Cost being updated based on Receipt Routing setup. The error was originally spotted 12 years ago and a SAR applied - which fixed the error by accident since the programmer mixed up the data types of the variables. However, in 8.11 this error is back - fixed in v9 according to the programmer, but again I was told the fix was done in a way that actually removes some of the functionality for updating cost based on the step in the receipt routing process. If anyone is interested in more specific details I can get them. We have tested a program change and the issue is resolved. Many Thanks. Doogie.
 
Re: Average Cost Not Calculating on PO Receipt - Solution XT4111Z1

Feeling industrious this morning. Here is the technical information relating to this issue:
/*-------------------------------------------------------------------------------
* Saras Babu 09.21.98 SAR 2493275
* When purchase order receipts is processing an initial receipt of
* a routing item, do not update the average cost. */

/*-------------------------------------------------------------------------------
* Saras Babu 09.21.98 SAR 2493275
* When purchase order receipts is processing an initial receipt of
* a routing item, do not update the average cost.
*
* SAR 7650516 - nTransaction is an int, don't treat as a JCHAR or
* it will cause memory violations.
*
* SAR 7889025 - Average Cost should be updated when purchase order receipts
* is not processing an initial receipt of a routing item; Transaction type
* is 4 in both cases; when the receipt routing is activated and also when receipt routing
* is not activated. Having the statement nTransaction != 4 will cause the system to not
* recalculate the average cost correctly. nTransaction != 4 is disabled because
* dsF41UI001.itvuil != _J('1') takes care of validating whether or not the
* average cost should be updated. when the item is in receipt routing the
* dsF41UI001.itvuil flag is set and the average cost is not updated.
*
if ((dsF41UI001.itvuil != _J('1')) && / * '1'- Do not write cardex records * /
(nTransaction != _J('4'))) / * '4'- From purchase order receipts * /
*/
if (dsF41UI001.itvuil != _J('1'))
{
IX4111Z1_UpdateAvrgCost(lpBhvrCom, lpVoid, &dsF41UI001, dsF4009.cpavgc,
lpDS->cMarginMaintenanceFlag, (JCHAR *) lpDS->szProgramID ) ;
}
}

/*------------------------------------------------------------------
* If Write Item Price Record (APRC) equals '1'
* If Program ID = "EP4113" and From Side Of Transfer (ITFTRN)
* equals '1'
* If Price Level (PLEV) equals '3'
* Call CopyWritePriceRecords(..)
* ELSE
 
Re: Average Cost Not Calculating on PO Receipt - Solution XT4111Z1

Thanks, it looks like we have the same issue.
 
Thanks for this feedback on what you found. I know this was a while ago but hopefully you can remember something since I have a question.

Since the process was failing to update the weighted average cost while it was running, how did yo bring these back in line once the issue was resolved?

In order to calculate a weighted average cost that was not being updated correctly it would seem yo would have to roll back through the Cardex on these items and recalculate this value to get it correct. Is this what you ended up doing?

Any feedback is appreciated.

Thanks,
 
Back
Top