6 Replies Latest reply: Feb 8, 2013 11:21 AM by 931002 RSS

    Sick leave restriction in SSHR


      We are implementing absence management/accruals in 12.0.6. We have a requirement that when employees apply for more than 3 days of sick leave in SSHR, they should get an error to contact HR if the sick leave is more than 3 days but HR should be able to save the sick leave with more than 3 days in Core HR. I tried using days_between > 3 in the BG duration formula but it is stopping both employees and HR from applying more than 3 days of sick leave.

      As a workaround, I have split sick leave into two absences casual sick leave which can only be up to 3 days and extended sick leave that can extend beyond 3 days and used the same element for both so HR should be able to generate a report for total sick days. Also, for extended sick leave I have not assigned a category so it can be hidden from SSHR view.

      I would like feedback on whether this workaround makes sense or if there are any better options to use only one absence type but stop employees and allow HR when the duration is more than 3.

      Thanks for any direction you can provide on this..

        • 1. Re: Sick leave restriction in SSHR

          make single sick leave type and,

          1. If sick leave days > 3, then send it to HR for approval. or
          2. If in your BG absence formula, put validation on responsibility, if it is from SSHR resp then show error, if it is from HR resp dnt show error.

          • 2. Re: Sick leave restriction in SSHR
            Try putting a validation on the apply button on SSHR form through controller extension..
            • 3. Re: Sick leave restriction in SSHR
              Hi Ayaz,

              Thanks for the quick response.

              Can you provide me more details on how I can restrict by responsibility? Which database item should I use in the formula?

              • 4. Re: Sick leave restriction in SSHR
                Sanjay Singh
                Hi Ayaz,

                We had same requirement, where we wanted to have a restriction for employees but open for HR guys. We had used a user hook to achieve this because if we add the validation in BG_ABSENCE_DURATION it will fire for all, provided if we can distinguish the responsibility been used.

                Please find the details below:
                1. Define the procedure which will do validation for you

                p_business_group_id NUMBER ,
                p_absence_attendance_type_id NUMBER ,
                p_abs_attendance_reason_id NUMBER ,
                p_date_start DATE ,
                p_date_end DATE ,
                p_absence_days NUMBER,
                p_absence_hours NUMBER,
                p_abs_information1 VARCHAR2)
                l_resp_name VARCHAR2(250);
                SELECT fnd_global.resp_name INTO l_resp_name FROM dual;
                IF l_resp_name LIKE '%Employee%Self%' THEN -- do the validation only for self-service appliactions
                --Do your validation and raise exception
                l_error_msg := l_mgr_name || ' who is currently assigned as your reporting manager is not active. Please reach HR to get a valid reporting manager assigned.';
                FND_MESSAGE.set_token('ERRMSG', l_error_msg, FALSE);

                2. Register a hook on HR_PERSON_ABSENCE_BK1
                l_api_hook_call_id number;
                l_object_version_number number;
                (p_validate => false,
                p_effective_date => sysdate,
                p_api_hook_id => 3839,
                P_API_HOOK_CALL_TYPE => 'PP',
                p_sequence => 4000,
                p_enabled_flag => 'Y',
                p_call_package => 'XX_LMS_CUSTOM_PKG',
                p_call_procedure => 'ABSENCE_VALIDATION',
                p_api_hook_call_id => l_api_hook_call_id,
                p_object_version_number => l_object_version_number);

                3. Run the preprocessor

                Hope this helps.

                • 5. Re: Sick leave restriction in SSHR
                  I believe you could disable BG_ABSENCE_DURATION formula for your HR Responsibility.
                  Set the following profile option:

                  HR: Absence Duration Auto Overwrite - No
                  at responsibility level.

                  You can also check to see if you can return profile options in fast formula, that way you can get responsibility_id as well.

                  Edited by: igwe on Feb 8, 2013 4:09 AM
                  • 6. Re: Sick leave restriction in SSHR
                    Thanks a lot to every one for your answers. Most of them are very helpful and I have decided to use the AME route to route sick leave to HR if it is more than 3 days.