You should explore accessing InventoryAllocDetEnq, setting the filter with your inventory values and availability rules to come up with Quantities