/*******************************************************************
FORMULA NAME : XYZ_MTI_TARGET
FORMULA TYPE : Total Compensation Item
Requirement: The formula will fetch an attribute from Assignment EIT
*******************************************************************/
/*=========== INPUT VALUES DEFAULTS BEGIN =====================*/
INPUTS ARE CMP_IV_PERSON_ID (text), CMP_IV_PERIOD_START_DATE (date), CMP_IV_PERIOD_END_DATE (date)
DEFAULT FOR CMP_IV_PERSON_ID IS '-1'
DEFAULT FOR CMP_IV_PERIOD_START_DATE IS '1951/01/01' (date)
DEFAULT FOR PER_ASG_LEGAL_ENTITY_ID is -1
DEFAULT_DATA_VALUE FOR PER_ASSIGNMENT_EIT_EFF_USER_MTI_PLAN_MTI_TARGET IS -1
DEFAULT_DATA_VALUE FOR PER_ASSIGNMENT_EIT_EFF_USER_MTI_PLAN_PERIOD_START IS '4712/12/31 00:00:00' (DATE)
DEFAULT_DATA_VALUE FOR PER_ASSIGNMENT_EIT_EFF_USER_MTI_PLAN_PERIOD_END IS '4712/12/31 00:00:00' (DATE)
DEFAULT_DATA_VALUE FOR PER_ASSIGNMENT_EIT_EFF_USER_MTI_PLAN_ACTIVE IS 'NA'
DEFAULT FOR PER_ASG_ASSIGNMENT_NUMBER IS 'NA'
/*============ INPUT VALUES DEFAULTS ENDS =====================*/
/*=================== FORMULA SECTION BEGIN =================*/
Formula_Name = '[XYZ_MTI_TARGET]'
L_PD_START_DATE = CMP_IV_PERIOD_START_DATE
COMPENSATION_DATES = to_char(CMP_IV_PERIOD_START_DATE,'YYYY/MM/DD')
ASSIGNMENTS = to_char(GET_CONTEXT(HR_ASSIGNMENT_ID,-1))
LEGALEMPLOYERS = to_char(PER_ASG_LEGAL_ENTITY_ID)
CHANGE_CONTEXTS(EFFECTIVE_DATE = L_PD_START_DATE)
(
l_asg_number=PER_ASG_ASSIGNMENT_NUMBER
I = PER_ASSIGNMENT_EIT_EFF_USER_MTI_PLAN_MTI_TARGET.FIRST(-1)
WHILE PER_ASSIGNMENT_EIT_EFF_USER_MTI_PLAN_MTI_TARGET.EXISTS(I) LOOP
(
IF L_PD_START_DATE >= PER_ASSIGNMENT_EIT_EFF_USER_MTI_PLAN_PERIOD_START[I]
AND L_PD_START_DATE <= PER_ASSIGNMENT_EIT_EFF_USER_MTI_PLAN_PERIOD_END[I]
AND PER_ASSIGNMENT_EIT_EFF_USER_MTI_PLAN_ACTIVE[I]='Y' THEN
(
VALUES = PER_ASSIGNMENT_EIT_EFF_USER_MTI_PLAN_MTI_TARGET[I]
RETURN COMPENSATION_DATES, VALUES, ASSIGNMENTS, LEGALEMPLOYERS
)
I = PER_ASSIGNMENT_EIT_EFF_USER_MTI_PLAN_MTI_TARGET.NEXT(I,-1)
)
)
RETURN ASSIGNMENTS, LEGALEMPLOYERS
/*================ FORMULA SECTION END =======================*/
FORMULA NAME : XYZ_MTI_TARGET
FORMULA TYPE : Total Compensation Item
Requirement: The formula will fetch an attribute from Assignment EIT
*******************************************************************/
/*=========== INPUT VALUES DEFAULTS BEGIN =====================*/
INPUTS ARE CMP_IV_PERSON_ID (text), CMP_IV_PERIOD_START_DATE (date), CMP_IV_PERIOD_END_DATE (date)
DEFAULT FOR CMP_IV_PERSON_ID IS '-1'
DEFAULT FOR CMP_IV_PERIOD_START_DATE IS '1951/01/01' (date)
DEFAULT FOR PER_ASG_LEGAL_ENTITY_ID is -1
DEFAULT_DATA_VALUE FOR PER_ASSIGNMENT_EIT_EFF_USER_MTI_PLAN_MTI_TARGET IS -1
DEFAULT_DATA_VALUE FOR PER_ASSIGNMENT_EIT_EFF_USER_MTI_PLAN_PERIOD_START IS '4712/12/31 00:00:00' (DATE)
DEFAULT_DATA_VALUE FOR PER_ASSIGNMENT_EIT_EFF_USER_MTI_PLAN_PERIOD_END IS '4712/12/31 00:00:00' (DATE)
DEFAULT_DATA_VALUE FOR PER_ASSIGNMENT_EIT_EFF_USER_MTI_PLAN_ACTIVE IS 'NA'
DEFAULT FOR PER_ASG_ASSIGNMENT_NUMBER IS 'NA'
/*============ INPUT VALUES DEFAULTS ENDS =====================*/
/*=================== FORMULA SECTION BEGIN =================*/
Formula_Name = '[XYZ_MTI_TARGET]'
L_PD_START_DATE = CMP_IV_PERIOD_START_DATE
COMPENSATION_DATES = to_char(CMP_IV_PERIOD_START_DATE,'YYYY/MM/DD')
ASSIGNMENTS = to_char(GET_CONTEXT(HR_ASSIGNMENT_ID,-1))
LEGALEMPLOYERS = to_char(PER_ASG_LEGAL_ENTITY_ID)
CHANGE_CONTEXTS(EFFECTIVE_DATE = L_PD_START_DATE)
(
l_asg_number=PER_ASG_ASSIGNMENT_NUMBER
I = PER_ASSIGNMENT_EIT_EFF_USER_MTI_PLAN_MTI_TARGET.FIRST(-1)
WHILE PER_ASSIGNMENT_EIT_EFF_USER_MTI_PLAN_MTI_TARGET.EXISTS(I) LOOP
(
IF L_PD_START_DATE >= PER_ASSIGNMENT_EIT_EFF_USER_MTI_PLAN_PERIOD_START[I]
AND L_PD_START_DATE <= PER_ASSIGNMENT_EIT_EFF_USER_MTI_PLAN_PERIOD_END[I]
AND PER_ASSIGNMENT_EIT_EFF_USER_MTI_PLAN_ACTIVE[I]='Y' THEN
(
VALUES = PER_ASSIGNMENT_EIT_EFF_USER_MTI_PLAN_MTI_TARGET[I]
RETURN COMPENSATION_DATES, VALUES, ASSIGNMENTS, LEGALEMPLOYERS
)
I = PER_ASSIGNMENT_EIT_EFF_USER_MTI_PLAN_MTI_TARGET.NEXT(I,-1)
)
)
RETURN ASSIGNMENTS, LEGALEMPLOYERS
/*================ FORMULA SECTION END =======================*/
No comments:
Post a Comment