Thursday, 25 January 2018

Workflow Customization : How to restrict PO approval Notification to send to some specific Employees in the Position Hierarchy.



Workflow Customization : How to restrict PO approval Notification to send to some specific Employees in the Position Hierarchy.


Step1:- Open the PO approval workflow in workflow builder and then open Find Approver Process as below.






Step2:- Go to Get First Manager Approval Hierarchy Function in the process.



Step3:- Copy the name of PLSQL function
PO_REQAPPROVAL_FINDAPPRV1.GETMGR_PO_HIER


 
 
Step4:- Go to this package in Database and open it.
 
Step5:- In this package go to function as below
 

FUNCTION GetMgrHRHier(itemtype VARCHAR2, itemkey VARCHAR2)
 

Step6:- You can see below here in this function , workflow is setting the value of Next approver.
 
 
 
 
 
if you found this post helpful and you liked it then follow this blog to get notifications for the upcoming posts.
 
Step7:-  These are two below cursors are using to set the next approver. You just to put Not in condition in their where conditions with that employee Id's for which you don't want to sent approval Notification.
 
 

CURSOR c1 (p_empid NUMBER, p_business_group_id NUMBER) IS

SELECT pafe.supervisor_id

FROM   Per_All_Assignments_f pafe,  -- <BUG 6615913>

       Per_All_People_f ppfs,       -- <BUG 6615913>

       Per_All_Assignments_f pafs,  -- <BUG 6615913>

       per_person_types_v ppts,

       per_person_type_usages_f pptu

WHERE  pafe.business_group_id = p_business_group_id

       AND pafe.person_id = p_empid

       AND Trunc(SYSDATE) BETWEEN pafe.Effective_Start_Date

                              AND pafe.Effective_End_Date

       AND pafe.Primary_Flag = 'Y'

       AND pafe.Assignment_Type IN ('E','C')

       AND ppfs.Person_Id = pafe.Supervisor_Id

       AND Trunc(SYSDATE) BETWEEN ppfs.Effective_Start_Date

                              AND ppfs.Effective_End_Date

       AND pafs.Person_Id = ppfs.Person_Id

       AND Trunc(SYSDATE) BETWEEN pafs.Effective_Start_Date

                              AND pafs.Effective_End_Date

       AND pafs.Primary_Flag = 'Y'

       AND pafs.Assignment_Type IN ('E','C')

       AND pptu.Person_Id = ppfs.Person_Id

       AND ppts.person_type_id = pptu.person_type_id
       AND ppts.System_Person_Type IN ('EMP','EMP_APL','CWK');  


6 comments:

arif said...

Thanks and Regards. Oracle Apps R12 & Fusion Training Videos at affordable cost.
please check oracleappstechnical.com for details.

Anonymous said...

Good blog, Thanks for sharing this informative article. It would be helpful to all if you write a full article.
Oracle Fusion HCM Online Training"

shaik shah said...

Thanks for sharing this informative article ,It would be helpful to all
Oracle Fusion HCM Online Training

Goutham Raj said...

Good Article, Alots of information provided, Thanks for sharing this information.
Oracle Fusion HCM Online Training

Lakshmi Satya said...

Nice blog.
Oracle Fusion HCM Online Training

Rainbow Training Institute said...

good blog. your blog is really informative and helpful for me

Oracle Fusion HCM Online Training
Oracle Fusion SCM Online Training
Oracle Fusion Financials Online Training
Oracle Integration Cloud Online Training

Post a Comment

Contact us for any Collaboration, Project Support & On Job Support Work

Name

Email *

Message *