procedure wst_agile_bom_extend(p_item_id in number,
p_level in number)
is
cursor 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;
p_level in number)
is
cursor 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;