HRMS Assignment Extra Information API
Hi guys today we will explain HRMS Assignment Extra Information API
DECLARE v_person_id NUMBER; v_assignment_id NUMBER; v_extra NUMBER; v_object NUMBER; v_api_error VARCHAR (500); v_errcode NUMBER; CURSOR c1 IS SELECT * FROM XX_EXTRA WHERE valid_flag IS NULL AND EMP_NO '25980' ; BEGIN FOR rec IN c1 LOOP BEGIN SELECT DISTINCT person_id INTO v_person_id FROM per_all_people_f a WHERE employee_number = rec.emp_no AND effective_end_date = TO_DATE ('31/12/4712', 'DD/MM/RRRR'); EXCEPTION WHEN OTHERS THEN NULL; END; BEGIN SELECT assignment_id INTO v_assignment_id FROM per_all_assignments_f WHERE person_id = v_person_id AND effective_end_date = TO_DATE ('31/12/4712', 'DD/MM/RRRR'); EXCEPTION WHEN OTHERS THEN NULL; END; BEGIN hr_assignment_extra_info_api.create_assignment_extra_info (p_assignment_id => v_assignment_id, p_information_type => 'EAME Assignments', p_aei_attribute_category => '', p_aei_information_category => 'EAME Assignments', p_assignment_extra_info_id => v_extra, p_object_version_number => v_object, p_aei_information6 => rec.INFO6, p_aei_information7 => rec.INFO7, p_aei_information8 => rec.INFO8, p_aei_information3 => rec.INFO3, p_aei_information4 => rec.INFO4, p_aei_information11 => rec.INFO11, p_aei_information12 => rec.INFO12 ); COMMIT; UPDATE XX_EXTRA SET valid_flag = 'Y' WHERE emp_no = rec.emp_no; COMMIT; EXCEPTION WHEN OTHERS THEN v_api_error := SQLERRM; v_errcode := SQLCODE; UPDATE XX_EXTRA SET valid_flag = 'N', error_msg = v_api_error || ' ' || v_errcode WHERE emp_no = rec.emp_no; COMMIT; END; END LOOP; END;