Search This Blog

Sunday, April 5, 2015

issue_with_empno_already_exists


Issue while generating the new Employee Number Auto as Empno Already exists:

select max(employee_number)
--employee_number, person_id
       from per_people_f
       --where employee_number = '9890'    
       where employee_number not like 'P%'
       --group by person_id;

check in the front end if the emp query comes.
      
DECLARE
  -- Input Variables
  l_validate BOOLEAN    := FALSE;
  l_effective_date DATE := sysdate;
  l_person_id                 NUMBER    := 32765;
  l_perform_predel_validation BOOLEAN   := FALSE;
  -- Output Variables
  l_person_org_manager_warning VARCHAR2(2000);
BEGIN
  --  Calling API HR_PERSON_API.DELETE_PERSON
  hr_person_api.delete_person(p_validate                   => l_validate ,
                              p_effective_date             => l_effective_date ,
                              p_person_id                  => l_person_id ,
                              p_perform_predel_validation  => l_perform_predel_validation ,
                              p_person_org_manager_warning => l_person_org_manager_warning );
  --
  dbms_output.put_line('Employee deleted successfully');
  --
EXCEPTION
WHEN OTHERS THEN
  dbms_output.put_line('Error : ' || sqlerrm);
END;
/     

No comments:

Post a Comment