DECLARE
CURSOR c1
IS
SELECT *
FROM fnd_descr_flex_contexts
WHERE descriptive_flex_context_code IN ('81', 'Warnings')
AND descriptive_flexfield_name = 'PER_EVENTS';
BEGIN
FOR i IN c1
LOOP
BEGIN
fnd_descr_flex_contexts_pkg.
delete_row (
x_application_id => i.application_id,
x_descriptive_flexfield_name => i.descriptive_flexfield_name,
x_descriptive_flex_context_cod => i.
descriptive_flex_context_code);
DBMS_OUTPUT.
put_line (
i.descriptive_flex_context_code || ' has
been purged !!!!');
COMMIT;
EXCEPTION
WHEN OTHERS
THEN
DBMS_OUTPUT.
put_line (
'Failure:
'
|| i.descriptive_flex_context_code
|| ' - '
|| SQLERRM);
END;
END LOOP;
EXCEPTION
WHEN OTHERS
THEN
DBMS_OUTPUT.put_line ('Main
Exception: ' || SQLERRM);
END;
This is awesome, is there an API to also delete the DFF registration as well please?
ReplyDelete