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

A little strange it may sound first time but there are business use case where-in we want to have an absence type which should allow absence recording only if done via some specific users. Those users will be able to apply the absence for everyone but no-one else should be able to record absence apart from them.

The delivered application functionality categorises users into:

  1. Employees
  2. Line Managers
  3. Administrators

But any further bifurcation isn’t delivered. This essentially means that an absence type can be enabled only for Administrators but we cannot restrict this to ensure that only ADMIN1, ADMIN2 can record absence against it but not all other Administrators.

In this post, we would demonstrate how we can achieve this functionality through a custom solution.

So, let’s get started.

Worked Out Example

We would have to perform a series of setups to achieve this functionality. We can break them down into the following steps:

  1. Create Absence Type
  2. Create a Custom Profile Option (Assign Values to Specific Admin Users)
  3. Create a Custom Table Value Set
  4. Create a Custom Error Message
  5. Create a Custom Fast Formula of Global Absence Entry Validation Type
  6. Attach the Custom Fast Formula to the Absence Type Created at Step 1
  7. Verify Results

 

Create Absence Type

We will create a simple Absence Type (say “Special Leave”) and the important attribute values are mentioned in table below:

Attribute Name

Attribute Value

Effective Start Date

01-Jan-1951

Name

Special Leave

Pattern

Generic Absence

UOM

Days

Legislative Data Group

US Legislative Data Group

Status

Active

Validation Formula

SPECIAL_LEAVE_VALIDATION 

Enable Administrative Updates

Checked

 

 

Create Custom Profile Option

We would need to create a custom profile option (ALLOW_SPECIALLEAVE_ABSENCE_BOOKING which would hold ‘N’ at Site Level and ‘Y’ for Admin Users HCM_IMPL and HCM_IMPL1 who are authorised to record absence. All other Admin users do not have a entry here and hence they should not be able to record the absence). Details of the profile option are below:

Navigation-> Setup and Maintenance->Manage Profile Options-> Create

Attribute Name

Attribute Value

Profile Option Name

ALLOW_SPECIALLEAVE_ABSENCE_BOOKING

Profile Display Name

Allow Special Leave Absence Booking

Application

Absence Management

Module

Absence Recording

Start Date

1/1/1951

Description

Custom Profile Option created to Allow Special Leave Absence Booking

Profile Option Level (Site)

Enabled (Checked), Updatable (Checked)

Profile Option Level (User)

Enabled (Checked), Updatable (Checked)

 

Assign Profile Option Values

We will assign profile option values for this newly created profile option.

Navigation->Manage Administrator Profile Values->ALLOW_SPECIALLEAVE_ABSENCE_BOOKING

Profile Option Name: ALLOW_SPECIALLEAVE_ABSENCE_BOOKING

*Profile Level

Product Name

User Name

Profile Value

Site

   

N

User

 

HCM_IMPL

Y

User

 

HCM_IMPL1

Y

 

 

Create a Custom Table Value Set

We will now create a custom table type value set.

Navigation-> Setup and Maintenance -> Manage Value Sets -> Create

Attribute Name

Attribute Value

Value Set Code

SPECIALLEAVE_RECORDING_AUTH_VS

Description

Custom Table Type Value Set which returns the profile value assigned to ALLOW_SPECIALLEAVE_ABSENCE_BOOKING

*Module

Absence Management

Validation Type

Table

Value Data Type

Character

*FROM Clause

fnd_profile_option_values fpov , fnd_profile_options_b fpob

*Value Column Name

fpov.profile_option_value

ID Column Name

fpov.profile_option_value

WHERE Clause

fpov.profile_option_id = fpob.profile_option_id 

and fpob.profile_option_name = 'ALLOW_SPECIALLEAVE_ABSENCE_BOOKING' 

and     fpov.level_value =fnd_global.user_guid

 

 

Create Custom Error Message

We would now create a custom error message.

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

Attribute Name

Attribute Value

Message Name

SPECIAL_LEAVE_ABS_RCD_AUTH_ERR

Application

Absence Management

Module

Absence Recording

Message Number

9000001

Message Type

Error

Severity

High

Logging Enabled

Checked

*Short Text

You are not authorized to record this absence. Please contact your system administrator.

 

Create Custom Fast Formula

We would now create a custom Fast Formula of Global Absence Entry Validation Type.

Navigation-> Setup and Maintenance-> Fast Formulas -> Create

Fast Formula Text

/* Formula Name: SPECIAL_LEAVE_VALIDATION

   Formula Type: Global Absence Entry Validation

   Description : Custom Global Absence Entry Validation Attached to Special Leave Absence Type

   Change History:   ***************************************************************************************

   Version Date Created By

   1.0 18-May-2020 Ashish Harbhajanka

   ****************************************************************************************

*/

INPUTS ARE IV_START_DATE (date),

           IV_END_DATE (date),

  IV_ABSENCE_REASON,

  IV_TOTALDURATION

   

lc_valid = 'Y'

lc_val_set_has_val = 'Y'


lc_auth_val = GET_VALUE_SET('SPECIALLEAVE_RECORDING_AUTH_VS')


IF ISNULL(lc_auth_val) = 'N'

THEN

(

lc_val_set_has_val = 'Y'

lc_auth_val = 'N'

)

L_LOG = ESS_LOG_WRITE('Value of lc_auth_val is: ' || lc_auth_val)

L_LOG = ESS_LOG_WRITE('Value of lc_val_set_has_val is: ' || lc_val_set_has_val)

VALID = lc_valid

IF (lc_auth_val = 'N')

THEN

(

VALID = 'N'

ERROR_MESSAGE = 'SPECIAL_LEAVE_ABS_RCD_AUTH_ERR'

RETURN VALID,ERROR_MESSAGE

)

RETURN VALID

 

 

Assign Validation Fast Formula to Absence Type

Now we will attach the Fast Formula to Absence Type

Navigation->Setup and Maintenance -> Manage Absence Types -> Special Leave

 

Verifying Results

Now we will login with an ADMIN user (HCM_IMPL2) who is not allowed to record absence booking for “Special Leave” and check result.

 

We will now login with another ADMIN user (HCM_IMPL1) who is authorized to record the absence and verify result.

 

Summary

So, this is how we can make use of Global Absence Entry Validation Fast Formula to restrict absence booking for specific users. While in this example we have used controls on Admin users the same logic can very well be applied for line managers and employees too.

And with this I would end this post.

Hope this was a good read, Thanks all for your time and have a nice day ahead.

 

The supporting files can be downloaded from the links below:

ProfileOptionSQL

Special_Leave_Validation.sql


Ashish Harbhajanka

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

<<  Apr 2024  >>
 Mon  Tue  Wed  Thu  Fri  Sat  Sun 
  1  2  3  4  5  6  7
  8  91011121314
15161718192021
22232425262728
2930     

Enquire For Training

Fusion Training Packages

Get Email Updates


Powered by Google FeedBurner