DECLARE
l_api_version NUMBER := 1.0;
l_init_msg_list VARCHAR2 (2) := fnd_api.g_true;
l_commit VARCHAR2 (2) := fnd_api.g_false;
x_message_list error_handler.error_tbl_type;
x_return_status VARCHAR2 (2);
x_msg_count NUMBER := 0;
l_rowcnt NUMBER := 1;
CURSOR c
IS
SELECT inventory_item_id, segment1, primary_uom_code
FROM mtl_system_items_b
WHERE segment1 LIKE 'VEH%';
--and segment1='VEH000001' ;
BEGIN
FOR rec IN c LOOP
ego_item_pub.assign_item_to_org
(p_api_version => l_api_version,
p_init_msg_list => l_init_msg_list,
p_commit => l_commit,
p_inventory_item_id => REC.inventory_item_id,
p_item_number => REC.segment1,
p_organization_id => 84,--p_organization_id,
p_organization_code => 'WCO',--p_organization_code, DESTINATION
ORG
p_primary_uom_code => REC.primary_uom_code,
x_return_status => x_return_status,
x_msg_count => x_msg_count
);
DBMS_OUTPUT.PUT_LINE('=========================================');
DBMS_OUTPUT.PUT_LINE('Return Status: '||x_return_status);
end loop;
END;
No comments:
Post a Comment