Sunday, June 9, 2013

API to Update Salary - PER_PAY_PROPOSALS

DECLARE
   CURSOR c1
   IS
      SELECT * FROM per_pay_proposals;

   l_inv_next_sal_date_warning   BOOLEAN;
   l_proposed_salary_warning     BOOLEAN;
   l_approved_warning            BOOLEAN;
   l_payroll_warning             BOOLEAN;
BEGIN
   FOR i IN c1
   LOOP
      l_inv_next_sal_date_warning := NULL;
      l_proposed_salary_warning := NULL;
      l_approved_warning := NULL;
      l_payroll_warning := NULL;
      hr_maintain_proposal_api.
       update_salary_proposal (
         p_pay_proposal_id             => i.pay_proposal_id,
         p_change_date                 => i.change_date,
         p_proposed_salary_n           => 10000,
         p_object_version_number       => i.object_version_number,
         p_multiple_components         => 'N',
         p_approved                    => 'Y',
         p_validate                    => FALSE,
         p_inv_next_sal_date_warning   => l_inv_next_sal_date_warning,
         p_proposed_salary_warning     => l_proposed_salary_warning,
         p_approved_warning            => l_approved_warning,
         p_payroll_warning             => l_payroll_warning);

      DBMS_OUTPUT.put_line (i.pay_proposal_id || ' has been Updated !!!!');
   END LOOP;
EXCEPTION
   WHEN OTHERS
   THEN
      DBMS_OUTPUT.put_line ('Main Exception: ' || SQLERRM);
END;

No comments:

Post a Comment