Wednesday, February 17, 2016

API to Rollback Payroll Actions



DECLARE
   CURSOR c1
   IS
        SELECT *
          FROM pay_payroll_actions ppa
         WHERE business_group_id = 10665
      ORDER BY payroll_action_id DESC;
BEGIN
   FOR i IN c1
   LOOP
      py_rollback_pkg.rollback_payroll_action (i.payroll_action_id);

      DBMS_OUTPUT.put_line (
         i.payroll_action_id || ' has been Rolled back successfully');
      COMMIT;
   END LOOP;
EXCEPTION
   WHEN OTHERS
   THEN
      DBMS_OUTPUT.put_line ('Main Exception: ' || SQLERRM);
END;

No comments:

Post a Comment