SlideShare a Scribd company logo
1 of 5
Download to read offline
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.

More Related Content

What's hot

Query all roles and duties and privileges Oracle Fusion Cloud
Query all roles and duties and privileges Oracle Fusion CloudQuery all roles and duties and privileges Oracle Fusion Cloud
Query all roles and duties and privileges Oracle Fusion CloudFeras Ahmad
 
Fusion absence management explained with examples
Fusion absence management   explained with examplesFusion absence management   explained with examples
Fusion absence management explained with examplesmshabrawi
 
Otl Oracle Time and Labor
Otl Oracle Time and LaborOtl Oracle Time and Labor
Otl Oracle Time and LaborFeras Ahmad
 
Oracle Receivables R12
Oracle Receivables R12Oracle Receivables R12
Oracle Receivables R12Sarfaraz Ahmed
 
Oracle Payables R12 ivas
Oracle Payables R12 ivasOracle Payables R12 ivas
Oracle Payables R12 ivasAli Ibrahim
 
Oracle Fusion functional setup manager
Oracle Fusion functional setup managerOracle Fusion functional setup manager
Oracle Fusion functional setup managerBerry Clemens
 
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
 
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
 
Oracle payroll-subledger accounting integration
Oracle payroll-subledger accounting integrationOracle payroll-subledger accounting integration
Oracle payroll-subledger accounting integrationBaker Khader Abdallah, PMP
 
Bi email-alert-notification - Fusion Alert
Bi email-alert-notification - Fusion AlertBi email-alert-notification - Fusion Alert
Bi email-alert-notification - Fusion AlertFeras Ahmad
 
Fujcci oracle hr user_manual
Fujcci oracle hr user_manualFujcci oracle hr user_manual
Fujcci oracle hr user_manualFeras Ahmad
 
Query Worker Contracts Details Oracle Fusion Cloud
Query Worker Contracts Details Oracle Fusion CloudQuery Worker Contracts Details Oracle Fusion Cloud
Query Worker Contracts Details Oracle Fusion CloudFeras Ahmad
 
Oracle HRMS Accrual plan Setup
Oracle HRMS Accrual plan SetupOracle HRMS Accrual plan Setup
Oracle HRMS Accrual plan SetupFeras Ahmad
 
09 define legal entities for hcm
09 define legal entities for hcm09 define legal entities for hcm
09 define legal entities for hcmmohamed refaei
 
Oracle HCM Cloud Core HR Workforce Structures Table Relationships
Oracle HCM Cloud Core HR Workforce Structures Table RelationshipsOracle HCM Cloud Core HR Workforce Structures Table Relationships
Oracle HCM Cloud Core HR Workforce Structures Table RelationshipsSricharan
 
Oracle EBS Self service from A to Z
Oracle EBS Self service from A to ZOracle EBS Self service from A to Z
Oracle EBS Self service from A to ZFeras Ahmad
 

What's hot (20)

Query all roles and duties and privileges Oracle Fusion Cloud
Query all roles and duties and privileges Oracle Fusion CloudQuery all roles and duties and privileges Oracle Fusion Cloud
Query all roles and duties and privileges Oracle Fusion Cloud
 
Fusion absence management explained with examples
Fusion absence management   explained with examplesFusion absence management   explained with examples
Fusion absence management explained with examples
 
Otl Oracle Time and Labor
Otl Oracle Time and LaborOtl Oracle Time and Labor
Otl Oracle Time and Labor
 
Oracle Receivables R12
Oracle Receivables R12Oracle Receivables R12
Oracle Receivables R12
 
Uae absence whitepaper
Uae absence whitepaperUae absence whitepaper
Uae absence whitepaper
 
Oracle Payables R12 ivas
Oracle Payables R12 ivasOracle Payables R12 ivas
Oracle Payables R12 ivas
 
Oracle R12 Legal Entity
Oracle R12 Legal EntityOracle R12 Legal Entity
Oracle R12 Legal Entity
 
Oracle Fusion functional setup manager
Oracle Fusion functional setup managerOracle Fusion functional setup manager
Oracle Fusion functional setup manager
 
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
 
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
 
Oracle payroll-subledger accounting integration
Oracle payroll-subledger accounting integrationOracle payroll-subledger accounting integration
Oracle payroll-subledger accounting integration
 
Bi email-alert-notification - Fusion Alert
Bi email-alert-notification - Fusion AlertBi email-alert-notification - Fusion Alert
Bi email-alert-notification - Fusion Alert
 
Fujcci oracle hr user_manual
Fujcci oracle hr user_manualFujcci oracle hr user_manual
Fujcci oracle hr user_manual
 
8 legal structures
8   legal structures8   legal structures
8 legal structures
 
