I am working on a BAQ that will show the total cost of material for a part. Just like the BOM Costing report does in E10. But my query calculation is giving me something different from the BOM Costing Report.
Is there a calculation that i am missing??
BOM Report Calculation:
My Query Calculation:
select
[PartMtl].[PartNum] as [PartMtl_PartNum],
[PartMtl].[RevisionNum] as [PartMtl_RevisionNum],
[PartRev].[EffectiveDate] as [PartRev_EffectiveDate],
[PartMtl].[MtlPartNum] as [PartMtl_MtlPartNum],
[ProdGrup].[Description] as [ProdGrup_Description],
(PartCost.AvgMaterialCost * PartMtl.QtyPer) as [Calculated_PartMtlCostPerQty],
[PartMtl].[QtyPer] as [PartMtl_QtyPer],
[PartMtl].[MtlSeq] as [PartMtl_MtlSeq]
from Erp.PartRev as PartRev
inner join Erp.PartMtl as PartMtl on
PartRev.Company = PartMtl.Company
and PartRev.PartNum = PartMtl.PartNum
and PartRev.RevisionNum = PartMtl.RevisionNum
and PartRev.AltMethod = PartMtl.AltMethod
left outer join Erp.PartCost as PartCost on
PartMtl.Company = PartCost.Company
and PartMtl.MtlPartNum = PartCost.PartNum
left outer join Erp.Part as Part on
PartMtl.Company = Part.Company
and PartMtl.MtlPartNum = Part.PartNum
and ( Part.ProdCode = ‘5508’ )inner join Erp.ProdGrup as ProdGrup on
Part.Company = ProdGrup.Company
and Part.ProdCode = ProdGrup.ProdCode