Login
Register

Home

Trainings

Fusion Blog

EBS Blog

Authors

CONTACT US

Fusion Blog
  • Register

Oracle Gold Partners, our very popular training packages, training schedule is listed here
Designed by Five Star Rated Oracle Press Authors & Oracle ACE's.

webinar new

Search Courses

Introduction

In context with Absence Management Approval Workflow processes and configurations many times one way have a requirement where-in certain absence transactions needs to follow an alternative approval routing based on a Descriptive Flex-Field (DFF) enabled on the Absence Recording page. In this case the business requirement is such that whenever a specific Absence Booking Transaction makes the Absence Leave Balance as “Negative” then an alternative approval routing should be followed. Unfortunately, this cannot be achieved as the DFF attributes are not available while defining approval rules on the Absence Approval workflow.But having said so one can still have a workaround solution where they can make use of “Absence Reason” field.

In this post we would try to demonstrate the same with a worked-out example.

Pre-Requisites

In order to proceed with this approach, we need to make sure that there are some pre-existing setups in the system.

  1. Pre-Existing Active Absence Type

There should be a pre-existing absence type present in the system against which we can associate the newly created absence reason. For this example, we will choose the “Sick” absence type.

Worked-Out Example

We would need to do some configuration steps which are described below:

Creating a New Absence Reason

We would need to navigate to Setup and Maintenance -> Manage Absence Reasons-> Create New Reason

Attribute Name

Attribute Value

Effective Start Date

01/01/2000

Name

Allow Negative Absence Booking

Description

New Absence Reason created to demonstrate that an Alternative Approval Hierarchy can be routed based on Absence Reason

Legislation

United States

Status

Active

Management

User-defined

 

 

Associating Absence Reason to Absence Type

Next we would need to associate the absence plan with absence type.

Navigation: Setup and Maintenance->Manage Absence Type-> Search for “Sick” and add absence reason under “Plans and Reasons”

Enable Display Properties for Absence Reason

We would need to enable the “Reason” field under “Manage Absence Type” > Sick (Display Features)-> Primary Absence Details

Enabling Approval Processing for Administrator

As a next step we would also need to enable Approval processing for Administrator.

Navigation: Setup and Maintenance->Manage Absence Type-> Display Features-> Approvals and Processing Rules-> Approval Processing and Approval Reset on Update to Enabled for Administrator

 

 

Ensure Insufficient Balance Enforcement is Not Enabled Administrator

We would also need to ensure that “Insufficient Balance Enforcement” attribute is “Not Enabled” for Administrator.

Navigation: Setup and Maintenance->Manage Absence Type-> Display Features-> Projected Balances-> Insufficient Balance Enforcement to Not Enabled for Administrator

 

 

Configuring Custom Error Messages under “Manage Messages”

We would also need to create two new Custom Error Messages. 

Navigation is Setup and Maintenance->Manage Messages -> Create New Messages

The first message is fired when an end-user chooses “Allow Negative Absence Booking” as an Absence Reason even when the current absence transaction does not take the Absence Leave Balance to a negative value. In this case the end-user has to choose another absence reason and re-submit the transaction

XX_NEG_BAL_INVALID_REASON_ERR

Attribute Name

Attribute Value

Message Name

XX_NEG_BAL_INVALID_ERR

Application

Absence Management

Module

Absence Recording

Message Number

90000001

Short Text

This Absence Booking would make the leave balance negative. You, would need to choose "Allow Negative Absence Booking" as Absence Reason to record this Absence.

Message Type

Error

Severity

High

Logging Enabled

Yes

 

The second message gets fired when the current absence booking is about to make the Absence Leave Balance as negative but the Absence Reason chosen is not “Allow Negative Absence Booking”. In this case, end-user would be asked to choose “Allow Negative Absence Booking” and then re-submit the transaction.

XX_INVALID_REASON_ERR

Attribute Name

Attribute Value

Message Name

XX_INVALID_REASON_ERR

Application

Absence Management

Module

Absence Recording

Message Number

90000002

Short Text

You cannot choose "Allow Negative Absence Booking" as Absence Reason as this Absence Recording will not make the leave balance negative. Please choose a different Absence Reason.

Message Type

Error

Severity

High

Logging Enabled

Yes



Creating a Custom Global Absence Entry Validation Fast Formula

We would also need to create a custom Global Absence Entry Validation Fast Formula.

Navigation: Setup and Maintenance->Fast Formula->Create New Formula

Formula Text for XX_ANC_SICK_VAL 

/*******************************************************************************

*                                                                               *

* FORMULA NAME: XX_ANC_SICK_VAL                                                 *

*                                                                               *

* FORMULA TYPE: Global Absence Entry Validation                                 *

*                                                                               *

* DESCRIPTION: Validation Fast Formula for 'Sick' Accrual Plan                  *

*                                                                               *

* Change History                                                                *

* Created By     : Ashish Harbhajanka                                           *

* Creation Date  : 19-April-2020                                                *

********************************************************************************/


/*===================================== DATABASE ITEM DEFAULTS BEGIN =============================*/

INPUTS ARE IV_START_DATE (date), IV_END_DATE (date), IV_START_TIME(text),IV_END_TIME(text), IV_ABSENCE_REASON (text), IV_TOTALDURATION


lc_abs_reason_name = IV_ABSENCE_REASON

lc_plan_name = 'Sick'

ln_assignment_id = GET_CONTEXT(HR_ASSIGNMENT_ID,0)

ln_person_id = GET_CONTEXT(Person_ID,0)

