DECLARE
CURSOR c1
IS
SELECT msi.organization_id,
msi.inventory_item_id,
ood.organization_code
FROM mtl_system_items_b msi,
org_organization_definitions ood
WHERE stock_enabled_flag = 'Y'
AND msi.organization_id = ood.organization_id;
x_return_status varchar2(100);
x_msg_count NUMBER;
x_msg_data varchar2(100);
BEGIN
FOR i in c1
LOOP
inv_item_sub_default_pkg.insert_upd_item_sub_defaults
(x_return_status => x_return_status,
x_msg_count => x_msg_count,
x_msg_data => x_msg_data,
p_organization_id => i.organization_id,
p_inventory_item_id => i.inventory_item_id,
p_subinventory_code => i.organization_code,
--shipping_subinv2,
p_default_type => 2,
p_creation_date => SYSDATE,
p_created_by => -1,
p_last_update_date => SYSDATE,
p_last_updated_by => -1,
p_process_code => 'INSERT',
p_commit => 'Y'
);
END LOOP;
COMMIT;
DBMS_OUTPUT.PUT_LINE(x_msg_data);
END;
CURSOR c1
IS
SELECT msi.organization_id,
msi.inventory_item_id,
ood.organization_code
FROM mtl_system_items_b msi,
org_organization_definitions ood
WHERE stock_enabled_flag = 'Y'
AND msi.organization_id = ood.organization_id;
x_return_status varchar2(100);
x_msg_count NUMBER;
x_msg_data varchar2(100);
BEGIN
FOR i in c1
LOOP
inv_item_sub_default_pkg.insert_upd_item_sub_defaults
(x_return_status => x_return_status,
x_msg_count => x_msg_count,
x_msg_data => x_msg_data,
p_organization_id => i.organization_id,
p_inventory_item_id => i.inventory_item_id,
p_subinventory_code => i.organization_code,
--shipping_subinv2,
p_default_type => 2,
p_creation_date => SYSDATE,
p_created_by => -1,
p_last_update_date => SYSDATE,
p_last_updated_by => -1,
p_process_code => 'INSERT',
p_commit => 'Y'
);
END LOOP;
COMMIT;
DBMS_OUTPUT.PUT_LINE(x_msg_data);
END;
Free Webinar : Oracle E-Business Suite - Salesforce.com Integration via Oracle's API on Aug 26th, 2015 at 3PM EST.
ReplyDeleteVisit: http://blog.optiosys.com