SlideShare ist ein Scribd-Unternehmen logo
1 von 5
Downloaden Sie, um offline zu lesen
User Hook Implementation – A Sample Example
                      http://oracleapps-atechniciansview.blogspot.co.uk/
Author : Ashish Harbhajanka                                       Email : ashish1234u@gmail.com




Business Requirement:



Business wants to ensure that whenever an employee tries to overbook leaves the system should not
allow him to do so. In case of exceptional situations the user will contact the Local HR who will then
enter his/her leaves in the system.

In 11i Oracle Absence Management user/employee only gets a warning message stating that after you
apply this leave your balance will be negative , but allows the user to ignore and proceed. The approver
too does not gets any such message so the approver is completely in dark and so he unknowingly
approves it.

In order to achieve this there are two options :

a) Upgrade your Application to R12

b) Write custom logic within user hook.

Now, it is not always possible to move to a higher version just for achieving some functionality although
that would be best considering the added features you get with next upgrade, but as a stop gap solution
we would try to see how we can get this done via user hook.



On investigation it was found that there is a particular out parameter p_exceeds_pto_entit_warning
which gives the message on self-service screen. Since it is a out parameter we have to choose the API
Hook of process type 'BP' and after insert.



Now I have written a package which takes p_exceeds_pto_entit_warning as input and displays the error
message. I have also used a custom profile option XXC_LOA_RESTRICT_OVERBOOKING to ensure I have
the option of switching on/off the functionality.



-- Profile Option Details—
User Hook Implementation – A Sample Example
                      http://oracleapps-atechniciansview.blogspot.co.uk/
Author : Ashish Harbhajanka                                       Email : ashish1234u@gmail.com




Name : XXC_LOA_RESTRICT_OVERBOOKING

User Profile Name : XXC: LOA Restrict Overbooking

Hierarchy Type Access Level : Responsibility and user ( visible and updatable)

User Access : Visible

SQL Validation: SQL="select meaning "Yes or No", lookup_code into :visible_option_value,
:profile_option_value from fnd_lookups where lookup_type = 'YES_NO'" COLUMN=""Yes or No"(*)"

N.B: We have define this profile option value to ensure that the error will be thrown only when
employees try to overbook using Self Service Responsibility but when the changes are to be
incorporated from Absence Details screen it would allow HR to add details ( with seeded warning
message).

In case you want to switch on this functionality just set the value of profile at Responsibility level to ‘Yes’
to switch off set the same to ‘No’.



This gives the flexibility that from Employee Self Service error will be displayed but not from core
Absence Details form



---------- Create a Custom Message ----------------------------------------------

Message Name : XXC_HR_LOA_EMP_NOT_ENTITLED
User Hook Implementation – A Sample Example
                      http://oracleapps-atechniciansview.blogspot.co.uk/
Author : Ashish Harbhajanka                                       Email : ashish1234u@gmail.com

Message : You have exceeded the maximum limit for this absence type. Please resubmit based on the
local policy for this leave type.




-------- Custom Package ----------------------------------------------------------------------------------------------------




--Query to find API HOOK ID and MODULE ID



select hah.api_hook_id,ham.api_module_id

from apps.hr_api_hooks hah,

   apps.hr_api_modules ham

where hah.api_module_id = ham.api_module_id
User Hook Implementation – A Sample Example
                      http://oracleapps-atechniciansview.blogspot.co.uk/
Author : Ashish Harbhajanka                                       Email : ashish1234u@gmail.com

and hah.hook_package = 'HR_PERSON_ABSENCE_BK1'

and hah.hook_procedure = 'CREATE_PERSON_ABSENCE_A'



-- api_hook_id = 3840, api_module_id = 1731



-- Register User HOOK by CALLING hr_api_hook_call_api.create_api_hook_call



DECLARE

 P_VALIDATE BOOLEAN;

 P_EFFECTIVE_DATE DATE;

 P_API_HOOK_ID NUMBER;

 P_API_HOOK_CALL_TYPE VARCHAR2(200);

 P_SEQUENCE NUMBER;

 P_ENABLED_FLAG VARCHAR2(200);

 P_CALL_PACKAGE VARCHAR2(200);

 P_CALL_PROCEDURE VARCHAR2(200);

 P_API_HOOK_CALL_ID NUMBER;

 P_OBJECT_VERSION_NUMBER NUMBER;



