CO Report Custom development ALV report

Open-Period Estimated Actual Unit Cost Report (Before the Material Ledger Close)

Short answer: A report that calculates an estimated actual unit cost per material from the actual purchase and production costs of the current period, before the month is closed and before material ledger actual costing runs. Standard price, price differences in the period, invoice differences and production order variances are shown together, so pricing and profitability decisions do not have to wait for period end.

Estimated effort
M · 12–18 working days
System
ECC and S/4HANA
Tables
13
Scope
Global
Built by
NeKuDos Teknoloji
Last updated

Why is the standard not enough?

The actual unit cost (periodic unit price) only exists after the material ledger close (CKMLCP) has run. During the period CKM3N shows only the price differences collected so far; it does not roll them up across levels or include variances of production orders not yet settled. When raw material prices change quickly, teams want a cost estimate without waiting for month end and prepare it in Excel.

Who uses it? Cost accountants, controlling teams, sales pricing teams and production managers.

Closest standard alternatives

  • CKM3N Material Price Analysis. Material price analysis; shows differences collected in the period but makes no pre-close estimate or roll-up.
  • CKMLCP Actual Costing Cockpit. Actual costing closing cockpit; produces the final periodic price only at period end.
  • KKBC_ORD Analyze Order. Cost analysis of a single production order; does not aggregate unit costs per material.

Tables used

The tables the report reads and their join fields. ECC and S/4HANA differences are marked separately.

TableRoleJoinSystem
MBEWMaterial ValuationMaterial's standard price, price unit and stock quantity (driving table)—ECC + S/4
CKMLHDMaterial Ledger: Header RecordMaterial ledger header: cost estimate numberCKMLHD-MATNR = MBEW-MATNR AND CKMLHD-BWKEY = MBEW-BWKEYECC + S/4
CKMLCRMaterial Ledger: Period Totals (Values)Standard and periodic unit price per periodCKMLCR-KALNR = CKMLHD-KALNRECC + S/4
ACDOCAUniversal Journal Entry Line ItemsPrice difference items and production order actual costs (S/4HANA)ACDOCA-MATNR = MBEW-MATNR AND ACDOCA-KALNR = CKMLHD-KALNRS/4HANA only
MATDOCMaterial Documents (S/4HANA)Goods receipts of the period (S/4HANA)MATDOC-MATNR = MBEW-MATNR AND MATDOC-WERKS = MBEW-BWKEYS/4HANA only
MSEGMaterial Document ItemGoods receipts of the period (ECC)MSEG-MATNR = MBEW-MATNR AND MSEG-WERKS = MBEW-BWKEYECC only
COEPCO Object: Line Items (by Period)Production order actual costs (ECC)COEP-OBJNR = AUFK-OBJNRECC only
EKBEPurchasing Document HistoryPurchase order history: goods receipt and invoice valuesEKBE-MATNR = MBEW-MATNR AND EKBE-WERKS = MBEW-BWKEYECC + S/4
RSEGDocument Item: Incoming InvoiceInvoice items and invoice price differenceRSEG-MATNR = MBEW-MATNR AND RSEG-WERKS = MBEW-BWKEYECC + S/4
AUFKOrder Master DataProduction orders with movements in the period—ECC + S/4
AFRUOrder ConfirmationsProduction confirmations and delivered quantityAFRU-AUFNR = AUFK-AUFNRECC + S/4
KEKOProduct Costing Header DataProduct cost estimate header (for the roll-up)KEKO-MATNR = MBEW-MATNR AND KEKO-WERKS = MBEW-BWKEYECC + S/4
CKISUnit Costing and Product Costing ItemsCost estimate items: component quantitiesCKIS-KALNR = KEKO-KALNRECC + S/4

S/4HANA notes

  • MBEW: In S/4HANA the Material Ledger is mandatory and valuation data is read through a compatibility view. Prices remain readable; validate value calculations against the currency and valuation view in use.
  • MSEG → MATDOC: In S/4HANA MATDOC replaces MSEG; reading MSEG works through a compatibility view but is slow at high volumes.
  • COEP → ACDOCA: In S/4HANA actual CO line items are stored in ACDOCA; reads on COEP go through the compatibility view V_COEP.

BAPIs and functions used

  • K_KKB_CO_OBJECT_READRead Cost Totals of a CO Object. Reads the cost object of the production order
  • CONVERSION_FACTOR_GETGet Unit Conversion Factor. Converts between receipt and stock units

Selection screen parameters

