库存事务处理现有量检查
2013-12-04 23:18
323 查看
--检查现有量 CURSOR c_lot_number(l_organization_id NUMBER, p_inventory_item_id IN NUMBER) IS SELECT mln.lot_number, mln.expiration_date FROM mtl_lot_numbers mln WHERE mln.inventory_item_id = p_inventory_item_id -- AND mln.status_id = 1 --有效合格批次 AND mln.organization_id = l_organization_id; --需要添加合格字段 FOR rec_loc IN c_lot_number(l_organization_id => rec_header.organization_id, p_inventory_item_id => rec_line.inventory_item_id) LOOP inv_quantity_tree_pub.query_quantities(p_api_version_number => 1.0, p_init_msg_lst => NULL, x_return_status => l_return_status, x_msg_count => l_msg_count, x_msg_data => l_msg_data, p_organization_id => rec_header.organization_id, --仓库ID p_inventory_item_id => rec_line.inventory_item_id, --物料ID p_tree_mode => 3, p_is_revision_control => FALSE, p_is_lot_control => TRUE, p_is_serial_control => FALSE, p_revision => NULL, p_lot_number => rec_loc.lot_number, p_lot_expiration_date => rec_loc.expiration_date, p_subinventory_code => rec_header.subinventory_code, --子库code p_locator_id => NULL, --rec_loc.locator_id, p_cost_group_id => NULL, p_onhand_source => inv_quantity_tree_pvt.g_all_subs, x_qoh => l_qoh, --现有量 x_rqoh => l_atp_qty, x_qr => l_qr, x_qs => l_qs, x_att => l_att, x_atr => l_atr); end loop;
相关文章推荐
- Listview动态添加/删除数据
- 移动通信技术演进图—1G/2G/3G/4G
- SNMP--How to develop a SNMP extension agent DLL(如何开发一个SNMP扩展代理DLL)
- 根据ccid取得账户,更改某段值再创建账户,返回新的ccid
- 根据ccid取得账户,更改某段值再创建账户,返回新的ccid
- 根据ccid取得账户,更改某段值再创建账户,返回新的ccid
- 电脑报2013年第2期
- 符合Doxygen规范的注释宏ForVS2005
- DFS hdu 1016
- 一、SOAP简单对象访问协议讲解
- TOP-N类查询
- TOP-N类查询
- TOP-N类查询
- SQL语句常见问题的总结(持续更新)
- SQL语句常见问题的总结(持续更新)
- SQL语句常见问题的总结(持续更新)
- (5)关于JDBC中rs.next()的注意事项
- 电脑报2013年第1期
- sql group句子
- 什么是JSP引擎?什么是JSP容器?什么是Web服务器?