Query Worker Contracts Details Oracle Fusion Cloud
Query Worker Contracts Details Oracle Fusion CloudQuery Worker Contracts Details Oracle Fusion Cloud
Query Worker Contracts Details Oracle Fusion Cloud
 
Oracle HRMS Accrual plan Setup
Oracle HRMS Accrual plan SetupOracle HRMS Accrual plan Setup
Oracle HRMS Accrual plan Setup
 
09 define legal entities for hcm
09 define legal entities for hcm09 define legal entities for hcm
09 define legal entities for hcm
 
Oracle HCM Cloud Core HR Workforce Structures Table Relationships
Oracle HCM Cloud Core HR Workforce Structures Table RelationshipsOracle HCM Cloud Core HR Workforce Structures Table Relationships
Oracle HCM Cloud Core HR Workforce Structures Table Relationships
 
Oatbi
OatbiOatbi
Oatbi
 
Oracle EBS Self service from A to Z
Oracle EBS Self service from A to ZOracle EBS Self service from A to Z
Oracle EBS Self service from A to Z
 

Similar to User hook implemantation sample example

Webadi -a_sample_implementation
Webadi  -a_sample_implementationWebadi  -a_sample_implementation
Webadi -a_sample_implementationAshish Harbhajanka
 
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
 

Similar to User hook implemantation sample example (20)

Webadi -a_sample_implementation
Webadi  -a_sample_implementationWebadi  -a_sample_implementation
Webadi -a_sample_implementation
 
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
 

Recently uploaded

Postal Ballot procedure for employees to utilise
Postal Ballot procedure for employees to utilisePostal Ballot procedure for employees to utilise
Postal Ballot procedure for employees to utiliseccsubcollector
 
REFLECTIONS Newsletter Jan-Jul 2024.pdf.pdf
REFLECTIONS Newsletter Jan-Jul 2024.pdf.pdfREFLECTIONS Newsletter Jan-Jul 2024.pdf.pdf
REFLECTIONS Newsletter Jan-Jul 2024.pdf.pdfssusere8ea60
 
Breath, Brain & Beyond_A Holistic Approach to Peak Performance.pdf
Breath, Brain & Beyond_A Holistic Approach to Peak Performance.pdfBreath, Brain & Beyond_A Holistic Approach to Peak Performance.pdf
Breath, Brain & Beyond_A Holistic Approach to Peak Performance.pdfJess Walker
 
Authentic No 1 Amil Baba In Pakistan Amil Baba In Faisalabad Amil Baba In Kar...
Authentic No 1 Amil Baba In Pakistan Amil Baba In Faisalabad Amil Baba In Kar...Authentic No 1 Amil Baba In Pakistan Amil Baba In Faisalabad Amil Baba In Kar...
Authentic No 1 Amil Baba In Pakistan Amil Baba In Faisalabad Amil Baba In Kar...Authentic No 1 Amil Baba In Pakistan
 
Powerpoint on Writing a Newspaper Report.pptx
Powerpoint on Writing a Newspaper Report.pptxPowerpoint on Writing a Newspaper Report.pptx
Powerpoint on Writing a Newspaper Report.pptxNeelamMulchandani1
 
《塔夫斯大学毕业证成绩单购买》做Tufts文凭毕业证成绩单/伪造美国假文凭假毕业证书图片Q微信741003700《塔夫斯大学毕业证购买》《Tufts毕业文...
《塔夫斯大学毕业证成绩单购买》做Tufts文凭毕业证成绩单/伪造美国假文凭假毕业证书图片Q微信741003700《塔夫斯大学毕业证购买》《Tufts毕业文...《塔夫斯大学毕业证成绩单购买》做Tufts文凭毕业证成绩单/伪造美国假文凭假毕业证书图片Q微信741003700《塔夫斯大学毕业证购买》《Tufts毕业文...
《塔夫斯大学毕业证成绩单购买》做Tufts文凭毕业证成绩单/伪造美国假文凭假毕业证书图片Q微信741003700《塔夫斯大学毕业证购买》《Tufts毕业文...ur8mqw8e
 
Call Girls in Govindpuri Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Govindpuri Delhi 💯Call Us 🔝8264348440🔝Call Girls in Govindpuri Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Govindpuri Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
(No.1)↠Young Call Girls in Sikanderpur (Gurgaon) ꧁❤ 9711911712 ❤꧂ Escorts
(No.1)↠Young Call Girls in Sikanderpur (Gurgaon) ꧁❤ 9711911712 ❤꧂ Escorts(No.1)↠Young Call Girls in Sikanderpur (Gurgaon) ꧁❤ 9711911712 ❤꧂ Escorts
(No.1)↠Young Call Girls in Sikanderpur (Gurgaon) ꧁❤ 9711911712 ❤꧂ EscortsDelhi Escorts Service
 
