select
org.name,
si.segment1 item_code,
si.description item_desc,
sum(q.onhand*c.item_cost) inv_value
from
cst_item_costs c,
(select organization_id,inventory_item_id,sum(transaction_quantity) onhand
from mtl_onhand_quantities group by organization_id,inventory_item_id) q,
mtl_system_items si,
hr_all_organization_units org
where
c.organization_id=q.organization_id and
c.inventory_item_id=q.inventory_item_id and
c.organization_id=org.organization_id and
c.inventory_item_id=si.inventory_item_id and
si.organization_id=85 -- Master Organization
group by
org.name,
si.segment1,
si.description
No comments:
Post a Comment