[转]BOM导入及更新

一、新增工艺路线


INSERT INTO bom_op_sequences_interface
  (assembly_item_number,
   operation_seq_num,
   department_code,
   transaction_type,
   process_flag,
   organization_code,
   attribute14)
VALUES
  (rec.assembly_item_number,
   rec.,operation_seq_num
   rec.department_code,
   'CREATE',
   1,
   rec.organization_code,
   gv_batch);

 

二、新增资源


INSERT INTO bom_op_resources_interface
  (assembly_item_id,
   organization_id,
   operation_seq_num,
   effectivity_date,
   resource_seq_num,
   resource_code,
   basis_type,
   usage_rate_or_amount,
   schedule_flag,
   standard_rate_flag,
   transaction_type,
   process_flag,
   organization_code,
   attribute14)
VALUES
  (ln_assembly_item_id,
   ln_organization_id,
   rec.operation_seq_num,
   SYSDATE,
   rec.,resource_seq_num
   rec.resource_code,
   1,
   rec.usage_rate_or_amount,
   2, -- NO
   2,
   'Insert',
   1,
   rec.organization_code,
   gv_batch);

三、更新BOMINSERT INTO bom_inventory_comps_interface
  (component_sequence_id,
   --component_item_id,
   organization_id,
   new_operation_seq_num,
   wip_supply_type,
   supply_subinventory,
   supply_locator_id,
   location_name,
   transaction_type,
   process_flag,
   old_operation_seq_num,
   attribute14)
VALUES
  (rec_b.component_sequence_id,
   --rec_b.component_item_id,
   ln_organization_id,
   rec_b.new_operation_seq_num,
   lv_wip_supply_type,
   rec.supply_subinventory,
   NULL,
   NULL,
   'UPDATE',
   1,
   gv_batch);

四、注意:
     1.implementation_date为空的记录不能被更改,要预先筛选掉,否则会报 BOM_COLUMN_NOT_UPDATABLE
      2.需要修改子库存(supply_subinventory),而新的子库存是没有货位控制的,这时要预先清除 bom_inventory_components 表的supply_locator_id字段,否则会报BOM_LOCATOR_INVALID。 (ps:supply_locator_id设置为空,也无济于事。)


 

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/26555596/viewspace-720682/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/26555596/viewspace-720682/

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

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值