DECLARE
CURSOR c1 IS
SELECT lookup_type, lookup_code,
security_group_id, view_application_id
FROM fnd_lookup_values_vl
WHERE lookup_type = 'mylookupname'
AND lookup_code LIKE 'mylookupcode';
BEGIN
FOR i IN c1
LOOP
BEGIN
fnd_lookup_values_pkg.delete_row(x_lookup_type
=> i.lookup_type,
x_security_group_id => i.security_group_id,
x_view_application_id
=> i.view_application_id,
x_lookup_code => i.lookup_code);
COMMIT;
DBMS_OUTPUT.put_line(i.lookup_code || ' has been Purged !!!');
EXCEPTION
WHEN OTHERS THEN
DBMS_OUTPUT.put_line('Inner Exception: ' || SQLERRM);
END;
END LOOP;
EXCEPTION
WHEN OTHERS THEN
DBMS_OUTPUT.put_line('Main Exception ' || SQLERRM);
END;
No comments:
Post a Comment