663: -- removed the match condition as its already checked.
664: --
665: if l_current_system_person_type in ('EMP_APL','EX_EMP_APL','APL_EX_APL')
666: then
667: fnd_message.set_name('PER','PER_289965_COMP_PER_TYPE_INVLD');
668: fnd_message.raise_error;
669: end if;
670: --
671: -- Check if the new person type is valid for current person type
664: --
665: if l_current_system_person_type in ('EMP_APL','EX_EMP_APL','APL_EX_APL')
666: then
667: fnd_message.set_name('PER','PER_289965_COMP_PER_TYPE_INVLD');
668: fnd_message.raise_error;
669: end if;
670: --
671: -- Check if the new person type is valid for current person type
672:
671: -- Check if the new person type is valid for current person type
672:
673: if not hr_general2.is_person_type
674: (p_person_id,l_current_system_person_type,l_effective_date) then
675: fnd_message.set_name('PER','PER_289603_CWK_INV_PERSON_TYPE');
676: fnd_message.raise_error;
677: end if;
678:
679: hr_per_type_usage_internal.maintain_person_type_usage
672:
673: if not hr_general2.is_person_type
674: (p_person_id,l_current_system_person_type,l_effective_date) then
675: fnd_message.set_name('PER','PER_289603_CWK_INV_PERSON_TYPE');
676: fnd_message.raise_error;
677: end if;
678:
679: hr_per_type_usage_internal.maintain_person_type_usage
680: (p_effective_date => l_effective_start_date