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

During the implementation of Absence Management module there may have been situations where there is a need to have validations which would be applicable depending on who among (Employee, Line Manager or HR Admin) is booking the absence.

There could be some rules which will be applicable when employee tries to book a leave for himself (self-service transaction) but a different set of rules would be applicable if line manager books the same leave for his direct-reports. On same lines there could be a different set altogether when HR Admin tries to book a leave. 

As of current date application allows configuring different approval rules based on the initiator but unfortunately there is no delivered configuration to achieve the same during absence booking. But, this doesn’t mean we cannot have some alternative. In this post, I would try to demonstrate how we can write custom logic within “Global Absence Entry Validation” Fast Formula to ensure different messages are displayed depending the user ( Employee / Manager / HR Admin).

So, without further delay let’s get started with a worked-out example.

Worked Out Example

Before we start with the demonstration we would need to ensure we have some basic pre-requisite steps are in place. They are:

  1. Creating a User-Defined Absence Type
  2. Creating Custom Error Messages which would be displayed during absence recording.
  3. Create a Fast Formula of “Global Absence Entry Validation” type which should be associated with the absence type.
  4. Active login credentials of one employee, his line manager and HR Admin.

 

Creating User-Defined Absence Type

For this example we will create a simple absence type (named “Test Absence”). Some salient features of the Absence are:

Attribute Name

Attribute Value

Absence Type Name

Test Absence

 Effective Start Date

 01-Jan-1951

 Legislative Data Group

US Legislative Data Group 

 UOM

Hours 

 Status

 Active

 Plans

No Plans Associated 

 Reasons

No Reasons Associated 

Insufficient Balance Enforcement 

Not Enabled for Employees,  Managers and Administrators 




 

Creating Custom Error Messages

We would create 5 custom Error Messages.

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

Messages are defined in “Absence Management” application and module is “Absence Recording”

Details of Message are as below:

Message Name

Message Number

Message Type

Short Text

TEST_ABSENCE_COMMON_ERR_MSG

9000001

Error

Absence cannot be greater than 45 hours.

TEST_ABSENCE_DEFAULT_ERR_MSG

9000002

Error

Please save the transaction before submitting.

TEST_ABSENCE_ADMIN_ERR_MSG

9000003

Error

Admin Users should inform the employee before booking this absence.

TEST_ABSENCE_LINE_MGR_ERR_MSG

9000004

Error

You are booking this absence on behalf of your direct report.Line Manager should inform the employee before booking this absence.

TEST_ABSENCE_EMP_ERR_MSG

9000005

Error

Please reach out to your HR Representative or Line Manager if you wish to book this absence

 

 

Creating a Fast Formula

We would create a Fast Formula (TEST_DBI_VALUE).

Formula Text

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

FORMULA NAME: TEST_DBI_VALUE

FORMULA TYPE: Global Absence Entry Validation  

DESCRIPTION:  Validation Formula attached to "Test Absence" 


Change History:

Name                    Date                         Comments

--------------------------------------------------------------------------------------------------------------------

Ashish Harbhajanka      19-03-2020                         Initial Version 

--------------------------------------------------------------------------------------------------------------------

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

DEFAULT FOR PER_ASG_PERSON_NUMBER IS 'X'

DEFAULT FOR ANC_ABS_ENTRS_USER_MODE is 'XXXX'


INPUTS ARE IV_START_DATE,IV_END_DATE,IV_TOTALDURATION



ln_person_number = PER_ASG_PERSON_NUMBER

lc_user_mode = ANC_ABS_ENTRS_USER_MODE

lc_admin = 'ADMIN'

lc_mgr   = 'MGR'

lc_emp   = 'EMP'

lc_default = 'XXXX'


/*

VALID = 'N'

ERROR_CODE = 'W'

ERROR_MESSAGE = 'Value of lc_user_mode is: ' || lc_user_mode

RETURN VALID,ERROR_CODE,ERROR_MESSAGE

*/


IF IV_TOTALDURATION > 45

THEN

(

VALID = 'N'

ERROR_CODE = 'E'

ERROR_MESSAGE = 'TEST_ABSENCE_COMMON_ERR_MSG' /* 'Absence cannot be greater than 45 hours' */

RETURN VALID,ERROR_MESSAGE

)


IF lc_user_mode = lc_default

THEN

(

VALID = 'N'

ERROR_CODE = 'E'

ERROR_MESSAGE =    'TEST_ABSENCE_DEFAULT_ERR_MSG'  /* 'Please save the transaction before submitting.' */

RETURN VALID,ERROR_CODE,ERROR_MESSAGE

    )

IF lc_user_mode = lc_admin

THEN

(

VALID = 'N'

ERROR_CODE = 'E'

ERROR_MESSAGE = 'TEST_ABSENCE_ADMIN_ERR_MSG' /* 'Admin Users should inform the employee before booking this absence.' */

RETURN VALID,ERROR_CODE,ERROR_MESSAGE

    )


IF lc_user_mode = lc_mgr

THEN

(

VALID = 'N'

ERROR_CODE = 'E'

ERROR_MESSAGE = 'TEST_ABSENCE_LINE_MGR_ERR_MSG' /* 'You are booking this absence on behalf of your direct report. 

Line Manager should inform the employee before booking this absence.' */

RETURN VALID,ERROR_CODE,ERROR_MESSAGE

    )


IF lc_user_mode = lc_emp

THEN

(

VALID = 'N'

ERROR_CODE = 'E'

ERROR_MESSAGE = 'TEST_ABSENCE_EMP_ERR_MSG' /* 'Please reach out to your HR Representative or Line Manager if you wish to book this absence' */

RETURN VALID,ERROR_CODE,ERROR_MESSAGE

    )

 

 

Login Credentials

For this example we will perform all transaction on Employee (Martin Conway , Employee Number 925)

Details about various user which will be used in this example are below:

User Type

User Name

Employee

Martin.Conway

Manager

Bob.Boyle

Administrator

HCM_IMPL

 

Absence Booking As Administrator

We will login as HCM_IMPL and try to book an Absence of “Test Absence” for Martin such that absence duration is greater than 45 hours. In this case we should get the common error (this is a error which would be shown for all types of users)

Now we will reduce the duration to less than 45 hours and try to book an absence. 

Now we will save the transaction and if we re-submit we will get a error message which is specific to Administrator

Absence Booking as Manager

Now we will login as Bob.Boyle (who is line manager of Martin) and if we book more than 45 hours we will get the common error

Now we will reduce the duration to less than 45 hours and try to book an absence. 

Now we will save the transaction and if we re-submit we will get a error message which is specific to Manager

 

Absence Booking as Employee (Self-Service)

We will login as Martin.Conway and try to book an absence of more than 45 hours

Now, we will reduce the absence duration to less than 45 hours and we should encounter the error that transaction is not saved.

Now we will save the transaction and if we re-submit we will get a error message which is specific to Employee (Self-Service)

 

Summary

So this is how we can have different error message for different type of user. We can also have a common error which would be applicable to all types of users.

Hope this was useful.

That’s all from my side, have a nice day ahead.


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