[Home] [Help]
PACKAGE BODY: APPS.BEN_PDP_INS
Source
1 Package Body ben_pdp_ins as
2 /* $Header: bepdprhi.pkb 120.13 2008/02/22 16:27:41 rtagarra noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Private Global Definitions |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package varchar2(33) := ' ben_pdp_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_pdp_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_cvrd_dpnt_f t
70 where t.elig_cvrd_dpnt_id = p_rec.elig_cvrd_dpnt_id
71 and t.effective_start_date =
72 ben_pdp_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_cvrd_dpnt_f.created_by%TYPE;
77 l_creation_date ben_elig_cvrd_dpnt_f.creation_date%TYPE;
78 l_last_update_date ben_elig_cvrd_dpnt_f.last_update_date%TYPE;
79 l_last_updated_by ben_elig_cvrd_dpnt_f.last_updated_by%TYPE;
80 l_last_update_login ben_elig_cvrd_dpnt_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_cvrd_dpnt_f',
90 p_base_key_column => 'elig_cvrd_dpnt_id',
91 p_base_key_value => p_rec.elig_cvrd_dpnt_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 fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
116 fnd_message.set_token('PROCEDURE', l_proc);
117 fnd_message.set_token('STEP','10');
118 fnd_message.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_pdp_shd.g_api_dml := true; -- Set the api dml status
130 --
131 -- Insert the row into: ben_elig_cvrd_dpnt_f
132 --
133 insert into ben_elig_cvrd_dpnt_f
134 ( elig_cvrd_dpnt_id,
135 effective_start_date,
136 effective_end_date,
137 business_group_id,
138 prtt_enrt_rslt_id,
139 dpnt_person_id,
140 cvg_strt_dt,
141 cvg_thru_dt,
142 cvg_pndg_flag,
143 pdp_attribute_category,
144 pdp_attribute1,
145 pdp_attribute2,
146 pdp_attribute3,
147 pdp_attribute4,
148 pdp_attribute5,
149 pdp_attribute6,
150 pdp_attribute7,
151 pdp_attribute8,
152 pdp_attribute9,
153 pdp_attribute10,
154 pdp_attribute11,
155 pdp_attribute12,
156 pdp_attribute13,
157 pdp_attribute14,
158 pdp_attribute15,
159 pdp_attribute16,
160 pdp_attribute17,
161 pdp_attribute18,
162 pdp_attribute19,
163 pdp_attribute20,
164 pdp_attribute21,
165 pdp_attribute22,
166 pdp_attribute23,
167 pdp_attribute24,
168 pdp_attribute25,
169 pdp_attribute26,
170 pdp_attribute27,
171 pdp_attribute28,
172 pdp_attribute29,
173 pdp_attribute30,
174 request_id,
175 program_application_id,
176 program_id,
177 program_update_date,
178 object_version_number,
179 ovrdn_flag,
180 per_in_ler_id,
181 ovrdn_thru_dt,
182 created_by,
183 creation_date,
184 last_update_date,
185 last_updated_by,
186 last_update_login
187 )
188 Values
189 ( p_rec.elig_cvrd_dpnt_id,
190 p_rec.effective_start_date,
191 p_rec.effective_end_date,
192 p_rec.business_group_id,
193 p_rec.prtt_enrt_rslt_id,
194 p_rec.dpnt_person_id,
195 p_rec.cvg_strt_dt,
196 p_rec.cvg_thru_dt,
197 p_rec.cvg_pndg_flag,
198 p_rec.pdp_attribute_category,
199 p_rec.pdp_attribute1,
200 p_rec.pdp_attribute2,
201 p_rec.pdp_attribute3,
202 p_rec.pdp_attribute4,
203 p_rec.pdp_attribute5,
204 p_rec.pdp_attribute6,
205 p_rec.pdp_attribute7,
206 p_rec.pdp_attribute8,
207 p_rec.pdp_attribute9,
208 p_rec.pdp_attribute10,
209 p_rec.pdp_attribute11,
210 p_rec.pdp_attribute12,
211 p_rec.pdp_attribute13,
212 p_rec.pdp_attribute14,
213 p_rec.pdp_attribute15,
214 p_rec.pdp_attribute16,
215 p_rec.pdp_attribute17,
216 p_rec.pdp_attribute18,
217 p_rec.pdp_attribute19,
218 p_rec.pdp_attribute20,
219 p_rec.pdp_attribute21,
220 p_rec.pdp_attribute22,
221 p_rec.pdp_attribute23,
222 p_rec.pdp_attribute24,
223 p_rec.pdp_attribute25,
224 p_rec.pdp_attribute26,
225 p_rec.pdp_attribute27,
226 p_rec.pdp_attribute28,
227 p_rec.pdp_attribute29,
228 p_rec.pdp_attribute30,
229 p_rec.request_id,
230 p_rec.program_application_id,
231 p_rec.program_id,
232 p_rec.program_update_date,
233 p_rec.object_version_number,
234 p_rec.ovrdn_flag,
235 p_rec.per_in_ler_id,
236 p_rec.ovrdn_thru_dt
237 , l_created_by,
238 l_creation_date,
239 l_last_update_date,
240 l_last_updated_by,
241 l_last_update_login
242 );
243 --
244 ben_pdp_shd.g_api_dml := false; -- Unset the api dml status
245 hr_utility.set_location(' Leaving:'||l_proc, 15);
246 --
247 Exception
248 When hr_api.check_integrity_violated Then
249 -- A check constraint has been violated
250 ben_pdp_shd.g_api_dml := false; -- Unset the api dml status
251 ben_pdp_shd.constraint_error
252 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
253 When hr_api.unique_integrity_violated Then
254 -- Unique integrity has been violated
255 ben_pdp_shd.g_api_dml := false; -- Unset the api dml status
256 ben_pdp_shd.constraint_error
257 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
258 When Others Then
259 ben_pdp_shd.g_api_dml := false; -- Unset the api dml status
260 Raise;
261 End dt_insert_dml;
262 --
263 -- ----------------------------------------------------------------------------
264 -- |------------------------------< insert_dml >------------------------------|
265 -- ----------------------------------------------------------------------------
266 Procedure insert_dml
267 (p_rec in out nocopy ben_pdp_shd.g_rec_type,
268 p_effective_date in date,
269 p_datetrack_mode in varchar2,
270 p_validation_start_date in date,
271 p_validation_end_date in date) is
272 --
273 l_proc varchar2(72) := g_package||'insert_dml';
274 --
275 Begin
276 hr_utility.set_location('Entering:'||l_proc, 5);
277 --
278 dt_insert_dml(p_rec => p_rec,
279 p_effective_date => p_effective_date,
280 p_datetrack_mode => p_datetrack_mode,
281 p_validation_start_date => p_validation_start_date,
282 p_validation_end_date => p_validation_end_date);
283 --
284 hr_utility.set_location(' Leaving:'||l_proc, 10);
285 End insert_dml;
286 --
287 -- ----------------------------------------------------------------------------
288 -- |------------------------------< pre_insert >------------------------------|
289 -- ----------------------------------------------------------------------------
290 -- {Start Of Comments}
291 --
292 -- Description:
293 -- This private procedure contains any processing which is required before
294 -- the insert dml. Presently, if the entity has a corresponding primary
295 -- key which is maintained by an associating sequence, the primary key for
296 -- the entity will be populated with the next sequence value in
297 -- preparation for the insert dml.
298 -- Also, if comments are defined for this entity, the comments insert
299 -- logic will also be called, generating a comment_id if required.
300 --
301 -- Prerequisites:
302 -- This is an internal procedure which is called from the ins procedure.
303 --
304 -- In Parameters:
305 -- A Pl/Sql record structre.
306 --
307 -- Post Success:
308 -- Processing continues.
309 --
310 -- Post Failure:
311 -- If an error has occurred, an error message and exception will be raised
312 -- but not handled.
313 --
314 -- Developer Implementation Notes:
315 -- Any pre-processing required before the insert dml is issued should be
316 -- coded within this procedure. As stated above, a good example is the
317 -- generation of a primary key number via a corresponding sequence.
318 -- It is important to note that any 3rd party maintenance should be reviewed
319 -- before placing in this procedure.
320 --
321 -- Access Status:
322 -- Internal Row Handler Use Only.
323 --
324 -- {End Of Comments}
325 -- ----------------------------------------------------------------------------
326 Procedure pre_insert
327 (p_rec in out nocopy ben_pdp_shd.g_rec_type,
328 p_effective_date in date,
329 p_datetrack_mode in varchar2,
330 p_validation_start_date in date,
331 p_validation_end_date in date) is
332 --
333 l_proc varchar2(72) := g_package||'pre_insert';
334 --
335 --
336 cursor c1 is
337 select ben_elig_cvrd_dpnt_f_s.nextval
338 from sys.dual;
339 --
340 --
341 Begin
342 hr_utility.set_location('Entering:'||l_proc, 5);
343 --
344 open c1;
345 fetch c1 into p_rec.elig_cvrd_dpnt_id;
346 close c1;
347 --
348 --
349 hr_utility.set_location(' Leaving:'||l_proc, 10);
350 --
351 End pre_insert;
352 --
353 -- ----------------------------------------------------------------------------
354 -- |-----------------------------< post_insert >------------------------------|
355 -- ----------------------------------------------------------------------------
356 -- {Start Of Comments}
357 --
358 -- Description:
359 -- This private procedure contains any processing which is required after the
360 -- insert dml.
361 --
362 -- Prerequisites:
363 -- This is an internal procedure which is called from the ins procedure.
364 --
365 -- In Parameters:
366 -- A Pl/Sql record structre.
367 --
368 -- Post Success:
369 -- Processing continues.
370 --
371 -- Post Failure:
372 -- If an error has occurred, an error message and exception will be raised
373 -- but not handled.
374 --
375 -- Developer Implementation Notes:
376 -- Any post-processing required after the insert dml is issued should be
377 -- coded within this procedure. It is important to note that any 3rd party
378 -- maintenance should be reviewed before placing in this procedure.
379 --
380 -- Access Status:
381 -- Internal Row Handler Use Only.
382 --
383 -- {End Of Comments}
384 -- ----------------------------------------------------------------------------
385 Procedure post_insert
386 (p_rec in ben_pdp_shd.g_rec_type,
387 p_effective_date in date,
388 p_datetrack_mode in varchar2,
389 p_validation_start_date in date,
390 p_validation_end_date in date) is
391 --
392 l_proc varchar2(72) := g_package||'post_insert';
393 --
394 Begin
395 hr_utility.set_location('Entering:'||l_proc, 5);
396 --
397 --Bug 4390330 fix
398 --
399 ben_dt_trgr_handle.elig_cvrd_dpnt
400 (p_rowid => null
401 ,p_ELIG_CVRD_DPNT_ID => p_rec.ELIG_CVRD_DPNT_ID
402 ,p_dpnt_person_id => p_rec.dpnt_person_id
403 ,p_business_group_id => p_rec.business_group_id
404 ,p_prtt_enrt_rslt_id => p_rec.prtt_enrt_rslt_id
405 ,p_effective_start_date => p_rec.effective_start_date
406 ,p_effective_end_date => p_rec.effective_end_date
407 ,p_cvg_strt_dt => p_rec.cvg_strt_dt
408 ,p_cvg_thru_dt => p_rec.cvg_thru_dt
409 ,p_ovrdn_flag => p_rec.ovrdn_flag
410 ,p_ovrdn_thru_dt => p_rec.ovrdn_thru_dt
411 );
412
413 --
414 -- Bug : 3756863 : Moved here from INSERT_VALIDATE
415 ben_pdp_bus.crt_ordr_warning
416 (p_prtt_enrt_rslt_id => p_rec.prtt_enrt_rslt_id,
417 p_effective_date => p_effective_date,
418 p_business_group_id => p_rec.business_group_id);
419 --
420 --
421 -- Start of API User Hook for post_insert.
422 --
423 begin
424 --
425 ben_pdp_rki.after_insert
426 (
427 p_elig_cvrd_dpnt_id =>p_rec.elig_cvrd_dpnt_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_prtt_enrt_rslt_id =>p_rec.prtt_enrt_rslt_id
432 ,p_dpnt_person_id =>p_rec.dpnt_person_id
433 ,p_cvg_strt_dt =>p_rec.cvg_strt_dt
434 ,p_cvg_thru_dt =>p_rec.cvg_thru_dt
435 ,p_cvg_pndg_flag =>p_rec.cvg_pndg_flag
436 ,p_pdp_attribute_category =>p_rec.pdp_attribute_category
437 ,p_pdp_attribute1 =>p_rec.pdp_attribute1
438 ,p_pdp_attribute2 =>p_rec.pdp_attribute2
439 ,p_pdp_attribute3 =>p_rec.pdp_attribute3
440 ,p_pdp_attribute4 =>p_rec.pdp_attribute4
441 ,p_pdp_attribute5 =>p_rec.pdp_attribute5
442 ,p_pdp_attribute6 =>p_rec.pdp_attribute6
443 ,p_pdp_attribute7 =>p_rec.pdp_attribute7
444 ,p_pdp_attribute8 =>p_rec.pdp_attribute8
445 ,p_pdp_attribute9 =>p_rec.pdp_attribute9
446 ,p_pdp_attribute10 =>p_rec.pdp_attribute10
447 ,p_pdp_attribute11 =>p_rec.pdp_attribute11
448 ,p_pdp_attribute12 =>p_rec.pdp_attribute12
449 ,p_pdp_attribute13 =>p_rec.pdp_attribute13
450 ,p_pdp_attribute14 =>p_rec.pdp_attribute14
451 ,p_pdp_attribute15 =>p_rec.pdp_attribute15
452 ,p_pdp_attribute16 =>p_rec.pdp_attribute16
453 ,p_pdp_attribute17 =>p_rec.pdp_attribute17
454 ,p_pdp_attribute18 =>p_rec.pdp_attribute18
455 ,p_pdp_attribute19 =>p_rec.pdp_attribute19
456 ,p_pdp_attribute20 =>p_rec.pdp_attribute20
457 ,p_pdp_attribute21 =>p_rec.pdp_attribute21
458 ,p_pdp_attribute22 =>p_rec.pdp_attribute22
459 ,p_pdp_attribute23 =>p_rec.pdp_attribute23
460 ,p_pdp_attribute24 =>p_rec.pdp_attribute24
461 ,p_pdp_attribute25 =>p_rec.pdp_attribute25
462 ,p_pdp_attribute26 =>p_rec.pdp_attribute26
463 ,p_pdp_attribute27 =>p_rec.pdp_attribute27
464 ,p_pdp_attribute28 =>p_rec.pdp_attribute28
465 ,p_pdp_attribute29 =>p_rec.pdp_attribute29
466 ,p_pdp_attribute30 =>p_rec.pdp_attribute30
467 ,p_request_id =>p_rec.request_id
468 ,p_program_application_id =>p_rec.program_application_id
469 ,p_program_id =>p_rec.program_id
470 ,p_program_update_date =>p_rec.program_update_date
471 ,p_object_version_number =>p_rec.object_version_number
472 ,p_ovrdn_flag =>p_rec.ovrdn_flag
473 ,p_per_in_ler_id =>p_rec.per_in_ler_id
474 ,p_ovrdn_thru_dt =>p_rec.ovrdn_thru_dt
475 ,p_effective_date =>p_effective_date
476 ,p_validation_start_date =>p_validation_start_date
477 ,p_validation_end_date =>p_validation_end_date
478 );
479 --
480 exception
481 --
482 when hr_api.cannot_find_prog_unit then
483 --
484 hr_api.cannot_find_prog_unit_error
485 (p_module_name => 'ben_elig_cvrd_dpnt_f'
486 ,p_hook_type => 'AI');
487 --
488 end;
489 --
490 -- End of API User Hook for post_insert.
491 --
492 --
493 hr_utility.set_location(' Leaving:'||l_proc, 10);
494 End post_insert;
495 --
496 -- ----------------------------------------------------------------------------
497 -- |-------------------------------< ins_lck >--------------------------------|
498 -- ----------------------------------------------------------------------------
499 -- {Start Of Comments}
500 --
501 -- Description:
502 -- The ins_lck process has one main function to perform. When inserting
503 -- a datetracked row, we must validate the DT mode.
504 -- be manipulated.
505 --
506 -- Prerequisites:
507 -- This procedure can only be called for the datetrack mode of INSERT.
508 --
509 -- In Parameters:
510 --
511 -- Post Success:
512 -- On successful completion of the ins_lck process the parental
513 -- datetracked rows will be locked providing the p_enforce_foreign_locking
514 -- argument value is TRUE.
515 -- If the p_enforce_foreign_locking argument value is FALSE then the
516 -- parential rows are not locked.
517 --
518 -- Post Failure:
519 -- The Lck process can fail for:
520 -- 1) When attempting to lock the row the row could already be locked by
521 -- another user. This will raise the HR_Api.Object_Locked exception.
522 -- 2) When attempting to the lock the parent which doesn't exist.
523 -- For the entity to be locked the parent must exist!
524 --
525 -- Developer Implementation Notes:
526 -- None.
527 --
528 -- Access Status:
529 -- Internal Row Handler Use Only.
530 --
531 -- {End Of Comments}
532 -- ----------------------------------------------------------------------------
533 Procedure ins_lck
534 (p_effective_date in date,
535 p_datetrack_mode in varchar2,
536 p_rec in ben_pdp_shd.g_rec_type,
537 p_validation_start_date out nocopy date,
538 p_validation_end_date out nocopy date) is
539 --
540 l_proc varchar2(72) := g_package||'ins_lck';
541 l_validation_start_date date;
542 l_validation_end_date date;
543 --
544 Begin
545 hr_utility.set_location('Entering:'||l_proc, 5);
546 --
547 -- Validate the datetrack mode mode getting the validation start
548 -- and end dates for the specified datetrack operation.
549 --
550 dt_api.validate_dt_mode
551 (p_effective_date => p_effective_date,
552 p_datetrack_mode => p_datetrack_mode,
553 p_base_table_name => 'ben_elig_cvrd_dpnt_f',
554 p_base_key_column => 'elig_cvrd_dpnt_id',
555 p_base_key_value => p_rec.elig_cvrd_dpnt_id,
556 p_enforce_foreign_locking => false,
557 p_validation_start_date => l_validation_start_date,
558 p_validation_end_date => l_validation_end_date);
559 --
560 -- Set the validation start and end date OUT arguments
561 --
562 p_validation_start_date := l_validation_start_date;
563 p_validation_end_date := l_validation_end_date;
564 --
565 hr_utility.set_location(' Leaving:'||l_proc, 10);
566 --
567 End ins_lck;
568 --
569 -- ----------------------------------------------------------------------------
570 -- |---------------------------------< ins >----------------------------------|
571 -- ----------------------------------------------------------------------------
572 Procedure ins
573 (
574 p_rec in out nocopy ben_pdp_shd.g_rec_type,
575 p_effective_date in date
576 ) is
577 --
578 l_proc varchar2(72) := g_package||'ins';
579 l_datetrack_mode varchar2(30) := 'INSERT';
580 l_validation_start_date date;
581 l_validation_end_date date;
582 --
583 Begin
584 hr_utility.set_location('Entering:'||l_proc, 5);
585 --
586 -- Call the lock operation
587 --
588 ins_lck
589 (p_effective_date => p_effective_date,
590 p_datetrack_mode => l_datetrack_mode,
591 p_rec => p_rec,
592 p_validation_start_date => l_validation_start_date,
593 p_validation_end_date => l_validation_end_date);
594 --
595 -- Call the supporting insert validate operations
596 --
597 ben_pdp_bus.insert_validate
598 (p_rec => p_rec,
599 p_effective_date => p_effective_date,
600 p_datetrack_mode => l_datetrack_mode,
601 p_validation_start_date => l_validation_start_date,
602 p_validation_end_date => l_validation_end_date);
603 --
604 -- Call the supporting pre-insert operation
605 --
606 pre_insert
607 (p_rec => p_rec,
608 p_effective_date => p_effective_date,
609 p_datetrack_mode => l_datetrack_mode,
610 p_validation_start_date => l_validation_start_date,
611 p_validation_end_date => l_validation_end_date);
612 --
613 -- Insert the row
614 --
615 insert_dml
616 (p_rec => p_rec,
617 p_effective_date => p_effective_date,
618 p_datetrack_mode => l_datetrack_mode,
619 p_validation_start_date => l_validation_start_date,
620 p_validation_end_date => l_validation_end_date);
621 --
622 -- Call the supporting post-insert operation
623 --
624 post_insert
625 (p_rec => p_rec,
626 p_effective_date => p_effective_date,
627 p_datetrack_mode => l_datetrack_mode,
628 p_validation_start_date => l_validation_start_date,
629 p_validation_end_date => l_validation_end_date);
630 end ins;
631 --
632 -- ----------------------------------------------------------------------------
633 -- |---------------------------------< ins >----------------------------------|
634 -- ----------------------------------------------------------------------------
635 Procedure ins
636 (
637 p_elig_cvrd_dpnt_id out nocopy number,
638 p_effective_start_date out nocopy date,
639 p_effective_end_date out nocopy date,
640 p_business_group_id in number,
641 p_prtt_enrt_rslt_id in number default null,
642 p_dpnt_person_id in number,
643 p_cvg_strt_dt in date default null,
644 p_cvg_thru_dt in date default null,
645 p_cvg_pndg_flag in varchar2,
646 p_pdp_attribute_category in varchar2 default null,
647 p_pdp_attribute1 in varchar2 default null,
648 p_pdp_attribute2 in varchar2 default null,
649 p_pdp_attribute3 in varchar2 default null,
650 p_pdp_attribute4 in varchar2 default null,
651 p_pdp_attribute5 in varchar2 default null,
652 p_pdp_attribute6 in varchar2 default null,
653 p_pdp_attribute7 in varchar2 default null,
654 p_pdp_attribute8 in varchar2 default null,
655 p_pdp_attribute9 in varchar2 default null,
656 p_pdp_attribute10 in varchar2 default null,
657 p_pdp_attribute11 in varchar2 default null,
658 p_pdp_attribute12 in varchar2 default null,
659 p_pdp_attribute13 in varchar2 default null,
660 p_pdp_attribute14 in varchar2 default null,
661 p_pdp_attribute15 in varchar2 default null,
662 p_pdp_attribute16 in varchar2 default null,
663 p_pdp_attribute17 in varchar2 default null,
664 p_pdp_attribute18 in varchar2 default null,
665 p_pdp_attribute19 in varchar2 default null,
666 p_pdp_attribute20 in varchar2 default null,
667 p_pdp_attribute21 in varchar2 default null,
668 p_pdp_attribute22 in varchar2 default null,
669 p_pdp_attribute23 in varchar2 default null,
670 p_pdp_attribute24 in varchar2 default null,
671 p_pdp_attribute25 in varchar2 default null,
672 p_pdp_attribute26 in varchar2 default null,
673 p_pdp_attribute27 in varchar2 default null,
674 p_pdp_attribute28 in varchar2 default null,
675 p_pdp_attribute29 in varchar2 default null,
676 p_pdp_attribute30 in varchar2 default null,
677 p_request_id in number default null,
678 p_program_application_id in number default null,
679 p_program_id in number default null,
680 p_program_update_date in date default null,
681 p_object_version_number out nocopy number,
682 p_ovrdn_flag in varchar2,
683 p_per_in_ler_id in number default null,
684 p_ovrdn_thru_dt in date default null,
685 p_effective_date in date
686 ) is
687 --
688 l_rec ben_pdp_shd.g_rec_type;
689 l_proc varchar2(72) := g_package||'ins';
690 --
691 Begin
692 hr_utility.set_location('Entering:'||l_proc, 5);
693 --
694 -- Call conversion function to turn arguments into the
695 -- p_rec structure.
696 --
697 l_rec :=
698 ben_pdp_shd.convert_args
699 (
700 null,
701 null,
702 null,
703 p_business_group_id,
704 p_prtt_enrt_rslt_id,
705 p_dpnt_person_id,
706 p_cvg_strt_dt,
707 p_cvg_thru_dt,
708 p_cvg_pndg_flag,
709 p_pdp_attribute_category,
710 p_pdp_attribute1,
711 p_pdp_attribute2,
712 p_pdp_attribute3,
713 p_pdp_attribute4,
714 p_pdp_attribute5,
715 p_pdp_attribute6,
716 p_pdp_attribute7,
717 p_pdp_attribute8,
718 p_pdp_attribute9,
719 p_pdp_attribute10,
720 p_pdp_attribute11,
721 p_pdp_attribute12,
722 p_pdp_attribute13,
723 p_pdp_attribute14,
724 p_pdp_attribute15,
725 p_pdp_attribute16,
726 p_pdp_attribute17,
727 p_pdp_attribute18,
728 p_pdp_attribute19,
729 p_pdp_attribute20,
730 p_pdp_attribute21,
731 p_pdp_attribute22,
732 p_pdp_attribute23,
733 p_pdp_attribute24,
734 p_pdp_attribute25,
735 p_pdp_attribute26,
736 p_pdp_attribute27,
737 p_pdp_attribute28,
738 p_pdp_attribute29,
739 p_pdp_attribute30,
740 p_request_id,
741 p_program_application_id,
742 p_program_id,
743 p_program_update_date,
744 null,
745 p_ovrdn_flag,
746 p_per_in_ler_id,
747 p_ovrdn_thru_dt
748 );
749 --
750 -- Having converted the arguments into the ben_pdp_rec
751 -- plsql record structure we call the corresponding record
752 -- business process.
753 --
754 ins(l_rec, p_effective_date);
755 --
756 -- Set the OUT arguments.
757 --
758 p_elig_cvrd_dpnt_id := l_rec.elig_cvrd_dpnt_id;
759 p_effective_start_date := l_rec.effective_start_date;
760 p_effective_end_date := l_rec.effective_end_date;
761 p_object_version_number := l_rec.object_version_number;
762 --
763 --
764 hr_utility.set_location(' Leaving:'||l_proc, 10);
765 End ins;
766 --
767 end ben_pdp_ins;