Skip to content
Fusion Reference

CST_PERPAVG_COST

Product: CSTtransaction

The perpetual average cost history — recomputed transaction by transaction per cost org, book, item, valuation unit, and cost element; the latest row is the current average

Grain note

One row per recomputation per cost element — take the latest EFF_DATE per item/element for the current average; UNIT_COST_AVERAGE is the resulting number

Notes

The composite key runs through the costing transaction ids and the effective timestamp; UNIT_COST_ONHAND is the average before the transaction, UNIT_COST_NEW the incoming cost.

What the badges mean
master
Data class: what the table holds — master data, transaction documents, control/configuration, interface/staging, or a documented view.
In field listings, K marks a primary-key field.

Extract access

The delivered surfaces that reach this table — the BICC extract data store (PVO) for bulk extraction and the OTBI subject areas for real-time queries. There is no SQL path to the SaaS database.

  • FscmTopModelAM.ScmExtractAM.CstBiccExtractAM.CstPerpavgCostExtractPVO
    OTBI: Costing - Perpetual Average Cost Real Time

    Average Costed Item Costs data store — keyed on PerpavgCostId. There is no single item-cost subject area; unit cost splits by cost method.

    Oracle data-store documentation →

Fields

14 fields · 5 key

Table fields: position, field name, description, data type, and flags. 14 fields.
#FieldDescriptionTypeFlags
1TRANSACTION_IDThe costing transaction that triggered the recomputationNUMBER
Key
2REC_TRXN_IDReceipt transaction id — part of the composite keyNUMBER
Key
3DEP_TRXN_IDDepleting transaction id — part of the composite keyNUMBER
Key
4COST_ELEMENT_IDCost element of this average sliceNUMBER
Key
5EFF_DATEWhen this average became effective — latest row is currentTIMESTAMP
Key
6PERPAVG_COST_IDSurrogate id of the rowNUMBER
7COST_ORG_IDCost organizationNUMBER
8COST_BOOK_IDCost bookNUMBER
9INVENTORY_ITEM_IDThe itemNUMBER
10VAL_UNIT_IDValuation unitNUMBER
11QUANTITY_ONHANDOn-hand quantity at recomputationNUMBER
12UNIT_COST_AVERAGEThe resulting perpetual average — the number analytics wantsNUMBER
13CURRENCY_CODECosting currencyVARCHAR2
14UOM_CODECosting UOMVARCHAR2

Field provenance: hand-curated. 5 key fields.

Boilerplate SQL

Starting point for reading the BICC-landed copy of CST_PERPAVG_COSTon Databricks — real DATE columns need no conversion, and the org anchor and the LAST_UPDATE_DATE watermark (the column incremental BICC extracts key on) are already in place. Set your Unity Catalog location, schema, and org values below; they’re substituted into the SQL and the copy button.

Query parameters
-- ============================================================
-- Table  : CST_PERPAVG_COST — The perpetual average cost history — recomputed transaction by transaction per cost org, book, item, valuation unit, and cost element; the latest row is the current average
-- Purpose: Column-selected read of CST_PERPAVG_COST — auto-generated from field metadata
-- Grain  : One row per TRANSACTION_ID + REC_TRXN_ID + DEP_TRXN_ID + COST_ELEMENT_ID + EFF_DATE
-- Caution: One row per recomputation per cost element — take the latest EFF_DATE per item/element for the current average; UNIT_COST_AVERAGE is the resulting number
-- Notes  : Auto-generated skeleton for Oracle Fusion Cloud data landed in your lakehouse by a BICC extract — there is no SQL path to the SaaS database. Column names follow Oracle's table documentation — if your landed data still carries PVO attribute headers, map names first; see quirks #pvo-drift. Dates are real DATE/TIMESTAMP columns — no conversion needed. WHO audit columns omitted (see the quirks guide); the optional LAST_UPDATE_DATE watermark filter supports incremental extracts.
-- ============================================================
SELECT
  t.TRANSACTION_ID AS "The costing transaction that triggered the recomputation",
  t.REC_TRXN_ID AS "Receipt transaction id — part of the composite key",
  t.DEP_TRXN_ID AS "Depleting transaction id — part of the composite key",
  t.COST_ELEMENT_ID AS "Cost element of this average slice",
  t.EFF_DATE AS "When this average became effective — latest row is current",
  t.PERPAVG_COST_ID AS "Surrogate id of the row",
  t.COST_ORG_ID AS "Cost organization",
  t.COST_BOOK_ID AS "Cost book",
  t.INVENTORY_ITEM_ID AS "The item",
  t.VAL_UNIT_ID AS "Valuation unit",
  t.QUANTITY_ONHAND AS "On-hand quantity at recomputation",
  t.UNIT_COST_AVERAGE AS "The resulting perpetual average — the number analytics wants",
  t.CURRENCY_CODE AS "Costing currency",
  t.UOM_CODE AS "Costing UOM"
FROM <catalog>.<schema>.CST_PERPAVG_COST t
WHERE
  1 = 1  -- no partition column on this table; the filters below are optional
  -- AND t.TRANSACTION_ID = <TRANSACTION_ID>
  -- AND t.REC_TRXN_ID = <REC_TRXN_ID>
  -- AND t.DEP_TRXN_ID = <DEP_TRXN_ID>
  -- AND t.COST_ELEMENT_ID = <COST_ELEMENT_ID>
  -- AND t.LAST_UPDATE_DATE >= TIMESTAMP '<watermark>'  -- the column incremental BICC extracts key on
ORDER BY t.TRANSACTION_ID;

7 parameters not filled: <catalog>, <schema>, <TRANSACTION_ID>, <REC_TRXN_ID>, <DEP_TRXN_ID>, <COST_ELEMENT_ID>, <watermark>

Relationships

1-hop neighbors — click a table to navigate there. FND lookup decode and translation edges are highlighted; they’re the joins newcomers most often get wrong.

Join details

  • CST_PERPAVG_COSTCST_TRANSACTIONSforeign key · N:1
    ON CST_PERPAVG_COST.TRANSACTION_ID = CST_TRANSACTIONS.TRANSACTION_ID
  • CST_PERPAVG_COSTCST_COST_ELEMENTS_Bforeign key · N:1
    ON CST_PERPAVG_COST.COST_ELEMENT_ID = CST_COST_ELEMENTS_B.COST_ELEMENT_ID

Browse more Cost Managementtables →

Maintained by Summit Analytics, a supply chain analytics practice. The tools and references are free — the consulting is selective.

Part of the Summit Analytics reference library.

Work with the practice →

Not affiliated with or endorsed by Oracle. Oracle and Oracle Fusion Cloud Applications are registered trademarks of Oracle and/or its affiliates.