遞迴展開BOM

2021-06-06 20:38:19 字數 611 閱讀 4006

procedure wst_agile_bom_extend(p_item_id in number,

p_level in number)

iscursor cur(p_item in number) is

select id,item_number,quantity,component from

bom@agile9 where item=p_item;

v_level number;

begin

v_level:=p_level+1;

for c1 in cur(p_item_id) loop

insert into wst_agile_bom(seq,levels,id,item_number,quantity)

values(s_wst_agile_bom.nextval,v_level,c1.id,c1.item_number,c1.quantity);

wst_agile_bom_extend(c1.component,v_level);

end loop;

v_level := p_level-1;

commit;

end wst_agile_bom_extend;

BOM展開SQL語句

示例資料 create table tb 父物料 varchar 10 子物料 varchar 10 insert tb select a1 b1 union all select a1 b2 union all select a1 b3 union all select b1 c1 union a...

BOM展開和反查函式

bom展開和反查函式cs15 css4 bom 展開 cs bom explosion mat bom explosion old version as of 3.0,use cs bom expl mat v2 cs bom expl mat v2 bom explosion for materi...

ERP系統裡的BOM展開函式

erp系統裡的bom展開函式 l grp id number l session id number l org id number l levels to explode number 10 l module number default 2 bom 2 l cst type id number ...