[Home] [Help]
PACKAGE BODY: APPS.PER_SPS_INS
Source
1 Package Body per_sps_ins as
2 /* $Header: pespsrhi.pkb 120.5.12000000.1 2007/01/22 04:39:24 appldev noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Private Global Definitions |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package varchar2(33) := ' per_sps_ins.'; -- Global package name
9 --
10 -- The following global variables are only to be used by
11 -- the set_base_key_value and pre_insert procedures.
12 --
13 g_step_id_i number default null;
14 --
15 -- ----------------------------------------------------------------------------
16 -- |------------------------< set_base_key_value >----------------------------|
17 -- ----------------------------------------------------------------------------
18 procedure set_base_key_value
19 (p_step_id in number) is
20 --
21 l_proc varchar2(72) := g_package||'set_base_key_value';
22 --
23 Begin
24 hr_utility.set_location('Entering:'||l_proc, 10);
25 --
26 per_sps_ins.g_step_id_i := p_step_id;
27 --
28 hr_utility.set_location(' Leaving:'||l_proc, 20);
29 End set_base_key_value;
30 --
31 --
32 -- ----------------------------------------------------------------------------
33 -- |----------------------------< dt_insert_dml >-----------------------------|
34 -- ----------------------------------------------------------------------------
35 -- {Start Of Comments}
36 --
37 -- Description:
38 -- This procedure controls the actual dml insert logic for datetrack. The
39 -- functions of this procedure are as follows:
40 -- 1) Get the object_version_number.
41 -- 2) To set the effective start and end dates to the corresponding
42 -- validation start and end dates. Also, the object version number
43 -- record attribute is set.
44 -- 3) To set and unset the g_api_dml status as required (as we are about to
45 -- perform dml).
46 -- 4) To insert the row into the schema with the derived effective start
47 -- and end dates and the object version number.
48 -- 5) To trap any constraint violations that may have occurred.
49 -- 6) To raise any other errors.
50 --
51 -- Prerequisites:
52 -- This is an internal private procedure which must be called from the
53 -- insert_dml and pre_update (logic permitting) procedure and must have
54 -- all mandatory arguments set.
55 --
56 -- In Parameters:
57 -- A Pl/Sql record structure.
58 --
59 -- Post Success:
60 -- The specified row will be inserted into the schema.
61 --
62 -- Post Failure:
63 -- On the insert dml failure it is important to note that we always reset the
64 -- g_api_dml status to false.
65 -- If a check or unique integrity constraint violation is raised the
66 -- constraint_error procedure will be called.
67 -- If any other error is reported, the error will be raised after the
68 -- g_api_dml status is reset.
69 --
70 -- Developer Implementation Notes:
71 -- This is an internal datetrack maintenance procedure which should
72 -- not be modified in anyway.
73 --
74 -- Access Status:
75 -- Internal Row Handler Use Only.
76 --
77 -- {End Of Comments}
78 -- ----------------------------------------------------------------------------
79 Procedure dt_insert_dml
80 (p_rec in out nocopy per_sps_shd.g_rec_type
81 ,p_effective_date in date
82 ,p_datetrack_mode in varchar2
83 ,p_validation_start_date in date
84 ,p_validation_end_date in date
85 ) is
86 -- Cursor to select 'old' created AOL who column values
87 --
88 Cursor C_Sel1 Is
89 select t.created_by,
90 t.creation_date
91 from per_spinal_point_steps_f t
92 where t.step_id = p_rec.step_id
93 and t.effective_start_date =
94 per_sps_shd.g_old_rec.effective_start_date
95 and t.effective_end_date = (p_validation_start_date - 1);
96 --
97 l_proc varchar2(72) := g_package||'dt_insert_dml';
98 l_created_by per_spinal_point_steps_f.created_by%TYPE;
99 l_creation_date per_spinal_point_steps_f.creation_date%TYPE;
100 l_last_update_date per_spinal_point_steps_f.last_update_date%TYPE;
101 l_last_updated_by per_spinal_point_steps_f.last_updated_by%TYPE;
102 l_last_update_login per_spinal_point_steps_f.last_update_login%TYPE;
103 --
104 Begin
105 hr_utility.set_location('Entering:'||l_proc, 5);
106 --
107 -- Set the effective start and end dates to the corresponding
108 -- validation start and end dates
109 --
110 p_rec.effective_start_date := p_validation_start_date;
111 p_rec.effective_end_date := p_validation_end_date;
112 --
113 -- If the datetrack_mode is not INSERT then we must populate the WHO
114 -- columns with the 'old' creation values and 'new' updated values.
115 --
116 If (p_datetrack_mode <> hr_api.g_insert) then
117 hr_utility.set_location(l_proc, 10);
118 --
119 -- Get the object version number for the insert
120 --
121 p_rec.object_version_number :=
122 dt_api.get_object_version_number
123 (p_base_table_name => 'per_spinal_point_steps_f'
124 ,p_base_key_column => 'step_id'
125 ,p_base_key_value => p_rec.step_id
126 );
127 --
128 -- Select the 'old' created values
129 --
130 Open C_Sel1;
131 Fetch C_Sel1 Into l_created_by, l_creation_date;
132 If C_Sel1%notfound Then
133 --
134 -- The previous 'old' created row has not been found. We need
135 -- to error as an internal datetrack problem exists.
136 --
137 Close C_Sel1;
138 fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
139 fnd_message.set_token('PROCEDURE', l_proc);
140 fnd_message.set_token('STEP','10');
141 fnd_message.raise_error;
142 End If;
143 Close C_Sel1;
144 --
145 -- Set the AOL updated WHO values
146 --
147 l_last_update_date := sysdate;
148 l_last_updated_by := fnd_global.user_id;
149 l_last_update_login := fnd_global.login_id;
150 Else
151 p_rec.object_version_number := 1; -- Initialise the object version
152 End If;
153 --
154 per_sps_shd.g_api_dml := true; -- Set the api dml status
155 --
156 -- Insert the row into: per_spinal_point_steps_f
157 --
158 insert into per_spinal_point_steps_f
159 (step_id
160 ,effective_start_date
161 ,effective_end_date
162 ,business_group_id
163 ,spinal_point_id
164 ,grade_spine_id
165 ,sequence
166 ,request_id
167 ,program_application_id
168 ,program_id
169 ,program_update_date
170 ,information1
171 ,information2
172 ,information3
173 ,information4
174 ,information5
175 ,information6
176 ,information7
177 ,information8
178 ,information9
179 ,information10
180 ,information11
181 ,information12
182 ,information13
183 ,information14
184 ,information15
185 ,information16
186 ,information17
187 ,information18
188 ,information19
189 ,information20
190 ,information21
191 ,information22
192 ,information23
193 ,information24
194 ,information25
195 ,information26
196 ,information27
197 ,information28
198 ,information29
199 ,information30
200 ,information_category
201 ,object_version_number
202 ,created_by
203 ,creation_date
204 ,last_update_date
205 ,last_updated_by
206 ,last_update_login
207 )
208 Values
209 (p_rec.step_id
210 ,p_rec.effective_start_date
211 ,p_rec.effective_end_date
212 ,p_rec.business_group_id
213 ,p_rec.spinal_point_id
214 ,p_rec.grade_spine_id
215 ,p_rec.sequence
216 ,p_rec.request_id
217 ,p_rec.program_application_id
218 ,p_rec.program_id
219 ,p_rec.program_update_date
220 ,p_rec.information1
221 ,p_rec.information2
222 ,p_rec.information3
223 ,p_rec.information4
224 ,p_rec.information5
225 ,p_rec.information6
226 ,p_rec.information7
227 ,p_rec.information8
228 ,p_rec.information9
229 ,p_rec.information10
230 ,p_rec.information11
231 ,p_rec.information12
232 ,p_rec.information13
233 ,p_rec.information14
234 ,p_rec.information15
235 ,p_rec.information16
236 ,p_rec.information17
237 ,p_rec.information18
238 ,p_rec.information19
239 ,p_rec.information20
240 ,p_rec.information21
241 ,p_rec.information22
242 ,p_rec.information23
243 ,p_rec.information24
244 ,p_rec.information25
245 ,p_rec.information26
246 ,p_rec.information27
247 ,p_rec.information28
248 ,p_rec.information29
249 ,p_rec.information30
250 ,p_rec.information_category
251 ,p_rec.object_version_number
252 ,l_created_by
253 ,l_creation_date
254 ,l_last_update_date
255 ,l_last_updated_by
256 ,l_last_update_login
257 );
258 --
259 per_sps_shd.g_api_dml := false; -- Unset the api dml status
260 hr_utility.set_location(' Leaving:'||l_proc, 15);
261 --
262 Exception
263 When hr_api.check_integrity_violated Then
264 -- A check constraint has been violated
265 per_sps_shd.g_api_dml := false; -- Unset the api dml status
266 per_sps_shd.constraint_error
267 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
268 When hr_api.unique_integrity_violated Then
269 -- Unique integrity has been violated
270 per_sps_shd.g_api_dml := false; -- Unset the api dml status
271 per_sps_shd.constraint_error
272 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
273 When Others Then
274 per_sps_shd.g_api_dml := false; -- Unset the api dml status
275 Raise;
276 End dt_insert_dml;
277 --
278 -- ----------------------------------------------------------------------------
279 -- |------------------------------< insert_dml >------------------------------|
280 -- ----------------------------------------------------------------------------
281 Procedure insert_dml
282 (p_rec in out nocopy per_sps_shd.g_rec_type
283 ,p_effective_date in date
284 ,p_datetrack_mode in varchar2
285 ,p_validation_start_date in date
286 ,p_validation_end_date in date
287 ) is
288 --
289 l_proc varchar2(72) := g_package||'insert_dml';
290 --
291 Begin
292 hr_utility.set_location('Entering:'||l_proc, 5);
293 --
294 per_sps_ins.dt_insert_dml
295 (p_rec => p_rec
296 ,p_effective_date => p_effective_date
297 ,p_datetrack_mode => p_datetrack_mode
298 ,p_validation_start_date => p_validation_start_date
299 ,p_validation_end_date => p_validation_end_date
300 );
301 --
302 hr_utility.set_location(' Leaving:'||l_proc, 10);
303 End insert_dml;
304 --
305 -- ----------------------------------------------------------------------------
306 -- |------------------------------< pre_insert >------------------------------|
307 -- ----------------------------------------------------------------------------
308 -- {Start Of Comments}
309 --
310 -- Description:
311 -- This private procedure contains any processing which is required before
312 -- the insert dml. Presently, if the entity has a corresponding primary
313 -- key which is maintained by an associating sequence, the primary key for
314 -- the entity will be populated with the next sequence value in
315 -- preparation for the insert dml.
316 -- Also, if comments are defined for this entity, the comments insert
317 -- logic will also be called, generating a comment_id if required.
318 --
319 -- Prerequisites:
320 -- This is an internal procedure which is called from the ins procedure.
321 --
322 -- In Parameters:
323 -- A Pl/Sql record structure.
324 --
325 -- Post Success:
326 -- Processing continues.
327 --
328 -- Post Failure:
329 -- If an error has occurred, an error message and exception will be raised
330 -- but not handled.
331 --
332 -- Developer Implementation Notes:
333 -- Any pre-processing required before the insert dml is issued should be
334 -- coded within this procedure. As stated above, a good example is the
335 -- generation of a primary key number via a corresponding sequence.
336 -- It is important to note that any 3rd party maintenance should be reviewed
337 -- before placing in this procedure.
338 --
339 -- Access Status:
340 -- Internal Row Handler Use Only.
341 --
342 -- {End Of Comments}
343 -- ----------------------------------------------------------------------------
344 Procedure pre_insert
345 (p_rec in out nocopy per_sps_shd.g_rec_type
346 ,p_effective_date in date
347 ,p_datetrack_mode in varchar2
348 ,p_validation_start_date in date
349 ,p_validation_end_date in date
350 ) is
351 --
352 Cursor C_Sel1 is select per_spinal_point_steps_s.nextval from sys.dual;
353 --
354 Cursor C_Sel2 is
355 Select null
356 from per_spinal_point_steps_f
357 where step_id =
358 per_sps_ins.g_step_id_i;
359 --
360 l_proc varchar2(72) := g_package||'pre_insert';
361 l_exists varchar2(1);
362 --
363 Begin
364 hr_utility.set_location('Entering:'||l_proc, 5);
365 --
366 If (per_sps_ins.g_step_id_i is not null) Then
367 --
368 -- Verify registered primary key values not already in use
369 --
370 Open C_Sel2;
371 Fetch C_Sel2 into l_exists;
372 If C_Sel2%found Then
373 Close C_Sel2;
374 --
375 -- The primary key values are already in use.
376 --
377 fnd_message.set_name('PER','PER_289391_KEY_ALREADY_USED');
378 fnd_message.set_token('TABLE_NAME','per_spinal_point_steps_f');
379 fnd_message.raise_error;
380 End If;
381 Close C_Sel2;
382 --
383 -- Use registered key values and clear globals
384 --
385 p_rec.step_id :=
386 per_sps_ins.g_step_id_i;
387 per_sps_ins.g_step_id_i := null;
388 Else
389 --
390 -- No registerd key values, so select the next sequence number
391 --
392 --
393 -- Select the next sequence number
394 --
395 Open C_Sel1;
396 Fetch C_Sel1 Into p_rec.step_id;
397 Close C_Sel1;
398 End If;
399 --
400 --
401 hr_utility.set_location(' Leaving:'||l_proc, 10);
402 End pre_insert;
403 --
404 -- ----------------------------------------------------------------------------
405 -- |----------------------------< post_insert >-------------------------------|
406 -- ----------------------------------------------------------------------------
407 -- {Start Of Comments}
408 --
409 -- Description:
410 -- This private procedure contains any processing which is required after
411 -- the insert dml.
412 --
413 -- Prerequisites:
414 -- This is an internal procedure which is called from the ins procedure.
415 --
416 -- In Parameters:
417 -- A Pl/Sql record structure.
418 --
419 -- Post Success:
420 -- Processing continues.
421 --
422 -- Post Failure:
423 -- If an error has occurred, an error message and exception will be raised
424 -- but not handled.
425 --
426 -- Developer Implementation Notes:
427 -- Any post-processing required after the insert dml is issued should be
428 -- coded within this procedure. It is important to note that any 3rd party
429 -- maintenance should be reviewed before placing in this procedure.
430 --
431 -- Access Status:
432 -- Internal Row Handler Use Only.
433 --
434 -- {End Of Comments}
435 -- ----------------------------------------------------------------------------
436 Procedure post_insert
437 (p_rec in per_sps_shd.g_rec_type
438 ,p_effective_date in date
439 ,p_datetrack_mode in varchar2
440 ,p_validation_start_date in date
441 ,p_validation_end_date in date
442 ) is
443 --
444 l_proc varchar2(72) := g_package||'post_insert';
445 l_pay_scale_name varchar2(30);
446 l_spinal_point_name varchar2(30);
447 l_grade_id number;
448 l_return varchar2(20);
449 l_message varchar2(2000) := null;
450 --
451 cursor csr_get_names is
452 select pps.name
453 ,psp.spinal_point
454 ,pgs.grade_id
455 from per_parent_spines pps
456 ,per_grade_spines_f pgs
457 ,per_spinal_points psp
458 where pgs.grade_spine_id = p_rec.grade_spine_id
459 and p_effective_date between
460 pgs.effective_start_date and pgs.effective_end_date
461 and pps.parent_spine_id = pgs.parent_spine_id
462 and psp.spinal_point_id = p_rec.spinal_point_id;
463
464 --
465 Begin
466 hr_utility.set_location('Entering:'||l_proc, 5);
467
468 --
469 -- Need to create option and option in plan for Benefit
470 --
471 --
472 open csr_get_names;
473 fetch csr_get_names into l_pay_scale_name,l_spinal_point_name,l_grade_id;
474 if csr_get_names%notfound then
475 close csr_get_names;
476 hr_utility.set_location(l_proc, 10);
477 else
478 /* comment out BUG3179239
479 l_return := pqh_gsp_sync_compensation_obj.create_option_for_point
480 (p_spinal_point_id => p_rec.spinal_point_id
481 ,p_pay_scale_name => l_pay_scale_name
482 ,p_spinal_point_name => l_spinal_point_name
483 );
484 --
485 hr_utility.trace('pqh_gsp_sync_compensation_obj.create_option_for_point : '
486 || l_return);
487 --
488 if l_return <> 'SUCCESS' Then
489 l_message := fnd_message.get;
490 hr_utility.trace('error message : ' || l_message);
491 fnd_message.set_name('PER','HR_289527_CRE_OPTION_FOR_POINT');
492 if l_message is not null then
493 fnd_message.set_token('ERR_CODE',l_message);
494 else
495 fnd_message.set_token('ERR_CODE','-1');
496 end if;
497 --
498 fnd_message.raise_error;
499 End if;
500
501 */ -- End of BUG3179239
502
503 l_return := pqh_gsp_sync_compensation_obj.create_oipl_for_step
504 (p_grade_id => l_grade_id
505 ,p_spinal_point_id => p_rec.spinal_point_id
506 ,p_step_id => p_rec.step_id
507 ,p_effective_date => p_effective_date
508 ,p_datetrack_mode => p_datetrack_mode
509 );
510 --
511 hr_utility.trace('pqh_gsp_sync_compensation_obj.oipl_for_step : '
512 || l_return);
513 --
514 if l_return <> 'SUCCESS' Then
515 l_message := fnd_message.get;
516 hr_utility.trace('error message : ' || l_message);
517 fnd_message.set_name('PER','HR_289528_CRE_OPTION_IN_PLAN');
518 if l_message is not null then
519 fnd_message.set_token('ERR_CODE',l_message);
520 else
521 fnd_message.set_token('ERR_CODE','-1');
522 end if;
523 --
524 fnd_message.raise_error;
525 End if;
526 end if;
527 --
528 hr_utility.set_location(l_proc, 20);
529 --
530 begin
531 --
532 per_sps_rki.after_insert
533 (p_effective_date
534 => p_effective_date
535 ,p_validation_start_date
536 => p_validation_start_date
537 ,p_validation_end_date
538 => p_validation_end_date
539 ,p_step_id
540 => p_rec.step_id
541 ,p_effective_start_date
542 => p_rec.effective_start_date
543 ,p_effective_end_date
544 => p_rec.effective_end_date
545 ,p_business_group_id
546 => p_rec.business_group_id
547 ,p_spinal_point_id
548 => p_rec.spinal_point_id
549 ,p_grade_spine_id
550 => p_rec.grade_spine_id
551 ,p_sequence
552 => p_rec.sequence
553 ,p_request_id
554 => p_rec.request_id
555 ,p_program_application_id
556 => p_rec.program_application_id
557 ,p_program_id
558 => p_rec.program_id
559 ,p_program_update_date
560 => p_rec.program_update_date
561 ,p_information1
562 => p_rec.information1
563 ,p_information2
564 => p_rec.information2
565 ,p_information3
566 => p_rec.information3
567 ,p_information4
568 => p_rec.information4
569 ,p_information5
570 => p_rec.information5
571 ,p_information6
572 => p_rec.information6
573 ,p_information7
574 => p_rec.information7
575 ,p_information8
576 => p_rec.information8
577 ,p_information9
578 => p_rec.information9
579 ,p_information10
580 => p_rec.information10
581 ,p_information11
582 => p_rec.information11
583 ,p_information12
584 => p_rec.information12
585 ,p_information13
586 => p_rec.information13
587 ,p_information14
588 => p_rec.information14
589 ,p_information15
590 => p_rec.information15
591 ,p_information16
592 => p_rec.information16
593 ,p_information17
594 => p_rec.information17
595 ,p_information18
596 => p_rec.information18
597 ,p_information19
598 => p_rec.information19
599 ,p_information20
600 => p_rec.information20
601 ,p_information21
602 => p_rec.information21
603 ,p_information22
604 => p_rec.information22
605 ,p_information23
606 => p_rec.information23
607 ,p_information24
608 => p_rec.information24
609 ,p_information25
610 => p_rec.information25
611 ,p_information26
612 => p_rec.information26
613 ,p_information27
614 => p_rec.information27
615 ,p_information28
616 => p_rec.information28
617 ,p_information29
618 => p_rec.information29
619 ,p_information30
620 => p_rec.information30
621 ,p_information_category
622 => p_rec.information_category
623 ,p_object_version_number
624 => p_rec.object_version_number
625 );
626 --
627 exception
628 --
629 when hr_api.cannot_find_prog_unit then
630 --
631 hr_api.cannot_find_prog_unit_error
632 (p_module_name => 'PER_SPINAL_POINT_STEPS_F'
633 ,p_hook_type => 'AI');
634 --
635 end;
636 --
637 hr_utility.set_location(' Leaving:'||l_proc, 30);
638 End post_insert;
639 --
640 -- ----------------------------------------------------------------------------
641 -- |-------------------------------< ins_lck >--------------------------------|
642 -- ----------------------------------------------------------------------------
643 -- {Start Of Comments}
644 --
645 -- Description:
646 -- The ins_lck process has one main function to perform. When inserting
647 -- a datetracked row, we must validate the DT mode.
648 --
649 -- Prerequisites:
650 -- This procedure can only be called for the datetrack mode of INSERT.
651 --
652 -- In Parameters:
653 --
654 -- Post Success:
655 -- On successful completion of the ins_lck process the parental
656 -- datetracked rows will be locked providing the p_enforce_foreign_locking
657 -- argument value is TRUE.
658 -- If the p_enforce_foreign_locking argument value is FALSE then the
659 -- parential rows are not locked.
660 --
661 -- Post Failure:
662 -- The Lck process can fail for:
663 -- 1) When attempting to lock the row the row could already be locked by
664 -- another user. This will raise the HR_Api.Object_Locked exception.
665 -- 2) When attempting to the lock the parent which doesn't exist.
666 -- For the entity to be locked the parent must exist!
667 --
668 -- Developer Implementation Notes:
669 -- None.
670 --
671 -- Access Status:
672 -- Internal Row Handler Use Only.
673 --
674 -- {End Of Comments}
675 -- ----------------------------------------------------------------------------
676 Procedure ins_lck
677 (p_effective_date in date
678 ,p_datetrack_mode in varchar2
679 ,p_rec in per_sps_shd.g_rec_type
680 ,p_validation_start_date out nocopy date
681 ,p_validation_end_date out nocopy date
682 ) is
683 --
684 l_proc varchar2(72) := g_package||'ins_lck';
685 l_validation_start_date date;
686 l_validation_end_date date;
687 --
688 Begin
689 hr_utility.set_location('Entering:'||l_proc, 5);
690 --
691 -- Validate the datetrack mode mode getting the validation start
692 -- and end dates for the specified datetrack operation.
693 --
694 dt_api.validate_dt_mode
695 (p_effective_date => p_effective_date
696 ,p_datetrack_mode => p_datetrack_mode
697 ,p_base_table_name => 'per_spinal_point_steps_f'
698 ,p_base_key_column => 'step_id'
699 ,p_base_key_value => p_rec.step_id
700 ,p_parent_table_name1 => 'per_grade_spines_f'
701 ,p_parent_key_column1 => 'grade_spine_id'
702 ,p_parent_key_value1 => p_rec.grade_spine_id
703 ,p_enforce_foreign_locking => true
704 ,p_validation_start_date => l_validation_start_date
705 ,p_validation_end_date => l_validation_end_date
706 );
707 --
708 -- Set the validation start and end date OUT arguments
709 --
710 p_validation_start_date := l_validation_start_date;
711 p_validation_end_date := l_validation_end_date;
712 --
713 hr_utility.set_location(' Leaving:'||l_proc, 10);
714 --
715 End ins_lck;
716 --
717 -- ----------------------------------------------------------------------------
718 -- |---------------------------------< ins >----------------------------------|
719 -- ----------------------------------------------------------------------------
720 Procedure ins
721 (p_effective_date in date
722 ,p_rec in out nocopy per_sps_shd.g_rec_type
723 ) is
724 --
725 l_proc varchar2(72) := g_package||'ins';
726 l_datetrack_mode varchar2(30) := hr_api.g_insert;
727 l_validation_start_date date;
728 l_validation_end_date date;
729 --
730 Begin
731 hr_utility.set_location('Entering:'||l_proc, 5);
732 --
733 -- Call the lock operation
734 --
735 per_sps_ins.ins_lck
736 (p_effective_date => p_effective_date
737 ,p_datetrack_mode => l_datetrack_mode
738 ,p_rec => p_rec
739 ,p_validation_start_date => l_validation_start_date
740 ,p_validation_end_date => l_validation_end_date
741 );
742 --
743 -- Call the supporting insert validate operations
744 --
745 per_sps_bus.insert_validate
746 (p_rec => p_rec
747 ,p_effective_date => p_effective_date
748 ,p_datetrack_mode => l_datetrack_mode
749 ,p_validation_start_date => l_validation_start_date
750 ,p_validation_end_date => l_validation_end_date
751 );
752 --
753 -- Call to raise any errors on multi-message list
754 hr_multi_message.end_validation_set;
755 --
756 -- Call the supporting pre-insert operation
757 --
758 per_sps_ins.pre_insert
759 (p_rec => p_rec
760 ,p_effective_date => p_effective_date
761 ,p_datetrack_mode => l_datetrack_mode
762 ,p_validation_start_date => l_validation_start_date
763 ,p_validation_end_date => l_validation_end_date
764 );
765 --
766 -- Insert the row
767 --
768 per_sps_ins.insert_dml
769 (p_rec => p_rec
770 ,p_effective_date => p_effective_date
771 ,p_datetrack_mode => l_datetrack_mode
772 ,p_validation_start_date => l_validation_start_date
773 ,p_validation_end_date => l_validation_end_date
774 );
775 --
776 -- Call the supporting post-insert operation
777 --
778 per_sps_ins.post_insert
779 (p_rec => p_rec
780 ,p_effective_date => p_effective_date
781 ,p_datetrack_mode => l_datetrack_mode
782 ,p_validation_start_date => l_validation_start_date
783 ,p_validation_end_date => l_validation_end_date
784 );
785 --
786 -- Call to raise any errors on multi-message list
787 hr_multi_message.end_validation_set;
788 --
789 hr_utility.set_location('Leaving:'||l_proc,10);
790 end ins;
791 --
792 -- ----------------------------------------------------------------------------
793 -- |---------------------------------< ins >----------------------------------|
794 -- ----------------------------------------------------------------------------
795 Procedure ins
796 (p_effective_date in date
797 ,p_business_group_id in number
798 ,p_spinal_point_id in number
799 ,p_grade_spine_id in number
800 ,p_sequence in number
801 ,p_request_id in number default null
802 ,p_program_application_id in number default null
803 ,p_program_id in number default null
804 ,p_program_update_date in date default null
805 ,p_information1 in varchar2 default null
806 ,p_information2 in varchar2 default null
807 ,p_information3 in varchar2 default null
808 ,p_information4 in varchar2 default null
809 ,p_information5 in varchar2 default null
810 ,p_information6 in varchar2 default null
811 ,p_information7 in varchar2 default null
812 ,p_information8 in varchar2 default null
813 ,p_information9 in varchar2 default null
814 ,p_information10 in varchar2 default null
815 ,p_information11 in varchar2 default null
816 ,p_information12 in varchar2 default null
817 ,p_information13 in varchar2 default null
818 ,p_information14 in varchar2 default null
819 ,p_information15 in varchar2 default null
820 ,p_information16 in varchar2 default null
821 ,p_information17 in varchar2 default null
822 ,p_information18 in varchar2 default null
823 ,p_information19 in varchar2 default null
824 ,p_information20 in varchar2 default null
825 ,p_information21 in varchar2 default null
826 ,p_information22 in varchar2 default null
827 ,p_information23 in varchar2 default null
828 ,p_information24 in varchar2 default null
829 ,p_information25 in varchar2 default null
830 ,p_information26 in varchar2 default null
831 ,p_information27 in varchar2 default null
832 ,p_information28 in varchar2 default null
833 ,p_information29 in varchar2 default null
834 ,p_information30 in varchar2 default null
835 ,p_information_category in varchar2 default null
836 ,p_step_id in out nocopy number
837 ,p_object_version_number out nocopy number
838 ,p_effective_start_date out nocopy date
839 ,p_effective_end_date out nocopy date
840 ) is
841 --
842 l_rec per_sps_shd.g_rec_type;
843 l_proc varchar2(72) := g_package||'ins';
844 --
845 Begin
846 hr_utility.set_location('Entering:'||l_proc, 5);
847 --
848 -- Call conversion function to turn arguments into the
849 -- p_rec structure.
850 --
851 l_rec :=
852 per_sps_shd.convert_args
853 (p_step_id
854 ,null
855 ,null
856 ,p_business_group_id
857 ,p_spinal_point_id
858 ,p_grade_spine_id
859 ,p_sequence
860 ,p_request_id
861 ,p_program_application_id
862 ,p_program_id
863 ,p_program_update_date
864 ,p_information1
865 ,p_information2
866 ,p_information3
867 ,p_information4
868 ,p_information5
869 ,p_information6
870 ,p_information7
871 ,p_information8
872 ,p_information9
873 ,p_information10
874 ,p_information11
875 ,p_information12
876 ,p_information13
877 ,p_information14
878 ,p_information15
879 ,p_information16
880 ,p_information17
881 ,p_information18
882 ,p_information19
883 ,p_information20
884 ,p_information21
885 ,p_information22
886 ,p_information23
887 ,p_information24
888 ,p_information25
889 ,p_information26
890 ,p_information27
891 ,p_information28
892 ,p_information29
893 ,p_information30
894 ,p_information_category
895 ,null
896 );
897 --
898 -- Having converted the arguments into the per_sps_rec
899 -- plsql record structure we call the corresponding record
900 -- business process.
901 --
902 per_sps_ins.ins
903 (p_effective_date
904 ,l_rec
905 );
906 --
907 -- Set the OUT arguments.
908 --
909 p_step_id := l_rec.step_id;
910 p_effective_start_date := l_rec.effective_start_date;
911 p_effective_end_date := l_rec.effective_end_date;
912 p_object_version_number := l_rec.object_version_number;
913 --
914 --
915 hr_utility.set_location(' Leaving:'||l_proc, 10);
916 End ins;
917 --
918 end per_sps_ins;