1 PACKAGE pqh_pa_whatif_process AUTHID CURRENT_USER AS
2 /* $Header: pqwifswi.pkh 115.2 2003/07/01 09:54:14 kmullapu noship $ */
3
4 FUNCTION get_uom (p_uom IN VARCHAR2
5 ,p_nnmntry_uom IN VARCHAR2
6 ,p_effective_date IN DATE )
7 RETURN VARCHAR2;
8 /*
9 ||========================================================================================================
10 || PROCEDURE: ss_whatif_process
11 ||--------------------------------------------------------------------------------------------------------
12 ||
13 || Description:
14 || This buids the current and whatif benefit hierarchy
15 ||
16 || Parameters
17 || -------------------------------------------------------------------------------------------------------
18 || Name Description
19 ||--------------------------------------------------------------------------------------------------------
20 ||p_called_from Whether whatif is being called from ssben or sshr(values :SSHR/SSBEN)
21 ||p_login_id Fnd user_id of person who initiated What-If function.
22 ||p_login_type Whether user is using LMDA or EDA (LINE/EMP).User for role based plan restriction
23 ||p_person_id Person on whom what if is being performed
24 ||p_effective_date What if date.ystem will analyse the impact on benefits as of this date
25 ||p_session_date Transaction date (Since we dont have date tracking this will be sysdate)
26 ||p_transaction_id PK of hr_api_transactions table.Used to get data changes
27 ||p_ler_id For sshr whatif this returns detected LE.For ssben whatif
28 || this specifies theoverridding LE in case of conflicting LE's
29 ||p_whatif_results_batch_id batch ID of pqh_pa_watif_results table containing hierarchy
30 ||========================================================================================================
31 */
32
33 PROCEDURE ss_whatif_process(
34 p_called_from IN VARCHAR2
35 ,p_login_id IN NUMBER
36 ,p_login_type IN VARCHAR2
37 ,p_person_id IN NUMBER
38 ,p_business_group_id IN NUMBER
39 ,p_effective_date IN DATE
40 ,p_session_date IN DATE
41 ,p_transaction_id IN NUMBER
42 ,p_ler_id IN OUT NOCOPY NUMBER
43 ,p_whatif_results_batch_id OUT NOCOPY NUMBER
44 );
45 /*
46 ||========================================================================================================
47 || PROCEDURE: validate_data_changes
48 ||--------------------------------------------------------------------------------------------------------
49 ||
50 || Description: Used for ssben whatif only
51 || This validates the data changes by posting them and checking if conflicting LE's are triggered.
52 || Conflicting LE's triggered (if any) are inserted in pah_pa_watif_results table.
53 ||
54 || Parameters
55 || -------------------------------------------------------------------------------------------------------
56 || Name Description
57 ||--------------------------------------------------------------------------------------------------------
58 ||p_person_id Person on whom what if is being performed
59 ||p_effective_date What if date.ystem will analyse the impact on benefits as of this date
60 ||p_session_date Transaction date (Since we dont have date tracking this will be sysdate)
61 ||p_transaction_id PK of hr_api_transactions table.Used to get data changes
62 ||p_whatif_results_batch_id batch ID of pqh_pa_watif_results table containing conflicting LE's triggered
63 || by data changes
64 ||========================================================================================================
65 */
66
67 PROCEDURE validate_data_changes(
68 p_person_id IN NUMBER
69 ,p_business_group_id IN NUMBER
70 ,p_effective_date IN DATE
71 ,p_session_date IN DATE
72 ,p_transaction_id IN NUMBER
73 ,p_whatif_results_batch_id OUT NOCOPY NUMBER
74 );
75 /*
76 ||========================================================================================================
77 || PROCEDURE: prepare_transaction
78 ||--------------------------------------------------------------------------------------------------------
79 ||
80 || Description: Used for ssben whatif only
81 || This is used to create a hr_api_txn for ssben whatif.If in same txn,this will try to re-use txn_id
82 || This procedure will be enhanced to purge uncessary txn's from hr_api_txn tabels
83 ||
84 || Parameters
85 || -------------------------------------------------------------------------------------------------------
86 || Name Description
87 ||--------------------------------------------------------------------------------------------------------
88 ||p_person_id Person on whom what if is being performed
89 ||p_txn_id PK of hr_api_transactions
90 ||========================================================================================================
91 */
92
93 PROCEDURE prepare_transaction(
94 p_person_id IN NUMBER
95 ,p_txn_id IN OUT NOCOPY NUMBER
96 );
97 /*
98 ||========================================================================================================
99 || PROCEDURE: get_user_role
100 ||--------------------------------------------------------------------------------------------------------
101 ||
102 || Description: Used for role based plan/life event restriction
103 || Given a user_Id and type this will return the role_id to be considered
104 ||
105 || Parameters
106 || -------------------------------------------------------------------------------------------------------
107 || Name Description
108 ||--------------------------------------------------------------------------------------------------------
109 ||p_user_id Fnd user who initiated whatif function
110 ||p_user_type Whether User is accesing Employee Whatif or Manager Whatif
111 ||p_role_id PK of pqh_roles, to be used in to restrict comp object access
112 ||========================================================================================================
113 */
114 PROCEDURE get_user_role(
115 p_user_id IN NUMBER
116 ,p_user_type IN VARCHAR2
117 ,p_business_group_id IN NUMBER
118 ,p_role_id OUT NOCOPY NUMBER
119 );
120
121 FUNCTION get_first_label(
122 p_ler_id IN NUMBER
123 ,p_effective_date IN DATE
124 )
125 RETURN VARCHAR2;
126
127 END pqh_pa_whatif_process;