Thursday, February 27, 2014

Oracle PL/SQL : Get Quantity On hand, Reservable Quantity On hand, Quantity Reserved,Quantity Suggested, Quantity Available to Transact, Quantity Available to Reserve


apps.inv_quantity_tree_pub.query_quantities
(p_api_version_number => 1.0,
p_init_msg_lst => apps.fnd_api.g_false,
x_return_status => l_api_return_status,
x_msg_count => l_msg_count,
x_msg_data => l_msg_data,
p_organization_id => i.organization_id, --Input
p_inventory_item_id => i.inventory_item_id, --Input
p_tree_mode => 1, --apps.inv_quantity_tree_pub.g_transaction_mode,
p_onhand_source => 3,
p_is_revision_control => FALSE,
p_is_lot_control => FALSE,
p_is_serial_control => FALSE,
p_revision => NULL,
p_lot_number => NULL,
p_subinventory_code => NULL,
p_locator_id => NULL,
x_qoh => l_qty_oh,
x_rqoh => l_qty_res_oh,
x_qr => l_qty_res,
x_qs => l_qty_sug,
x_att => l_qty_att,
x_atr => l_qty_atr);

DBMS_OUTPUT.put_line ('Quantity on hand => '|| TO_CHAR (l_qty_oh));
DBMS_OUTPUT.put_line ('Reservable quantity on hand ===============> '|| TO_CHAR (l_qty_res_oh));
DBMS_OUTPUT.put_line ('Quantity reserved =====================> '|| TO_CHAR (l_qty_res));
DBMS_OUTPUT.put_line ('Quantity suggested ====================> '|| TO_CHAR (l_qty_sug));
DBMS_OUTPUT.put_line ('Quantity Available To Transact => '|| TO_CHAR (l_qty_att));
DBMS_OUTPUT.put_line ('Quantity Available To Reserve => '|| TO_CHAR (l_qty_atr));

No comments:

Post a Comment