@r12-restrict absence type lov-user hook

5
 How To Restrict Absence Type List of Values in Oracle Self-Service Human Resources (Release 12.1.3) 1

Upload: rafeek-abd-elmonsef

Post on 16-Oct-2015

149 views

Category:

Documents


0 download

TRANSCRIPT

  • How To Restrict Absence Type List of Values in Oracle Self-Service Human Resources

    (Release 12.1.3)

    1

  • Table of Contents 1.1 Purpose................................................................................................... 3 1.1 Release Level ......................................................................................... 3 2. Introduction.............................................................................................. 3 3. References................................................................................................. 3 5. Setup for restricting Absence Type LOV .............................................. 3

    5.2 Sample Code ..................................................................................................... 4 6. Limitations Known ................................................................................. 5

    2

  • 1.1 Purpose The purpose of this document is to outline the steps to restrict the absence type list of values in Oracle Self-Service Human Resources. 1.1 Release Level Important: This document is meant for HCM Release 12.1.3 and forward. 2. Introduction Oracle Self-Service HR enables users to apply for absences. When applying for an absence, users enter the absence 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.

    3. References Implementing Oracle Self-Service Human Resources http://www.oracle.com/technology/documentation/applications.html

    5. 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

    3

  • 5.2 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;

    */

    4

  • 6. Limitations Known

    1. If the restriction logic is set to restrict based on responsibility and an approver accesses absence

    approval notification directly from notifications worklist without navigating to a responsibility, the restriction will not apply since the responsibility context is not set in this scenario.

    How To Restrict Absence Type List of Values in Oracle Self-Service Human Resources June 2010 Author: Rosamma Sonia Varghese Contributing Authors: Gajula Sankar Oracle Corporation World Headquarters 500 Oracle Parkway Redwood Shores, CA 94065 U.S.A. Worldwide Inquiries: Phone: +1.650.506.7000 Fax: +1.650.506.7200 oracle.com Copyright 2010, Oracle. All rights reserved. This document is provided for information purposes only and the contents hereof are subject to change without notice. This document is not warranted to be error-free, nor subject to any other warranties or conditions, whether expressed orally or implied in law, including implied warranties and conditions of merchantability or fitness for a particular purpose. We specifically disclaim any liability with respect to this document and no contractual obligations are formed either directly or indirectly by this document. This document may not be reproduced or transmitted in any form or by any means, electronic or mechanical, for any purpose, without our prior written permission. Oracle, JD Edwards, and PeopleSoft, are registered trademarks of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.

    5

    1.1 Purpose1.1 Release Level2. Introduction3. References5. Setup for Restricting Absence Type LOV5.2 Sample Code

    6. Limitations Known