Oracle HRMS API – Create Employee Element Entry


Oracle HRMS API – Create Employee Element Entry


API - pay_element_entry_api.create_element_entry
Example --
Lets Try to Create Element Entry "Bonus" for Employee

DECLARE   
    ln_element_link_id                  PAY_ELEMENT_LINKS_F.ELEMENT_LINK_ID%TYPE;
   ld_effective_start_date            DATE;
   ld_effective_end_date             DATE;
   ln_element_entry_id                PAY_ELEMENT_ENTRIES_F.ELEMENT_ENTRY_ID%TYPE;
   ln_object_version_number     PAY_ELEMENT_ENTRIES_F.OBJECT_VERSION_NUMBER %TYPE;
   lb_create_warning                    BOOLEAN;
   ln_input_value_id                    PAY_INPUT_VALUES_F.INPUT_VALUE_ID%TYPE;
   ln_screen_entry_value            PAY_ELEMENT_ENTRY_VALUES_F.SCREEN_ENTRY_VALUE%TYPE;
   ln_element_type_id                  PAY_ELEMENT_TYPES_F.ELEMENT_TYPE_ID%TYPE; 
BEGIN
        -- Get Element Link Id
        -- ------------------------------ 
         

 ln_element_link_id :=      hr_entry_api.get_link
                                                          (       p_assignment_id      => 33561,
                                                                  p_element_type_id   => 50417,
                                                                  p_session_date          => TO_DATE('23-JUN-2011')
                                                          ); 

       dbms_output.put_line( '  API: Element Link Id: ' || ln_element_link_id );

       -- Create Element Entry
       -- ------------------------------ 
      

      pay_element_entry_api.create_element_entry
         (     -- Input data elements
               -- ----------------------------- 
               

               p_effective_date                     => TO_DATE('22-JUN-2011'),
               p_business_group_id          => fnd_profile.value('PER_BUSINESS_GROUP_ID'),
               p_assignment_id                   => 33561,
               p_element_link_id                => ln_element_link_id,
               p_entry_type                           => 'E',
               p_input_value_id1               => 53726,
               p_entry_value1                      => 2500,
               -- Output data elements
               -- -------------------------------- 
             

               p_effective_start_date          => ld_effective_start_date,
               p_effective_end_date           => ld_effective_end_date,
               p_element_entry_id             => ln_element_entry_id,
               p_object_version_number  => ln_object_version_number,
               p_create_warning                 => lb_create_warning
         ); 

     dbms_output.put_line( '  API: pay_element_entry_api.create_element_entry successfull - Element Entry Id: ' || ln_element_entry_id ); 
 COMMIT;

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

No comments:

Post a Comment

How to find all cancel Requisitions

SELECT prha . *   FROM po_Requisition_headers_all prha , po_action_history pah   WHERE      1 = 1        AND pah . object_id ...