BEGIN

 P_VALIDATE := TRUE;

 P_EFFECTIVE_DATE := 01-JAN-1951;

 P_API_HOOK_ID := 3840;-- derived from SQL1

 P_API_HOOK_CALL_TYPE := 'PP';

 P_SEQUENCE := 3000; -- any value greater than 2000, 1-2000 reserved for Oracle Use

 P_ENABLED_FLAG := 'Y';

 P_CALL_PACKAGE := 'XXC_HR_USER_HOOK_PKG'; -- custom package
User Hook Implementation – A Sample Example
                      http://oracleapps-atechniciansview.blogspot.co.uk/
Author : Ashish Harbhajanka                                       Email : ashish1234u@gmail.com

 P_CALL_PROCEDURE := 'XXC_LOA_RESTRICT_OVERBOOKING'; -- custom procedure

 P_API_HOOK_CALL_ID := NULL;

 P_OBJECT_VERSION_NUMBER := NULL;



 APPS.HR_API_HOOK_CALL_API.CREATE_API_HOOK_CALL ( P_VALIDATE, P_EFFECTIVE_DATE,
P_API_HOOK_ID, P_API_HOOK_CALL_TYPE, P_SEQUENCE, P_ENABLED_FLAG, P_CALL_PACKAGE,
P_CALL_PROCEDURE, P_API_HOOK_CALL_ID, P_OBJECT_VERSION_NUMBER );

 COMMIT;

 dbms_output.put_line('API Hook ID: '|| P_API_HOOK_ID);

 dbms_output.put_line('API OVN: '|| P_OBJECT_VERSION_NUMBER);

EXCEPTION

WHEN OTHERS THEN

         dbms_output.put_line('Error: '|| SQLCODE||SQLERRM);

END;



-- Output of above query

-- API Hook Call ID: 864

-- API OVN: 1



------Query to execute Pre-processor---------------------------------

Login to your unix enviornment and connect sqlplus

go to $PER_TOP/admin/sql

execute hrahkone.sql

it will ask for module id derived from sql1



After completing the desired steps and setting the profile value of your Responsibility to ‘Yes’ /’ No’ the
application will work as per business requirement.

Weitere ähnliche Inhalte

Was ist angesagt?

Customize the login homepage For Oracle EBS R12
Customize the login homepage For Oracle EBS R12Customize the login homepage For Oracle EBS R12
Customize the login homepage For Oracle EBS R12Ahmed Elshayeb
 
Approval Hierarchy in Oracle Apps
Approval Hierarchy in Oracle AppsApproval Hierarchy in Oracle Apps
Approval Hierarchy in Oracle AppsRahul Guhathakurta
 
Webadi -a_sample_implementation
Webadi  -a_sample_implementationWebadi  -a_sample_implementation
Webadi -a_sample_implementationAshish Harbhajanka
 
How to configure LCM After receiving
How to configure LCM After receivingHow to configure LCM After receiving
How to configure LCM After receivingAhmed Elshayeb
 
Recruitment process through core hr
Recruitment process through core hrRecruitment process through core hr
Recruitment process through core hrFeras Ahmad
 
PO Position Hierarchy in R12
PO Position Hierarchy in R12PO Position Hierarchy in R12
PO Position Hierarchy in R12parinay jain
 
Accrual plan set up in oracle hrms
Accrual plan set up in oracle hrmsAccrual plan set up in oracle hrms
Accrual plan set up in oracle hrmsRajiv reddy
 
R12:Payment Process Request (PPR)
R12:Payment Process Request (PPR)R12:Payment Process Request (PPR)
R12:Payment Process Request (PPR)lingaswamy vallapu
 
Oracle R12 – Multiple Organization Setup Steps
Oracle R12 – Multiple Organization Setup StepsOracle R12 – Multiple Organization Setup Steps
Oracle R12 – Multiple Organization Setup StepsBoopathy CS
 
Oracle EBS R12 Self service user manual
Oracle EBS R12 Self service user manualOracle EBS R12 Self service user manual
Oracle EBS R12 Self service user manualFeras Ahmad
 
