[Home] [Help]
PACKAGE BODY: APPS.BEN_PCM_INS
Source
1 Package Body ben_pcm_ins as
2 /* $Header: bepcmrhi.pkb 115.13 2002/12/16 11:58:35 vsethi ship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Private Global Definitions |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package varchar2(33) := ' ben_pcm_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_pcm_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_per_cm_f t
70 where t.per_cm_id = p_rec.per_cm_id
71 and t.effective_start_date =
72 ben_pcm_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_per_cm_f.created_by%TYPE;
77 l_creation_date ben_per_cm_f.creation_date%TYPE;
78 l_last_update_date ben_per_cm_f.last_update_date%TYPE;
79 l_last_updated_by ben_per_cm_f.last_updated_by%TYPE;
80 l_last_update_login ben_per_cm_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_per_cm_f',
90 p_base_key_column => 'per_cm_id',
91 p_base_key_value => p_rec.per_cm_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_pcm_shd.g_api_dml := true; -- Set the api dml status
130 --
131 -- Insert the row into: ben_per_cm_f
132 --
133 insert into ben_per_cm_f
134 ( per_cm_id,
135 effective_start_date,
136 effective_end_date,
137 lf_evt_ocrd_dt,
138 rqstbl_untl_dt,
139 ler_id,
140 per_in_ler_id,
141 prtt_enrt_actn_id,
142 person_id,
143 bnf_person_id,
144 dpnt_person_id,
145 cm_typ_id,
146 business_group_id,
147 pcm_attribute_category,
148 pcm_attribute1,
149 pcm_attribute2,
150 pcm_attribute3,
151 pcm_attribute4,
152 pcm_attribute5,
153 pcm_attribute6,
154 pcm_attribute7,
155 pcm_attribute8,
156 pcm_attribute9,
157 pcm_attribute10,
158 pcm_attribute11,
159 pcm_attribute12,
160 pcm_attribute13,
161 pcm_attribute14,
162 pcm_attribute15,
163 pcm_attribute16,
164 pcm_attribute17,
165 pcm_attribute18,
166 pcm_attribute19,
167 pcm_attribute20,
168 pcm_attribute21,
169 pcm_attribute22,
170 pcm_attribute23,
171 pcm_attribute24,
172 pcm_attribute25,
173 pcm_attribute26,
174 pcm_attribute27,
175 pcm_attribute28,
176 pcm_attribute29,
177 pcm_attribute30,
178 request_id,
179 program_application_id,
180 program_id,
181 program_update_date,
182 object_version_number
183 , created_by,
184 creation_date,
185 last_update_date,
186 last_updated_by,
187 last_update_login
188 )
189 Values
190 ( p_rec.per_cm_id,
191 p_rec.effective_start_date,
192 p_rec.effective_end_date,
193 p_rec.lf_evt_ocrd_dt,
194 p_rec.rqstbl_untl_dt,
195 p_rec.ler_id,
196 p_rec.per_in_ler_id,
197 p_rec.prtt_enrt_actn_id,
198 p_rec.person_id,
199 p_rec.bnf_person_id,
200 p_rec.dpnt_person_id,
201 p_rec.cm_typ_id,
202 p_rec.business_group_id,
203 p_rec.pcm_attribute_category,
204 p_rec.pcm_attribute1,
205 p_rec.pcm_attribute2,
206 p_rec.pcm_attribute3,
207 p_rec.pcm_attribute4,
208 p_rec.pcm_attribute5,
209 p_rec.pcm_attribute6,
210 p_rec.pcm_attribute7,
211 p_rec.pcm_attribute8,
212 p_rec.pcm_attribute9,
213 p_rec.pcm_attribute10,
214 p_rec.pcm_attribute11,
215 p_rec.pcm_attribute12,
216 p_rec.pcm_attribute13,
217 p_rec.pcm_attribute14,
218 p_rec.pcm_attribute15,
219 p_rec.pcm_attribute16,
220 p_rec.pcm_attribute17,
221 p_rec.pcm_attribute18,
222 p_rec.pcm_attribute19,
223 p_rec.pcm_attribute20,
224 p_rec.pcm_attribute21,
225 p_rec.pcm_attribute22,
226 p_rec.pcm_attribute23,
227 p_rec.pcm_attribute24,
228 p_rec.pcm_attribute25,
229 p_rec.pcm_attribute26,
230 p_rec.pcm_attribute27,
231 p_rec.pcm_attribute28,
232 p_rec.pcm_attribute29,
233 p_rec.pcm_attribute30,
234 p_rec.request_id,
235 p_rec.program_application_id,
236 p_rec.program_id,
237 p_rec.program_update_date,
238 p_rec.object_version_number
239 , l_created_by,
240 l_creation_date,
241 l_last_update_date,
242 l_last_updated_by,
243 l_last_update_login
244 );
245 --
246 ben_pcm_shd.g_api_dml := false; -- Unset the api dml status
247 hr_utility.set_location(' Leaving:'||l_proc, 15);
248 --
249 Exception
250 When hr_api.check_integrity_violated Then
251 -- A check constraint has been violated
252 ben_pcm_shd.g_api_dml := false; -- Unset the api dml status
253 ben_pcm_shd.constraint_error
254 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
255 When hr_api.unique_integrity_violated Then
256 -- Unique integrity has been violated
257 ben_pcm_shd.g_api_dml := false; -- Unset the api dml status
258 ben_pcm_shd.constraint_error
259 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
260 When Others Then
261 ben_pcm_shd.g_api_dml := false; -- Unset the api dml status
262 Raise;
263 End dt_insert_dml;
264 --
265 -- ----------------------------------------------------------------------------
266 -- |------------------------------< insert_dml >------------------------------|
267 -- ----------------------------------------------------------------------------
268 Procedure insert_dml
269 (p_rec in out nocopy ben_pcm_shd.g_rec_type,
270 p_effective_date in date,
271 p_datetrack_mode in varchar2,
272 p_validation_start_date in date,
273 p_validation_end_date in date) is
274 --
275 l_proc varchar2(72) := g_package||'insert_dml';
276 --
277 Begin
278 hr_utility.set_location('Entering:'||l_proc, 5);
279 --
280 dt_insert_dml(p_rec => p_rec,
281 p_effective_date => p_effective_date,
282 p_datetrack_mode => p_datetrack_mode,
283 p_validation_start_date => p_validation_start_date,
284 p_validation_end_date => p_validation_end_date);
285 --
286 hr_utility.set_location(' Leaving:'||l_proc, 10);
287 End insert_dml;
288 --
289 -- ----------------------------------------------------------------------------
290 -- |------------------------------< pre_insert >------------------------------|
291 -- ----------------------------------------------------------------------------
292 -- {Start Of Comments}
293 --
294 -- Description:
295 -- This private procedure contains any processing which is required before
296 -- the insert dml. Presently, if the entity has a corresponding primary
297 -- key which is maintained by an associating sequence, the primary key for
298 -- the entity will be populated with the next sequence value in
299 -- preparation for the insert dml.
300 -- Also, if comments are defined for this entity, the comments insert
301 -- logic will also be called, generating a comment_id if required.
302 --
303 -- Prerequisites:
304 -- This is an internal procedure which is called from the ins procedure.
305 --
306 -- In Parameters:
307 -- A Pl/Sql record structre.
308 --
309 -- Post Success:
310 -- Processing continues.
311 --
312 -- Post Failure:
313 -- If an error has occurred, an error message and exception will be raised
314 -- but not handled.
315 --
316 -- Developer Implementation Notes:
317 -- Any pre-processing required before the insert dml is issued should be
318 -- coded within this procedure. As stated above, a good example is the
319 -- generation of a primary key number via a corresponding sequence.
320 -- It is important to note that any 3rd party maintenance should be reviewed
321 -- before placing in this procedure.
322 --
323 -- Access Status:
324 -- Internal Row Handler Use Only.
325 --
326 -- {End Of Comments}
327 -- ----------------------------------------------------------------------------
328 Procedure pre_insert
329 (p_rec in out nocopy ben_pcm_shd.g_rec_type,
330 p_effective_date in date,
331 p_datetrack_mode in varchar2,
332 p_validation_start_date in date,
333 p_validation_end_date in date) is
334 --
335 l_proc varchar2(72) := g_package||'pre_insert';
336 --
337 cursor c1 is
338 select ben_per_cm_f_s.nextval
339 from dual;
340 --
341 --
342 Begin
343 hr_utility.set_location('Entering:'||l_proc, 5);
344 --
345 --
346 open c1;
347 fetch c1 into p_rec.per_cm_id;
348 close c1;
349
350 hr_utility.set_location(' Leaving:'||l_proc, 10);
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_pcm_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 --
398 -- Start of API User Hook for post_insert.
399 --
400 begin
401 --
402 ben_pcm_rki.after_insert
403 (
404 p_per_cm_id =>p_rec.per_cm_id
405 ,p_effective_start_date =>p_rec.effective_start_date
406 ,p_effective_end_date =>p_rec.effective_end_date
407 ,p_lf_evt_ocrd_dt =>p_rec.lf_evt_ocrd_dt
408 ,p_rqstbl_untl_dt =>p_rec.rqstbl_untl_dt
409 ,p_ler_id =>p_rec.ler_id
410 ,p_per_in_ler_id =>p_rec.per_in_ler_id
411 ,p_prtt_enrt_actn_id =>p_rec.prtt_enrt_actn_id
412 ,p_person_id =>p_rec.person_id
413 ,p_bnf_person_id =>p_rec.bnf_person_id
414 ,p_dpnt_person_id =>p_rec.dpnt_person_id
415 ,p_cm_typ_id =>p_rec.cm_typ_id
416 ,p_business_group_id =>p_rec.business_group_id
417 ,p_pcm_attribute_category =>p_rec.pcm_attribute_category
418 ,p_pcm_attribute1 =>p_rec.pcm_attribute1
419 ,p_pcm_attribute2 =>p_rec.pcm_attribute2
420 ,p_pcm_attribute3 =>p_rec.pcm_attribute3
421 ,p_pcm_attribute4 =>p_rec.pcm_attribute4
422 ,p_pcm_attribute5 =>p_rec.pcm_attribute5
423 ,p_pcm_attribute6 =>p_rec.pcm_attribute6
424 ,p_pcm_attribute7 =>p_rec.pcm_attribute7
425 ,p_pcm_attribute8 =>p_rec.pcm_attribute8
426 ,p_pcm_attribute9 =>p_rec.pcm_attribute9
427 ,p_pcm_attribute10 =>p_rec.pcm_attribute10
428 ,p_pcm_attribute11 =>p_rec.pcm_attribute11
429 ,p_pcm_attribute12 =>p_rec.pcm_attribute12
430 ,p_pcm_attribute13 =>p_rec.pcm_attribute13
431 ,p_pcm_attribute14 =>p_rec.pcm_attribute14
432 ,p_pcm_attribute15 =>p_rec.pcm_attribute15
433 ,p_pcm_attribute16 =>p_rec.pcm_attribute16
434 ,p_pcm_attribute17 =>p_rec.pcm_attribute17
435 ,p_pcm_attribute18 =>p_rec.pcm_attribute18
436 ,p_pcm_attribute19 =>p_rec.pcm_attribute19
437 ,p_pcm_attribute20 =>p_rec.pcm_attribute20
438 ,p_pcm_attribute21 =>p_rec.pcm_attribute21
439 ,p_pcm_attribute22 =>p_rec.pcm_attribute22
440 ,p_pcm_attribute23 =>p_rec.pcm_attribute23
441 ,p_pcm_attribute24 =>p_rec.pcm_attribute24
442 ,p_pcm_attribute25 =>p_rec.pcm_attribute25
443 ,p_pcm_attribute26 =>p_rec.pcm_attribute26
444 ,p_pcm_attribute27 =>p_rec.pcm_attribute27
445 ,p_pcm_attribute28 =>p_rec.pcm_attribute28
446 ,p_pcm_attribute29 =>p_rec.pcm_attribute29
447 ,p_pcm_attribute30 =>p_rec.pcm_attribute30
448 ,p_request_id =>p_rec.request_id
449 ,p_program_application_id =>p_rec.program_application_id
450 ,p_program_id =>p_rec.program_id
451 ,p_program_update_date =>p_rec.program_update_date
452 ,p_object_version_number =>p_rec.object_version_number
453 ,p_effective_date =>p_effective_date
454 ,p_validation_start_date =>p_validation_start_date
455 ,p_validation_end_date =>p_validation_end_date
456 );
457 --
458 exception
459 --
460 when hr_api.cannot_find_prog_unit then
461 --
462 hr_api.cannot_find_prog_unit_error
463 (p_module_name => 'ben_per_cm_f'
464 ,p_hook_type => 'AI');
465 --
466 end;
467 --
468 -- End of API User Hook for post_insert.
469 --
470 --
471 hr_utility.set_location(' Leaving:'||l_proc, 10);
472 End post_insert;
473 --
474 -- ----------------------------------------------------------------------------
475 -- |-------------------------------< ins_lck >--------------------------------|
476 -- ----------------------------------------------------------------------------
477 -- {Start Of Comments}
478 --
479 -- Description:
480 -- The ins_lck process has one main function to perform. When inserting
481 -- a datetracked row, we must validate the DT mode.
482 -- be manipulated.
483 --
484 -- Prerequisites:
485 -- This procedure can only be called for the datetrack mode of INSERT.
486 --
487 -- In Parameters:
488 --
489 -- Post Success:
490 -- On successful completion of the ins_lck process the parental
491 -- datetracked rows will be locked providing the p_enforce_foreign_locking
492 -- argument value is TRUE.
493 -- If the p_enforce_foreign_locking argument value is FALSE then the
494 -- parential rows are not locked.
495 --
496 -- Post Failure:
497 -- The Lck process can fail for:
498 -- 1) When attempting to lock the row the row could already be locked by
499 -- another user. This will raise the HR_Api.Object_Locked exception.
500 -- 2) When attempting to the lock the parent which doesn't exist.
501 -- For the entity to be locked the parent must exist!
502 --
503 -- Developer Implementation Notes:
504 -- None.
505 --
506 -- Access Status:
507 -- Internal Row Handler Use Only.
508 --
509 -- {End Of Comments}
510 -- ----------------------------------------------------------------------------
511 Procedure ins_lck
512 (p_effective_date in date,
513 p_datetrack_mode in varchar2,
514 p_rec in ben_pcm_shd.g_rec_type,
515 p_validation_start_date out nocopy date,
516 p_validation_end_date out nocopy date) is
517 --
518 l_proc varchar2(72) := g_package||'ins_lck';
519 l_validation_start_date date;
520 l_validation_end_date date;
521 --
522 Begin
523 hr_utility.set_location('Entering:'||l_proc, 5);
524 --
525 -- Validate the datetrack mode mode getting the validation start
526 -- and end dates for the specified datetrack operation.
527 --
528 dt_api.validate_dt_mode
529 (p_effective_date => p_effective_date,
530 p_datetrack_mode => p_datetrack_mode,
531 p_base_table_name => 'ben_per_cm_f',
532 p_base_key_column => 'per_cm_id',
533 p_base_key_value => p_rec.per_cm_id,
534 p_parent_table_name1 => 'ben_cm_typ_f',
535 p_parent_key_column1 => 'cm_typ_id',
536 p_parent_key_value1 => p_rec.cm_typ_id,
537 p_parent_table_name2 => 'ben_prtt_enrt_actn_f',
538 p_parent_key_column2 => 'prtt_enrt_actn_id',
539 p_parent_key_value2 => p_rec.prtt_enrt_actn_id,
540 p_enforce_foreign_locking => false,
541 p_validation_start_date => l_validation_start_date,
542 p_validation_end_date => l_validation_end_date);
543 --
544 -- Set the validation start and end date OUT arguments
545 --
546 p_validation_start_date := l_validation_start_date;
547 p_validation_end_date := l_validation_end_date;
548 --
549 hr_utility.set_location(' Leaving:'||l_proc, 10);
550 --
551 End ins_lck;
552 --
553 -- ----------------------------------------------------------------------------
554 -- |---------------------------------< ins >----------------------------------|
555 -- ----------------------------------------------------------------------------
556 Procedure ins
557 (
558 p_rec in out nocopy ben_pcm_shd.g_rec_type,
559 p_effective_date in date
560 ) is
561 --
562 l_proc varchar2(72) := g_package||'ins';
563 l_datetrack_mode varchar2(30) := 'INSERT';
564 l_validation_start_date date;
565 l_validation_end_date date;
566 --
567 Begin
568 hr_utility.set_location('Entering:'||l_proc, 5);
569 --
570 -- Call the lock operation
571 --
572 ins_lck
573 (p_effective_date => p_effective_date,
574 p_datetrack_mode => l_datetrack_mode,
575 p_rec => p_rec,
576 p_validation_start_date => l_validation_start_date,
577 p_validation_end_date => l_validation_end_date);
578 --
579 -- Call the supporting insert validate operations
580 --
581 ben_pcm_bus.insert_validate
582 (p_rec => p_rec,
583 p_effective_date => p_effective_date,
584 p_datetrack_mode => l_datetrack_mode,
585 p_validation_start_date => l_validation_start_date,
586 p_validation_end_date => l_validation_end_date);
587 --
588 -- Call the supporting pre-insert operation
589 --
590 pre_insert
591 (p_rec => p_rec,
592 p_effective_date => p_effective_date,
593 p_datetrack_mode => l_datetrack_mode,
594 p_validation_start_date => l_validation_start_date,
595 p_validation_end_date => l_validation_end_date);
596 --
597 -- Insert the row
598 --
599 insert_dml
600 (p_rec => p_rec,
601 p_effective_date => p_effective_date,
602 p_datetrack_mode => l_datetrack_mode,
603 p_validation_start_date => l_validation_start_date,
604 p_validation_end_date => l_validation_end_date);
605 --
606 -- Call the supporting post-insert operation
607 --
608 post_insert
609 (p_rec => p_rec,
610 p_effective_date => p_effective_date,
611 p_datetrack_mode => l_datetrack_mode,
612 p_validation_start_date => l_validation_start_date,
613 p_validation_end_date => l_validation_end_date);
614 end ins;
615 --
616 -- ----------------------------------------------------------------------------
617 -- |---------------------------------< ins >----------------------------------|
618 -- ----------------------------------------------------------------------------
619 Procedure ins
620 (
621 p_per_cm_id out nocopy number,
622 p_effective_start_date out nocopy date,
623 p_effective_end_date out nocopy date,
624 p_lf_evt_ocrd_dt in date default null,
625 p_rqstbl_untl_dt in date default null,
626 p_ler_id in number default null,
627 p_per_in_ler_id in number default null,
628 p_prtt_enrt_actn_id in number default null,
629 p_person_id in number,
630 p_bnf_person_id in number default null,
631 p_dpnt_person_id in number default null,
632 p_cm_typ_id in number,
633 p_business_group_id in number,
634 p_pcm_attribute_category in varchar2 default null,
635 p_pcm_attribute1 in varchar2 default null,
636 p_pcm_attribute2 in varchar2 default null,
637 p_pcm_attribute3 in varchar2 default null,
638 p_pcm_attribute4 in varchar2 default null,
639 p_pcm_attribute5 in varchar2 default null,
640 p_pcm_attribute6 in varchar2 default null,
641 p_pcm_attribute7 in varchar2 default null,
642 p_pcm_attribute8 in varchar2 default null,
643 p_pcm_attribute9 in varchar2 default null,
644 p_pcm_attribute10 in varchar2 default null,
645 p_pcm_attribute11 in varchar2 default null,
646 p_pcm_attribute12 in varchar2 default null,
647 p_pcm_attribute13 in varchar2 default null,
648 p_pcm_attribute14 in varchar2 default null,
649 p_pcm_attribute15 in varchar2 default null,
650 p_pcm_attribute16 in varchar2 default null,
651 p_pcm_attribute17 in varchar2 default null,
652 p_pcm_attribute18 in varchar2 default null,
653 p_pcm_attribute19 in varchar2 default null,
654 p_pcm_attribute20 in varchar2 default null,
655 p_pcm_attribute21 in varchar2 default null,
656 p_pcm_attribute22 in varchar2 default null,
657 p_pcm_attribute23 in varchar2 default null,
658 p_pcm_attribute24 in varchar2 default null,
659 p_pcm_attribute25 in varchar2 default null,
660 p_pcm_attribute26 in varchar2 default null,
661 p_pcm_attribute27 in varchar2 default null,
662 p_pcm_attribute28 in varchar2 default null,
663 p_pcm_attribute29 in varchar2 default null,
664 p_pcm_attribute30 in varchar2 default null,
665 p_request_id in number default null,
666 p_program_application_id in number default null,
667 p_program_id in number default null,
668 p_program_update_date in date default null,
669 p_object_version_number out nocopy number,
670 p_effective_date in date
671 ) is
672 --
673 l_rec ben_pcm_shd.g_rec_type;
674 l_proc varchar2(72) := g_package||'ins';
675 --
676 Begin
677 hr_utility.set_location('Entering:'||l_proc, 5);
678 --
679 -- Call conversion function to turn arguments into the
680 -- p_rec structure.
681 --
682 l_rec :=
683 ben_pcm_shd.convert_args
684 (
685 null,
686 null,
687 null,
688 p_lf_evt_ocrd_dt,
689 p_rqstbl_untl_dt,
690 p_ler_id,
691 p_per_in_ler_id,
692 p_prtt_enrt_actn_id,
693 p_person_id,
694 p_bnf_person_id,
695 p_dpnt_person_id,
696 p_cm_typ_id,
697 p_business_group_id,
698 p_pcm_attribute_category,
699 p_pcm_attribute1,
700 p_pcm_attribute2,
701 p_pcm_attribute3,
702 p_pcm_attribute4,
703 p_pcm_attribute5,
704 p_pcm_attribute6,
705 p_pcm_attribute7,
706 p_pcm_attribute8,
707 p_pcm_attribute9,
708 p_pcm_attribute10,
709 p_pcm_attribute11,
710 p_pcm_attribute12,
711 p_pcm_attribute13,
712 p_pcm_attribute14,
713 p_pcm_attribute15,
714 p_pcm_attribute16,
715 p_pcm_attribute17,
716 p_pcm_attribute18,
717 p_pcm_attribute19,
718 p_pcm_attribute20,
719 p_pcm_attribute21,
720 p_pcm_attribute22,
721 p_pcm_attribute23,
722 p_pcm_attribute24,
723 p_pcm_attribute25,
724 p_pcm_attribute26,
725 p_pcm_attribute27,
726 p_pcm_attribute28,
727 p_pcm_attribute29,
728 p_pcm_attribute30,
729 p_request_id,
730 p_program_application_id,
731 p_program_id,
732 p_program_update_date,
733 null
734 );
735 --
736 -- Having converted the arguments into the ben_pcm_rec
737 -- plsql record structure we call the corresponding record
738 -- business process.
739 --
740 ins(l_rec, p_effective_date);
741 --
742 -- Set the OUT arguments.
743 --
744 p_per_cm_id := l_rec.per_cm_id;
745 p_effective_start_date := l_rec.effective_start_date;
746 p_effective_end_date := l_rec.effective_end_date;
747 p_object_version_number := l_rec.object_version_number;
748 --
749 --
750 hr_utility.set_location(' Leaving:'||l_proc, 10);
751 End ins;
752 --
753 end ben_pcm_ins;