码迷,mamicode.com
首页 > 其他好文 > 详细

whole LPN子库存转移 + whole LPN项目转移

时间:2014-08-28 22:47:06      阅读:710      评论:0      收藏:0      [点我收藏+]

标签:lpn   wms   子库存转移   项目   inv_trx_util_pub   


WMS中整箱进行子库存转移和项目转移:
将货位上的物料整箱的进行转移

IF l_status = fnd_api.g_ret_sts_success THEN
        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);
     
        IF l_lpn_trx_result = -1 THEN
          l_status  := fnd_api.g_ret_sts_error;
          l_message := ‘子库存转移出错:‘ || x_proc_msg;
        END IF ;
      END IF ;
   
      IF l_status = fnd_api.g_ret_sts_success THEN
        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);
     
        IF l_lpn_trx_result = -1 THEN
          l_status  := fnd_api.g_ret_sts_error;
          l_message := ‘Error in inv_trx_util_pub.process_lpn_trx:‘ ||
                       x_proc_msg;
        END IF ;
      END IF ;

whole LPN子库存转移 + whole LPN项目转移

标签:lpn   wms   子库存转移   项目   inv_trx_util_pub   

原文地址:http://blog.csdn.net/gh320/article/details/38904781

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!