AME Requisition Approval Heirarchy
AME Requisition Approval Heirarchy AME Requisition Approval Heirarchy
AME Requisition Approval Heirarchy Mohammad Younus
 
Creating business group in oracle apps
Creating business group in oracle appsCreating business group in oracle apps
Creating business group in oracle appsGurpreet singh
 
Fast formula queries for functions, contexts, db is and packages
Fast formula queries for functions, contexts, db is and packagesFast formula queries for functions, contexts, db is and packages
Fast formula queries for functions, contexts, db is and packagesFeras Ahmad
 
Oracle Web ADI Implementation Steps
Oracle Web ADI Implementation StepsOracle Web ADI Implementation Steps
Oracle Web ADI Implementation Stepsstandale
 
How to Close Period in Oracle Apps Inventory
How to Close Period in Oracle Apps Inventory How to Close Period in Oracle Apps Inventory
How to Close Period in Oracle Apps Inventory Bizinsight Consulting Inc
 

Was ist angesagt? (20)

Oracle forms personalization
Oracle forms personalizationOracle forms personalization
Oracle forms personalization
 
Customize the login homepage For Oracle EBS R12
Customize the login homepage For Oracle EBS R12Customize the login homepage For Oracle EBS R12
Customize the login homepage For Oracle EBS R12
 
Approval Hierarchy in Oracle Apps
Approval Hierarchy in Oracle AppsApproval Hierarchy in Oracle Apps
Approval Hierarchy in Oracle Apps
 
Webadi -a_sample_implementation
Webadi  -a_sample_implementationWebadi  -a_sample_implementation
Webadi -a_sample_implementation
 
How to configure LCM After receiving
How to configure LCM After receivingHow to configure LCM After receiving
How to configure LCM After receiving
 
Oaf personalization examples
Oaf personalization examplesOaf personalization examples
Oaf personalization examples
 
Recruitment process through core hr
Recruitment process through core hrRecruitment process through core hr
Recruitment process through core hr
 
PO Position Hierarchy in R12
PO Position Hierarchy in R12PO Position Hierarchy in R12
PO Position Hierarchy in R12
 
Accrual plan set up in oracle hrms
Accrual plan set up in oracle hrmsAccrual plan set up in oracle hrms
Accrual plan set up in oracle hrms
 
R12:Payment Process Request (PPR)
R12:Payment Process Request (PPR)R12:Payment Process Request (PPR)
R12:Payment Process Request (PPR)
 
Oracle R12 – Multiple Organization Setup Steps
Oracle R12 – Multiple Organization Setup StepsOracle R12 – Multiple Organization Setup Steps
Oracle R12 – Multiple Organization Setup Steps
 
Oracle EBS R12 Self service user manual
Oracle EBS R12 Self service user manualOracle EBS R12 Self service user manual
Oracle EBS R12 Self service user manual
 
Extensions in OAF
Extensions in OAF Extensions in OAF
Extensions in OAF
 
AME Requisition Approval Heirarchy
AME Requisition Approval Heirarchy AME Requisition Approval Heirarchy
AME Requisition Approval Heirarchy
 
Ame in oracle hrms
Ame in oracle hrmsAme in oracle hrms
Ame in oracle hrms
 
Creating business group in oracle apps
Creating business group in oracle appsCreating business group in oracle apps
Creating business group in oracle apps
 
Fast formula queries for functions, contexts, db is and packages
Fast formula queries for functions, contexts, db is and packagesFast formula queries for functions, contexts, db is and packages
Fast formula queries for functions, contexts, db is and packages
 
Oracle HRMS Proration
Oracle HRMS ProrationOracle HRMS Proration
Oracle HRMS Proration
 
Oracle Web ADI Implementation Steps
Oracle Web ADI Implementation StepsOracle Web ADI Implementation Steps
Oracle Web ADI Implementation Steps
 
How to Close Period in Oracle Apps Inventory
How to Close Period in Oracle Apps Inventory How to Close Period in Oracle Apps Inventory
How to Close Period in Oracle Apps Inventory
 

Ähnlich wie User hook implemantation sample example

A linux mac os x command line interface
A linux mac os x command line interfaceA linux mac os x command line interface
A linux mac os x command line interfaceDavid Walker
 
