MTL_ONHAND_QUANTITIES_DETAIL
Schema: INVtransactionPer inventory orgThe on-hand balance detail — receipt-level slices of stock per item, org, subinventory, locator, lot, and revision, consumed in FIFO order as material issues
Rows are FIFO receipt slices — SUM PRIMARY_TRANSACTION_QUANTITY at your chosen grain; a single row is not a balance
One item in one bin can hold many rows (one per receipt). On-hand at any grain is SUM(PRIMARY_TRANSACTION_QUANTITY) — or SUM(TRANSACTION_QUANTITY) in the row's own UOM — grouped by that grain; DATE_RECEIVED orders the slices (see quirks #onhand). Cost group, LPN, and project columns extend the grain in WMS and project-manufacturing orgs.
What the badges mean
- master
- Data class: what the table holds — master data, transaction documents, control/configuration, interface/staging, or an APPS-schema view.
Fields
16 fields · 1 key
| # | Field | Description | Type | Flags |
|---|---|---|---|---|
| 1 | ONHAND_QUANTITIES_ID | Surrogate key of the receipt slice — not a business identifier | NUMBER | Key |
| 2 | INVENTORY_ITEM_ID | Item id | NUMBER | |
| 3 | ORGANIZATION_ID | Inventory organization | NUMBER | |
| 4 | SUBINVENTORY_CODE | The subinventory holding the stock | VARCHAR2 | |
| 5 | LOCATOR_ID | The locator holding the stock — NULL in non-locator-controlled subinventories | NUMBER | |
| 6 | LOT_NUMBER | Lot — NULL for non-lot-controlled items | VARCHAR2 | |
| 7 | REVISION | Item revision — populated for revision-controlled items | VARCHAR2 | |
| 8 | PRIMARY_TRANSACTION_QUANTITY | The slice's quantity in the item's primary UOM — SUM this at your grain for on-hand | NUMBER | |
| 9 | TRANSACTION_QUANTITY | The slice's quantity in the transaction UOM it arrived in | NUMBER | |
| 10 | TRANSACTION_UOM_CODE | The UOM TRANSACTION_QUANTITY is expressed in (the transaction ledger spells its equivalent TRANSACTION_UOM) | VARCHAR2 | |
| 11 | DATE_RECEIVED | When the slice was received — orders the FIFO stack | DATE | Filter date |
| 12 | ORIG_DATE_RECEIVED | The original receipt date, preserved across moves | DATE | |
| 13 | COST_GROUP_ID | Cost group of the slice (WMS/average-cost orgs) | NUMBER | |
| 14 | LPN_ID | License plate the stock sits on (WMS orgs) — extends the on-hand grain | NUMBER | |
| 15 | PROJECT_ID | Project the stock belongs to (project manufacturing orgs) | NUMBER | |
| 16 | TASK_ID | Task within the project | NUMBER |
Field provenance: hand-curated. 1 key field.
Boilerplate SQL
Starting point for reading MTL_ONHAND_QUANTITIES_DETAILon Databricks — real DATE columns need no conversion, and the org anchor and the LAST_UPDATE_DATE watermark 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 : MTL_ONHAND_QUANTITIES_DETAIL — The on-hand balance detail — receipt-level slices of stock per item, org, subinventory, locator, lot, and revision, consumed in FIFO order as material issues
-- Purpose: Column-selected read of MTL_ONHAND_QUANTITIES_DETAIL — auto-generated from field metadata
-- Grain : One row per inventory org (ORGANIZATION_ID) + ONHAND_QUANTITIES_ID
-- Caution: Rows are FIFO receipt slices — SUM PRIMARY_TRANSACTION_QUANTITY at your chosen grain; a single row is not a balance
-- Notes : Auto-generated skeleton for Oracle EBS R12 data landed in your lakehouse. 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.ONHAND_QUANTITIES_ID AS "Surrogate key of the receipt slice — not a business identifier",
t.INVENTORY_ITEM_ID AS "Item id",
t.ORGANIZATION_ID AS "Inventory organization",
t.SUBINVENTORY_CODE AS "The subinventory holding the stock",
t.LOCATOR_ID AS "The locator holding the stock — NULL in non-locator-controlled subinventories",
t.LOT_NUMBER AS "Lot — NULL for non-lot-controlled items",
t.REVISION AS "Item revision — populated for revision-controlled items",
t.PRIMARY_TRANSACTION_QUANTITY AS "The slice's quantity in the item's primary UOM — SUM this at your grain for on-hand",
t.TRANSACTION_QUANTITY AS "The slice's quantity in the transaction UOM it arrived in",
t.TRANSACTION_UOM_CODE AS "The UOM TRANSACTION_QUANTITY is expressed in (the transaction ledger spells its equivalent TRANSACTION_UOM)",
t.DATE_RECEIVED AS "When the slice was received — orders the FIFO stack",
t.ORIG_DATE_RECEIVED AS "The original receipt date, preserved across moves",
t.COST_GROUP_ID AS "Cost group of the slice (WMS/average-cost orgs)",
t.LPN_ID AS "License plate the stock sits on (WMS orgs) — extends the on-hand grain",
t.PROJECT_ID AS "Project the stock belongs to (project manufacturing orgs)",
t.TASK_ID AS "Task within the project"
FROM <catalog>.<schema>.MTL_ONHAND_QUANTITIES_DETAIL t
WHERE
t.ORGANIZATION_ID = <inventory_org_id> -- inventory org, NOT the operating unit — see quirks guide #two-orgs
-- AND t.DATE_RECEIVED >= DATE '<DATE_FROM>'
-- AND t.DATE_RECEIVED <= DATE '<DATE_TO>'
-- AND t.LAST_UPDATE_DATE >= TIMESTAMP '<watermark>' -- WHO watermark, bulk-stamped by batch jobs; see quirks guide #who-columns
ORDER BY t.ONHAND_QUANTITIES_ID;6 parameters not filled: <catalog>, <schema>, <inventory_org_id>, <DATE_FROM>, <DATE_TO>, <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 MTL_ONHAND_QUANTITIES_DETAIL.INVENTORY_ITEM_ID = MTL_SYSTEM_ITEMS_B.INVENTORY_ITEM_ID AND MTL_ONHAND_QUANTITIES_DETAIL.ORGANIZATION_ID = MTL_SYSTEM_ITEMS_B.ORGANIZATION_IDON MTL_ONHAND_QUANTITIES_DETAIL.SUBINVENTORY_CODE = MTL_SECONDARY_INVENTORIES.SECONDARY_INVENTORY_NAME AND MTL_ONHAND_QUANTITIES_DETAIL.ORGANIZATION_ID = MTL_SECONDARY_INVENTORIES.ORGANIZATION_IDON MTL_ONHAND_QUANTITIES_DETAIL.LOCATOR_ID = MTL_ITEM_LOCATIONS.INVENTORY_LOCATION_ID AND MTL_ONHAND_QUANTITIES_DETAIL.ORGANIZATION_ID = MTL_ITEM_LOCATIONS.ORGANIZATION_IDON MTL_ONHAND_QUANTITIES_DETAIL.LOT_NUMBER = MTL_LOT_NUMBERS.LOT_NUMBER AND MTL_ONHAND_QUANTITIES_DETAIL.INVENTORY_ITEM_ID = MTL_LOT_NUMBERS.INVENTORY_ITEM_ID AND MTL_ONHAND_QUANTITIES_DETAIL.ORGANIZATION_ID = MTL_LOT_NUMBERS.ORGANIZATION_ID