0% found this document useful (0 votes)
87 views2 pages

Formula

This document contains a global absence entry validation formula for the absence type "Test Annual Leave UK". It checks if the entered leave duration exceeds the available absence balance for the employee, and returns an error message if so. The formula gets context data like the employee ID, assignment ID, and effective date. It retrieves data like accrual rates and carry over balance from other formulas. It calculates the employee's accrual balance and compares it to the entered leave duration to validate the absence entry.

Uploaded by

Mohammad Navaz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
87 views2 pages

Formula

This document contains a global absence entry validation formula for the absence type "Test Annual Leave UK". It checks if the entered leave duration exceeds the available absence balance for the employee, and returns an error message if so. The formula gets context data like the employee ID, assignment ID, and effective date. It retrieves data like accrual rates and carry over balance from other formulas. It calculates the employee's accrual balance and compares it to the entered leave duration to validate the absence entry.

Uploaded by

Mohammad Navaz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

/

***********************************************************************************
********
FORMULA NAME: ABSENCE_ENTRY_VALIDATION_GB_FF
FORMULA TYPE: Global Absence Entry Validation
DESCRIPTION : Global Absence Entry Validation Formula for Absence Type(Test Annual
Leave UK)
-----------------------------------------------------------------------------------
---------
Name Date Version Comments
-----------------------------------------------------------------------------------
---------
Navaz 18-OCT-2022 V.1 Initial Version
***********************************************************************************
********/

DEFAULT_DATA_VALUE for ANC_PER_ABS_ENTRS_ABSENCE_ENTRY_ID_ARR is 0


DEFAULT for ANC_ABS_ENTRS_ABSENCE_TYPE_ID is 0
DEFAULT for ANC_ABS_TYP_NAME is ' '
DEFAULT for ANC_ABS_ENTRS_DURATION is 0
DEFAULT FOR ANC_ABS_RSN_NAME is 'XX'
DEFAULT FOR IV_START_DATE IS '4712/12/31 00:00:00' (date)
DEFAULT FOR IV_END_DATE IS '4712/12/31 00:00:00' (date)
DEFAULT FOR GLOBAL_PAY_INTERFACE_EXTRACTION_DATE is '1951/01/01'

INPUTS ARE IV_START_DATE (date),


IV_END_DATE (date),
IV_TOTALDURATION(number)

l_person_id = GET_CONTEXT(PERSON_ID,0)
l_effective_date = GET_CONTEXT(EFFECTIVE_DATE,'4712/12/31 00:00:00'(date))
l_hr_assignment_id = GET_CONTEXT(HR_ASSIGNMENT_ID,0)
l_leg_group_id = GET_CONTEXT(LEGISLATIVE_DATA_GROUP_ID,0)

l_carry_over = 0
l_get_plan_balance_1 = 0
l_get_plan_balance_2 = 0

l_log = ESS_LOG_WRITE('Assignment_id: ' || to_char(l_hr_assignment_id))


l_log = ESS_LOG_WRITE('LDG : ' || to_char(l_leg_group_id))
l_log = ESS_LOG_WRITE('Person_id: ' || to_char(l_person_id))

l_absence_type = ANC_ABS_TYP_NAME
l_absence_duration = IV_TOTALDURATION

l_plan_name_1 = 'TEST Statutory Leave'


l_plan_name_2 = 'Test Annual Leave Plan'

VALID = 'Y'

if l_absence_type = 'Test Annual Leave UK' then(

l_plan_id = to_number(GET_VALUE_SET ( 'GET_PLAN_ID' , '|=P_PLAN_ID='''||


l_plan_name_2||''''))
l_accrual_rate = to_number(GET_VALUE_SET ( 'GET_MONTHLY_ACCRUAL_RATE' , '|
=P_PERSON_ID='''|| TO_CHAR(l_person_id)||''''||'|P_PLAN_ID='''||
TO_CHAR(l_plan_id)||''''))
l_absence_used_rate = to_number(GET_VALUE_SET ( 'GET_USED_ACCRUAL_RATE' , '|
=P_PERSON_ID='''|| TO_CHAR(l_person_id)||''''||'|P_PLAN_ID='''||
TO_CHAR(l_plan_id)||''''))
l_carry_over = to_number(GET_VALUE_SET ( 'GET_ACCRUAL_CARRY_OVER' , '|
=P_PERSON_ID='''|| TO_CHAR(l_person_id)||''''||'|P_PLAN_ID='''||
TO_CHAR(l_plan_id)||''''))

l_yearly_rate = (round(l_accrual_rate,1) * 12)


l_used_rate = (round(l_absence_used_rate,1))
l_accrual_year_bal = l_yearly_rate + l_used_rate
l_accrual_bal = l_accrual_year_bal + l_carry_over

if round(l_absence_duration,1) > round(l_accrual_bal,1) then (

VALID = 'N'
ERROR_MESSAGE = 'Leave Duration is exceeding the available absence balance ' ||
TO_CHAR(ROUND(l_accrual_bal,1))

RETURN VALID,ERROR_MESSAGE

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy