This program will import one category set to another category set.
After importing run the import category set assignment program.
declare
cursor c1 is
select cat.INVENTORY_ITEM_ID,itm.segment1,itm.description
from mtl_item_categories_v cat, mtl_system_items_b itm
where cat.CATEGORY_ID=33219
and cat.INVENTORY_ITEM_ID=itm.INVENTORY_ITEM_ID
;
lc_cat_set_id number;
begin
select CATEGORY_SET_ID
into lc_cat_set_id
from MTL_CATEGORY_SETS_V
where CATEGORY_SET_NAME='Price Group';
for c1_rec in c1
loop
insert into MTL_ITEM_CATEGORIES_INTERFACE
(SET_PROCESS_ID,
INVENTORY_ITEM_ID,
CATEGORY_SET_ID,
LAST_UPDATE_DATE,
CREATION_DATE,
ORGANIZATION_ID,
CATEGORY_SET_NAME,
CATEGORY_NAME)
values
(1
,c1_rec.inventory_item_id
,lc_cat_set_id --1100000171
,sysdate
,sysdate
,85
,'Price Group'
,'NPR'
);
end loop;
end;
Monday, July 11, 2011
Subscribe to:
Posts (Atom)