[Home] [Help]
PACKAGE BODY: APPS.BEN_PND_INS
Source
1 Package Body ben_pnd_ins as
2 /* $Header: bepndrhi.pkb 120.1 2008/02/05 09:52:24 rtagarra noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Private Global Definitions |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package varchar2(33) := ' ben_pnd_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_pnd_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_pl_dpnt_cvg_ctfn_f t
70 where t.pl_dpnt_cvg_ctfn_id = p_rec.pl_dpnt_cvg_ctfn_id
71 and t.effective_start_date =
72 ben_pnd_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_pl_dpnt_cvg_ctfn_f.created_by%TYPE;
77 l_creation_date ben_pl_dpnt_cvg_ctfn_f.creation_date%TYPE;
78 l_last_update_date ben_pl_dpnt_cvg_ctfn_f.last_update_date%TYPE;
79 l_last_updated_by ben_pl_dpnt_cvg_ctfn_f.last_updated_by%TYPE;
80 l_last_update_login ben_pl_dpnt_cvg_ctfn_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_pl_dpnt_cvg_ctfn_f',
90 p_base_key_column => 'pl_dpnt_cvg_ctfn_id',
91 p_base_key_value => p_rec.pl_dpnt_cvg_ctfn_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_pnd_shd.g_api_dml := true; -- Set the api dml status
130 --
131 -- Insert the row into: ben_pl_dpnt_cvg_ctfn_f
132 --
133 insert into ben_pl_dpnt_cvg_ctfn_f
134 ( pl_dpnt_cvg_ctfn_id,
135 effective_start_date,
136 effective_end_date,
137 pl_id,
138 pfd_flag,
139 ctfn_rqd_when_rl,
140 lack_ctfn_sspnd_enrt_flag,
141 dpnt_cvg_ctfn_typ_cd,
142 rqd_flag,
143 rlshp_typ_cd,
144 business_group_id,
145 pnd_attribute_category,
146 pnd_attribute1,
147 pnd_attribute2,
148 pnd_attribute3,
149 pnd_attribute4,
150 pnd_attribute5,
151 pnd_attribute6,
152 pnd_attribute7,
153 pnd_attribute8,
154 pnd_attribute9,
155 pnd_attribute10,
156 pnd_attribute11,
157 pnd_attribute12,
158 pnd_attribute13,
159 pnd_attribute14,
160 pnd_attribute15,
161 pnd_attribute16,
162 pnd_attribute17,
163 pnd_attribute18,
164 pnd_attribute19,
165 pnd_attribute20,
166 pnd_attribute21,
167 pnd_attribute22,
168 pnd_attribute23,
169 pnd_attribute24,
170 pnd_attribute25,
171 pnd_attribute26,
172 pnd_attribute27,
173 pnd_attribute28,
174 pnd_attribute29,
175 pnd_attribute30,
176 request_id,
177 program_application_id,
178 program_id,
179 program_update_date,
180 object_version_number
181 , created_by,
182 creation_date,
183 last_update_date,
184 last_updated_by,
185 last_update_login
186 )
187 Values
188 ( p_rec.pl_dpnt_cvg_ctfn_id,
189 p_rec.effective_start_date,
190 p_rec.effective_end_date,
191 p_rec.pl_id,
192 p_rec.pfd_flag,
193 p_rec.ctfn_rqd_when_rl,
194 p_rec.lack_ctfn_sspnd_enrt_flag,
195 p_rec.dpnt_cvg_ctfn_typ_cd,
196 p_rec.rqd_flag,
197 p_rec.rlshp_typ_cd,
198 p_rec.business_group_id,
199 p_rec.pnd_attribute_category,
200 p_rec.pnd_attribute1,
201 p_rec.pnd_attribute2,
202 p_rec.pnd_attribute3,
203 p_rec.pnd_attribute4,
204 p_rec.pnd_attribute5,
205 p_rec.pnd_attribute6,
206 p_rec.pnd_attribute7,
207 p_rec.pnd_attribute8,
208 p_rec.pnd_attribute9,
209 p_rec.pnd_attribute10,
210 p_rec.pnd_attribute11,
211 p_rec.pnd_attribute12,
212 p_rec.pnd_attribute13,
213 p_rec.pnd_attribute14,
214 p_rec.pnd_attribute15,
215 p_rec.pnd_attribute16,
216 p_rec.pnd_attribute17,
217 p_rec.pnd_attribute18,
218 p_rec.pnd_attribute19,
219 p_rec.pnd_attribute20,
220 p_rec.pnd_attribute21,
221 p_rec.pnd_attribute22,
222 p_rec.pnd_attribute23,
223 p_rec.pnd_attribute24,
224 p_rec.pnd_attribute25,
225 p_rec.pnd_attribute26,
226 p_rec.pnd_attribute27,
227 p_rec.pnd_attribute28,
228 p_rec.pnd_attribute29,
229 p_rec.pnd_attribute30,
230 p_rec.request_id,
231 p_rec.program_application_id,
232 p_rec.program_id,
233 p_rec.program_update_date,
234 p_rec.object_version_number
235 , l_created_by,
236 l_creation_date,
237 l_last_update_date,
238 l_last_updated_by,
239 l_last_update_login
240 );
241 --
242 ben_pnd_shd.g_api_dml := false; -- Unset the api dml status
243 hr_utility.set_location(' Leaving:'||l_proc, 15);
244 --
245 Exception
246 When hr_api.check_integrity_violated Then
247 -- A check constraint has been violated
248 ben_pnd_shd.g_api_dml := false; -- Unset the api dml status
249 ben_pnd_shd.constraint_error
250 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
251 When hr_api.unique_integrity_violated Then
252 -- Unique integrity has been violated
253 ben_pnd_shd.g_api_dml := false; -- Unset the api dml status
254 ben_pnd_shd.constraint_error
255 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
256 When Others Then
257 ben_pnd_shd.g_api_dml := false; -- Unset the api dml status
258 Raise;
259 End dt_insert_dml;
260 --
261 -- ----------------------------------------------------------------------------
262 -- |------------------------------< insert_dml >------------------------------|
263 -- ----------------------------------------------------------------------------
264 Procedure insert_dml
265 (p_rec in out nocopy ben_pnd_shd.g_rec_type,
266 p_effective_date in date,
267 p_datetrack_mode in varchar2,
268 p_validation_start_date in date,
269 p_validation_end_date in date) is
270 --
271 l_proc varchar2(72) := g_package||'insert_dml';
272 --
273 Begin
274 hr_utility.set_location('Entering:'||l_proc, 5);
275 --
276 dt_insert_dml(p_rec => p_rec,
277 p_effective_date => p_effective_date,
278 p_datetrack_mode => p_datetrack_mode,
279 p_validation_start_date => p_validation_start_date,
280 p_validation_end_date => p_validation_end_date);
281 --
282 hr_utility.set_location(' Leaving:'||l_proc, 10);
283 End insert_dml;
284 --
285 -- ----------------------------------------------------------------------------
286 -- |------------------------------< pre_insert >------------------------------|
287 -- ----------------------------------------------------------------------------
288 -- {Start Of Comments}
289 --
290 -- Description:
291 -- This private procedure contains any processing which is required before
292 -- the insert dml. Presently, if the entity has a corresponding primary
293 -- key which is maintained by an associating sequence, the primary key for
294 -- the entity will be populated with the next sequence value in
295 -- preparation for the insert dml.
296 -- Also, if comments are defined for this entity, the comments insert
297 -- logic will also be called, generating a comment_id if required.
298 --
299 -- Prerequisites:
300 -- This is an internal procedure which is called from the ins procedure.
301 --
302 -- In Parameters:
303 -- A Pl/Sql record structre.
304 --
305 -- Post Success:
306 -- Processing continues.
307 --
308 -- Post Failure:
309 -- If an error has occurred, an error message and exception will be raised
310 -- but not handled.
311 --
312 -- Developer Implementation Notes:
313 -- Any pre-processing required before the insert dml is issued should be
314 -- coded within this procedure. As stated above, a good example is the
315 -- generation of a primary key number via a corresponding sequence.
316 -- It is important to note that any 3rd party maintenance should be reviewed
317 -- before placing in this procedure.
318 --
319 -- Access Status:
320 -- Internal Row Handler Use Only.
321 --
322 -- {End Of Comments}
323 -- ----------------------------------------------------------------------------
324 Procedure pre_insert
325 (p_rec in out nocopy ben_pnd_shd.g_rec_type,
326 p_effective_date in date,
327 p_datetrack_mode in varchar2,
328 p_validation_start_date in date,
329 p_validation_end_date in date) is
330 --
331 l_proc varchar2(72) := g_package||'pre_insert';
332 --
333 Cursor C_Sel1 is select ben_pl_dpnt_cvg_ctfn_f_s.nextval from sys.dual;
334 --
335 Begin
336 hr_utility.set_location('Entering:'||l_proc, 5);
337 --
338 --
339 Open C_Sel1;
340 Fetch C_Sel1 Into p_rec.pl_dpnt_cvg_ctfn_id;
341 Close C_Sel1;
342 --
343 --
344 hr_utility.set_location(' Leaving:'||l_proc, 10);
345 End pre_insert;
346 --
347 -- ----------------------------------------------------------------------------
348 -- |-----------------------------< post_insert >------------------------------|
349 -- ----------------------------------------------------------------------------
350 -- {Start Of Comments}
351 --
352 -- Description:
353 -- This private procedure contains any processing which is required after the
354 -- insert dml.
355 --
356 -- Prerequisites:
357 -- This is an internal procedure which is called from the ins procedure.
358 --
359 -- In Parameters:
360 -- A Pl/Sql record structre.
361 --
362 -- Post Success:
363 -- Processing continues.
364 --
365 -- Post Failure:
366 -- If an error has occurred, an error message and exception will be raised
367 -- but not handled.
368 --
369 -- Developer Implementation Notes:
370 -- Any post-processing required after the insert dml is issued should be
371 -- coded within this procedure. It is important to note that any 3rd party
372 -- maintenance should be reviewed before placing in this procedure.
373 --
374 -- Access Status:
375 -- Internal Row Handler Use Only.
376 --
377 -- {End Of Comments}
378 -- ----------------------------------------------------------------------------
379 Procedure post_insert
380 (p_rec in ben_pnd_shd.g_rec_type,
381 p_effective_date in date,
382 p_datetrack_mode in varchar2,
383 p_validation_start_date in date,
384 p_validation_end_date in date) is
385 --
386 l_proc varchar2(72) := g_package||'post_insert';
387 --
388 Begin
389 hr_utility.set_location('Entering:'||l_proc, 5);
390 --
391 --
392 -- Start of API User Hook for post_insert.
393 --
394 begin
395 --
396 ben_pnd_rki.after_insert
397 (
398 p_pl_dpnt_cvg_ctfn_id =>p_rec.pl_dpnt_cvg_ctfn_id
399 ,p_effective_start_date =>p_rec.effective_start_date
400 ,p_effective_end_date =>p_rec.effective_end_date
401 ,p_pl_id =>p_rec.pl_id
402 ,p_pfd_flag =>p_rec.pfd_flag
403 ,p_ctfn_rqd_when_rl =>p_rec.ctfn_rqd_when_rl
404 ,p_lack_ctfn_sspnd_enrt_flag =>p_rec.lack_ctfn_sspnd_enrt_flag
405 ,p_dpnt_cvg_ctfn_typ_cd =>p_rec.dpnt_cvg_ctfn_typ_cd
406 ,p_rqd_flag =>p_rec.rqd_flag
407 ,p_rlshp_typ_cd =>p_rec.rlshp_typ_cd
408 ,p_business_group_id =>p_rec.business_group_id
409 ,p_pnd_attribute_category =>p_rec.pnd_attribute_category
410 ,p_pnd_attribute1 =>p_rec.pnd_attribute1
411 ,p_pnd_attribute2 =>p_rec.pnd_attribute2
412 ,p_pnd_attribute3 =>p_rec.pnd_attribute3
413 ,p_pnd_attribute4 =>p_rec.pnd_attribute4
414 ,p_pnd_attribute5 =>p_rec.pnd_attribute5
415 ,p_pnd_attribute6 =>p_rec.pnd_attribute6
416 ,p_pnd_attribute7 =>p_rec.pnd_attribute7
417 ,p_pnd_attribute8 =>p_rec.pnd_attribute8
418 ,p_pnd_attribute9 =>p_rec.pnd_attribute9
419 ,p_pnd_attribute10 =>p_rec.pnd_attribute10
420 ,p_pnd_attribute11 =>p_rec.pnd_attribute11
421 ,p_pnd_attribute12 =>p_rec.pnd_attribute12
422 ,p_pnd_attribute13 =>p_rec.pnd_attribute13
423 ,p_pnd_attribute14 =>p_rec.pnd_attribute14
424 ,p_pnd_attribute15 =>p_rec.pnd_attribute15
425 ,p_pnd_attribute16 =>p_rec.pnd_attribute16
426 ,p_pnd_attribute17 =>p_rec.pnd_attribute17
427 ,p_pnd_attribute18 =>p_rec.pnd_attribute18
428 ,p_pnd_attribute19 =>p_rec.pnd_attribute19
429 ,p_pnd_attribute20 =>p_rec.pnd_attribute20
430 ,p_pnd_attribute21 =>p_rec.pnd_attribute21
431 ,p_pnd_attribute22 =>p_rec.pnd_attribute22
432 ,p_pnd_attribute23 =>p_rec.pnd_attribute23
433 ,p_pnd_attribute24 =>p_rec.pnd_attribute24
434 ,p_pnd_attribute25 =>p_rec.pnd_attribute25
435 ,p_pnd_attribute26 =>p_rec.pnd_attribute26
436 ,p_pnd_attribute27 =>p_rec.pnd_attribute27
437 ,p_pnd_attribute28 =>p_rec.pnd_attribute28
438 ,p_pnd_attribute29 =>p_rec.pnd_attribute29
439 ,p_pnd_attribute30 =>p_rec.pnd_attribute30
440 ,p_request_id =>p_rec.request_id
441 ,p_program_application_id =>p_rec.program_application_id
442 ,p_program_id =>p_rec.program_id
443 ,p_program_update_date =>p_rec.program_update_date
444 ,p_object_version_number =>p_rec.object_version_number
445 ,p_effective_date =>p_effective_date
446 ,p_validation_start_date =>p_validation_start_date
447 ,p_validation_end_date =>p_validation_end_date
448 );
449 --
450 exception
451 --
452 when hr_api.cannot_find_prog_unit then
453 --
454 hr_api.cannot_find_prog_unit_error
455 (p_module_name => 'ben_pl_dpnt_cvg_ctfn_f'
456 ,p_hook_type => 'AI');
457 --
458 end;
459 --
460 -- End of API User Hook for post_insert.
461 --
462 --
463 hr_utility.set_location(' Leaving:'||l_proc, 10);
464 End post_insert;
465 --
466 -- ----------------------------------------------------------------------------
467 -- |-------------------------------< ins_lck >--------------------------------|
468 -- ----------------------------------------------------------------------------
469 -- {Start Of Comments}
470 --
471 -- Description:
472 -- The ins_lck process has one main function to perform. When inserting
473 -- a datetracked row, we must validate the DT mode.
474 -- be manipulated.
475 --
476 -- Prerequisites:
477 -- This procedure can only be called for the datetrack mode of INSERT.
478 --
479 -- In Parameters:
480 --
481 -- Post Success:
482 -- On successful completion of the ins_lck process the parental
483 -- datetracked rows will be locked providing the p_enforce_foreign_locking
484 -- argument value is TRUE.
485 -- If the p_enforce_foreign_locking argument value is FALSE then the
486 -- parential rows are not locked.
487 --
488 -- Post Failure:
489 -- The Lck process can fail for:
490 -- 1) When attempting to lock the row the row could already be locked by
491 -- another user. This will raise the HR_Api.Object_Locked exception.
492 -- 2) When attempting to the lock the parent which doesn't exist.
493 -- For the entity to be locked the parent must exist!
494 --
495 -- Developer Implementation Notes:
496 -- None.
497 --
498 -- Access Status:
499 -- Internal Row Handler Use Only.
500 --
501 -- {End Of Comments}
502 -- ----------------------------------------------------------------------------
503 Procedure ins_lck
504 (p_effective_date in date,
505 p_datetrack_mode in varchar2,
506 p_rec in ben_pnd_shd.g_rec_type,
507 p_validation_start_date out nocopy date,
508 p_validation_end_date out nocopy date) is
509 --
510 l_proc varchar2(72) := g_package||'ins_lck';
511 l_validation_start_date date;
512 l_validation_end_date date;
513 --
514 Begin
515 hr_utility.set_location('Entering:'||l_proc, 5);
516 --
517 -- Validate the datetrack mode mode getting the validation start
518 -- and end dates for the specified datetrack operation.
519 --
520 dt_api.validate_dt_mode
521 (p_effective_date => p_effective_date,
522 p_datetrack_mode => p_datetrack_mode,
523 p_base_table_name => 'ben_pl_dpnt_cvg_ctfn_f',
524 p_base_key_column => 'pl_dpnt_cvg_ctfn_id',
525 p_base_key_value => p_rec.pl_dpnt_cvg_ctfn_id,
526 p_parent_table_name1 => 'ben_pl_f',
527 p_parent_key_column1 => 'pl_id',
528 p_parent_key_value1 => p_rec.pl_id,
529 p_enforce_foreign_locking => true,
530 p_validation_start_date => l_validation_start_date,
531 p_validation_end_date => l_validation_end_date);
532 --
533 -- Set the validation start and end date OUT arguments
534 --
535 p_validation_start_date := l_validation_start_date;
536 p_validation_end_date := l_validation_end_date;
537 --
538 hr_utility.set_location(' Leaving:'||l_proc, 10);
539 --
540 End ins_lck;
541 --
542 -- ----------------------------------------------------------------------------
543 -- |---------------------------------< ins >----------------------------------|
544 -- ----------------------------------------------------------------------------
545 Procedure ins
546 (
547 p_rec in out nocopy ben_pnd_shd.g_rec_type,
548 p_effective_date in date
549 ) is
550 --
551 l_proc varchar2(72) := g_package||'ins';
552 l_datetrack_mode varchar2(30) := 'INSERT';
553 l_validation_start_date date;
554 l_validation_end_date date;
555 --
556 Begin
557 hr_utility.set_location('Entering:'||l_proc, 5);
558 --
559 -- Call the lock operation
560 --
561 ins_lck
562 (p_effective_date => p_effective_date,
563 p_datetrack_mode => l_datetrack_mode,
564 p_rec => p_rec,
565 p_validation_start_date => l_validation_start_date,
566 p_validation_end_date => l_validation_end_date);
567 --
568 -- Call the supporting insert validate operations
569 --
570 ben_pnd_bus.insert_validate
571 (p_rec => p_rec,
572 p_effective_date => p_effective_date,
573 p_datetrack_mode => l_datetrack_mode,
574 p_validation_start_date => l_validation_start_date,
575 p_validation_end_date => l_validation_end_date);
576 --
577 -- Call the supporting pre-insert operation
578 --
579 pre_insert
580 (p_rec => p_rec,
581 p_effective_date => p_effective_date,
582 p_datetrack_mode => l_datetrack_mode,
583 p_validation_start_date => l_validation_start_date,
584 p_validation_end_date => l_validation_end_date);
585 --
586 -- Insert the row
587 --
588 insert_dml
589 (p_rec => p_rec,
590 p_effective_date => p_effective_date,
591 p_datetrack_mode => l_datetrack_mode,
592 p_validation_start_date => l_validation_start_date,
593 p_validation_end_date => l_validation_end_date);
594 --
595 -- Call the supporting post-insert operation
596 --
597 post_insert
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 end ins;
604 --
605 -- ----------------------------------------------------------------------------
606 -- |---------------------------------< ins >----------------------------------|
607 -- ----------------------------------------------------------------------------
608 Procedure ins
609 (
610 p_pl_dpnt_cvg_ctfn_id out nocopy number,
611 p_effective_start_date out nocopy date,
612 p_effective_end_date out nocopy date,
613 p_pl_id in number,
614 p_pfd_flag in varchar2,
615 p_ctfn_rqd_when_rl in number default null,
616 p_lack_ctfn_sspnd_enrt_flag in varchar2,
617 p_dpnt_cvg_ctfn_typ_cd in varchar2,
618 p_rqd_flag in varchar2,
619 p_rlshp_typ_cd in varchar2 default null,
620 p_business_group_id in number,
621 p_pnd_attribute_category in varchar2 default null,
622 p_pnd_attribute1 in varchar2 default null,
623 p_pnd_attribute2 in varchar2 default null,
624 p_pnd_attribute3 in varchar2 default null,
625 p_pnd_attribute4 in varchar2 default null,
626 p_pnd_attribute5 in varchar2 default null,
627 p_pnd_attribute6 in varchar2 default null,
628 p_pnd_attribute7 in varchar2 default null,
629 p_pnd_attribute8 in varchar2 default null,
630 p_pnd_attribute9 in varchar2 default null,
631 p_pnd_attribute10 in varchar2 default null,
632 p_pnd_attribute11 in varchar2 default null,
633 p_pnd_attribute12 in varchar2 default null,
634 p_pnd_attribute13 in varchar2 default null,
635 p_pnd_attribute14 in varchar2 default null,
636 p_pnd_attribute15 in varchar2 default null,
637 p_pnd_attribute16 in varchar2 default null,
638 p_pnd_attribute17 in varchar2 default null,
639 p_pnd_attribute18 in varchar2 default null,
640 p_pnd_attribute19 in varchar2 default null,
641 p_pnd_attribute20 in varchar2 default null,
642 p_pnd_attribute21 in varchar2 default null,
643 p_pnd_attribute22 in varchar2 default null,
644 p_pnd_attribute23 in varchar2 default null,
645 p_pnd_attribute24 in varchar2 default null,
646 p_pnd_attribute25 in varchar2 default null,
647 p_pnd_attribute26 in varchar2 default null,
648 p_pnd_attribute27 in varchar2 default null,
649 p_pnd_attribute28 in varchar2 default null,
650 p_pnd_attribute29 in varchar2 default null,
651 p_pnd_attribute30 in varchar2 default null,
652 p_request_id in number default null,
653 p_program_application_id in number default null,
654 p_program_id in number default null,
655 p_program_update_date in date default null,
656 p_object_version_number out nocopy number,
657 p_effective_date in date
658 ) is
659 --
660 l_rec ben_pnd_shd.g_rec_type;
661 l_proc varchar2(72) := g_package||'ins';
662 --
663 Begin
664 hr_utility.set_location('Entering:'||l_proc, 5);
665 --
666 -- Call conversion function to turn arguments into the
667 -- p_rec structure.
668 --
669 l_rec :=
670 ben_pnd_shd.convert_args
671 (
672 null,
673 null,
674 null,
675 p_pl_id,
676 p_pfd_flag,
677 p_ctfn_rqd_when_rl,
678 p_lack_ctfn_sspnd_enrt_flag,
679 p_dpnt_cvg_ctfn_typ_cd,
680 p_rqd_flag,
681 p_rlshp_typ_cd,
682 p_business_group_id,
683 p_pnd_attribute_category,
684 p_pnd_attribute1,
685 p_pnd_attribute2,
686 p_pnd_attribute3,
687 p_pnd_attribute4,
688 p_pnd_attribute5,
689 p_pnd_attribute6,
690 p_pnd_attribute7,
691 p_pnd_attribute8,
692 p_pnd_attribute9,
693 p_pnd_attribute10,
694 p_pnd_attribute11,
695 p_pnd_attribute12,
696 p_pnd_attribute13,
697 p_pnd_attribute14,
698 p_pnd_attribute15,
699 p_pnd_attribute16,
700 p_pnd_attribute17,
701 p_pnd_attribute18,
702 p_pnd_attribute19,
703 p_pnd_attribute20,
704 p_pnd_attribute21,
705 p_pnd_attribute22,
706 p_pnd_attribute23,
707 p_pnd_attribute24,
708 p_pnd_attribute25,
709 p_pnd_attribute26,
710 p_pnd_attribute27,
711 p_pnd_attribute28,
712 p_pnd_attribute29,
713 p_pnd_attribute30,
714 p_request_id,
715 p_program_application_id,
716 p_program_id,
717 p_program_update_date,
718 null
719 );
720 --
721 -- Having converted the arguments into the ben_pnd_rec
722 -- plsql record structure we call the corresponding record
723 -- business process.
724 --
725 ins(l_rec, p_effective_date);
726 --
727 -- Set the OUT arguments.
728 --
729 p_pl_dpnt_cvg_ctfn_id := l_rec.pl_dpnt_cvg_ctfn_id;
730 p_effective_start_date := l_rec.effective_start_date;
731 p_effective_end_date := l_rec.effective_end_date;
732 p_object_version_number := l_rec.object_version_number;
733 --
734 --
735 hr_utility.set_location(' Leaving:'||l_proc, 10);
736 End ins;
737 --
738 end ben_pnd_ins;