ld_effective_date = GET_CONTEXT(EFFECTIVE_DATE,'4712/12/31 00:00:00'(date))

ln_leg_group_id = GET_CONTEXT(LEGISLATIVE_DATA_GROUP_ID,0)

lc_allow_neg_abs = 'Allow Negative Absence Booking'

lc_valid = 'Y'

ln_accrual_balance = 0


VALID = lc_valid


CHANGE_CONTEXTS (HR_ASSIGNMENT_ID = ln_assignment_id, PERSON_ID = ln_person_id, EFFECTIVE_DATE= ld_effective_date,LEGISLATIVE_DATA_GROUP_ID = ln_leg_group_id)

(

ln_accrual_balance = GET_PLAN_BALANCE(lc_plan_name)

)

ln_bal_after_abs_booking = ln_accrual_balance - IV_TOTALDURATION


L_DATA = ESS_LOG_WRITE('Assignment ID: ' || to_char(ln_assignment_id))

L_DATA = ESS_LOG_WRITE('Effective Date: ' || to_char(ld_effective_date,'YYYY/MM/DD'))

L_DATA = ESS_LOG_WRITE('Accrual Balance: ' || to_char(ln_accrual_balance))

L_DATA = ESS_LOG_WRITE('IV_ABSENCE_REASON: ' || lc_abs_reason_name)

L_DATA = ESS_LOG_WRITE('IV_TOTALDURATION: ' || to_char(IV_TOTALDURATION))

L_DATA = ESS_LOG_WRITE('ln_bal_after_abs_booking: ' || to_char(ln_bal_after_abs_booking))


IF (ln_bal_after_abs_booking <= 0 and lc_abs_reason_name != lc_allow_neg_abs)

THEN

(

VALID = 'N'

ERROR_MESSAGE = 'XX_NEG_BAL_INVALID_REASON_ERR'

RETURN VALID,ERROR_MESSAGE

)

IF (ln_accrual_balance > 0 and lc_abs_reason_name = lc_allow_neg_abs)

THEN

(

VALID = 'N'

ERROR_MESSAGE = 'XX_INVALID_REASON_ERR'

RETURN VALID,ERROR_MESSAGE

)

RETURN VALID

 

Attaching XX_ANC_SICK_VAL to Sick Absence Type

We would need to attach “XX_ANC_SICK_VAL” Absence Entry Validation Fast Formula to “Sick” Absence Type

Configuring “Global Absence Recording” Transaction Workflow

Next, we would need to configure “Global Absence Recording” workflow. 

Navigation: Setup and Maintenance -> Manage Approval Transactions for Human Capital Management-> Global Absence Recording

We need to configure two rules:

Rule: ApprovalReasonKeyForHT

IF (absencesApprovalsRequest.absenceTypeReasons != "Allow Negative Absence Booking") THEN “Management Hierarchy”

Rule: AllowOverBooking

IF (absencesApprovalsRequest.absenceTypeReasons == " Allow Negative Absence Booking") THEN “Self Auto Approve”

Verification

There is a positive balance value as on 01/02/2020 such that the current absence booking will not make the Absence Leave Balance negative. In this case, if we choose “Absence Reason” as  “Allow Negative Absence Booking” and we should get an error.

 

Next, we will book and absence with any Absence Reason apart from “Allow Negative Absence Booking Routing” and we should get error.

 

Now if we change the Absence Reason to “Allow Negative Absence Booking” then we should be able to submit the absence

Once we are done with the Absence Recording we could check the status of the booked absences.

 

We could clearly see that based on the Äbsence Reason used one of the absence has got auto-approved while the other is still awaiting approval.

Summary

So, this is how we can use a combination of “Global Absence Entry Validation” Fast Formula and “Absence Reason” to ensure an alternative approval routing is enforced in case of Absence Overbooking.


Ashish Harbhajanka

Comments   

0 #1 Anuvandana 2022-01-11 13:12
Iam getting the below error, when compiling the formula.



database item or local variable HR_ASSIGNMENT_I D used as a context.

Any lead will be a big help.



Iam using the below formula

CHANGE_CONTEXTS (HR_ASSIGNMENT_I D = hr_id, PERSON_ID = person_id, EFFECTIVE_DATE= eff_date,LEGISL ATIVE_DATA_GROU P_ID = ln_leg_group_id)

(

ln_accrual_balance = GET_PLAN_BALANC E('Annual Leave Plan')

)
Quote

Add comment


Security code
Refresh

About the Author

Ashish Harbhajanka

 

Oracle Fusion HCM Techno Functional Consultant with overall 10 years of Experience in software industry with 5 years in EBS HRMS and rest 5 in Fusion HCM.

My areas of intesrest in Fusion HCM include :

a) Inbound Outbound Integration using FBL/HDL or BIP/HCM Extracts.

b) Fast Formula

c) BIP Reports

d) OTBI Reports

e) RESTFUL API / Web Service Call

f) Functional Setup

g) End to End Testing

h) Regression Testing

i) Preparing COnfiguration Workbooks

j) Creating Speed Solutions

k) Preparing User Guides

l) UPK

........

Search Trainings

Fully verifiable testimonials

Apps2Fusion - Event List

<<  Mar 2024  >>
 Mon  Tue  Wed  Thu  Fri  Sat  Sun 
      1  2  3
  4  5  6  7  8  910
11121314151617
18192021222324
25262728293031

Enquire For Training

Fusion Training Packages

Get Email Updates


Powered by Google FeedBurner