南新罕布什尔大学毕业证学位证成绩单-学历认证
南新罕布什尔大学毕业证学位证成绩单-学历认证南新罕布什尔大学毕业证学位证成绩单-学历认证
南新罕布什尔大学毕业证学位证成绩单-学历认证kbdhl05e
 
Call Girls In Andheri East Call US Pooja📞 9892124323 Book Hot And
Call Girls In Andheri East Call US Pooja📞 9892124323 Book Hot AndCall Girls In Andheri East Call US Pooja📞 9892124323 Book Hot And
Call Girls In Andheri East Call US Pooja📞 9892124323 Book Hot AndPooja Nehwal
 
Dhule Call Girls #9907093804 Contact Number Escorts Service Dhule
Dhule Call Girls #9907093804 Contact Number Escorts Service DhuleDhule Call Girls #9907093804 Contact Number Escorts Service Dhule
Dhule Call Girls #9907093804 Contact Number Escorts Service Dhulesrsj9000
 
E J Waggoner against Kellogg's Pantheism 8.pptx
E J Waggoner against Kellogg's Pantheism 8.pptxE J Waggoner against Kellogg's Pantheism 8.pptx
E J Waggoner against Kellogg's Pantheism 8.pptxJackieSparrow3
 
Call Girls In Karkardooma 83770 87607 Just-Dial Escorts Service 24X7 Avilable
Call Girls In Karkardooma 83770 87607 Just-Dial Escorts Service 24X7 AvilableCall Girls In Karkardooma 83770 87607 Just-Dial Escorts Service 24X7 Avilable
Call Girls In Karkardooma 83770 87607 Just-Dial Escorts Service 24X7 Avilabledollysharma2066
 
西伦敦大学毕业证学位证成绩单-怎么样做
西伦敦大学毕业证学位证成绩单-怎么样做西伦敦大学毕业证学位证成绩单-怎么样做
西伦敦大学毕业证学位证成绩单-怎么样做j5bzwet6
 
办理国外毕业证学位证《原版美国montana文凭》蒙大拿州立大学毕业证制作成绩单修改
办理国外毕业证学位证《原版美国montana文凭》蒙大拿州立大学毕业证制作成绩单修改办理国外毕业证学位证《原版美国montana文凭》蒙大拿州立大学毕业证制作成绩单修改
办理国外毕业证学位证《原版美国montana文凭》蒙大拿州立大学毕业证制作成绩单修改atducpo
 

Recently uploaded (20)

Postal Ballot procedure for employees to utilise
Postal Ballot procedure for employees to utilisePostal Ballot procedure for employees to utilise
Postal Ballot procedure for employees to utilise
 
Cheap Rate ➥8448380779 ▻Call Girls In Mg Road Gurgaon
Cheap Rate ➥8448380779 ▻Call Girls In Mg Road GurgaonCheap Rate ➥8448380779 ▻Call Girls In Mg Road Gurgaon
Cheap Rate ➥8448380779 ▻Call Girls In Mg Road Gurgaon
 
REFLECTIONS Newsletter Jan-Jul 2024.pdf.pdf
REFLECTIONS Newsletter Jan-Jul 2024.pdf.pdfREFLECTIONS Newsletter Jan-Jul 2024.pdf.pdf
REFLECTIONS Newsletter Jan-Jul 2024.pdf.pdf
 
Breath, Brain & Beyond_A Holistic Approach to Peak Performance.pdf
Breath, Brain & Beyond_A Holistic Approach to Peak Performance.pdfBreath, Brain & Beyond_A Holistic Approach to Peak Performance.pdf
Breath, Brain & Beyond_A Holistic Approach to Peak Performance.pdf
 
Authentic No 1 Amil Baba In Pakistan Amil Baba In Faisalabad Amil Baba In Kar...
Authentic No 1 Amil Baba In Pakistan Amil Baba In Faisalabad Amil Baba In Kar...Authentic No 1 Amil Baba In Pakistan Amil Baba In Faisalabad Amil Baba In Kar...
Authentic No 1 Amil Baba In Pakistan Amil Baba In Faisalabad Amil Baba In Kar...
 
young Call girls in Neb Sarai 🔝 9953056974 🔝 Delhi escort Service
young Call girls in Neb Sarai 🔝 9953056974 🔝 Delhi escort Serviceyoung Call girls in Neb Sarai 🔝 9953056974 🔝 Delhi escort Service
young Call girls in Neb Sarai 🔝 9953056974 🔝 Delhi escort Service
 
Powerpoint on Writing a Newspaper Report.pptx
Powerpoint on Writing a Newspaper Report.pptxPowerpoint on Writing a Newspaper Report.pptx
Powerpoint on Writing a Newspaper Report.pptx
 
