Oracle HRMS API –Update Employee Fed Tax Rule

API --  pay_federal_tax_rule_api.update_fed_tax_rule

Example --

DECLARE
   lb_correction                              BOOLEAN;
   lb_update                                   BOOLEAN;
   lb_update_override                 BOOLEAN;
   lb_update_change_insert      BOOLEAN;
   ld_effective_start_date            DATE;
   ld_effective_end_date             DATE;
   ln_assignment_id                     NUMBER                    := 33561;
   lc_dt_ud_mode                          VARCHAR2(100)     := NULL;
   ln_object_version_number     NUMBER                    := 0;
   ln_supp_tax_override_rate    PAY_US_EMP_FED_TAX_RULES_F.SUPP_TAX_OVERRIDE_RATE%TYPE;
   ln_emp_fed_tax_rule_id         PAY_US_EMP_FED_TAX_RULES_F.EMP_FED_TAX_RULE_ID%TYPE;


BEGIN
   -- Find Date Track Mode
   -- -------------------------------
   dt_api.find_dt_upd_modes
   (   -- Input data elements
       -- ------------------------------
      p_effective_date                   => TO_DATE('12-JUN-2011'),
      p_base_table_name            => 'PER_ALL_ASSIGNMENTS_F',
      p_base_key_column           => 'ASSIGNMENT_ID',
      p_base_key_value               => ln_assignment_id,
      -- Output data elements
      -- -------------------------------
      p_correction                          => lb_correction,
      p_update                                => lb_update,
      p_update_override              => lb_update_override,
      p_update_change_insert   => lb_update_change_insert
  );

 

 IF ( lb_update_override = TRUE OR lb_update_change_insert = TRUE )
 THEN
     -- UPDATE_OVERRIDE
     -- --------------------------------
     lc_dt_ud_mode := 'UPDATE_OVERRIDE';
 END IF;

 

 IF ( lb_correction = TRUE )
 THEN
    -- CORRECTION
    -- ----------------------

    lc_dt_ud_mode := 'CORRECTION';
 END IF;

 

 IF ( lb_update = TRUE )
 THEN
     -- UPDATE
     -- -------------
     lc_dt_ud_mode := 'UPDATE';
 END IF; 
  

  -- Update Employee Fed Tax Rule
  -- ----------------------------------------------

  pay_federal_tax_rule_api.update_fed_tax_rule
  (   -- Input data elements
      -- -----------------------------
      p_effective_date                        => TO_DATE('20-JUN-2011'),
      p_datetrack_update_mode   => lc_dt_ud_mode,
      p_emp_fed_tax_rule_id         => 7417,
      p_withholding_allowances  => 100,
      p_fit_additional_tax                => 10,
      p_fit_exempt                               => 'N',
      p_supp_tax_override_rate     => 5,
      -- Output data elements
      -- --------------------------------

     p_object_version_number       => ln_object_version_number,
     p_effective_start_date               => ld_effective_start_date,
     p_effective_end_date                => ld_effective_end_date
  );
 
 COMMIT;

EXCEPTION
          WHEN OTHERS THEN
                         ROLLBACK;
                         dbms_output.put_line(SQLERRM);
END;
/

SHOW ERR;

 

Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
About

Welcome to My Oracle World Puneet Rajkumar

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today