[Home] [Help]
PACKAGE BODY: APPS.BEN_PEO_INS
Source
1 Package Body ben_peo_ins as
2 /* $Header: bepeorhi.pkb 120.0 2005/05/28 10:38:09 appldev noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Private Global Definitions |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package varchar2(33) := ' ben_peo_ins.'; -- Global package name
9 --
10 -- ----------------------------------------------------------------------------
11 -- |----------------------------< dt_insert_dml >-----------------------------|
12 -- ----------------------------------------------------------------------------
13 -- {Start Of Comments}
14 --
15 -- Description:
16 -- This procedure controls the actual dml insert logic for datetrack. The
17 -- functions of this procedure are as follows:
18 -- 1) Get the object_version_number.
19 -- 2) To set the effective start and end dates to the corresponding
20 -- validation start and end dates. Also, the object version number
21 -- record attribute is set.
22 -- 3) To set and unset the g_api_dml status as required (as we are about to
23 -- perform dml).
24 -- 4) To insert the row into the schema with the derived effective start
25 -- and end dates and the object version number.
26 -- 5) To trap any constraint violations that may have occurred.
27 -- 6) To raise any other errors.
28 --
29 -- Prerequisites:
30 -- This is an internal private procedure which must be called from the
31 -- insert_dml and pre_update (logic permitting) procedure and must have
32 -- all mandatory arguments set.
33 --
34 -- In Parameters:
35 -- A Pl/Sql record structre.
36 --
37 -- Post Success:
38 -- The specified row will be inserted into the schema.
39 --
40 -- Post Failure:
41 -- On the insert dml failure it is important to note that we always reset the
42 -- g_api_dml status to false.
43 -- If a check or unique integrity constraint violation is raised the
44 -- constraint_error procedure will be called.
45 -- If any other error is reported, the error will be raised after the
46 -- g_api_dml status is reset.
47 --
48 -- Developer Implementation Notes:
49 -- This is an internal datetrack maintenance procedure which should
50 -- not be modified in anyway.
51 --
52 -- Access Status:
53 -- Internal Row Handler Use Only.
54 --
55 -- {End Of Comments}
56 -- ----------------------------------------------------------------------------
57 Procedure dt_insert_dml
58 (p_rec in out nocopy ben_peo_shd.g_rec_type,
59 p_effective_date in date,
60 p_datetrack_mode in varchar2,
61 p_validation_start_date in date,
62 p_validation_end_date in date) is
63 --
64 -- Cursor to select 'old' created AOL who column values
65 --
66 Cursor C_Sel1 Is
67 select t.created_by,
68 t.creation_date
69 from ben_elig_to_prte_rsn_f t
70 where t.elig_to_prte_rsn_id = p_rec.elig_to_prte_rsn_id
71 and t.effective_start_date =
72 ben_peo_shd.g_old_rec.effective_start_date
73 and t.effective_end_date = (p_validation_start_date - 1);
74 --
75 l_proc varchar2(72) := g_package||'dt_insert_dml';
76 l_created_by ben_elig_to_prte_rsn_f.created_by%TYPE;
77 l_creation_date ben_elig_to_prte_rsn_f.creation_date%TYPE;
78 l_last_update_date ben_elig_to_prte_rsn_f.last_update_date%TYPE;
79 l_last_updated_by ben_elig_to_prte_rsn_f.last_updated_by%TYPE;
80 l_last_update_login ben_elig_to_prte_rsn_f.last_update_login%TYPE;
81 --
82 Begin
83 hr_utility.set_location('Entering:'||l_proc, 5);
84 --
85 -- Get the object version number for the insert
86 --
87 p_rec.object_version_number :=
88 dt_api.get_object_version_number
89 (p_base_table_name => 'ben_elig_to_prte_rsn_f',
90 p_base_key_column => 'elig_to_prte_rsn_id',
91 p_base_key_value => p_rec.elig_to_prte_rsn_id);
92 --
93 -- Set the effective start and end dates to the corresponding
94 -- validation start and end dates
95 --
96 p_rec.effective_start_date := p_validation_start_date;
97 p_rec.effective_end_date := p_validation_end_date;
98 --
99 -- If the datetrack_mode is not INSERT then we must populate the WHO
100 -- columns with the 'old' creation values and 'new' updated values.
101 --
102 If (p_datetrack_mode <> 'INSERT') then
103 hr_utility.set_location(l_proc, 10);
104 --
105 -- Select the 'old' created values
106 --
107 Open C_Sel1;
108 Fetch C_Sel1 Into l_created_by, l_creation_date;
109 If C_Sel1%notfound Then
110 --
111 -- The previous 'old' created row has not been found. We need
112 -- to error as an internal datetrack problem exists.
113 --
114 Close C_Sel1;
115 hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
116 hr_utility.set_message_token('PROCEDURE', l_proc);
117 hr_utility.set_message_token('STEP','10');
118 hr_utility.raise_error;
119 End If;
120 Close C_Sel1;
121 --
122 -- Set the AOL updated WHO values
123 --
124 l_last_update_date := sysdate;
125 l_last_updated_by := fnd_global.user_id;
126 l_last_update_login := fnd_global.login_id;
127 End If;
128 --
129 ben_peo_shd.g_api_dml := true; -- Set the api dml status
130 --
131 -- Insert the row into: ben_elig_to_prte_rsn_f
132 --
133 insert into ben_elig_to_prte_rsn_f
134 ( elig_to_prte_rsn_id,
135 effective_start_date,
136 effective_end_date,
137 business_group_id,
138 ler_id,
139 oipl_id,
140 pgm_id,
141 pl_id,
142 ptip_id,
143 plip_id,
144 ignr_prtn_ovrid_flag,
145 elig_inelig_cd,
146 prtn_eff_strt_dt_cd,
147 prtn_eff_strt_dt_rl,
148 prtn_eff_end_dt_cd,
149 prtn_eff_end_dt_rl,
150 wait_perd_dt_to_use_cd,
151 wait_perd_dt_to_use_rl,
152 wait_perd_val,
153 wait_perd_uom,
154 wait_perd_rl,
155 mx_poe_det_dt_cd,
156 mx_poe_det_dt_rl,
157 mx_poe_val,
158 mx_poe_uom,
159 mx_poe_rl,
160 mx_poe_apls_cd,
161 prtn_ovridbl_flag,
162 vrfy_fmly_mmbr_cd,
163 vrfy_fmly_mmbr_rl,
164 peo_attribute_category,
165 peo_attribute1,
166 peo_attribute2,
167 peo_attribute3,
168 peo_attribute4,
169 peo_attribute5,
170 peo_attribute6,
171 peo_attribute7,
172 peo_attribute8,
173 peo_attribute9,
174 peo_attribute10,
175 peo_attribute11,
176 peo_attribute12,
177 peo_attribute13,
178 peo_attribute14,
179 peo_attribute15,
180 peo_attribute16,
181 peo_attribute17,
182 peo_attribute18,
183 peo_attribute19,
184 peo_attribute20,
185 peo_attribute21,
186 peo_attribute22,
187 peo_attribute23,
188 peo_attribute24,
189 peo_attribute25,
190 peo_attribute26,
191 peo_attribute27,
192 peo_attribute28,
193 peo_attribute29,
194 peo_attribute30,
195 object_version_number,
196 created_by,
197 creation_date,
198 last_update_date,
199 last_updated_by,
200 last_update_login
201 )
202 Values
203 ( p_rec.elig_to_prte_rsn_id,
204 p_rec.effective_start_date,
205 p_rec.effective_end_date,
206 p_rec.business_group_id,
207 p_rec.ler_id,
208 p_rec.oipl_id,
209 p_rec.pgm_id,
210 p_rec.pl_id,
211 p_rec.ptip_id,
212 p_rec.plip_id,
213 p_rec.ignr_prtn_ovrid_flag,
214 p_rec.elig_inelig_cd,
215 p_rec.prtn_eff_strt_dt_cd,
216 p_rec.prtn_eff_strt_dt_rl,
217 p_rec.prtn_eff_end_dt_cd,
218 p_rec.prtn_eff_end_dt_rl,
219 p_rec.wait_perd_dt_to_use_cd,
220 p_rec.wait_perd_dt_to_use_rl,
221 p_rec.wait_perd_val,
222 p_rec.wait_perd_uom,
223 p_rec.wait_perd_rl,
224 p_rec.mx_poe_det_dt_cd,
225 p_rec.mx_poe_det_dt_rl,
226 p_rec.mx_poe_val,
227 p_rec.mx_poe_uom,
228 p_rec.mx_poe_rl,
229 p_rec.mx_poe_apls_cd,
230 p_rec.prtn_ovridbl_flag,
231 p_rec.vrfy_fmly_mmbr_cd,
232 p_rec.vrfy_fmly_mmbr_rl,
233 p_rec.peo_attribute_category,
234 p_rec.peo_attribute1,
235 p_rec.peo_attribute2,
236 p_rec.peo_attribute3,
237 p_rec.peo_attribute4,
238 p_rec.peo_attribute5,
239 p_rec.peo_attribute6,
240 p_rec.peo_attribute7,
241 p_rec.peo_attribute8,
242 p_rec.peo_attribute9,
243 p_rec.peo_attribute10,
244 p_rec.peo_attribute11,
245 p_rec.peo_attribute12,
246 p_rec.peo_attribute13,
247 p_rec.peo_attribute14,
248 p_rec.peo_attribute15,
249 p_rec.peo_attribute16,
250 p_rec.peo_attribute17,
251 p_rec.peo_attribute18,
252 p_rec.peo_attribute19,
253 p_rec.peo_attribute20,
254 p_rec.peo_attribute21,
255 p_rec.peo_attribute22,
256 p_rec.peo_attribute23,
257 p_rec.peo_attribute24,
258 p_rec.peo_attribute25,
259 p_rec.peo_attribute26,
260 p_rec.peo_attribute27,
261 p_rec.peo_attribute28,
262 p_rec.peo_attribute29,
263 p_rec.peo_attribute30,
264 p_rec.object_version_number,
265 l_created_by,
266 l_creation_date,
267 l_last_update_date,
268 l_last_updated_by,
269 l_last_update_login
270 );
271 --
272 ben_peo_shd.g_api_dml := false; -- Unset the api dml status
273 hr_utility.set_location(' Leaving:'||l_proc, 15);
274 --
275 Exception
276 When hr_api.check_integrity_violated Then
277 -- A check constraint has been violated
278 ben_peo_shd.g_api_dml := false; -- Unset the api dml status
279 ben_peo_shd.constraint_error
280 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
281 When hr_api.unique_integrity_violated Then
282 -- Unique integrity has been violated
283 ben_peo_shd.g_api_dml := false; -- Unset the api dml status
284 ben_peo_shd.constraint_error
285 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
286 When Others Then
287 ben_peo_shd.g_api_dml := false; -- Unset the api dml status
288 Raise;
289 End dt_insert_dml;
290 --
291 -- ----------------------------------------------------------------------------
292 -- |------------------------------< insert_dml >------------------------------|
293 -- ----------------------------------------------------------------------------
294 Procedure insert_dml
295 (p_rec in out nocopy ben_peo_shd.g_rec_type,
296 p_effective_date in date,
297 p_datetrack_mode in varchar2,
298 p_validation_start_date in date,
299 p_validation_end_date in date) is
300 --
301 l_proc varchar2(72) := g_package||'insert_dml';
302 --
303 Begin
304 hr_utility.set_location('Entering:'||l_proc, 5);
305 --
306 dt_insert_dml(p_rec => p_rec,
307 p_effective_date => p_effective_date,
308 p_datetrack_mode => p_datetrack_mode,
309 p_validation_start_date => p_validation_start_date,
310 p_validation_end_date => p_validation_end_date);
311 --
312 hr_utility.set_location(' Leaving:'||l_proc, 10);
313 End insert_dml;
314 --
315 -- ----------------------------------------------------------------------------
316 -- |------------------------------< pre_insert >------------------------------|
317 -- ----------------------------------------------------------------------------
318 -- {Start Of Comments}
319 --
320 -- Description:
321 -- This private procedure contains any processing which is required before
322 -- the insert dml. Presently, if the entity has a corresponding primary
323 -- key which is maintained by an associating sequence, the primary key for
324 -- the entity will be populated with the next sequence value in
325 -- preparation for the insert dml.
326 -- Also, if comments are defined for this entity, the comments insert
327 -- logic will also be called, generating a comment_id if required.
328 --
329 -- Prerequisites:
330 -- This is an internal procedure which is called from the ins procedure.
331 --
332 -- In Parameters:
333 -- A Pl/Sql record structre.
334 --
335 -- Post Success:
336 -- Processing continues.
337 --
338 -- Post Failure:
339 -- If an error has occurred, an error message and exception will be raised
340 -- but not handled.
341 --
342 -- Developer Implementation Notes:
343 -- Any pre-processing required before the insert dml is issued should be
344 -- coded within this procedure. As stated above, a good example is the
345 -- generation of a primary key number via a corresponding sequence.
346 -- It is important to note that any 3rd party maintenance should be reviewed
347 -- before placing in this procedure.
348 --
349 -- Access Status:
350 -- Internal Row Handler Use Only.
351 --
352 -- {End Of Comments}
353 -- ----------------------------------------------------------------------------
354 Procedure pre_insert
355 (p_rec in out nocopy ben_peo_shd.g_rec_type,
356 p_effective_date in date,
357 p_datetrack_mode in varchar2,
358 p_validation_start_date in date,
359 p_validation_end_date in date) is
360 --
361 l_proc varchar2(72) := g_package||'pre_insert';
362 --
363 Cursor C_Sel1 is select ben_elig_to_prte_rsn_f_s.nextval from sys.dual;
364 --
365 Begin
366 hr_utility.set_location('Entering:'||l_proc, 5);
367 --
368 -- Select the next sequence number
369 --
370 Open C_Sel1;
371 Fetch C_Sel1 Into p_rec.elig_to_prte_rsn_id;
372 Close C_Sel1;
373 --
374 hr_utility.set_location(' Leaving:'||l_proc, 10);
375 End pre_insert;
376 --
377 -- ----------------------------------------------------------------------------
378 -- |-----------------------------< post_insert >------------------------------|
379 -- ----------------------------------------------------------------------------
380 -- {Start Of Comments}
381 --
382 -- Description:
383 -- This private procedure contains any processing which is required after the
384 -- insert dml.
385 --
386 -- Prerequisites:
387 -- This is an internal procedure which is called from the ins procedure.
388 --
389 -- In Parameters:
390 -- A Pl/Sql record structre.
391 --
392 -- Post Success:
393 -- Processing continues.
394 --
395 -- Post Failure:
396 -- If an error has occurred, an error message and exception will be raised
397 -- but not handled.
398 --
399 -- Developer Implementation Notes:
400 -- Any post-processing required after the insert dml is issued should be
401 -- coded within this procedure. It is important to note that any 3rd party
402 -- maintenance should be reviewed before placing in this procedure.
403 --
404 -- Access Status:
405 -- Internal Row Handler Use Only.
406 --
407 -- {End Of Comments}
408 -- ----------------------------------------------------------------------------
409 Procedure post_insert
410 (p_rec in ben_peo_shd.g_rec_type,
411 p_effective_date in date,
412 p_datetrack_mode in varchar2,
413 p_validation_start_date in date,
414 p_validation_end_date in date) is
415 --
416 l_proc varchar2(72) := g_package||'post_insert';
417 --
418 Begin
419 hr_utility.set_location('Entering:'||l_proc, 5);
420 --
421 -- Start of API User Hook for post_insert.
422 --
423 begin
424 --
425 ben_peo_rki.after_insert
426 (
427 p_elig_to_prte_rsn_id => p_rec.elig_to_prte_rsn_id
428 ,p_effective_start_date => p_rec.effective_start_date
429 ,p_effective_end_date => p_rec.effective_end_date
430 ,p_business_group_id => p_rec.business_group_id
431 ,p_ler_id => p_rec.ler_id
432 ,p_oipl_id => p_rec.oipl_id
433 ,p_pgm_id => p_rec.pgm_id
437 ,p_ignr_prtn_ovrid_flag => p_rec.ignr_prtn_ovrid_flag
434 ,p_pl_id => p_rec.pl_id
435 ,p_ptip_id => p_rec.ptip_id
436 ,p_plip_id => p_rec.plip_id
438 ,p_elig_inelig_cd => p_rec.elig_inelig_cd
439 ,p_prtn_eff_strt_dt_cd => p_rec.prtn_eff_strt_dt_cd
440 ,p_prtn_eff_strt_dt_rl => p_rec.prtn_eff_strt_dt_rl
441 ,p_prtn_eff_end_dt_cd => p_rec.prtn_eff_end_dt_cd
442 ,p_prtn_eff_end_dt_rl => p_rec.prtn_eff_end_dt_rl
443 ,p_wait_perd_dt_to_use_cd => p_rec.wait_perd_dt_to_use_cd
444 ,p_wait_perd_dt_to_use_rl => p_rec.wait_perd_dt_to_use_rl
445 ,p_wait_perd_val => p_rec.wait_perd_val
446 ,p_wait_perd_uom => p_rec.wait_perd_uom
447 ,p_wait_perd_rl => p_rec.wait_perd_rl
448 ,p_mx_poe_det_dt_cd => p_rec.mx_poe_det_dt_cd
449 ,p_mx_poe_det_dt_rl => p_rec.mx_poe_det_dt_rl
450 ,p_mx_poe_val => p_rec.mx_poe_val
451 ,p_mx_poe_uom => p_rec.mx_poe_uom
452 ,p_mx_poe_rl => p_rec.mx_poe_rl
453 ,p_mx_poe_apls_cd => p_rec.mx_poe_apls_cd
454 ,p_prtn_ovridbl_flag => p_rec.prtn_ovridbl_flag
455 ,p_vrfy_fmly_mmbr_cd => p_rec.vrfy_fmly_mmbr_cd
456 ,p_vrfy_fmly_mmbr_rl => p_rec.vrfy_fmly_mmbr_rl
457 ,p_peo_attribute_category => p_rec.peo_attribute_category
458 ,p_peo_attribute1 => p_rec.peo_attribute1
459 ,p_peo_attribute2 => p_rec.peo_attribute2
460 ,p_peo_attribute3 => p_rec.peo_attribute3
461 ,p_peo_attribute4 => p_rec.peo_attribute4
462 ,p_peo_attribute5 => p_rec.peo_attribute5
463 ,p_peo_attribute6 => p_rec.peo_attribute6
464 ,p_peo_attribute7 => p_rec.peo_attribute7
465 ,p_peo_attribute8 => p_rec.peo_attribute8
466 ,p_peo_attribute9 => p_rec.peo_attribute9
467 ,p_peo_attribute10 => p_rec.peo_attribute10
468 ,p_peo_attribute11 => p_rec.peo_attribute11
469 ,p_peo_attribute12 => p_rec.peo_attribute12
470 ,p_peo_attribute13 => p_rec.peo_attribute13
471 ,p_peo_attribute14 => p_rec.peo_attribute14
472 ,p_peo_attribute15 => p_rec.peo_attribute15
473 ,p_peo_attribute16 => p_rec.peo_attribute16
474 ,p_peo_attribute17 => p_rec.peo_attribute17
475 ,p_peo_attribute18 => p_rec.peo_attribute18
476 ,p_peo_attribute19 => p_rec.peo_attribute19
477 ,p_peo_attribute20 => p_rec.peo_attribute20
478 ,p_peo_attribute21 => p_rec.peo_attribute21
479 ,p_peo_attribute22 => p_rec.peo_attribute22
480 ,p_peo_attribute23 => p_rec.peo_attribute23
481 ,p_peo_attribute24 => p_rec.peo_attribute24
482 ,p_peo_attribute25 => p_rec.peo_attribute25
483 ,p_peo_attribute26 => p_rec.peo_attribute26
484 ,p_peo_attribute27 => p_rec.peo_attribute27
485 ,p_peo_attribute28 => p_rec.peo_attribute28
486 ,p_peo_attribute29 => p_rec.peo_attribute29
487 ,p_peo_attribute30 => p_rec.peo_attribute30
488 ,p_object_version_number => p_rec.object_version_number
489 ,p_effective_date => p_effective_date
490 ,p_validation_start_date => p_validation_start_date
491 ,p_validation_end_date => p_validation_end_date
492 );
493 --
494 exception
495 --
496 when hr_api.cannot_find_prog_unit then
497 --
498 hr_api.cannot_find_prog_unit_error
499 (p_module_name => 'ben_elig_to_prte_rsn_f'
500 ,p_hook_type => 'AI');
501 --
502 end;
503 --
504 -- End of API User Hook for post_insert.
505 --
506 hr_utility.set_location(' Leaving:'||l_proc, 10);
507 End post_insert;
508 --
509 -- ----------------------------------------------------------------------------
510 -- |-------------------------------< ins_lck >--------------------------------|
511 -- ----------------------------------------------------------------------------
512 -- {Start Of Comments}
513 --
514 -- Description:
515 -- The ins_lck process has one main function to perform. When inserting
516 -- a datetracked row, we must validate the DT mode.
517 -- be manipulated.
518 --
519 -- Prerequisites:
520 -- This procedure can only be called for the datetrack mode of INSERT.
521 --
522 -- In Parameters:
523 --
524 -- Post Success:
525 -- On successful completion of the ins_lck process the parental
526 -- datetracked rows will be locked providing the p_enforce_foreign_locking
527 -- argument value is TRUE.
528 -- If the p_enforce_foreign_locking argument value is FALSE then the
529 -- parential rows are not locked.
530 --
531 -- Post Failure:
532 -- The Lck process can fail for:
533 -- 1) When attempting to lock the row the row could already be locked by
534 -- another user. This will raise the HR_Api.Object_Locked exception.
535 -- 2) When attempting to the lock the parent which doesn't exist.
539 -- None.
536 -- For the entity to be locked the parent must exist!
537 --
538 -- Developer Implementation Notes:
540 --
541 -- Access Status:
542 -- Internal Row Handler Use Only.
543 --
544 -- {End Of Comments}
545 -- ----------------------------------------------------------------------------
546 Procedure ins_lck
547 (p_effective_date in date,
548 p_datetrack_mode in varchar2,
549 p_rec in ben_peo_shd.g_rec_type,
550 p_validation_start_date out nocopy date,
551 p_validation_end_date out nocopy date) is
552 --
553 l_proc varchar2(72) := g_package||'ins_lck';
554 l_validation_start_date date;
555 l_validation_end_date date;
556 --
557 Begin
558 hr_utility.set_location('Entering:'||l_proc, 5);
559 --
560 -- Validate the datetrack mode mode getting the validation start
561 -- and end dates for the specified datetrack operation.
562 --
563 dt_api.validate_dt_mode
564 (p_effective_date => p_effective_date,
565 p_datetrack_mode => p_datetrack_mode,
566 p_base_table_name => 'ben_elig_to_prte_rsn_f',
567 p_base_key_column => 'elig_to_prte_rsn_id',
568 p_base_key_value => p_rec.elig_to_prte_rsn_id,
569 p_parent_table_name1 => 'ben_oipl_f',
570 p_parent_key_column1 => 'oipl_id',
571 p_parent_key_value1 => p_rec.oipl_id,
572 p_parent_table_name2 => 'ben_ler_f',
573 p_parent_key_column2 => 'ler_id',
574 p_parent_key_value2 => p_rec.ler_id,
575 p_parent_table_name3 => 'ben_pl_f',
576 p_parent_key_column3 => 'pl_id',
577 p_parent_key_value3 => p_rec.pl_id,
578 p_parent_table_name4 => 'ben_pgm_f',
579 p_parent_key_column4 => 'pgm_id',
580 p_parent_key_value4 => p_rec.pgm_id,
581 p_parent_table_name5 => 'ben_ptip_f',
582 p_parent_key_column5 => 'ptip_id',
583 p_parent_key_value5 => p_rec.ptip_id,
584 p_parent_table_name6 => 'ben_plip_f',
585 p_parent_key_column6 => 'plip_id',
586 p_parent_key_value6 => p_rec.plip_id,
587 p_enforce_foreign_locking => true,
588 p_validation_start_date => l_validation_start_date,
589 p_validation_end_date => l_validation_end_date);
590 --
591 -- Set the validation start and end date OUT arguments
592 --
593 p_validation_start_date := l_validation_start_date;
594 p_validation_end_date := l_validation_end_date;
595 --
596 hr_utility.set_location(' Leaving:'||l_proc, 10);
597 --
598 End ins_lck;
599 --
600 -- ----------------------------------------------------------------------------
601 -- |---------------------------------< ins >----------------------------------|
602 -- ----------------------------------------------------------------------------
603 Procedure ins
604 (
605 p_rec in out nocopy ben_peo_shd.g_rec_type,
606 p_effective_date in date
607 ) is
608 --
609 l_proc varchar2(72) := g_package||'ins';
610 l_datetrack_mode varchar2(30) := 'INSERT';
611 l_validation_start_date date;
612 l_validation_end_date date;
613 --
614 Begin
615 hr_utility.set_location('Entering:'||l_proc, 5);
616 --
617 -- Call the lock operation
618 --
619 ins_lck
620 (p_effective_date => p_effective_date,
621 p_datetrack_mode => l_datetrack_mode,
622 p_rec => p_rec,
623 p_validation_start_date => l_validation_start_date,
624 p_validation_end_date => l_validation_end_date);
625 --
626 -- Call the supporting insert validate operations
627 --
628 ben_peo_bus.insert_validate
629 (p_rec => p_rec,
630 p_effective_date => p_effective_date,
631 p_datetrack_mode => l_datetrack_mode,
632 p_validation_start_date => l_validation_start_date,
633 p_validation_end_date => l_validation_end_date);
634 --
635 -- Call the supporting pre-insert operation
636 --
637 pre_insert
638 (p_rec => p_rec,
639 p_effective_date => p_effective_date,
640 p_datetrack_mode => l_datetrack_mode,
641 p_validation_start_date => l_validation_start_date,
642 p_validation_end_date => l_validation_end_date);
643 --
644 -- Insert the row
645 --
646 insert_dml
647 (p_rec => p_rec,
648 p_effective_date => p_effective_date,
649 p_datetrack_mode => l_datetrack_mode,
650 p_validation_start_date => l_validation_start_date,
651 p_validation_end_date => l_validation_end_date);
652 --
653 -- Call the supporting post-insert operation
654 --
655 post_insert
656 (p_rec => p_rec,
657 p_effective_date => p_effective_date,
658 p_datetrack_mode => l_datetrack_mode,
659 p_validation_start_date => l_validation_start_date,
660 p_validation_end_date => l_validation_end_date);
661 end ins;
662 --
663 -- ----------------------------------------------------------------------------
664 -- |---------------------------------< ins >----------------------------------|
665 -- ----------------------------------------------------------------------------
666 Procedure ins
667 (
668 p_elig_to_prte_rsn_id out nocopy number,
669 p_effective_start_date out nocopy date,
670 p_effective_end_date out nocopy date,
674 p_pgm_id in number default null,
671 p_business_group_id in number,
672 p_ler_id in number,
673 p_oipl_id in number default null,
675 p_pl_id in number default null,
676 p_ptip_id in number default null,
677 p_plip_id in number default null,
678 p_ignr_prtn_ovrid_flag in varchar2 default null,
679 p_elig_inelig_cd in varchar2,
680 p_prtn_eff_strt_dt_cd in varchar2 default null,
681 p_prtn_eff_strt_dt_rl in number default null,
682 p_prtn_eff_end_dt_cd in varchar2 default null,
683 p_prtn_eff_end_dt_rl in number default null,
684 p_wait_perd_dt_to_use_cd in varchar2 default null,
685 p_wait_perd_dt_to_use_rl in number default null,
686 p_wait_perd_val in number default null,
687 p_wait_perd_uom in varchar2 default null,
688 p_wait_perd_rl in number default null,
689 p_mx_poe_det_dt_cd in varchar2 default null,
690 p_mx_poe_det_dt_rl in number default null,
691 p_mx_poe_val in number default null,
692 p_mx_poe_uom in varchar2 default null,
693 p_mx_poe_rl in number default null,
694 p_mx_poe_apls_cd in varchar2 default null,
695 p_prtn_ovridbl_flag in varchar2 default null,
696 p_vrfy_fmly_mmbr_cd in varchar2 default null,
697 p_vrfy_fmly_mmbr_rl in number default null,
698 p_peo_attribute_category in varchar2 default null,
699 p_peo_attribute1 in varchar2 default null,
700 p_peo_attribute2 in varchar2 default null,
701 p_peo_attribute3 in varchar2 default null,
702 p_peo_attribute4 in varchar2 default null,
703 p_peo_attribute5 in varchar2 default null,
704 p_peo_attribute6 in varchar2 default null,
705 p_peo_attribute7 in varchar2 default null,
706 p_peo_attribute8 in varchar2 default null,
707 p_peo_attribute9 in varchar2 default null,
708 p_peo_attribute10 in varchar2 default null,
709 p_peo_attribute11 in varchar2 default null,
710 p_peo_attribute12 in varchar2 default null,
711 p_peo_attribute13 in varchar2 default null,
712 p_peo_attribute14 in varchar2 default null,
713 p_peo_attribute15 in varchar2 default null,
714 p_peo_attribute16 in varchar2 default null,
715 p_peo_attribute17 in varchar2 default null,
716 p_peo_attribute18 in varchar2 default null,
717 p_peo_attribute19 in varchar2 default null,
718 p_peo_attribute20 in varchar2 default null,
719 p_peo_attribute21 in varchar2 default null,
720 p_peo_attribute22 in varchar2 default null,
721 p_peo_attribute23 in varchar2 default null,
722 p_peo_attribute24 in varchar2 default null,
723 p_peo_attribute25 in varchar2 default null,
724 p_peo_attribute26 in varchar2 default null,
725 p_peo_attribute27 in varchar2 default null,
726 p_peo_attribute28 in varchar2 default null,
727 p_peo_attribute29 in varchar2 default null,
728 p_peo_attribute30 in varchar2 default null,
729 p_object_version_number out nocopy number,
730 p_effective_date in date
731 ) is
732 --
733 l_rec ben_peo_shd.g_rec_type;
734 l_proc varchar2(72) := g_package||'ins';
735 --
736 Begin
737 hr_utility.set_location('Entering:'||l_proc, 5);
738 --
739 -- Call conversion function to turn arguments into the
740 -- p_rec structure.
741 --
742 l_rec :=
743 ben_peo_shd.convert_args
744 (
745 null,
746 null,
747 null,
748 p_business_group_id,
749 p_ler_id,
750 p_oipl_id,
751 p_pgm_id,
752 p_pl_id,
753 p_ptip_id,
754 p_plip_id,
755 p_ignr_prtn_ovrid_flag,
756 p_elig_inelig_cd,
757 p_prtn_eff_strt_dt_cd,
758 p_prtn_eff_strt_dt_rl,
759 p_prtn_eff_end_dt_cd,
760 p_prtn_eff_end_dt_rl,
761 p_wait_perd_dt_to_use_cd,
762 p_wait_perd_dt_to_use_rl,
763 p_wait_perd_val,
764 p_wait_perd_uom,
765 p_wait_perd_rl,
766 p_mx_poe_det_dt_cd,
767 p_mx_poe_det_dt_rl,
768 p_mx_poe_val,
769 p_mx_poe_uom,
770 p_mx_poe_rl,
771 p_mx_poe_apls_cd,
772 p_prtn_ovridbl_flag,
773 p_vrfy_fmly_mmbr_cd,
774 p_vrfy_fmly_mmbr_rl,
775 p_peo_attribute_category,
776 p_peo_attribute1,
777 p_peo_attribute2,
778 p_peo_attribute3,
779 p_peo_attribute4,
780 p_peo_attribute5,
781 p_peo_attribute6,
782 p_peo_attribute7,
783 p_peo_attribute8,
784 p_peo_attribute9,
785 p_peo_attribute10,
786 p_peo_attribute11,
787 p_peo_attribute12,
788 p_peo_attribute13,
789 p_peo_attribute14,
790 p_peo_attribute15,
791 p_peo_attribute16,
792 p_peo_attribute17,
793 p_peo_attribute18,
794 p_peo_attribute19,
795 p_peo_attribute20,
796 p_peo_attribute21,
797 p_peo_attribute22,
798 p_peo_attribute23,
799 p_peo_attribute24,
800 p_peo_attribute25,
801 p_peo_attribute26,
802 p_peo_attribute27,
803 p_peo_attribute28,
804 p_peo_attribute29,
805 p_peo_attribute30,
806 null
807 );
808 --
809 -- Having converted the arguments into the ben_peo_rec
810 -- plsql record structure we call the corresponding record
811 -- business process.
812 --
813 ins(l_rec, p_effective_date);
814 --
815 -- Set the OUT arguments.
816 --
817 p_elig_to_prte_rsn_id := l_rec.elig_to_prte_rsn_id;
818 p_effective_start_date := l_rec.effective_start_date;
819 p_effective_end_date := l_rec.effective_end_date;
820 p_object_version_number := l_rec.object_version_number;
821 --
822 --
823 hr_utility.set_location(' Leaving:'||l_proc, 10);
824 End ins;
825 --
826 end ben_peo_ins;