|
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。如果您注册时有任何问题请联系客服QQ: 83569622 。
您需要 登录 才可以下载或查看,没有帐号?注册
x
1.Create
1.1.Create BOM Header
INSERT
INTO bom_bill_of_mtls_interface
(item_number , organization_id , assembly_type , process_flag , transaction_type)
VALUES ('ITFC-01',83 ,1,1,'CREATE')
1.2.Create BOM Lines
INSERT
INTO bom_inventory_comps_interface
(operation_seq_num , assembly_item_number , component_item_number , component_quantity,
assembly_type , process_flag , component_yield_factor, organization_id ,
transaction_type , item_num , effectivity_date)
VALUES (1 , 'ITFC-01' , 'ITFC-0101' , 10.5 , 1 , 1 , 1 , 83 , 'CREATE', 10 , sysdate )
2.Delete,说明:对于BOM行删除和BOM头删除,以下都通过删除组进行处理,因此提交了Import请求之后还要提交删除组的请求,
2.1.Delete BOM Lines
INSERT
INTO bom_inventory_comps_interface
(assembly_item_number , component_item_number , process_flag , organization_id ,
transaction_type , item_num , effectivity_date , delete_group_name , operation_seq_num )
SELECT itmh.segment1 , itml.segment1 , 1 , 83 , 'DELETE', boml.item_num , boml.effectivity_date , '删除组件' , boml.operation_seq_num
FROM bom_structures_b bomh ,
bom_components_b boml ,
mtl_system_items_b itmh ,
mtl_system_items_b itml
WHERE bomh.bill_sequence_id = boml.bill_sequence_id
AND bomh.assembly_item_id = itmh.inventory_item_id and bomh.organization_id = itmh.organization_id
and boml.component_item_id = itml.inventory_item_id and itml.organization_id = 83
and itmh.organization_id = 83
and itmh.segment1 = 'ITFC-01'
and itml.segment1 = 'ITFC-0101'
2.2.Delete BOM Headers,一般不需要
INSERT
INTO bom_bill_of_mtls_interface
(item_number , organization_id , assembly_type , process_flag , transaction_type , delete_group_name)
VALUES ('ITFC-01' , 83 , 1 , 1 , 'DELETE' , '删除清单')
3.Update,说明:下面的方法仅仅适用于组件号不变的情况,对于组件号变化的情况,要先按照上面的方法先Delete,然后再Create,要注意变换Item_Num,因为此时还没有真正删除,只有确实提交了删除组的请求之后才可以使用原Item_Num
3.1.Update BOM Lines(以修改BOM行数量为例)
INSERT
INTO bom_inventory_comps_interface
(assembly_item_number , component_item_number , process_flag , organization_id ,
transaction_type , item_num , effectivity_date , operation_seq_num ,component_quantity )
SELECT itmh.segment1 , itml.segment1 , 1 , 83 , 'UPDATE', boml.item_num , boml.effectivity_date , boml.operation_seq_num ,13.2
FROM bom_structures_b bomh ,
bom_components_b boml ,
mtl_system_items_b itmh ,
mtl_system_items_b itml
WHERE bomh.bill_sequence_id = boml.bill_sequence_id
AND bomh.assembly_item_id = itmh.inventory_item_id and bomh.organization_id = itmh.organization_id
and boml.component_item_id = itml.inventory_item_id and itml.organization_id = 83
and itmh.organization_id = 83
and itmh.segment1 = 'ITFC-01'
and itml.segment1 = 'ITFC-0101'
3.2.Update BOM Header,一般不需要
|
|