Wednesday, August 20, 2014

Rollback Payroll Transactions using API - "Rollback" Request

--This API could Rollback All Processes except “Transfer to GL”, Provided it should be in Reverse Chronological Order

-- As per Oracle Business, One Cannot Rollback Transfer to GL for One Particular Assignment/ Person, so therefore one needs to Run the Request to Rollback for All Persons

DECLARE
   CURSOR c1
   IS
      SELECT assignment_action_id, action_status
        FROM pay_assignment_actions
       WHERE payroll_action_id = 235162 AND assignment_id = 81021;
BEGIN
   FOR i IN c1
   LOOP
      py_rollback_pkg.
       rollback_ass_action (
         p_assignment_action_id   => i.assignment_action_id,
         p_rollback_mode          => 'ROLLBACK');


      COMMIT;
      DBMS_OUTPUT.
       put_line (
         i.assignment_action_id || 'Assg Action has been Rolled Back !!!');
   END LOOP;
EXCEPTION
   WHEN OTHERS
   THEN
      DBMS_OUTPUT.put_line ('Main Exception: ' || SQLERRM);

END;

No comments:

Post a Comment