1 Package ben_pln_shd as
2 /* $Header: beplnrhi.pkh 120.2.12010000.1 2008/07/29 12:51:04 appldev ship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Global Record Type Specification |
6 -- ----------------------------------------------------------------------------
7 --
8 Type g_rec_type Is Record
9 (
10 PL_ID NUMBER(15)
11 ,EFFECTIVE_START_DATE DATE
12 ,EFFECTIVE_END_DATE DATE
13 ,NAME VARCHAR2(240) -- UTF8 Change Bug 2254683
14 ,ALWS_QDRO_FLAG VARCHAR2(30)
15 ,ALWS_QMCSO_FLAG VARCHAR2(30)
16 ,ALWS_REIMBMTS_FLAG VARCHAR2(30)
17 ,BNF_ADDL_INSTN_TXT_ALWD_FLAG VARCHAR2(30)
18 ,BNF_ADRS_RQD_FLAG VARCHAR2(30)
19 ,BNF_CNTNGT_BNFS_ALWD_FLAG VARCHAR2(30)
20 ,BNF_CTFN_RQD_FLAG VARCHAR2(30)
21 ,BNF_DOB_RQD_FLAG VARCHAR2(30)
22 ,BNF_DSGE_MNR_TTEE_RQD_FLAG VARCHAR2(30)
23 ,BNF_INCRMT_AMT NUMBER --(15)
24 ,BNF_DFLT_BNF_CD VARCHAR2(30)
25 ,BNF_LEGV_ID_RQD_FLAG VARCHAR2(30)
26 ,BNF_MAY_DSGT_ORG_FLAG VARCHAR2(30)
27 ,BNF_MN_DSGNTBL_AMT NUMBER --(15)
28 ,BNF_MN_DSGNTBL_PCT_VAL NUMBER(15,2) -- Bug 6012543, precision changed, (15) to (15,2).
29 ,rqd_perd_enrt_nenrt_val NUMBER(15)
30 ,ordr_num NUMBER(15)
31 ,BNF_PCT_INCRMT_VAL NUMBER(15,2) -- Bug 6012543, precision changed, (15) to (15,2).
32 ,BNF_PCT_AMT_ALWD_CD VARCHAR2(30)
33 ,BNF_QDRO_RL_APLS_FLAG VARCHAR2(30)
34 ,DFLT_TO_ASN_PNDG_CTFN_CD VARCHAR2(30)
35 ,DFLT_TO_ASN_PNDG_CTFN_RL NUMBER(15)
36 ,DRVBL_FCTR_APLS_RTS_FLAG VARCHAR2(30)
37 ,DRVBL_FCTR_PRTN_ELIG_FLAG VARCHAR2(30)
38 ,DPNT_DSGN_CD VARCHAR2(30)
39 ,ELIG_APLS_FLAG VARCHAR2(30)
40 ,INVK_DCLN_PRTN_PL_FLAG VARCHAR2(30)
41 ,INVK_FLX_CR_PL_FLAG VARCHAR2(30)
42 ,IMPTD_INCM_CALC_CD VARCHAR2(30)
43 ,DRVBL_DPNT_ELIG_FLAG VARCHAR2(30)
44 ,TRK_INELIG_PER_FLAG VARCHAR2(30)
45 ,PL_CD VARCHAR2(30)
46 ,AUTO_ENRT_MTHD_RL NUMBER(15)
47 ,IVR_IDENT VARCHAR2(90) -- UTF8 Change Bug 2254683
48 ,URL_REF_NAME VARCHAR2(240)
49 ,CMPR_CLMS_TO_CVG_OR_BAL_CD VARCHAR2(30)
50 ,COBRA_PYMT_DUE_DY_NUM NUMBER(15)
51 ,DPNT_CVD_BY_OTHR_APLS_FLAG VARCHAR2(30)
52 ,ENRT_MTHD_CD VARCHAR2(30)
53 ,ENRT_CD VARCHAR2(30)
54 ,ENRT_CVG_STRT_DT_CD VARCHAR2(30)
55 ,ENRT_CVG_END_DT_CD VARCHAR2(30)
56 ,FRFS_APLY_FLAG VARCHAR2(30)
57 ,HC_PL_SUBJ_HCFA_APRVL_FLAG VARCHAR2(30)
58 ,HGHLY_CMPD_RL_APLS_FLAG VARCHAR2(30)
59 ,INCPTN_DT DATE
60 ,MN_CVG_RL NUMBER(15)
61 ,MN_CVG_RQD_AMT NUMBER --(15)
62 ,MN_OPTS_RQD_NUM NUMBER(15)
63 ,MX_CVG_ALWD_AMT NUMBER --(15)
64 ,MX_CVG_RL NUMBER(15)
65 ,MX_OPTS_ALWD_NUM NUMBER(15)
66 ,MX_CVG_WCFN_MLT_NUM NUMBER(15)
67 ,MX_CVG_WCFN_AMT NUMBER --(15)
68 ,MX_CVG_INCR_ALWD_AMT NUMBER --(15)
69 ,MX_CVG_INCR_WCF_ALWD_AMT NUMBER --(15)
70 ,MX_CVG_MLT_INCR_NUM NUMBER(15)
71 ,MX_CVG_MLT_INCR_WCF_NUM NUMBER(15)
72 ,MX_WTG_DT_TO_USE_CD VARCHAR2(30)
73 ,MX_WTG_DT_TO_USE_RL NUMBER(15)
74 ,MX_WTG_PERD_PRTE_UOM VARCHAR2(30)
75 ,MX_WTG_PERD_PRTE_VAL NUMBER(15)
76 ,MX_WTG_PERD_RL NUMBER(15)
77 ,NIP_DFLT_ENRT_CD VARCHAR2(30)
78 ,NIP_DFLT_ENRT_DET_RL NUMBER(15)
79 ,DPNT_ADRS_RQD_FLAG VARCHAR2(30)
80 ,DPNT_CVG_END_DT_CD VARCHAR2(30)
81 ,DPNT_CVG_END_DT_RL NUMBER(15)
82 ,DPNT_CVG_STRT_DT_CD VARCHAR2(30)
83 ,DPNT_CVG_STRT_DT_RL NUMBER(15)
84 ,DPNT_DOB_RQD_FLAG VARCHAR2(30)
85 ,DPNT_LEG_ID_RQD_FLAG VARCHAR2(30)
86 ,DPNT_NO_CTFN_RQD_FLAG VARCHAR2(30)
87 ,NO_MN_CVG_AMT_APLS_FLAG VARCHAR2(30)
88 ,NO_MN_CVG_INCR_APLS_FLAG VARCHAR2(30)
89 ,NO_MN_OPTS_NUM_APLS_FLAG VARCHAR2(30)
90 ,NO_MX_CVG_AMT_APLS_FLAG VARCHAR2(30)
91 ,NO_MX_CVG_INCR_APLS_FLAG VARCHAR2(30)
92 ,NO_MX_OPTS_NUM_APLS_FLAG VARCHAR2(30)
93 ,NIP_PL_UOM VARCHAR2(30)
94 ,rqd_perd_enrt_nenrt_uom VARCHAR2(30)
95 ,NIP_ACTY_REF_PERD_CD VARCHAR2(30)
96 ,NIP_ENRT_INFO_RT_FREQ_CD VARCHAR2(30)
97 ,PER_CVRD_CD VARCHAR2(30)
98 ,ENRT_CVG_END_DT_RL NUMBER(15)
99 ,POSTELCN_EDIT_RL NUMBER(15)
100 ,ENRT_CVG_STRT_DT_RL NUMBER(15)
101 ,PRORT_PRTL_YR_CVG_RSTRN_CD VARCHAR2(30)
102 ,PRORT_PRTL_YR_CVG_RSTRN_RL NUMBER(15)
103 ,PRTN_ELIG_OVRID_ALWD_FLAG VARCHAR2(30)
104 ,SVGS_PL_FLAG VARCHAR2(30)
105 ,SUBJ_TO_IMPTD_INCM_TYP_CD VARCHAR2(30)
106 ,USE_ALL_ASNTS_ELIG_FLAG VARCHAR2(30)
107 ,USE_ALL_ASNTS_FOR_RT_FLAG VARCHAR2(30)
108 ,VSTG_APLS_FLAG VARCHAR2(30)
109 ,WVBL_FLAG VARCHAR2(30)
110 ,HC_SVC_TYP_CD VARCHAR2(30)
111 ,PL_STAT_CD VARCHAR2(30)
112 ,PRMRY_FNDG_MTHD_CD VARCHAR2(30)
113 ,RT_END_DT_CD VARCHAR2(30)
114 ,RT_END_DT_RL NUMBER(15)
115 ,RT_STRT_DT_RL NUMBER(15)
116 ,RT_STRT_DT_CD VARCHAR2(30)
117 ,BNF_DSGN_CD VARCHAR2(30)
118 ,PL_TYP_ID NUMBER(15)
119 ,BUSINESS_GROUP_ID NUMBER(15)
120 ,ENRT_PL_OPT_FLAG VARCHAR2(30)
121 ,BNFT_PRVDR_POOL_ID NUMBER(15)
122 ,MAY_ENRL_PL_N_OIPL_FLAG VARCHAR2(30)
123 ,ENRT_RL NUMBER
124 ,rqd_perd_enrt_nenrt_rl NUMBER
125 ,ALWS_UNRSTRCTD_ENRT_FLAG VARCHAR2(30)
126 ,BNFT_OR_OPTION_RSTRCTN_CD VARCHAR2(30)
127 ,CVG_INCR_R_DECR_ONLY_CD VARCHAR2(30)
128 ,unsspnd_enrt_cd VARCHAR2(30)
129 ,PLN_ATTRIBUTE_CATEGORY VARCHAR2(30)
130 ,PLN_ATTRIBUTE1 VARCHAR2(150)
131 ,PLN_ATTRIBUTE2 VARCHAR2(150)
132 ,PLN_ATTRIBUTE3 VARCHAR2(150)
133 ,PLN_ATTRIBUTE4 VARCHAR2(150)
134 ,PLN_ATTRIBUTE5 VARCHAR2(150)
135 ,PLN_ATTRIBUTE6 VARCHAR2(150)
136 ,PLN_ATTRIBUTE7 VARCHAR2(150)
137 ,PLN_ATTRIBUTE8 VARCHAR2(150)
138 ,PLN_ATTRIBUTE9 VARCHAR2(150)
139 ,PLN_ATTRIBUTE10 VARCHAR2(150)
140 ,PLN_ATTRIBUTE11 VARCHAR2(150)
141 ,PLN_ATTRIBUTE12 VARCHAR2(150)
142 ,PLN_ATTRIBUTE13 VARCHAR2(150)
143 ,PLN_ATTRIBUTE14 VARCHAR2(150)
144 ,PLN_ATTRIBUTE15 VARCHAR2(150)
145 ,PLN_ATTRIBUTE16 VARCHAR2(150)
146 ,PLN_ATTRIBUTE17 VARCHAR2(150)
147 ,PLN_ATTRIBUTE18 VARCHAR2(150)
148 ,PLN_ATTRIBUTE19 VARCHAR2(150)
149 ,PLN_ATTRIBUTE20 VARCHAR2(150)
150 ,PLN_ATTRIBUTE21 VARCHAR2(150)
151 ,PLN_ATTRIBUTE22 VARCHAR2(150)
152 ,PLN_ATTRIBUTE23 VARCHAR2(150)
153 ,PLN_ATTRIBUTE24 VARCHAR2(150)
154 ,PLN_ATTRIBUTE25 VARCHAR2(150)
155 ,PLN_ATTRIBUTE26 VARCHAR2(150)
156 ,PLN_ATTRIBUTE27 VARCHAR2(150)
157 ,PLN_ATTRIBUTE28 VARCHAR2(150)
158 ,PLN_ATTRIBUTE29 VARCHAR2(150)
159 ,PLN_ATTRIBUTE30 VARCHAR2(150)
160 ,susp_if_ctfn_not_prvd_flag varchar2(30)
161 ,ctfn_determine_cd varchar2(30)
162 ,susp_if_dpnt_ssn_nt_prv_cd varchar2(30)
163 ,susp_if_dpnt_dob_nt_prv_cd varchar2(30)
164 ,susp_if_dpnt_adr_nt_prv_cd varchar2(30)
165 ,susp_if_ctfn_not_dpnt_flag varchar2(30)
166 ,susp_if_bnf_ssn_nt_prv_cd varchar2(30)
167 ,susp_if_bnf_dob_nt_prv_cd varchar2(30)
168 ,susp_if_bnf_adr_nt_prv_cd varchar2(30)
169 ,susp_if_ctfn_not_bnf_flag varchar2(30)
170 ,dpnt_ctfn_determine_cd varchar2(30)
171 ,bnf_ctfn_determine_cd varchar2(30)
172 ,LAST_UPDATE_DATE DATE
173 ,LAST_UPDATED_BY NUMBER(15)
174 ,LAST_UPDATE_LOGIN NUMBER(15)
175 ,CREATED_BY NUMBER(15)
176 ,CREATION_DATE DATE
177 ,OBJECT_VERSION_NUMBER NUMBER(9)
178 ,ACTL_PREM_ID NUMBER(15)
179 ,VRFY_FMLY_MMBR_CD VARCHAR2(30)
180 ,VRFY_FMLY_MMBR_RL NUMBER(15)
181 ,ALWS_TMPRY_ID_CRD_FLAG VARCHAR2(30)
182 ,NIP_DFLT_FLAG VARCHAR2(30)
183 ,frfs_distr_mthd_cd VARCHAR2(30)
184 ,frfs_distr_mthd_rl NUMBER(15)
185 ,frfs_cntr_det_cd VARCHAR2(30)
186 ,frfs_distr_det_cd VARCHAR2(30)
187 ,cost_alloc_keyflex_1_id NUMBER(15)
188 ,cost_alloc_keyflex_2_id NUMBER(15)
189 ,post_to_gl_flag VARCHAR2(30)
190 ,frfs_val_det_cd VARCHAR2(30)
191 ,frfs_mx_cryfwd_val NUMBER(15)
192 ,frfs_portion_det_cd VARCHAR2(30)
193 ,bndry_perd_cd VARCHAR2(30)
194 ,short_name VARCHAR2(30)
195 ,short_code VARCHAR2(30)
196 ,legislation_code VARCHAR2(30)
197 ,legislation_subgroup VARCHAR2(30)
198 ,group_pl_id NUMBER
199 ,mapping_table_name VARCHAR2(60)
200 ,mapping_table_pk_id NUMBER
201 ,function_code VARCHAR2(30)
202 ,pl_yr_not_applcbl_flag VARCHAR2(30)
203 ,use_csd_rsd_prccng_cd VARCHAR2(30)
204 );
205 --
206 -- ----------------------------------------------------------------------------
207 -- | Global Definitions - Internal Development Use Only |
208 -- ----------------------------------------------------------------------------
209 --
210 g_old_rec g_rec_type; -- Global record definition
211 g_api_dml boolean; -- Global api dml status
212 --
213 -- ----------------------------------------------------------------------------
214 -- |------------------------< return_api_dml_status >-------------------------|
215 -- ----------------------------------------------------------------------------
216 -- {Start Of Comments}
217 --
218 -- Description:
219 -- This function will return the current g_api_dml private global
220 -- boolean status.
221 -- The g_api_dml status determines if at the time of the function
222 -- being executed if a dml statement (i.e. INSERT, UPDATE or DELETE)
223 -- is being issued from within an api.
224 -- If the status is TRUE then a dml statement is being issued from
225 -- within this entity api.
226 -- This function is primarily to support database triggers which
227 -- need to maintain the object_version_number for non-supported
228 -- dml statements (i.e. dml statement issued outside of the api layer).
229 --
230 -- Prerequisites:
231 -- None.
232 --
233 -- In Parameters:
234 -- None.
235 --
236 -- Post Success:
237 -- Processing continues.
238 -- If the function returns a TRUE value then, dml is being executed from
239 -- within this api.
240 --
241 -- Post Failure:
242 -- None.
243 --
244 -- Access Status:
245 -- Internal Row Handler Use Only.
246 --
247 -- {End Of Comments}
248 -- ----------------------------------------------------------------------------
249 Function return_api_dml_status Return Boolean;
250 --
251 -- ----------------------------------------------------------------------------
252 -- |---------------------------< constraint_error >---------------------------|
253 -- ----------------------------------------------------------------------------
254 -- {Start Of Comments}
255 --
256 -- Description:
257 -- This procedure is called when a constraint has been violated (i.e.
258 -- The exception hr_api.check_integrity_violated,
259 -- hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
260 -- hr_api.unique_integrity_violated has been raised).
261 -- The exceptions can only be raised as follows:
262 -- 1) A check constraint can only be violated during an INSERT or UPDATE
263 -- dml operation.
264 -- 2) A parent integrity constraint can only be violated during an
265 -- INSERT or UPDATE dml operation.
266 -- 3) A child integrity constraint can only be violated during an
267 -- DELETE dml operation.
268 -- 4) A unique integrity constraint can only be violated during INSERT or
269 -- UPDATE dml operation.
270 --
271 -- Prerequisites:
272 -- 1) Either hr_api.check_integrity_violated,
273 -- hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
274 -- hr_api.unique_integrity_violated has been raised with the subsequent
275 -- stripping of the constraint name from the generated error message
276 -- text.
277 -- 2) Standalone validation test which corresponds with a constraint error.
278 --
279 -- In Parameter:
280 -- p_constraint_name is in upper format and is just the constraint name
281 -- (e.g. not prefixed by brackets, schema owner etc).
282 --
283 -- Post Success:
284 -- Development dependant.
285 --
286 -- Post Failure:
287 -- Developement dependant.
288 --
289 -- Developer Implementation Notes:
290 -- For each constraint being checked the hr system package failure message
291 -- has been generated as a template only. These system error messages should
292 -- be modified as required (i.e. change the system failure message to a user
293 -- friendly defined error message).
294 --
295 -- Access Status:
299 -- ----------------------------------------------------------------------------
296 -- Internal Development Use Only.
297 --
298 -- {End Of Comments}
300 Procedure constraint_error
301 (p_constraint_name in all_constraints.constraint_name%TYPE);
302 --
303 -- ----------------------------------------------------------------------------
304 -- |-----------------------------< api_updating >-----------------------------|
305 -- ----------------------------------------------------------------------------
306 -- {Start Of Comments}
307 --
308 -- Description:
309 -- This function is used to populate the g_old_rec record with the current
310 -- row from the database for the specified primary key provided that the
311 -- primary key exists, and is valid, and does not already match the current
312 -- g_old_rec.
313 -- The function will always return a TRUE value if the g_old_rec is
314 -- populated with the current row. A FALSE value will be returned if all of
315 -- the primary key arguments are null.
316 --
317 -- Prerequisites:
318 -- None.
319 --
320 -- In Parameters:
321 --
322 -- Post Success:
323 -- A value of TRUE will be returned indiciating that the g_old_rec is
324 -- current.
325 -- A value of FALSE will be returned if all of the primary key arguments
326 -- have a null value (this indicates that the row has not be inserted into
327 -- the Schema), and therefore could never have a corresponding row.
328 --
329 -- Post Failure:
330 -- A failure can only occur under two circumstances:
331 -- 1) The primary key is invalid (i.e. a row does not exist for the
332 -- specified primary key values).
333 -- 2) If an object_version_number exists but is NOT the same as the current
334 -- g_old_rec value.
335 --
336 -- Developer Implementation Notes:
337 -- None.
338 --
339 -- Access Status:
340 -- Internal Development Use Only.
341 --
342 -- {End Of Comments}
343 -- ----------------------------------------------------------------------------
344 Function api_updating
345 (p_effective_date in date,
346 p_pl_id in number,
347 p_object_version_number in number
348 ) Return Boolean;
349 --
350 -- ----------------------------------------------------------------------------
351 -- |--------------------------< find_dt_del_modes >---------------------------|
352 -- ----------------------------------------------------------------------------
353 -- {Start Of Comments}
354 --
355 -- Description:
356 -- This procedure is used to determine what datetrack delete modes are
357 -- allowed as of the effective date for this entity. The procedure will
358 -- return a corresponding Boolean value for each of the delete modes
359 -- available where TRUE indicates that the corresponding delete mode is
360 -- available.
361 --
362 -- Prerequisites:
363 -- None.
364 --
365 -- In Parameters:
366 -- p_effective_date
367 -- Specifies the date at which the datetrack modes will be operated on.
368 -- p_base_key_value
369 -- Specifies the primary key value for this datetrack entity.
370 -- (E.g. For this entity the assignment of the argument would be:
371 -- p_base_key_value = :pl_id).
372 --
373 -- Post Success:
374 -- Processing continues.
375 --
376 -- Post Failure:
377 -- Failure might occur if for the specified effective date and primary key
378 -- value a row doesn't exist.
379 --
380 -- Developer Implementation Notes:
381 -- This procedure could require changes if this entity has any sepcific
382 -- delete restrictions.
383 -- For example, this entity might disallow the datetrack delete mode of
384 -- ZAP. To implement this you would have to set and return a Boolean value
385 -- of FALSE after the call to the dt_api.find_dt_del_modes procedure.
386 --
387 -- Access Status:
388 -- Internal Development Use Only.
389 --
390 -- {End Of Comments}
391 -- ----------------------------------------------------------------------------
392 Procedure find_dt_del_modes
393 (p_effective_date in date,
394 p_base_key_value in number,
395 p_zap out nocopy boolean,
396 p_delete out nocopy boolean,
397 p_future_change out nocopy boolean,
398 p_delete_next_change out nocopy boolean);
399 --
400 -- ----------------------------------------------------------------------------
401 -- |--------------------------< find_dt_upd_modes >---------------------------|
402 -- ----------------------------------------------------------------------------
403 -- {Start Of Comments}
404 --
405 -- Description:
406 -- This procedure is used to determine what datetrack update modes are
407 -- allowed as of the effective date for this entity. The procedure will
408 -- return a corresponding Boolean value for each of the update modes
409 -- available where TRUE indicates that the corresponding update mode
410 -- is available.
411 --
412 -- Prerequisites:
413 -- None.
414 --
415 -- In Parameters:
416 -- p_effective_date
417 -- Specifies the date at which the datetrack modes will be operated on.
418 -- p_base_key_value
419 -- Specifies the primary key value for this datetrack entity.
420 -- (E.g. For this entity the assignment of the argument would be:
421 -- p_base_key_value = :pl_id).
422 --
423 -- Post Success:
427 -- Failure might occur if for the specified effective date and primary key
424 -- Processing continues.
425 --
426 -- Post Failure:
428 -- value a row doesn't exist.
429 --
430 -- Developer Implementation Notes:
431 -- This procedure could require changes if this entity has any sepcific
432 -- delete restrictions.
433 -- For example, this entity might disallow the datetrack update mode of
434 -- UPDATE. To implement this you would have to set and return a Boolean
435 -- value of FALSE after the call to the dt_api.find_dt_upd_modes procedure.
436 --
437 -- Access Status:
438 -- Internal Development Use Only.
439 --
440 -- {End Of Comments}
441 -- ----------------------------------------------------------------------------
442 Procedure find_dt_upd_modes
443 (p_effective_date in date,
444 p_base_key_value in number,
445 p_correction out nocopy boolean,
446 p_update out nocopy boolean,
447 p_update_override out nocopy boolean,
448 p_update_change_insert out nocopy boolean);
449 --
450 -- ----------------------------------------------------------------------------
451 -- |------------------------< upd_effective_end_date >------------------------|
452 -- ----------------------------------------------------------------------------
453 -- {Start Of Comments}
454 --
455 -- Description:
456 -- This procedure will update the specified datetrack row with the
457 -- specified new effective end date. The object version number is also
458 -- set to the next object version number. DateTrack modes which call
459 -- this procedure are: UPDATE, UPDATE_CHANGE_INSERT,
460 -- UPDATE_OVERRIDE, DELETE, FUTURE_CHANGE and DELETE_NEXT_CHANGE.
461 -- This is an internal datetrack maintenance procedure which should
462 -- not be modified in anyway.
463 --
464 -- Prerequisites:
465 -- None.
466 --
467 -- In Parameters:
468 -- p_new_effective_end_date
469 -- Specifies the new effective end date which will be set for the
470 -- row as of the effective date.
471 -- p_base_key_value
472 -- Specifies the primary key value for this datetrack entity.
473 -- (E.g. For this entity the assignment of the argument would be:
474 -- p_base_key_value = :pl_id).
475 --
476 -- Post Success:
477 -- The specified row will be updated with the new effective end date and
478 -- object_version_number.
479 --
480 -- Post Failure:
481 -- Failure might occur if for the specified effective date and primary key
482 -- value a row doesn't exist.
483 --
484 -- Developer Implementation Notes:
485 -- This is an internal datetrack maintenance procedure which should
486 -- not be modified in anyway.
487 --
488 -- Access Status:
489 -- Internal Row Handler Use Only.
490 --
491 -- {End Of Comments}
492 -- ----------------------------------------------------------------------------
493 Procedure upd_effective_end_date
494 (p_effective_date in date,
495 p_base_key_value in number,
496 p_new_effective_end_date in date,
497 p_validation_start_date in date,
498 p_validation_end_date in date,
499 p_object_version_number out nocopy number);
500 --
501 -- ----------------------------------------------------------------------------
502 -- |---------------------------------< lck >----------------------------------|
503 -- ----------------------------------------------------------------------------
504 -- {Start Of Comments}
505 --
506 -- Description:
507 -- The Lck process for datetrack is complicated and comprises of the
508 -- following processing
509 -- The processing steps are as follows:
510 -- 1) The row to be updated or deleted must be locked.
511 -- By locking this row, the g_old_rec record data type is populated.
512 -- 2) If a comment exists the text is selected from hr_comments.
513 -- 3) The datetrack mode is then validated to ensure the operation is
514 -- valid. If the mode is valid the validation start and end dates for
515 -- the mode will be derived and returned. Any required locking is
516 -- completed when the datetrack mode is validated.
517 --
518 -- Prerequisites:
519 -- When attempting to call the lck procedure the object version number,
520 -- primary key, effective date and datetrack mode must be specified.
521 --
522 -- In Parameters:
523 -- p_effective_date
524 -- Specifies the date of the datetrack update operation.
525 -- p_datetrack_mode
526 -- Determines the datetrack update or delete mode.
527 --
528 -- Post Success:
529 -- On successful completion of the Lck process the row to be updated or
530 -- deleted will be locked and selected into the global data structure
531 -- g_old_rec.
532 --
533 -- Post Failure:
534 -- The Lck process can fail for three reasons:
535 -- 1) When attempting to lock the row the row could already be locked by
536 -- another user. This will raise the HR_Api.Object_Locked exception.
537 -- 2) The row which is required to be locked doesn't exist in the HR Schema.
538 -- This error is trapped and reported using the message name
539 -- 'HR_7220_INVALID_PRIMARY_KEY'.
540 -- 3) The row although existing in the HR Schema has a different object
541 -- version number than the object version number specified.
542 -- This error is trapped and reported using the message name
543 -- 'HR_7155_OBJECT_INVALID'.
544 --
545 -- Developer Implementation Notes:
546 -- None.
550 --
547 --
548 -- Access Status:
549 -- Internal Development Use Only.
551 -- {End Of Comments}
552 -- ----------------------------------------------------------------------------
553 Procedure lck
554 (p_effective_date in date,
555 p_datetrack_mode in varchar2,
556 p_pl_id in number,
557 p_object_version_number in number,
558 p_validation_start_date out nocopy date,
559 p_validation_end_date out nocopy date);
560 --
561 -- ----------------------------------------------------------------------------
562 -- |-----------------------------< convert_args >-----------------------------|
563 -- ----------------------------------------------------------------------------
564 -- {Start Of Comments}
565 --
566 -- Description:
567 -- This function is used to turn attribute parameters into the record
568 -- structure parameter g_rec_type.
569 --
570 -- Prerequisites:
571 -- This is a private function and can only be called from the ins or upd
572 -- attribute processes.
573 --
574 -- In Parameters:
575 --
576 -- Post Success:
577 -- A returning record structure will be returned.
578 --
579 -- Post Failure:
580 -- No direct error handling is required within this function. Any possible
581 -- errors within this function will be a PL/SQL value error due to conversion
582 -- of datatypes or data lengths.
583 --
584 -- Developer Implementation Notes:
585 -- None.
586 --
587 -- Access Status:
588 -- Internal Row Handler Use Only.
589 --
590 -- {End Of Comments}
591 -- ----------------------------------------------------------------------------
592 Function convert_args
593 (
594 p_pl_id in number,
595 p_effective_start_date in date,
596 p_effective_end_date in date,
597 p_name in varchar2,
598 p_alws_qdro_flag in varchar2,
599 p_alws_qmcso_flag in varchar2,
600 p_alws_reimbmts_flag in varchar2,
601 p_bnf_addl_instn_txt_alwd_flag in varchar2,
602 p_bnf_adrs_rqd_flag in varchar2,
603 p_bnf_cntngt_bnfs_alwd_flag in varchar2,
604 p_bnf_ctfn_rqd_flag in varchar2,
605 p_bnf_dob_rqd_flag in varchar2,
606 p_bnf_dsge_mnr_ttee_rqd_flag in varchar2,
607 p_bnf_incrmt_amt in number,
608 p_bnf_dflt_bnf_cd in varchar2,
609 p_bnf_legv_id_rqd_flag in varchar2,
610 p_bnf_may_dsgt_org_flag in varchar2,
611 p_bnf_mn_dsgntbl_amt in number,
612 p_bnf_mn_dsgntbl_pct_val in number,
613 p_rqd_perd_enrt_nenrt_val in number,
614 p_ordr_num in number,
615 p_bnf_pct_incrmt_val in number,
616 p_bnf_pct_amt_alwd_cd in varchar2,
617 p_bnf_qdro_rl_apls_flag in varchar2,
618 p_dflt_to_asn_pndg_ctfn_cd in varchar2,
619 p_dflt_to_asn_pndg_ctfn_rl in number,
620 p_drvbl_fctr_apls_rts_flag in varchar2,
621 p_drvbl_fctr_prtn_elig_flag in varchar2,
622 p_dpnt_dsgn_cd in varchar2,
623 p_elig_apls_flag in varchar2,
624 p_invk_dcln_prtn_pl_flag in varchar2,
625 p_invk_flx_cr_pl_flag in varchar2,
626 p_imptd_incm_calc_cd in varchar2,
627 p_drvbl_dpnt_elig_flag in varchar2,
628 p_trk_inelig_per_flag in varchar2,
629 p_pl_cd in varchar2,
630 p_auto_enrt_mthd_rl in number,
631 p_ivr_ident in varchar2,
632 p_url_ref_name in varchar2,
633 p_cmpr_clms_to_cvg_or_bal_cd in varchar2,
634 p_cobra_pymt_due_dy_num in number,
635 p_dpnt_cvd_by_othr_apls_flag in varchar2,
636 p_enrt_mthd_cd in varchar2,
637 p_enrt_cd in varchar2,
638 p_enrt_cvg_strt_dt_cd in varchar2,
639 p_enrt_cvg_end_dt_cd in varchar2,
640 p_frfs_aply_flag in varchar2,
641 p_hc_pl_subj_hcfa_aprvl_flag in varchar2,
642 p_hghly_cmpd_rl_apls_flag in varchar2,
643 p_incptn_dt in date,
644 p_mn_cvg_rl in number,
645 p_mn_cvg_rqd_amt in number,
646 p_mn_opts_rqd_num in number,
647 p_mx_cvg_alwd_amt in number,
648 p_mx_cvg_rl in number,
649 p_mx_opts_alwd_num in number,
650 p_mx_cvg_wcfn_mlt_num in number,
651 p_mx_cvg_wcfn_amt in number,
652 p_mx_cvg_incr_alwd_amt in number,
653 p_mx_cvg_incr_wcf_alwd_amt in number,
654 p_mx_cvg_mlt_incr_num in number,
655 p_mx_cvg_mlt_incr_wcf_num in number,
656 p_mx_wtg_dt_to_use_cd in varchar2,
657 p_mx_wtg_dt_to_use_rl in number,
658 p_mx_wtg_perd_prte_uom in varchar2,
659 p_mx_wtg_perd_prte_val in number,
660 p_mx_wtg_perd_rl in number,
661 p_nip_dflt_enrt_cd in varchar2,
662 p_nip_dflt_enrt_det_rl in number,
663 p_dpnt_adrs_rqd_flag in varchar2,
664 p_dpnt_cvg_end_dt_cd in varchar2,
665 p_dpnt_cvg_end_dt_rl in number,
666 p_dpnt_cvg_strt_dt_cd in varchar2,
667 p_dpnt_cvg_strt_dt_rl in number,
668 p_dpnt_dob_rqd_flag in varchar2,
669 p_dpnt_leg_id_rqd_flag in varchar2,
670 p_dpnt_no_ctfn_rqd_flag in varchar2,
671 p_no_mn_cvg_amt_apls_flag in varchar2,
672 p_no_mn_cvg_incr_apls_flag in varchar2,
676 p_no_mx_opts_num_apls_flag in varchar2,
673 p_no_mn_opts_num_apls_flag in varchar2,
674 p_no_mx_cvg_amt_apls_flag in varchar2,
675 p_no_mx_cvg_incr_apls_flag in varchar2,
677 p_nip_pl_uom in varchar2,
678 p_rqd_perd_enrt_nenrt_uom in varchar2,
679 p_nip_acty_ref_perd_cd in varchar2,
680 p_nip_enrt_info_rt_freq_cd in varchar2,
681 p_per_cvrd_cd in varchar2,
682 p_enrt_cvg_end_dt_rl in number,
683 p_postelcn_edit_rl in number,
684 p_enrt_cvg_strt_dt_rl in number,
685 p_prort_prtl_yr_cvg_rstrn_cd in varchar2,
686 p_prort_prtl_yr_cvg_rstrn_rl in number,
687 p_prtn_elig_ovrid_alwd_flag in varchar2,
688 p_svgs_pl_flag in varchar2,
689 p_subj_to_imptd_incm_typ_cd in varchar2,
690 p_use_all_asnts_elig_flag in varchar2,
691 p_use_all_asnts_for_rt_flag in varchar2,
692 p_vstg_apls_flag in varchar2,
693 p_wvbl_flag in varchar2,
694 p_hc_svc_typ_cd in varchar2,
695 p_pl_stat_cd in varchar2,
696 p_prmry_fndg_mthd_cd in varchar2,
697 p_rt_end_dt_cd in varchar2,
698 p_rt_end_dt_rl in number,
699 p_rt_strt_dt_rl in number,
700 p_rt_strt_dt_cd in varchar2,
701 p_bnf_dsgn_cd in varchar2,
702 p_pl_typ_id in number,
703 p_business_group_id in number,
704 p_enrt_pl_opt_flag in varchar2,
705 p_bnft_prvdr_pool_id in number,
706 p_MAY_ENRL_PL_N_OIPL_FLAG in VARCHAR2,
707 p_ENRT_RL in NUMBER,
708 p_rqd_perd_enrt_nenrt_rl in NUMBER,
709 p_ALWS_UNRSTRCTD_ENRT_FLAG in VARCHAR2,
710 p_BNFT_OR_OPTION_RSTRCTN_CD in VARCHAR2,
711 p_CVG_INCR_R_DECR_ONLY_CD in VARCHAR2,
712 p_unsspnd_enrt_cd in varchar2,
713 p_pln_attribute_category in varchar2,
714 p_pln_attribute1 in varchar2,
715 p_pln_attribute2 in varchar2,
716 p_pln_attribute3 in varchar2,
717 p_pln_attribute4 in varchar2,
718 p_pln_attribute5 in varchar2,
719 p_pln_attribute6 in varchar2,
720 p_pln_attribute7 in varchar2,
721 p_pln_attribute8 in varchar2,
722 p_pln_attribute9 in varchar2,
723 p_pln_attribute10 in varchar2,
724 p_pln_attribute11 in varchar2,
725 p_pln_attribute12 in varchar2,
726 p_pln_attribute13 in varchar2,
727 p_pln_attribute14 in varchar2,
728 p_pln_attribute15 in varchar2,
729 p_pln_attribute16 in varchar2,
730 p_pln_attribute17 in varchar2,
731 p_pln_attribute18 in varchar2,
732 p_pln_attribute19 in varchar2,
733 p_pln_attribute20 in varchar2,
734 p_pln_attribute21 in varchar2,
735 p_pln_attribute22 in varchar2,
736 p_pln_attribute23 in varchar2,
737 p_pln_attribute24 in varchar2,
738 p_pln_attribute25 in varchar2,
739 p_pln_attribute26 in varchar2,
740 p_pln_attribute27 in varchar2,
741 p_pln_attribute28 in varchar2,
742 p_pln_attribute29 in varchar2,
743 p_pln_attribute30 in varchar2,
744 p_susp_if_ctfn_not_prvd_flag in varchar2,
745 p_ctfn_determine_cd in varchar2,
746 p_susp_if_dpnt_ssn_nt_prv_cd in varchar2,
747 p_susp_if_dpnt_dob_nt_prv_cd in varchar2,
748 p_susp_if_dpnt_adr_nt_prv_cd in varchar2,
749 p_susp_if_ctfn_not_dpnt_flag in varchar2,
750 p_susp_if_bnf_ssn_nt_prv_cd in varchar2,
751 p_susp_if_bnf_dob_nt_prv_cd in varchar2,
752 p_susp_if_bnf_adr_nt_prv_cd in varchar2,
753 p_susp_if_ctfn_not_bnf_flag in varchar2,
754 p_dpnt_ctfn_determine_cd in varchar2,
755 p_bnf_ctfn_determine_cd in varchar2,
756 p_object_version_number in number,
757 p_actl_prem_id in number,
758 p_vrfy_fmly_mmbr_cd in varchar2,
759 p_vrfy_fmly_mmbr_rl in number,
760 p_ALWS_TMPRY_ID_CRD_FLAG in VARCHAR2,
761 p_nip_dflt_flag in VARCHAR2,
762 p_frfs_distr_mthd_cd in varchar2,
763 p_frfs_distr_mthd_rl in number,
764 p_frfs_cntr_det_cd in varchar2,
765 p_frfs_distr_det_cd in varchar2,
766 p_cost_alloc_keyflex_1_id in number,
767 p_cost_alloc_keyflex_2_id in number,
768 p_post_to_gl_flag in varchar2,
769 p_frfs_val_det_cd in varchar2,
770 p_frfs_mx_cryfwd_val in number,
771 p_frfs_portion_det_cd in varchar2,
772 p_bndry_perd_cd in varchar2,
773 p_short_name in varchar2,
774 p_short_code in varchar2,
775 p_legislation_code in varchar2,
776 p_legislation_subgroup in varchar2,
777 p_group_pl_id in number,
778 p_mapping_table_name in varchar2,
779 p_mapping_table_pk_id in number,
780 p_function_code in varchar2,
781 p_pl_yr_not_applcbl_flag in varchar2,
782 p_use_csd_rsd_prccng_cd in VARCHAR2
783 )
784 Return g_rec_type;
785 --
786 end ben_pln_shd;