看看我的吧
begin
UPDATE AIC_IMPORT_BOM_TEMP
SET organization_id = 88;---- next is 89
insert into bom_bill_of_mtls_interface
(assembly_item_id ,
organization_id,
assembly_type,
process_flag,
transaction_type
)
(select distinct
aic.parent_item_id ,
aic.organization_id,
1 ,
1 ,
'Create'
from aic_import_bom_temp aic
where aic.segment1 is not null
and aic.segment10=1 )
;
insert into bom_inventory_comps_interface
(process_flag,
component_item_id,
operation_seq_num,
component_quantity,
wip_supply_type,
assembly_item_id,
transaction_type,
Effectivity_date,
organization_id ,
item_num ,
INCLUDE_IN_COST_ROLLUP,
SUPPLY_SUBINVENTORY,
COMPONENT_YIELD_FACTOR
)
(
select
1,
aic.component_id,
aic.op_seq ,
aic.qty,
decode(lower(aic.supply_type),'push',1,'assembly Pull',2,'operation pull',3,'bulk',4,
'supplier',5,'phantom',6,'based on bill',7) ,
parent_item_id,
'Create',
sysdate,
organization_id ,
segment1 ,
ROLLUP_flag,
null,--SUBINVENTORY,
yield
from aic_import_bom_temp aic
where err_msg is null
)
;
end;
/*--------------------
WIP_SUPPLY_TYPE WIP_SUPPLY MFG_LOOKUPS
1 Push
2 Assembly Pull
3 Operation Pull
4 Bulk
5 Supplier
6 Phantom
7 Based on Bill
Column Descriptions
-----------------------*/
這是我導入BOM時用的語句﹐當然還有load時用到的ctl文檔