DECLARE
CURSOR lookup_values
IS
SELECT lookup_type, lookup_code, security_group_id,
view_application_id
FROM fnd_lookup_values_vl
WHERE lookup_type = 'XX_LOOKUP_NAME' AND lookup_code LIKE 'TEST%';
BEGIN
FOR i IN lookup_values
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 ( 'Looup Code '
|| i.lookup_code
|| ' has been delted..!'
);
EXCEPTION
WHEN OTHERS
THEN
DBMS_OUTPUT.put_line ('Inside Inner Exception: ' || SQLERRM);
END;
END LOOP;
EXCEPTION
WHEN OTHERS
THEN
DBMS_OUTPUT.put_line ('Inside Main Exception ' || SQLERRM);
END;
CURSOR lookup_values
IS
SELECT lookup_type, lookup_code, security_group_id,
view_application_id
FROM fnd_lookup_values_vl
WHERE lookup_type = 'XX_LOOKUP_NAME' AND lookup_code LIKE 'TEST%';
BEGIN
FOR i IN lookup_values
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 ( 'Looup Code '
|| i.lookup_code
|| ' has been delted..!'
);
EXCEPTION
WHEN OTHERS
THEN
DBMS_OUTPUT.put_line ('Inside Inner Exception: ' || SQLERRM);
END;
END LOOP;
EXCEPTION
WHEN OTHERS
THEN
DBMS_OUTPUT.put_line ('Inside Main Exception ' || SQLERRM);
END;
No comments:
Post a Comment