ParameterDescriptionTypeReference fieldRequiredExample
P_BWKEYValuation area (plant)Single valueMBEW-BWKEYYes1100
P_BDATJYearSingle valueCKMLCR-BDATJYes2026
P_POPERPeriodSingle valueCKMLCR-POPERYes011
S_MATNRMaterialRange / multipleMBEW-MATNRNoHT-*
S_MTARTMaterial typeRange / multipleMARA-MTARTNoROH, HALB, FERT
P_ROLLRoll component differences up to the higher-level materialCheckbox—NoX

Output columns

#ColumnSource
1MaterialMBEW-MATNR
2Price controlMBEW-VPRSV
3Standard priceCKMLCR-STPRS
4Receipt quantity in periodCalculated Sum of goods receipts and production deliveries in the period
5Purchase/invoice differenceCalculated ACDOCA price difference items (goods receipt and invoice)
6Production varianceCalculated Order actual cost − delivered quantity × standard price
7Roll-up differenceCalculated Component unit difference × cost estimate quantity
8Estimated actual unit costCalculated (Standard value + differences) / receipt quantity of the period × price unit
9Difference %Calculated (Estimated actual − standard) / standard × 100
10Previous period periodic priceCKMLCR-PVPRS
11CurrencyCKMLCR-WAERS

Sample output

MaterialPrice controlStandard priceReceipt quantity in periodPurchase/invoice differenceProduction varianceRoll-up differenceEstimated actual unit costDifference %Previous period periodic priceCurrency
HM-PAMUK-01S82.50120,000540,00000875.4584.10TRY
YM-IPLIK-30S14864,0000211,200172,8001544.05150.20TRY
HT-NEV-220S6109,5000-38,00066,5006130.49607.50TRY
KM-BOYA-12V2453,20012,800002491.63246TRY
A view built with fictional sample data; not real system data.

How does the report work?

  1. For the selected plant and period, each material’s standard price and stock quantity are read from MBEW, the material ledger number and period prices from CKMLHD/CKMLCR.
  2. Purchased materials: goods receipts (MATDOC in S/4HANA, MSEG in ECC) and invoices (RSEG, EKBE) in the period are summed; goods receipt and invoice differences are taken from the price difference items in ACDOCA (per material and period). Estimated actual unit cost = (standard value + price differences of the period) / receipt quantity of the period.
  3. Produced materials: the actual costs of the period’s production orders (ACDOCA in S/4HANA, COEP in ECC) and the delivered quantity (AFRU confirmations, goods receipts) are read. Because the order is not yet settled, the variance is calculated as actual cost − delivered quantity × standard price and spread per unit.
  4. Optional single-level roll-up: the estimated unit cost difference of components is multiplied by the quantities from the product cost estimate (KEKO/CKIS) and added to the higher-level material. This way a raw material price change is roughly reflected in the finished product cost.
  5. The result shows per material the standard price, the estimated actual unit cost, the difference percentage and its source (purchasing, invoice, production, roll-up). The previous period’s final periodic unit price is taken from CKMLCR for comparison.
  6. The report is an estimate; it does not replace the material ledger close and posts nothing.

Performance notes

Restrict ACDOCA by plant (valuation area), period and the relevant business transaction types and read it aggregated per material. For production orders select only those with movements in the period. Keep the roll-up step optional and run the report in the background for large plants.

Features

  • ALV list (sort, filter, subtotals)
  • User-specific layout variants
  • Double-click drill-down to the document Drill down from the material to CKM3N and to the documents behind the difference.
  • Runs as a background job
  • Export to Excel

Authorization objects

  • K_ML_VADisplay by material ledger valuation area
  • M_MATE_WRKMaterial master by plant

Frequently asked questions

Why can the figure in the report differ from the periodic unit price at period end?

The material ledger close finalises the multi-level roll-up, the distribution between ending stock and consumption and invoices not yet received. The report estimates from the movements so far; as the period progresses and invoices arrive, the estimate approaches the final value.

Does it work in ECC systems without the material ledger?

The basic calculation can be done with MBEW, MSEG, RSEG/EKBE and COEP; only the previous period periodic price column stays empty. In S/4HANA the material ledger is mandatory, so all columns are filled.

Does the report post anything?

No. It only reads and produces an estimate; valuation and posting are still done by the standard material ledger close.

Related reports

Let us build this report for your system

Briefly describe your system and expectations. We will clarify the scope and come back with an effort and price quote.

Related report: Open-Period Estimated Actual Unit Cost Report (Before the Material Ledger Close)