Thursday, October 30, 2008

How to get On hand qty using API

atp_details (p_item_id => c_ln_rec.inventory_item_id,
p_item_name => c_ln_rec.ordered_item,
p_ordered_qty => c_ln_rec.ordered_quantity,
p_uom => c_ln_rec.order_quantity_uom,
p_request_date => c_ln_rec.request_date,
p_ship_from_org => ,
x_atp_qty => l_atp_qty, --ouput
x_atp_date => l_atp_date -- output

using sql


SELECT SUM (moq.primary_transaction_quantity)
FROM mtl_onhand_quantities_detail moq,
mtl_secondary_inventories msi,
mtl_system_items_b msib
WHERE moq.subinventory_code = msi.secondary_inventory_name
AND moq.organization_id = msi.organization_id
AND moq.inventory_item_id = msib.inventory_item_id
AND moq.organization_id = msib.organization_id
AND moq.organization_id = p_organization_id
AND msi.secondary_inventory_name = p_sub_inv
AND msib.inventory_item_id = p_inv_item_id;

No comments:

My Zimbio
Top Stories