1 Package ben_pel_shd AUTHID CURRENT_USER as
2 /* $Header: bepelrhi.pkh 120.1.12020000.2 2012/07/03 13:08:34 amnaraya ship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Global Record Type Specification |
6 -- ----------------------------------------------------------------------------
7 --
8 Type g_rec_type Is Record
9 (
10 pil_elctbl_chc_popl_id number(15),
11 dflt_enrt_dt date,
12 dflt_asnd_dt date,
13 elcns_made_dt date,
14 cls_enrt_dt_to_use_cd varchar2(30),
15 enrt_typ_cycl_cd varchar2(30),
16 enrt_perd_end_dt date,
17 enrt_perd_strt_dt date,
18 procg_end_dt date,
19 pil_elctbl_popl_stat_cd varchar2(30),
20 acty_ref_perd_cd varchar2(30),
21 uom varchar2(30),
22 comments varchar2(2000),
23 mgr_ovrid_dt date,
24 ws_mgr_id number(15),
25 mgr_ovrid_person_id number(15),
26 assignment_id number(15),
27 --cwb
28 bdgt_acc_cd varchar2(30),
29 pop_cd varchar2(30),
30 bdgt_due_dt date,
31 bdgt_export_flag varchar2(30),
32 bdgt_iss_dt date,
33 bdgt_stat_cd varchar2(30),
34 ws_acc_cd varchar2(30),
35 ws_due_dt date,
36 ws_export_flag varchar2(30),
37 ws_iss_dt date,
38 ws_stat_cd varchar2(30),
39 --cwb
40 reinstate_cd varchar2(30),
41 reinstate_ovrdn_cd varchar2(30),
42 reopen_le_on_reprocess varchar2(30),
43 auto_asnd_dt date,
44 cbr_elig_perd_strt_dt date,
45 cbr_elig_perd_end_dt date,
46 lee_rsn_id number(15),
47 enrt_perd_id number(15),
48 per_in_ler_id number(15),
49 pgm_id number(15),
50 pl_id number(15),
51 business_group_id number(15),
52 pel_attribute_category varchar2(30),
53 pel_attribute1 varchar2(150),
54 pel_attribute2 varchar2(150),
55 pel_attribute3 varchar2(150),
56 pel_attribute4 varchar2(150),
57 pel_attribute5 varchar2(150),
58 pel_attribute6 varchar2(150),
59 pel_attribute7 varchar2(150),
60 pel_attribute8 varchar2(150),
61 pel_attribute9 varchar2(150),
62 pel_attribute10 varchar2(150),
63 pel_attribute11 varchar2(150),
64 pel_attribute12 varchar2(150),
65 pel_attribute13 varchar2(150),
66 pel_attribute14 varchar2(150),
67 pel_attribute15 varchar2(150),
68 pel_attribute16 varchar2(150),
69 pel_attribute17 varchar2(150),
70 pel_attribute18 varchar2(150),
71 pel_attribute19 varchar2(150),
72 pel_attribute20 varchar2(150),
73 pel_attribute21 varchar2(150),
74 pel_attribute22 varchar2(150),
75 pel_attribute23 varchar2(150),
76 pel_attribute24 varchar2(150),
77 pel_attribute25 varchar2(150),
78 pel_attribute26 varchar2(150),
79 pel_attribute27 varchar2(150),
80 pel_attribute28 varchar2(150),
81 pel_attribute29 varchar2(150),
82 pel_attribute30 varchar2(150),
83 request_id number(15),
84 program_application_id number(15),
85 program_id number(15),
86 program_update_date date,
87 object_version_number number(9),
88 defer_deenrol_flag varchar2(30),
89 deenrol_made_dt date
90 );
91 --
92 -- ----------------------------------------------------------------------------
93 -- | Global Definitions - Internal Development Use Only |
94 -- ----------------------------------------------------------------------------
95 --
96 g_old_rec g_rec_type; -- Global record definition
97 g_api_dml boolean; -- Global api dml status
98 --
99 -- ----------------------------------------------------------------------------
100 -- |------------------------< return_api_dml_status >-------------------------|
101 -- ----------------------------------------------------------------------------
102 -- {Start Of Comments}
103 --
104 -- Description:
105 -- This function will return the current g_api_dml private global
106 -- boolean status.
107 -- The g_api_dml status determines if at the time of the function
108 -- being executed if a dml statement (i.e. INSERT, UPDATE or DELETE)
109 -- is being issued from within an api.
110 -- If the status is TRUE then a dml statement is being issued from
111 -- within this entity api.
112 -- This function is primarily to support database triggers which
113 -- need to maintain the object_version_number for non-supported
114 -- dml statements (i.e. dml statement issued outside of the api layer).
115 --
116 -- Prerequisites:
117 -- None.
118 --
119 -- In Parameters:
120 -- None.
121 --
122 -- Post Success:
123 -- Processing continues.
124 -- If the function returns a TRUE value then, dml is being executed from
125 -- within this api.
126 --
127 -- Post Failure:
128 -- None.
129 --
130 -- Access Status:
131 -- Internal Row Handler Use Only.
132 --
133 -- {End Of Comments}
134 -- ----------------------------------------------------------------------------
135 Function return_api_dml_status Return Boolean;
136 --
137 -- ----------------------------------------------------------------------------
138 -- |---------------------------< constraint_error >---------------------------|
139 -- ----------------------------------------------------------------------------
140 -- {Start Of Comments}
141 --
142 -- Description:
143 -- This procedure is called when a constraint has been violated (i.e.
144 -- The exception hr_api.check_integrity_violated,
145 -- hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
146 -- hr_api.unique_integrity_violated has been raised).
147 -- The exceptions can only be raised as follows:
148 -- 1) A check constraint can only be violated during an INSERT or UPDATE
149 -- dml operation.
150 -- 2) A parent integrity constraint can only be violated during an
151 -- INSERT or UPDATE dml operation.
152 -- 3) A child integrity constraint can only be violated during an
153 -- DELETE dml operation.
154 -- 4) A unique integrity constraint can only be violated during INSERT or
155 -- UPDATE dml operation.
156 --
157 -- Prerequisites:
158 -- 1) Either hr_api.check_integrity_violated,
159 -- hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
160 -- hr_api.unique_integrity_violated has been raised with the subsequent
161 -- stripping of the constraint name from the generated error message
162 -- text.
163 -- 2) Standalone validation test which corresponds with a constraint error.
164 --
165 -- In Parameter:
166 -- p_constraint_name is in upper format and is just the constraint name
167 -- (e.g. not prefixed by brackets, schema owner etc).
168 --
169 -- Post Success:
170 -- Development dependant.
171 --
172 -- Post Failure:
173 -- Developement dependant.
174 --
175 -- Developer Implementation Notes:
176 -- For each constraint being checked the hr system package failure message
177 -- has been generated as a template only. These system error messages should
178 -- be modified as required (i.e. change the system failure message to a user
179 -- friendly defined error message).
180 --
181 -- Access Status:
182 -- Internal Development Use Only.
183 --
184 -- {End Of Comments}
185 -- ----------------------------------------------------------------------------
186 Procedure constraint_error
187 (p_constraint_name in all_constraints.constraint_name%TYPE);
188 --
189 -- ----------------------------------------------------------------------------
190 -- |-----------------------------< api_updating >-----------------------------|
191 -- ----------------------------------------------------------------------------
192 -- {Start Of Comments}
193 --
194 -- Description:
195 -- This function is used to populate the g_old_rec record with the
196 -- current row from the database for the specified primary key
197 -- provided that the primary key exists and is valid and does not
198 -- already match the current g_old_rec. The function will always return
199 -- a TRUE value if the g_old_rec is populated with the current row.
200 -- A FALSE value will be returned if all of the primary key arguments
201 -- are null.
202 --
203 -- Prerequisites:
204 -- None.
205 --
206 -- In Parameters:
207 --
208 -- Post Success:
209 -- A value of TRUE will be returned indiciating that the g_old_rec
210 -- is current.
211 -- A value of FALSE will be returned if all of the primary key arguments
212 -- have a null value (this indicates that the row has not be inserted into
213 -- the Schema), and therefore could never have a corresponding row.
214 --
215 -- Post Failure:
216 -- A failure can only occur under two circumstances:
217 -- 1) The primary key is invalid (i.e. a row does not exist for the
218 -- specified primary key values).
219 -- 2) If an object_version_number exists but is NOT the same as the current
220 -- g_old_rec value.
221 --
222 -- Developer Implementation Notes:
223 -- None.
224 --
225 -- Access Status:
226 -- Internal Development Use Only.
227 --
228 -- {End Of Comments}
229 -- ----------------------------------------------------------------------------
230 Function api_updating
231 (
232 p_pil_elctbl_chc_popl_id in number,
233 p_object_version_number in number
234 ) Return Boolean;
235 --
236 -- ----------------------------------------------------------------------------
237 -- |---------------------------------< lck >----------------------------------|
238 -- ----------------------------------------------------------------------------
239 -- {Start Of Comments}
240 --
241 -- Description:
242 -- The Lck process has two main functions to perform. Firstly, the row to be
243 -- updated or deleted must be locked. The locking of the row will only be
244 -- successful if the row is not currently locked by another user.
245 -- Secondly, during the locking of the row, the row is selected into
246 -- the g_old_rec data structure which enables the current row values from the
247 -- server to be available to the api.
248 --
249 -- Prerequisites:
250 -- When attempting to call the lock the object version number (if defined)
251 -- is mandatory.
252 --
253 -- In Parameters:
254 -- The arguments to the Lck process are the primary key(s) which uniquely
255 -- identify the row and the object version number of row.
256 --
257 -- Post Success:
258 -- On successful completion of the Lck process the row to be updated or
259 -- deleted will be locked and selected into the global data structure
260 -- g_old_rec.
261 --
262 -- Post Failure:
263 -- The Lck process can fail for three reasons:
264 -- 1) When attempting to lock the row the row could already be locked by
265 -- another user. This will raise the HR_Api.Object_Locked exception.
266 -- 2) The row which is required to be locked doesn't exist in the HR Schema.
267 -- This error is trapped and reported using the message name
268 -- 'HR_7220_INVALID_PRIMARY_KEY'.
269 -- 3) The row although existing in the HR Schema has a different object
270 -- version number than the object version number specified.
271 -- This error is trapped and reported using the message name
272 -- 'HR_7155_OBJECT_INVALID'.
273 --
274 -- Developer Implementation Notes:
275 -- For each primary key and the object version number arguments add a
276 -- call to hr_api.mandatory_arg_error procedure to ensure that these
277 -- argument values are not null.
278 --
279 -- Access Status:
280 -- Internal Development Use Only.
281 --
282 -- {End Of Comments}
283 -- ----------------------------------------------------------------------------
284 Procedure lck
285 (
286 p_pil_elctbl_chc_popl_id in number,
287 p_object_version_number in number
288 );
289 --
290 -- ----------------------------------------------------------------------------
291 -- |-----------------------------< convert_args >-----------------------------|
292 -- ----------------------------------------------------------------------------
293 -- {Start Of Comments}
294 --
295 -- Description:
296 -- This function is used to turn attribute parameters into the record
297 -- structure parameter g_rec_type.
298 --
299 -- Prerequisites:
300 -- This is a private function and can only be called from the ins or upd
301 -- attribute processes.
302 --
303 -- In Parameters:
304 --
305 -- Post Success:
306 -- A returning record structure will be returned.
307 --
308 -- Post Failure:
309 -- No direct error handling is required within this function. Any possible
310 -- errors within this function will be a PL/SQL value error due to conversion
311 -- of datatypes or data lengths.
312 --
313 -- Developer Implementation Notes:
314 -- None.
315 --
316 -- Access Status:
317 -- Internal Row Handler Use Only.
318 --
319 -- {End Of Comments}
320 -- ----------------------------------------------------------------------------
321 Function convert_args
322 (
323 p_pil_elctbl_chc_popl_id in number,
324 p_dflt_enrt_dt in date,
325 p_dflt_asnd_dt in date,
326 p_elcns_made_dt in date,
327 p_cls_enrt_dt_to_use_cd in varchar2,
328 p_enrt_typ_cycl_cd in varchar2,
329 p_enrt_perd_end_dt in date,
330 p_enrt_perd_strt_dt in date,
331 p_procg_end_dt in date,
332 p_pil_elctbl_popl_stat_cd in varchar2,
333 p_acty_ref_perd_cd in varchar2,
334 p_uom in varchar2,
335 p_comments in varchar2,
336 p_mgr_ovrid_dt in date,
337 p_ws_mgr_id in number,
338 p_mgr_ovrid_person_id in number,
339 p_assignment_id in number,
340 --cwb
341 p_bdgt_acc_cd in varchar2,
342 p_pop_cd in varchar2,
346 p_bdgt_stat_cd in varchar2,
343 p_bdgt_due_dt in date,
344 p_bdgt_export_flag in varchar2,
345 p_bdgt_iss_dt in date,
347 p_ws_acc_cd in varchar2,
348 p_ws_due_dt in date,
349 p_ws_export_flag in varchar2,
350 p_ws_iss_dt in date,
351 p_ws_stat_cd in varchar2,
352 --cwb
353 p_reinstate_cd in varchar2,
354 p_reinstate_ovrdn_cd in varchar2,
355 p_reopen_le_on_reprocess in varchar2,
356 p_auto_asnd_dt in date,
357 p_cbr_elig_perd_strt_dt in date,
358 p_cbr_elig_perd_end_dt in date,
359 p_lee_rsn_id in number,
360 p_enrt_perd_id in number,
361 p_per_in_ler_id in number,
362 p_pgm_id in number,
363 p_pl_id in number,
364 p_business_group_id in number,
365 p_pel_attribute_category in varchar2,
366 p_pel_attribute1 in varchar2,
367 p_pel_attribute2 in varchar2,
368 p_pel_attribute3 in varchar2,
369 p_pel_attribute4 in varchar2,
370 p_pel_attribute5 in varchar2,
371 p_pel_attribute6 in varchar2,
372 p_pel_attribute7 in varchar2,
373 p_pel_attribute8 in varchar2,
374 p_pel_attribute9 in varchar2,
375 p_pel_attribute10 in varchar2,
376 p_pel_attribute11 in varchar2,
377 p_pel_attribute12 in varchar2,
378 p_pel_attribute13 in varchar2,
379 p_pel_attribute14 in varchar2,
380 p_pel_attribute15 in varchar2,
381 p_pel_attribute16 in varchar2,
382 p_pel_attribute17 in varchar2,
383 p_pel_attribute18 in varchar2,
384 p_pel_attribute19 in varchar2,
385 p_pel_attribute20 in varchar2,
386 p_pel_attribute21 in varchar2,
387 p_pel_attribute22 in varchar2,
388 p_pel_attribute23 in varchar2,
389 p_pel_attribute24 in varchar2,
390 p_pel_attribute25 in varchar2,
391 p_pel_attribute26 in varchar2,
392 p_pel_attribute27 in varchar2,
393 p_pel_attribute28 in varchar2,
394 p_pel_attribute29 in varchar2,
395 p_pel_attribute30 in varchar2,
396 p_request_id in number,
397 p_program_application_id in number,
398 p_program_id in number,
399 p_program_update_date in date,
400 p_object_version_number in number,
401 p_defer_deenrol_flag in varchar2,
402 p_deenrol_made_dt in date
403 )
404 Return g_rec_type;
405 --
406 end ben_pel_shd;