KVSFCYEDCostCalculationMgmt#
Procedures#
CalculateEDOrder(Record Production Order, Record Prod. Order Line, Decimal, Decimal, Decimal, Decimal, Decimal, Decimal, Decimal, Decimal, Option) :#
Summary: Calculates comprehensive engineering design order cost analysis including standard, expected, and actual costs with variance analysis. This procedure performs complete cost calculation for engineering design production orders, supporting both single-level and multi-level calculations for individual production order lines or total production orders. It calculates standard costs based on item master data, expected costs from production order planning data, and actual costs from posted transactions including item ledger entries and capacity ledger entries. The procedure computes material costs, capacity costs, subcontracting costs, manufacturing overhead costs with their respective direct and overhead components, performs variance analysis between standard and actual costs, calculates capacity need expectations and actual time usage, and provides comprehensive cost performance indicators for engineering design manufacturing processes and production order financial analysis.
procedure CalculateEDOrder(prodOrderPar: Record "Production Order"; prodOrderLinePar: Record "Prod. Order Line"; var StdCostVar: Decimal; var ExpCostVar: Decimal; var ActCostVar: Decimal; var VarAmtVar: Decimal; var VarPctVar: Decimal; var TimeExpendedPctVar: Decimal; var ExpCapNeedVar: Decimal; var ActTimeUsedVar: Decimal; calcTypePar: Option):
Parameters:
prodOrderPar: The production order record containing order header information and configuration settings for cost calculation scope and processing parameters.prodOrderLinePar: The specific production order line record for line-level calculations, containing item and routing references for detailed cost analysis when using line calculation types.StdCostVar: Returns array of standard cost values by cost type: [1] Material Direct, [2] Capacity Direct, [3] Subcontracting Direct, [4] Capacity Overhead, [5] Manufacturing Overhead, [6] Material Overhead, [7] Subcontracting Overhead, [8] Total.ExpCostVar: Returns array of expected cost values by cost type using same index structure as standard costs, calculated from production order planning and routing data.ActCostVar: Returns array of actual cost values by cost type using same index structure, calculated from posted item and capacity ledger entries with currency conversion and rounding.VarAmtVar: Returns array of variance amounts calculated as differences between actual and standard costs for each cost type, supporting variance analysis and cost control reporting.VarPctVar: Returns array of variance percentages calculated as relative differences between actual and standard costs, providing performance indicators for cost management analysis.TimeExpendedPctVar: Returns the percentage of actual time usage compared to expected capacity need, providing efficiency indicator for capacity utilization and production performance analysis.ExpCapNeedVar: Returns the total expected capacity need in production order capacity unit of measure, calculated from production order routing lines and capacity requirements for planning analysis.ActTimeUsedVar: Returns the total actual time used in production order capacity unit of measure, calculated from posted capacity ledger entries for performance monitoring and efficiency analysis.calcTypePar: Specifies calculation scope and method: TotalSL (Total Single-Level), TotalML (Total Multi-Level), LineSL (Line Single-Level), LineML (Line Multi-Level) determining aggregation level and BOM explosion depth.