Curso Symfony - Clase 3
Curso Symfony - Clase 3Curso Symfony - Clase 3
Curso Symfony - Clase 3Javier Eguiluz
 
I Love APIs 2015: Advanced Crash Course in Apigee Edge Workshop
I Love APIs 2015: Advanced Crash Course in Apigee Edge Workshop I Love APIs 2015: Advanced Crash Course in Apigee Edge Workshop
I Love APIs 2015: Advanced Crash Course in Apigee Edge Workshop Apigee | Google Cloud
 
Troubleshooting oracle apps
Troubleshooting oracle appsTroubleshooting oracle apps
Troubleshooting oracle appsvamsi18here
 
Introduction on sap security
Introduction on sap securityIntroduction on sap security
Introduction on sap securityyektek
 
How to implement multiple authentication guards in laravel 8
How to implement multiple authentication guards in laravel 8How to implement multiple authentication guards in laravel 8
How to implement multiple authentication guards in laravel 8Katy Slemon
 
Codeception presentation
Codeception presentationCodeception presentation
Codeception presentationAndrei Burian
 
LvivPy - Flask in details
LvivPy - Flask in detailsLvivPy - Flask in details
LvivPy - Flask in detailsMax Klymyshyn
 
Single Sign-On for APEX applications based on Kerberos (Important: latest ver...
Single Sign-On for APEX applications based on Kerberos (Important: latest ver...Single Sign-On for APEX applications based on Kerberos (Important: latest ver...
Single Sign-On for APEX applications based on Kerberos (Important: latest ver...Niels de Bruijn
 
Integrating powl with web dynpro abap.
Integrating powl with web dynpro abap.Integrating powl with web dynpro abap.
Integrating powl with web dynpro abap.Adesh Chauhan
 
Integrating powl with web dynpro abap.
Integrating powl with web dynpro abap.Integrating powl with web dynpro abap.
Integrating powl with web dynpro abap.Adesh Chauhan
 
Hackazon realistic e-commerce Hack platform
Hackazon realistic e-commerce Hack platformHackazon realistic e-commerce Hack platform
Hackazon realistic e-commerce Hack platformIhor Uzhvenko
 
Open sap ui51_week_2_unit_3_acdt_exercises
Open sap ui51_week_2_unit_3_acdt_exercisesOpen sap ui51_week_2_unit_3_acdt_exercises
Open sap ui51_week_2_unit_3_acdt_exercisesvikram sukumar
 
AEM Sightly Deep Dive
AEM Sightly Deep DiveAEM Sightly Deep Dive
AEM Sightly Deep DiveGabriel Walt
 
Extend oa-framework-add-new-field
Extend oa-framework-add-new-fieldExtend oa-framework-add-new-field
Extend oa-framework-add-new-fieldSwapnil Khoke
 
]project-open[ Workflow Developer Tutorial Part 3
]project-open[ Workflow Developer Tutorial Part 3]project-open[ Workflow Developer Tutorial Part 3
]project-open[ Workflow Developer Tutorial Part 3Klaus Hofeditz
 
Laravel development (Laravel History, Environment Setup & Laravel Installatio...
Laravel development (Laravel History, Environment Setup & Laravel Installatio...Laravel development (Laravel History, Environment Setup & Laravel Installatio...
Laravel development (Laravel History, Environment Setup & Laravel Installatio...Dilouar Hossain
 

Ähnlich wie User hook implemantation sample example (20)

A linux mac os x command line interface
A linux mac os x command line interfaceA linux mac os x command line interface
A linux mac os x command line interface
 
Curso Symfony - Clase 3
Curso Symfony - Clase 3Curso Symfony - Clase 3
Curso Symfony - Clase 3
 
I Love APIs 2015: Advanced Crash Course in Apigee Edge Workshop
I Love APIs 2015: Advanced Crash Course in Apigee Edge Workshop I Love APIs 2015: Advanced Crash Course in Apigee Edge Workshop
I Love APIs 2015: Advanced Crash Course in Apigee Edge Workshop
 
What is sap security
What is sap securityWhat is sap security
What is sap security
 
Troubleshooting oracle apps
Troubleshooting oracle appsTroubleshooting oracle apps
Troubleshooting oracle apps
 
Introduction on sap security
Introduction on sap securityIntroduction on sap security
Introduction on sap security
 
How to implement multiple authentication guards in laravel 8
How to implement multiple authentication guards in laravel 8How to implement multiple authentication guards in laravel 8
How to implement multiple authentication guards in laravel 8
 
Codeception presentation
Codeception presentationCodeception presentation
Codeception presentation
 
LvivPy - Flask in details
LvivPy - Flask in detailsLvivPy - Flask in details
LvivPy - Flask in details
 
Single Sign-On for APEX applications based on Kerberos (Important: latest ver...
Single Sign-On for APEX applications based on Kerberos (Important: latest ver...Single Sign-On for APEX applications based on Kerberos (Important: latest ver...
Single Sign-On for APEX applications based on Kerberos (Important: latest ver...
 
Integrating powl with web dynpro abap.
Integrating powl with web dynpro abap.Integrating powl with web dynpro abap.
Integrating powl with web dynpro abap.
 
Integrating powl with web dynpro abap.
Integrating powl with web dynpro abap.Integrating powl with web dynpro abap.
Integrating powl with web dynpro abap.
 
Hackazon realistic e-commerce Hack platform
Hackazon realistic e-commerce Hack platformHackazon realistic e-commerce Hack platform
Hackazon realistic e-commerce Hack platform
 
Open sap ui51_week_2_unit_3_acdt_exercises
Open sap ui51_week_2_unit_3_acdt_exercisesOpen sap ui51_week_2_unit_3_acdt_exercises
Open sap ui51_week_2_unit_3_acdt_exercises
 
AEM Sightly Deep Dive
AEM Sightly Deep DiveAEM Sightly Deep Dive
AEM Sightly Deep Dive
 
PHP Security
PHP SecurityPHP Security
PHP Security
 
Extend oa-framework-add-new-field
Extend oa-framework-add-new-fieldExtend oa-framework-add-new-field
Extend oa-framework-add-new-field
 
User stories through Five W's technique
User stories through Five W's  techniqueUser stories through Five W's  technique
User stories through Five W's technique
 
]project-open[ Workflow Developer Tutorial Part 3
]project-open[ Workflow Developer Tutorial Part 3]project-open[ Workflow Developer Tutorial Part 3
]project-open[ Workflow Developer Tutorial Part 3
 
Laravel development (Laravel History, Environment Setup & Laravel Installatio...
Laravel development (Laravel History, Environment Setup & Laravel Installatio...Laravel development (Laravel History, Environment Setup & Laravel Installatio...
Laravel development (Laravel History, Environment Setup & Laravel Installatio...
 

Kürzlich hochgeladen

2k Shots ≽ 9205541914 ≼ Call Girls In Dashrath Puri (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Dashrath Puri (Delhi)2k Shots ≽ 9205541914 ≼ Call Girls In Dashrath Puri (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Dashrath Puri (Delhi)Delhi Call girls
 
Pokemon Go... Unraveling the Conspiracy Theory
Pokemon Go... Unraveling the Conspiracy TheoryPokemon Go... Unraveling the Conspiracy Theory
Pokemon Go... Unraveling the Conspiracy Theorydrae5
 
$ Love Spells^ 💎 (310) 882-6330 in West Virginia, WV | Psychic Reading Best B...
$ Love Spells^ 💎 (310) 882-6330 in West Virginia, WV | Psychic Reading Best B...$ Love Spells^ 💎 (310) 882-6330 in West Virginia, WV | Psychic Reading Best B...
$ Love Spells^ 💎 (310) 882-6330 in West Virginia, WV | Psychic Reading Best B...PsychicRuben LoveSpells
 
LC_YouSaidYes_NewBelieverBookletDone.pdf
LC_YouSaidYes_NewBelieverBookletDone.pdfLC_YouSaidYes_NewBelieverBookletDone.pdf
LC_YouSaidYes_NewBelieverBookletDone.pdfpastor83
 
Top Rated Pune Call Girls Tingre Nagar ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Tingre Nagar ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Tingre Nagar ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Tingre Nagar ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 
The Selfspace Journal Preview by Mindbrush
The Selfspace Journal Preview by MindbrushThe Selfspace Journal Preview by Mindbrush
The Selfspace Journal Preview by MindbrushShivain97
 
2k Shots ≽ 9205541914 ≼ Call Girls In Palam (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Palam (Delhi)2k Shots ≽ 9205541914 ≼ Call Girls In Palam (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Palam (Delhi)Delhi Call girls
 
2k Shots ≽ 9205541914 ≼ Call Girls In Jasola (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Jasola (Delhi)2k Shots ≽ 9205541914 ≼ Call Girls In Jasola (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Jasola (Delhi)Delhi Call girls
 
call Now 9811711561 Cash Payment乂 Call Girls in Dwarka Mor
call Now 9811711561 Cash Payment乂 Call Girls in Dwarka Morcall Now 9811711561 Cash Payment乂 Call Girls in Dwarka Mor
call Now 9811711561 Cash Payment乂 Call Girls in Dwarka Morvikas rana
 
2k Shots ≽ 9205541914 ≼ Call Girls In Mukherjee Nagar (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Mukherjee Nagar (Delhi)2k Shots ≽ 9205541914 ≼ Call Girls In Mukherjee Nagar (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Mukherjee Nagar (Delhi)Delhi Call girls
 
WOMEN EMPOWERMENT women empowerment.pptx
WOMEN EMPOWERMENT women empowerment.pptxWOMEN EMPOWERMENT women empowerment.pptx
WOMEN EMPOWERMENT women empowerment.pptxpadhand000
 
9892124323, Call Girls in mumbai, Vashi Call Girls , Kurla Call girls
9892124323, Call Girls in mumbai, Vashi Call Girls , Kurla Call girls9892124323, Call Girls in mumbai, Vashi Call Girls , Kurla Call girls
9892124323, Call Girls in mumbai, Vashi Call Girls , Kurla Call girlsPooja Nehwal
 
8377087607 Full Enjoy @24/7-CLEAN-Call Girls In Chhatarpur,
8377087607 Full Enjoy @24/7-CLEAN-Call Girls In Chhatarpur,8377087607 Full Enjoy @24/7-CLEAN-Call Girls In Chhatarpur,
8377087607 Full Enjoy @24/7-CLEAN-Call Girls In Chhatarpur,dollysharma2066
 

Kürzlich hochgeladen (15)

2k Shots ≽ 9205541914 ≼ Call Girls In Dashrath Puri (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Dashrath Puri (Delhi)2k Shots ≽ 9205541914 ≼ Call Girls In Dashrath Puri (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Dashrath Puri (Delhi)
 
Pokemon Go... Unraveling the Conspiracy Theory
Pokemon Go... Unraveling the Conspiracy TheoryPokemon Go... Unraveling the Conspiracy Theory
Pokemon Go... Unraveling the Conspiracy Theory
 
$ Love Spells^ 💎 (310) 882-6330 in West Virginia, WV | Psychic Reading Best B...
$ Love Spells^ 💎 (310) 882-6330 in West Virginia, WV | Psychic Reading Best B...$ Love Spells^ 💎 (310) 882-6330 in West Virginia, WV | Psychic Reading Best B...
$ Love Spells^ 💎 (310) 882-6330 in West Virginia, WV | Psychic Reading Best B...
 
(Anamika) VIP Call Girls Navi Mumbai Call Now 8250077686 Navi Mumbai Escorts ...
(Anamika) VIP Call Girls Navi Mumbai Call Now 8250077686 Navi Mumbai Escorts ...(Anamika) VIP Call Girls Navi Mumbai Call Now 8250077686 Navi Mumbai Escorts ...
(Anamika) VIP Call Girls Navi Mumbai Call Now 8250077686 Navi Mumbai Escorts ...
 
LC_YouSaidYes_NewBelieverBookletDone.pdf
LC_YouSaidYes_NewBelieverBookletDone.pdfLC_YouSaidYes_NewBelieverBookletDone.pdf
LC_YouSaidYes_NewBelieverBookletDone.pdf
 
Top Rated Pune Call Girls Tingre Nagar ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Tingre Nagar ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Tingre Nagar ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Tingre Nagar ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
The Selfspace Journal Preview by Mindbrush
The Selfspace Journal Preview by MindbrushThe Selfspace Journal Preview by Mindbrush
The Selfspace Journal Preview by Mindbrush
 
2k Shots ≽ 9205541914 ≼ Call Girls In Palam (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Palam (Delhi)2k Shots ≽ 9205541914 ≼ Call Girls In Palam (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Palam (Delhi)
 
2k Shots ≽ 9205541914 ≼ Call Girls In Jasola (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Jasola (Delhi)2k Shots ≽ 9205541914 ≼ Call Girls In Jasola (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Jasola (Delhi)
 
call Now 9811711561 Cash Payment乂 Call Girls in Dwarka Mor
call Now 9811711561 Cash Payment乂 Call Girls in Dwarka Morcall Now 9811711561 Cash Payment乂 Call Girls in Dwarka Mor
call Now 9811711561 Cash Payment乂 Call Girls in Dwarka Mor
 
2k Shots ≽ 9205541914 ≼ Call Girls In Mukherjee Nagar (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Mukherjee Nagar (Delhi)2k Shots ≽ 9205541914 ≼ Call Girls In Mukherjee Nagar (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Mukherjee Nagar (Delhi)
 
WOMEN EMPOWERMENT women empowerment.pptx
WOMEN EMPOWERMENT women empowerment.pptxWOMEN EMPOWERMENT women empowerment.pptx
WOMEN EMPOWERMENT women empowerment.pptx
 
9892124323, Call Girls in mumbai, Vashi Call Girls , Kurla Call girls
9892124323, Call Girls in mumbai, Vashi Call Girls , Kurla Call girls9892124323, Call Girls in mumbai, Vashi Call Girls , Kurla Call girls
9892124323, Call Girls in mumbai, Vashi Call Girls , Kurla Call girls
 
8377087607 Full Enjoy @24/7-CLEAN-Call Girls In Chhatarpur,
8377087607 Full Enjoy @24/7-CLEAN-Call Girls In Chhatarpur,8377087607 Full Enjoy @24/7-CLEAN-Call Girls In Chhatarpur,
8377087607 Full Enjoy @24/7-CLEAN-Call Girls In Chhatarpur,
 
(Aarini) Russian Call Girls Surat Call Now 8250077686 Surat Escorts 24x7
(Aarini) Russian Call Girls Surat Call Now 8250077686 Surat Escorts 24x7(Aarini) Russian Call Girls Surat Call Now 8250077686 Surat Escorts 24x7
(Aarini) Russian Call Girls Surat Call Now 8250077686 Surat Escorts 24x7
 

User hook implemantation sample example

  • 1. User Hook Implementation – A Sample Example http://oracleapps-atechniciansview.blogspot.co.uk/ Author : Ashish Harbhajanka Email : ashish1234u@gmail.com Business Requirement: Business wants to ensure that whenever an employee tries to overbook leaves the system should not allow him to do so. In case of exceptional situations the user will contact the Local HR who will then enter his/her leaves in the system. In 11i Oracle Absence Management user/employee only gets a warning message stating that after you apply this leave your balance will be negative , but allows the user to ignore and proceed. The approver too does not gets any such message so the approver is completely in dark and so he unknowingly approves it. In order to achieve this there are two options : a) Upgrade your Application to R12 b) Write custom logic within user hook. Now, it is not always possible to move to a higher version just for achieving some functionality although that would be best considering the added features you get with next upgrade, but as a stop gap solution we would try to see how we can get this done via user hook. On investigation it was found that there is a particular out parameter p_exceeds_pto_entit_warning which gives the message on self-service screen. Since it is a out parameter we have to choose the API Hook of process type 'BP' and after insert. Now I have written a package which takes p_exceeds_pto_entit_warning as input and displays the error message. I have also used a custom profile option XXC_LOA_RESTRICT_OVERBOOKING to ensure I have the option of switching on/off the functionality. -- Profile Option Details—
  • 2. User Hook Implementation – A Sample Example http://oracleapps-atechniciansview.blogspot.co.uk/ Author : Ashish Harbhajanka Email : ashish1234u@gmail.com Name : XXC_LOA_RESTRICT_OVERBOOKING User Profile Name : XXC: LOA Restrict Overbooking Hierarchy Type Access Level : Responsibility and user ( visible and updatable) User Access : Visible SQL Validation: SQL="select meaning "Yes or No", lookup_code into :visible_option_value, :profile_option_value from fnd_lookups where lookup_type = 'YES_NO'" COLUMN=""Yes or No"(*)" N.B: We have define this profile option value to ensure that the error will be thrown only when employees try to overbook using Self Service Responsibility but when the changes are to be incorporated from Absence Details screen it would allow HR to add details ( with seeded warning message). In case you want to switch on this functionality just set the value of profile at Responsibility level to ‘Yes’ to switch off set the same to ‘No’. This gives the flexibility that from Employee Self Service error will be displayed but not from core Absence Details form ---------- Create a Custom Message ---------------------------------------------- Message Name : XXC_HR_LOA_EMP_NOT_ENTITLED
  • 3. User Hook Implementation – A Sample Example http://oracleapps-atechniciansview.blogspot.co.uk/ Author : Ashish Harbhajanka Email : ashish1234u@gmail.com Message : You have exceeded the maximum limit for this absence type. Please resubmit based on the local policy for this leave type. -------- Custom Package ---------------------------------------------------------------------------------------------------- --Query to find API HOOK ID and MODULE ID select hah.api_hook_id,ham.api_module_id from apps.hr_api_hooks hah, apps.hr_api_modules ham where hah.api_module_id = ham.api_module_id
  • 4. User Hook Implementation – A Sample Example http://oracleapps-atechniciansview.blogspot.co.uk/ Author : Ashish Harbhajanka Email : ashish1234u@gmail.com and hah.hook_package = 'HR_PERSON_ABSENCE_BK1' and hah.hook_procedure = 'CREATE_PERSON_ABSENCE_A' -- api_hook_id = 3840, api_module_id = 1731 -- Register User HOOK by CALLING hr_api_hook_call_api.create_api_hook_call DECLARE P_VALIDATE BOOLEAN; P_EFFECTIVE_DATE DATE; P_API_HOOK_ID NUMBER; P_API_HOOK_CALL_TYPE VARCHAR2(200); P_SEQUENCE NUMBER; P_ENABLED_FLAG VARCHAR2(200); P_CALL_PACKAGE VARCHAR2(200); P_CALL_PROCEDURE VARCHAR2(200); P_API_HOOK_CALL_ID NUMBER; P_OBJECT_VERSION_NUMBER NUMBER; BEGIN P_VALIDATE := TRUE; P_EFFECTIVE_DATE := 01-JAN-1951; P_API_HOOK_ID := 3840;-- derived from SQL1 P_API_HOOK_CALL_TYPE := 'PP'; P_SEQUENCE := 3000; -- any value greater than 2000, 1-2000 reserved for Oracle Use P_ENABLED_FLAG := 'Y'; P_CALL_PACKAGE := 'XXC_HR_USER_HOOK_PKG'; -- custom package
  • 5. User Hook Implementation – A Sample Example http://oracleapps-atechniciansview.blogspot.co.uk/ Author : Ashish Harbhajanka Email : ashish1234u@gmail.com P_CALL_PROCEDURE := 'XXC_LOA_RESTRICT_OVERBOOKING'; -- custom procedure P_API_HOOK_CALL_ID := NULL; P_OBJECT_VERSION_NUMBER := NULL; APPS.HR_API_HOOK_CALL_API.CREATE_API_HOOK_CALL ( P_VALIDATE, P_EFFECTIVE_DATE, P_API_HOOK_ID, P_API_HOOK_CALL_TYPE, P_SEQUENCE, P_ENABLED_FLAG, P_CALL_PACKAGE, P_CALL_PROCEDURE, P_API_HOOK_CALL_ID, P_OBJECT_VERSION_NUMBER ); COMMIT; dbms_output.put_line('API Hook ID: '|| P_API_HOOK_ID); dbms_output.put_line('API OVN: '|| P_OBJECT_VERSION_NUMBER); EXCEPTION WHEN OTHERS THEN dbms_output.put_line('Error: '|| SQLCODE||SQLERRM); END; -- Output of above query -- API Hook Call ID: 864 -- API OVN: 1 ------Query to execute Pre-processor--------------------------------- Login to your unix enviornment and connect sqlplus go to $PER_TOP/admin/sql execute hrahkone.sql it will ask for module id derived from sql1 After completing the desired steps and setting the profile value of your Responsibility to ‘Yes’ /’ No’ the application will work as per business requirement.