Oracle EBS子庫存轉移,專案轉移whole LPN
阿新 • • 發佈:2019-01-25
WMS中整箱進行子庫存轉移和專案轉移:
將貨位上的物料整箱的進行轉移
IFl_status = fnd_api.g_ret_sts_successTHEN
dbms_output.put_line('start
subtransfer');
l_trx_hdr_id := mtl_material_transactions_s.nextval;
l_lpn_trx_result := inv_trx_util_pub.insert_line_trx(p_trx_hdr_id => l_trx_hdr_id,
p_cnt_lpn_id => l_lpn_id,
p_from_lpn_id =>NULL,
p_xfr_lpn_id =>NULL,
p_org_id => l_organization_id,
p_subinv_code => l_subinv_code, --
來源子庫
p_tosubinv_code => i.dest_subinventory_name,--
p_locator_id => l_locator_id,--
來源貨位
p_tolocator_id => l_to_locator_id,
p_item_id => -1,--
p_uom =>'X',--
沒填
p_trx_action_id =>2,
p_trx_type_id =>2,
p_trx_src_type_id =>13,
p_trx_src_id =>NULL,
p_trx_qty => -1,
p_pri_qty => -1,
p_date =>SYSDATE,
p_user_id => -1,
x_trx_tmp_id => x_trx_tmp_id,
x_proc_msg => x_proc_msg);
IFl_lpn_trx_result
= -1THEN
l_status := fnd_api.g_ret_sts_error;
l_message :='子庫存轉移出錯:'||
x_proc_msg;
ENDIF;
ENDIF;
IFl_status
= fnd_api.g_ret_sts_successTHEN
l_lpn_trx_result := inv_lpn_trx_pub.process_lpn_trx(p_trx_hdr_id => l_trx_hdr_id,
p_business_flow_code =>20,
x_proc_msg => x_proc_msg);
IFl_lpn_trx_result
= -1THEN
l_status := fnd_api.g_ret_sts_error;
l_message :='Error
in inv_trx_util_pub.process_lpn_trx:'||
x_proc_msg;
ENDIF;
ENDIF;