SELECT item.segment1 item_code, item.description item_description,
SUM (on_hand.on_hand) on_hand
FROM mtl_system_items_b item, mtl_onhand_total_mwb_v on_hand
WHERE item.organization_id = 4 --ORG ID
AND item.inventory_item_id = on_hand.inventory_item_id
AND on_hand.subinventory_code = 'XXX' --sub inventory
AND item.segment1 = 'XXXXX' ---item name
GROUP BY item.segment1, item.description;
No comments:
Post a Comment