Grade Step Progression (GSP) Ladder Level Eligibility Fast Formula
YouTube Tutorial: GSP Ladder Eligible Formula 2 - Oracle Fusion HCM Fast Formula Tutorial-11
Please See the Explanation in the YouTube Tutorial
/*
Name: TLK_GSP_ELIG_CHILD
Type: Compensation Person Selection
Purpose: Skip the person who is already in ceiling step
***************************/
/* DBI */
DEFAULT_DATA_VALUE FOR PER_GRD_GRADE_HISTORY_CEILING_STEP_ID IS -1
DEFAULT_DATA_VALUE FOR PER_GRD_GRADE_HISTORY_EFFECTIVE_START_DATE IS '1900/01/01 00:00:00' (date)
DEFAULT_DATA_VALUE FOR PER_GRD_GRADE_HISTORY_EFFECTIVE_END_DATE IS '1900/01/01 00:00:00' (date)
l_data = set_log('Entering TLK_GSP_ELIG_CHILD' )
grade = GET_CONTEXT(GRADE_ID, -1)
eDate = GET_CONTEXT(EFFECTIVE_DATE, '1900/01/01 00:00:00' (date) )
l_data = set_log('Grade ' || TO_CHAR(grade) )
l_data = set_log('EFF DATE ' || TO_CHAR(eDate) )
STEPID = -1
STEPNAME = ' '
/* Find the ceiling id of eff date */
index = PER_GRD_GRADE_HISTORY_CEILING_STEP_ID.FIRST( -1)
WHILE (PER_GRD_GRADE_HISTORY_CEILING_STEP_ID.EXISTS(index))
LOOP (
lstDate = PER_GRD_GRADE_HISTORY_EFFECTIVE_START_DATE[index]
lenDate = PER_GRD_GRADE_HISTORY_EFFECTIVE_END_DATE[index]
l_data = set_log('CEILING Dates ' || TO_CHAR(lstDate) || ' / '|| TO_CHAR(lenDate))
if (edate >= lstDate AND edate <= lenDate ) THEN (
STEPID = PER_GRD_GRADE_HISTORY_CEILING_STEP_ID[index]
l_data = set_log('Step ID ' || TO_CHAR(STEPID) )
exit
)
index = PER_GRD_GRADE_HISTORY_CEILING_STEP_ID.NEXT(index, -1 )
)
IF STEPID != -1 THEN (
lparam = '|=STEP_ID='|| TO_CHAR(STEPID)
l_data = set_log('Person Grade Step Name ' || lparam )
STEPNAME = GET_VALUE_SET('GSP_GET_STEP_NAME' , lparam)
l_data = set_log('Ceil Step Name ' || STEPNAME )
)
l_data = set_log('Leaving GSP_PERSON_SELECTION2 ' || STEPNAME )
RETURN STEPNAME
//*
Name: GSP_PART_ELIG
Type: Participation and Rate Eligibility
Function: Exclude the people who are in step 5 or >
Exclude the people who are in probation
***************************************************/
DEFAULT FOR PER_GRADE_STEP_NAME IS ' '
DEFAULT FOR PER_GRADE_STEP_SEQUENCE IS -1
DEFAULT FOR PER_ASG_DATE_PROBATION_END IS '1900/01/01 00:00:00' (date)
DEFAULT FOR PER_ASG_GRADE_ID is -1
INPUTS ARE CMP_IV_GRADE_LADDER_ID(NUMBER),CMP_IV_GRADE_LADDER_NAME (TEXT), CMP_IV_PERIOD_START_DATE (DATE), CMP_IV_PERIOD_END_DATE (DATE)
ldata = SET_LOG('Entering GSP_PART_ELIG' )
ELIGIBLE = 'Y'
eDate = GET_CONTEXT(EFFECTIVE_DATE, '1900/01/01 00:00:00' (date) )
asgID = GET_CONTEXT(HR_ASSIGNMENT_ID, -1 )
ldata = SET_LOG('PER_ASG_GRADE_ID ' || TO_CHAR(PER_ASG_GRADE_ID) )
ldata = SET_LOG('EFFECTIVE_DATE ' || TO_CHAR(eDate) )
ldata = SET_LOG('Asg ID ' || TO_CHAR(asgID) )
ldata = SET_LOG('PER_ASG_DATE_PROBATION_DATE_END '||TO_CHAR(PER_ASG_DATE_PROBATION_END))
ldata = SET_LOG('PER_GRADE_STEP_SEQUENCE ' || TO_CHAR(PER_GRADE_STEP_SEQUENCE) )
ldata = SET_LOG('PER_GRADE_STEP_NAME ' || PER_GRADE_STEP_NAME )
ldata = SET_LOG('CMP_IV_GRADE_LADDER_ID ' || TO_CHAR(CMP_IV_GRADE_LADDER_ID ) )
ldata = SET_LOG('CMP_IV_GRADE_LADDER_NAME ' || CMP_IV_GRADE_LADDER_NAME )
ldata = SET_LOG('CMP_IV_PERIOD_START_DATE ' || TO_CHAR(CMP_IV_PERIOD_START_DATE ) )
ldata = SET_LOG('CMP_IV_PERIOD_END_DATE ' || TO_CHAR(CMP_IV_PERIOD_END_DATE ) )
IF PER_GRADE_STEP_SEQUENCE >= 5 THEN (
ELIGIBLE = 'N'
) ELSE (
IF PER_ASG_DATE_PROBATION_END >= eDate THEN (
ELIGIBLE = 'N'
)ELSE (
IF PER_ASG_GRADE_ID WAS NOT DEFAULTED THEN (
IF IS_EXECUTABLE('GSP_CHILD_ELIG') THEN (
SET_INPUT('GRADE_ID' , PER_ASG_GRADE_ID)
EXECUTE('GSP_CHILD_ELIG')
ceil_step_name = GET_OUTPUT('STEPNAME', ' ')
ldata = SET_LOG('ceil_step_name ' || ceil_step_name )
if ceil_step_name != ' ' AND ceil_step_name = PER_GRADE_STEP_NAME THEN (
ELIGIBLE = 'N'
)
)
)
)
)
ldata = SET_LOG('Leaving GSP_PART_ELIG : '|| ELIGIBLE)
Return ELIGIBLE
Hello! Thank you for all contribution, your blog helped me so much!
ReplyDeleteI've been starting in fast formula in HCM Compensation, and a I need to retrieve the absences in the cycle's period and use it in a column for the compensation plan calculations (bonus compensation plan). I've looked for the sintax for a function "get absence duration in period" but I still didn't find it. Do you know this function and how it works? Or can you think in other way to build this kind of formula? Thank you!