《塔夫斯大学毕业证成绩单购买》做Tufts文凭毕业证成绩单/伪造美国假文凭假毕业证书图片Q微信741003700《塔夫斯大学毕业证购买》《Tufts毕业文...
《塔夫斯大学毕业证成绩单购买》做Tufts文凭毕业证成绩单/伪造美国假文凭假毕业证书图片Q微信741003700《塔夫斯大学毕业证购买》《Tufts毕业文...《塔夫斯大学毕业证成绩单购买》做Tufts文凭毕业证成绩单/伪造美国假文凭假毕业证书图片Q微信741003700《塔夫斯大学毕业证购买》《Tufts毕业文...
《塔夫斯大学毕业证成绩单购买》做Tufts文凭毕业证成绩单/伪造美国假文凭假毕业证书图片Q微信741003700《塔夫斯大学毕业证购买》《Tufts毕业文...
 
🔝9953056974🔝!!-YOUNG BOOK model Call Girls In Aerocity Delhi Escort service
🔝9953056974🔝!!-YOUNG BOOK model Call Girls In Aerocity Delhi Escort service🔝9953056974🔝!!-YOUNG BOOK model Call Girls In Aerocity Delhi Escort service
🔝9953056974🔝!!-YOUNG BOOK model Call Girls In Aerocity Delhi Escort service
 
escort service sasti (*~Call Girls in Paschim Vihar Metro❤️9953056974
escort service  sasti (*~Call Girls in Paschim Vihar Metro❤️9953056974escort service  sasti (*~Call Girls in Paschim Vihar Metro❤️9953056974
escort service sasti (*~Call Girls in Paschim Vihar Metro❤️9953056974
 
Call Girls in Govindpuri Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Govindpuri Delhi 💯Call Us 🔝8264348440🔝Call Girls in Govindpuri Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Govindpuri Delhi 💯Call Us 🔝8264348440🔝
 
(No.1)↠Young Call Girls in Sikanderpur (Gurgaon) ꧁❤ 9711911712 ❤꧂ Escorts
(No.1)↠Young Call Girls in Sikanderpur (Gurgaon) ꧁❤ 9711911712 ❤꧂ Escorts(No.1)↠Young Call Girls in Sikanderpur (Gurgaon) ꧁❤ 9711911712 ❤꧂ Escorts
(No.1)↠Young Call Girls in Sikanderpur (Gurgaon) ꧁❤ 9711911712 ❤꧂ Escorts
 
南新罕布什尔大学毕业证学位证成绩单-学历认证
南新罕布什尔大学毕业证学位证成绩单-学历认证南新罕布什尔大学毕业证学位证成绩单-学历认证
南新罕布什尔大学毕业证学位证成绩单-学历认证
 
Call Girls In Andheri East Call US Pooja📞 9892124323 Book Hot And
Call Girls In Andheri East Call US Pooja📞 9892124323 Book Hot AndCall Girls In Andheri East Call US Pooja📞 9892124323 Book Hot And
Call Girls In Andheri East Call US Pooja📞 9892124323 Book Hot And
 
Dhule Call Girls #9907093804 Contact Number Escorts Service Dhule
Dhule Call Girls #9907093804 Contact Number Escorts Service DhuleDhule Call Girls #9907093804 Contact Number Escorts Service Dhule
Dhule Call Girls #9907093804 Contact Number Escorts Service Dhule
 
E J Waggoner against Kellogg's Pantheism 8.pptx
E J Waggoner against Kellogg's Pantheism 8.pptxE J Waggoner against Kellogg's Pantheism 8.pptx
E J Waggoner against Kellogg's Pantheism 8.pptx
 
Model Call Girl in Lado Sarai Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Lado Sarai Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Lado Sarai Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Lado Sarai Delhi reach out to us at 🔝9953056974🔝
 
Call Girls In Karkardooma 83770 87607 Just-Dial Escorts Service 24X7 Avilable
Call Girls In Karkardooma 83770 87607 Just-Dial Escorts Service 24X7 AvilableCall Girls In Karkardooma 83770 87607 Just-Dial Escorts Service 24X7 Avilable
Call Girls In Karkardooma 83770 87607 Just-Dial Escorts Service 24X7 Avilable
 
西伦敦大学毕业证学位证成绩单-怎么样做
西伦敦大学毕业证学位证成绩单-怎么样做西伦敦大学毕业证学位证成绩单-怎么样做
西伦敦大学毕业证学位证成绩单-怎么样做
 
办理国外毕业证学位证《原版美国montana文凭》蒙大拿州立大学毕业证制作成绩单修改
办理国外毕业证学位证《原版美国montana文凭》蒙大拿州立大学毕业证制作成绩单修改办理国外毕业证学位证《原版美国montana文凭》蒙大拿州立大学毕业证制作成绩单修改
办理国外毕业证学位证《原版美国montana文凭》蒙大拿州立大学毕业证制作成绩单修改
 

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.