CST_PERPAVG_COST
Product: CSTtransactionThe 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
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
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.
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.CstPerpavgCostExtractPVOOTBI: 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
| # | Field | Description | Type | Flags |
|---|---|---|---|---|
| 1 | TRANSACTION_ID | The costing transaction that triggered the recomputation | NUMBER | Key |
| 2 | REC_TRXN_ID | Receipt transaction id — part of the composite key | NUMBER | Key |
| 3 | DEP_TRXN_ID | Depleting transaction id — part of the composite key | NUMBER | Key |
| 4 | COST_ELEMENT_ID | Cost element of this average slice | NUMBER | Key |
| 5 | EFF_DATE | When this average became effective — latest row is current | TIMESTAMP | Key |
| 6 | PERPAVG_COST_ID | Surrogate id of the row | NUMBER | |
| 7 | COST_ORG_ID | Cost organization | NUMBER | |
| 8 | COST_BOOK_ID | Cost book | NUMBER | |
| 9 | INVENTORY_ITEM_ID | The item | NUMBER | |
| 10 | VAL_UNIT_ID | Valuation unit | NUMBER | |
| 11 | QUANTITY_ONHAND | On-hand quantity at recomputation | NUMBER | |
| 12 | UNIT_COST_AVERAGE | The resulting perpetual average — the number analytics wants | NUMBER | |
| 13 | CURRENCY_CODE | Costing currency | VARCHAR2 | |
| 14 | UOM_CODE | Costing UOM | VARCHAR2 |
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.
-- ============================================================
-- 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
ON CST_PERPAVG_COST.TRANSACTION_ID = CST_TRANSACTIONS.TRANSACTION_IDON CST_PERPAVG_COST.COST_ELEMENT_ID = CST_COST_ELEMENTS_B.COST_ELEMENT_ID