Sunday 3 May 2020

Sample Fast Formula - Participation and Rate Eligibility formula

Participation and Rate eligibility formula can be used to determine if an employee is eligible for a particular plan(ex: compensation plan). Below fast formula is used to check eligibility of an employee as per the job tagged to his/her assignment.

/*******************************************************************
FORMULA NAME: XYZ_EMP_ELIG_JOB_LEVEL_1_3_5
FORMULA TYPE: Participation and Rate Eligibility
DESCRIPTION: This formula determines if a person is eligible by checking if the person's job level is in 1,3 or 5
*********************************************************************************/
DEFAULT FOR PER_ASG_JOB_APPROVAL_AUTHORITY IS -1
DEFAULT FOR PER_ASG_ASSIGNMENT_NUMBER IS 'NA'

Formula_Name = '[XYZ_EMP_ELIG_JOB_LEVEL_1_3_5]'

l_eff_date  = GET_CONTEXT(EFFECTIVE_DATE, TO_DATE('1951/01/01 12:00:00'))

CHANGE_CONTEXTS(EFFECTIVE_DATE = l_eff_date)
(
IF ((PER_ASG_JOB_APPROVAL_AUTHORITY = 1)
OR (PER_ASG_JOB_APPROVAL_AUTHORITY = 3) OR (PER_ASG_JOB_APPROVAL_AUTHORITY = 5)) THEN
(
ELIGIBLE = 'Y'
RETURN ELIGIBLE
)
)
ELIGIBLE = 'N'
RETURN ELIGIBLE

No comments:

Post a Comment