|
|
发表于 2012/4/26 14:50:46
|
显示全部楼层
参考一下下面这个标准的API 吧
我经常就是用这个进行取数的:
inv_quantity_tree_pub.clear_quantity_cache;
inv_quantity_tree_pub.query_quantities(p_api_version_number => 1,
p_init_msg_lst => 'F',
x_return_status => l_return_status,
x_msg_count => l_msg_count,
x_msg_data => l_msg_data,
p_organization_id => p_org_id /*p_organization_id*/,
p_inventory_item_id => p_item_id /*p_inventory_item_id*/,
p_tree_mode => 1,/*inv_quantity_tree_pvt.g_reservation_mode*/
p_is_revision_control => NULL,
p_is_lot_control => x_is_lot_control,
p_is_serial_control => NULL,
p_demand_source_type_id => 2 /*p_source_type_id*/,
p_demand_source_header_id => NULL,
p_demand_source_line_id => NULL,
p_demand_source_name => NULL,
p_lot_expiration_date => SYSDATE,
p_revision => NULL /*p_revision*/,
p_lot_number => p_lot_number /*p_lot_number*/,
p_subinventory_code => p_subinv_code /*p_subinventory_code*/,
p_locator_id => p_locator_id /*p_locator_id*/,
p_onhand_source => 3,
x_qoh => l_qoh, /*onhand quantity*/
x_rqoh => l_rqoh,
x_qr => l_qr,
x_qs => l_qs,
x_att => l_att /*avail quantity*/,
x_atr => l_atr,
p_transfer_subinventory_code => NULL,
p_cost_group_id => NULL,
p_lpn_id => NULL /*p_lpn_id*/,
p_transfer_locator_id => NULL); |
|