Counting the on hand quantities by API inv_quantity_tree_pub.query_quantities

Oracle ERP R11

DECLARE

x_return_status VARCHAR2 (1);

x_msg_data VARCHAR2 (4000);

x_msg_count NUMBER;

x_qoh NUMBER;

x_rqoh NUMBER;

x_qr NUMBER;

x_qs NUMBER;

x_att NUMBER;

x_atr NUMBER;

x_sqoh NUMBER;

x_srqoh NUMBER;

x_sqr NUMBER;

x_sqs NUMBER;

x_satt NUMBER;

x_sqtr NUMBER;

BEGIN

inv_globals.set_org_id (7324);

inv_quantity_tree_pub.clear_quantity_cache;

inv_quantity_tree_pub.query_quantities

(p_api_version_number => 1.0,

x_return_status => x_return_status,

x_msg_count => x_msg_count,

x_msg_data => x_msg_data,

p_organization_id => 7324,

p_inventory_item_id => 884054,

p_tree_mode => 2,

p_is_revision_control => FALSE,

p_is_lot_control => TRUE,

p_is_serial_control => FALSE,

p_revision => NULL,

p_lot_number => NULL,

p_subinventory_code =>'WH',

p_locator_id => NULL,

x_qoh => x_qoh,

x_rqoh => x_rqoh,

x_qr => x_qr,

x_qs => x_qs,

x_att => x_att,

x_atr => x_atr

);

DBMS_OUTPUT.put_line (x_return_status);

DBMS_OUTPUT.put_line (x_msg_count);

DBMS_OUTPUT.put_line (x_qoh);

DBMS_OUTPUT.put_line (x_rqoh);

DBMS_OUTPUT.put_line (x_qr);

DBMS_OUTPUT.put_line (x_qs);

DBMS_OUTPUT.put_line (x_att);

DBMS_OUTPUT.put_line (x_atr);

END;

 

x_att   ======>  available to transact
 x_atr  ======>  available to reserve

 

 

Oracle ERP R12

DECLARE
x_return_status VARCHAR2 (1);
x_msg_data VARCHAR2 (4000);
x_msg_count NUMBER;
x_qoh NUMBER;
x_rqoh NUMBER;
x_qr NUMBER;
x_qs NUMBER;
x_att NUMBER;
x_atr NUMBER;
x_sqoh NUMBER;
x_srqoh NUMBER;
x_sqr NUMBER;
x_sqs NUMBER;
x_satt NUMBER;
x_sqtr NUMBER;
BEGIN
inv_globals.set_org_id (207);
inv_quantity_tree_pub.clear_quantity_cache;
inv_quantity_tree_pub.query_quantities (p_api_version_number => 1.0
, x_return_status => x_return_status
, x_msg_count => x_msg_count
, x_msg_data => x_msg_data
, p_organization_id => 207
, p_inventory_item_id => 167742
, p_tree_mode => 1
, p_is_revision_control => FALSE
, p_is_lot_control => TRUE
, p_is_serial_control => TRUE
, p_grade_code => NULL
, p_revision => NULL
, p_lot_number => NULL
, p_subinventory_code => NULL
, p_locator_id => NULL
, x_qoh => x_qoh
, x_rqoh => x_rqoh
, x_qr => x_qr
, x_qs => x_qs
, x_att => x_att
, x_atr => x_atr
, x_sqoh => x_sqoh
, x_srqoh => x_srqoh
, x_sqr => x_sqr
, x_sqs => x_sqs
, x_satt => x_satt
, x_satr => x_sqtr
);
DBMS_OUTPUT.put_line (x_return_status);
DBMS_OUTPUT.put_line (x_msg_count);
DBMS_OUTPUT.put_line (x_qr);
DBMS_OUTPUT.put_line (x_qoh);
DBMS_OUTPUT.put_line (x_rqoh);
END;

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值