How To Restrict Absence Type List of Values in
Oracle Self-Service Human Resources
Introduction
Oracle Self-Service HR enables users to apply for absences. When applying for an absence, users enter thenabsence date or time, absence type, absence status, and absence reason. The absence types (for example,Vacation, Sick Leave etc.) are defined in Oracle HRMS application. Currently, all the absence types defined in Oracle HRMS application are displayed to the self-service user. The user may not be eligible for all the absence types displayed in the self-service application. This leads to users applying for ineligible absence types. Approvers are forced to verify if the absence type is valid for the employee.
With Release 12.1.3, Oracle Self-Service HR introduces a custom package that enables customers to write the logic for deriving the absence type values based on their business requirements. The absence type list of values can be based on parameters such as: Gender, Business Group, Organization, Responsibility, Grade, and Payroll. Customers can use user hooks within the custom package to derive a restricted list of values for absence type in Absence Management function in Oracle Self-Service Human Resources.
Setup for Restricting Absence Type LOV
Use the following the sample steps to derive a restricted list of values for absence type LOV in Absence
Management. The custom logic has to be written in the New Package function
HR_ABSENCE_RESTRICTED.ABSENCES_RESTRICTED. Login person id and selected person id
will be passed by default – using these two parameters the rest of the data or parameters can be queried
from the tables.
Package Name
|
HR_ABSENCE_RESTRICTED
|
Procedure Name
|
ABSENCES_RESTRICTED
|
New Parameters
|
1) selected_person_id 2)
login_person_id
|
The above procedure will be called from the AbsenceTypeVOImpl java file with the
proper input parameters and the return value will be appended to the AbsenceTypeVO
Sample Code
1. For the purpose of this document, the following example illustrates restricting absence type based
on gender.
1. How to restrict Maternity Absence type to employees of gender ‘Female’ only
--------------------Based on Gender------------
if to_number(selected_person_id) is not null then
select sex into l_sex from per_all_people_f where person_id= to_number(selected_person_id)
and sysdate between effective_start_date and effective_end_date;
if l_sex <>'F' THEN
return '36050';
END IF;
Note: In this example, ‘36050’ is the id of the absence type, which has to restricted
2. How to restrict Absence type based on organization
--------------------Based on Organization------------
if to_number(selected_person_id) is not null then
select organization_id into l_orgid
from per_all_assignments_f
where person_id= to_number(selected_person_id)
and sysdate between effective_start_date and effective_end_date;
if l_orgid =7545 then
return '36046';
end if;
end if;
Note: In this example, ‘36046’ is the id of the absence type which has to restricted
3. How to return more than one Absence Type
/* Example code logic
if to_number(selected_person_id) = 36003 then
return '31044,31045';
end if;
*/
No comments:
Post a Comment