1 package pay_purge_pkg as
2 /* $Header: pypurge.pkh 120.2.12010000.1 2008/07/27 23:29:40 appldev ship $ */
3 /*
4 +======================================================================+
5 | Copyright (c) 2000 Oracle Corporation |
6 | Redwood Shores, California, USA |
7 | All rights reserved. |
8 +======================================================================+
9 Package Header Name : PAY_PURGE_PKG
10 Package File Name : pypurge.pkh
11
12 Description : Declares procedures for Purge functionality.
13
14 Change List:
15 ------------
16
17 Name Date Version Bug Text
18 -------------- ------------ ------- ------- ----------------------------
19 T. Habara 03-APR-2006 115.7 5131274 Added pypu1_validate_asg.
20 T. Habara 17-MAR-2006 115.6 5089841 Added init_pact,bal_exists.
21 D. Saxby 05-DEC-2002 115.5 2692195 Nocopy changes.
22 D. Saxby 18-NOV-2000 115.4 GSCC standards fix.
23 D. Saxby 14-NOV-2000 115.3 Added procedure pypurgbv.
24 D. Saxby 08-NOV-2000 115.2 Added dbdrv line.
25 D. Saxby 12-DEC-2000 115.1 Added pypurcif.
26 D. Saxby 12-DEC-2000 115.0 Initial Version
27 ========================================================================
28 */
29
30 type ctx_rec is record
31 (
32 context_id number,
33 context_name varchar2(30),
34 context_value varchar2(60)
35 );
36
37 type ctx_cur_t is ref cursor return ctx_rec;
38
39 /*--------------------------------- validate --------------------------------*/
40 /*
41 NAME
42 validate - validate purge date and reporting date.
43 DESCRIPTION
44 This procedure is called from the main purge process
45 and is used to validate that the purge date as passed
46 to the routine is acceptable. If not, an error is
47 raised from the procedure and this will be reported
48 by the purge code.
49 */
50
51 procedure validate
52 (
53 p_balance_set_id in number default null,
54 p_assignment_set_id in number default null,
55 p_business_group_id in number,
56 p_reporting_date in date,
57 p_purge_date in date
58 );
59
60 procedure phase_two_checks
61 (
62 p_payroll_action_id in number
63 );
64
65 procedure open_ctx_cur
66 (
67 p_ctx_cursor in out nocopy ctx_cur_t,
68 p_assignment_id in number,
69 p_purge_date in date,
70 p_select_type in varchar2
71 );
72
73 /*-------------------------------- pypu2uacs --------------------------------*/
74 /*
75 NAME
76 pypu2uacs - Purge Phase 2 Update Action Sequence.
77 DESCRIPTION
78 Update the action_sequence of the balance initialization
79 actions inserted for the balance rollup.
80 */
81
82 procedure pypu2uacs
83 (
84 p_batch_id in number,
85 p_action_sequence in number -- of current Purge action.
86 );
87
88 /*--------------------------------- pypurgbv --------------------------------*/
89 /*
90 NAME
91 pypurgbv - Purge Get Balance Value.
92 DESCRIPTION
93 Cover routine to pay_balance_pkg.get_value (assignment action mode).
94
95 Because some balances need time_period_id stamped on the user and
96 owner payroll actios, Purge is forced to insert a payroll and
97 assignment action before calling get_value.
98
99 Something similar is done within pay_balance_pkg.get_value
100 for date mode, but purge has the unique requirement that the
101 action_sequence of the assignment action is the same value as
102 the parent purge action passed to the routine. This avoids the
103 need to shuffle actions.
104
105 The UK makes particularly heavy use of these types of dimensions,
106 for instance, _ASG_TD_YTD, _ASG_YTD and many others.
107 */
108
109 procedure pypurgbv
110 (
111 p_defined_balance_id in number,
112 p_assignment_action_id in number,
113 p_balance_value out nocopy number,
114 p_nonzero_flag out nocopy binary_integer
115 );
116
117 /*-------------------------------- pypu2vbr ---------------------------------*/
118 /*
119 NAME
120 pypu2vbr - Purge Phase 2 Validate Balance Rollup.
121 DESCRIPTION
122 Following balance rollup, attempts to verify that
123 the values are as expected.
124
125 The calling of this validation is switchable from
126 the PURGE_VALIDATE_ROLLUP action parameter.
127 */
128
129 procedure pypurvbr
130 (
131 p_assignment_action_id in number
132 );
133
134 /*-------------------------------- pypurcif ---------------------------------*/
135 /*
136 NAME
137 pypurcif - Purge Phase 2 Create Initial Feeds
138 DESCRIPTION
139 Procedure creates the initial balance feeds that are required
140 for balance rollup.
141 */
142
143 procedure pypurcif
144 (
145 p_balance_set_id in number,
146 p_business_group_id in number,
147 p_legislation_code in varchar2
148 );
149
150 /*------------------------------- init_pact -------------------------------*/
151 /*
152 NAME
153 init_pact - Purge Phase 1. Initialize Payroll Action
154 DESCRIPTION
155 This procedure initializes the Purge payroll action cache.
156
157 */
158
159 procedure init_pact
160 (
161 p_purge_action_id in number -- Purge Payroll Action ID
162 )
163 ;
164
165 /*------------------------------- bal_exists -------------------------------*/
166 /*
167 NAME
168 bal_exists - Purge Phase 1. Balance Existence Check.
169 DESCRIPTION
170 This function checks to see if there are any assignments processed
171 in the Purge Process that could have a value for the specified balance.
172
173 */
174
175 function bal_exists
176 (
177 p_purge_action_id in number, -- Purge Payroll Action ID
178 p_balance_type_id in number
179 ) return varchar2
180 ;
181
182 /*--------------------------- pypu1_validate_asg ---------------------------*/
183 /*
184 NAME
185 pypu1_validate_asg - Purge Phase 1. Validate Assignment
186 DESCRIPTION
187 This procedure validates the assignment on the purge date.
188
189 */
190
191 procedure pypu1_validate_asg
192 (
193 p_assignment_action_id in number
194 )
195 ;
196
197 end pay_purge_pkg;