For more information, please refer to this announcement explaining best practices for getting answers to questions.
Absence Plan should be accrued once in a lifetime.
Summary:
Hi Folks,
Here i got requirement where the plan balance should be accrued only once a career to the employee. So i used the below Formula.
DEFAULT FOR PER_PER_WORK_RELATIONSHIP_MAX_DATE IS '4712/12/31 00:00:00' (DATE)
l_hire_date = PER_PER_WORK_RELATIONSHIP_MAX_DATE
l_enrollment_Year = to_char(l_hire_date,'YYYY')
l_effective_date = GET_CONTEXT(EFFECTIVE_DATE, '4712/12/31 00:00:00' (date))
l_effective_date_Year = to_char(l_effective_date,'YYYY')
IF (l_enrollment_Year = l_effective_date_year) THEN
accrual = 225
ELSE
accrual = 0
RETURN Accrual
I used the above formula, but is is not working as expected . it is failing for the employees who hired past years. Please suggest which condition do i need to use.