[Home] [Help]
PACKAGE BODY: APPS.BEN_ASG_UPD
Source
1 Package Body ben_asg_upd as
2 /* $Header: beasgrhi.pkb 120.0.12010000.3 2008/08/25 13:43:54 ppentapa ship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Private Global Definitions |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package varchar2(33) := ' ben_asg_upd.'; -- Global package name
9 --
10 -- ----------------------------------------------------------------------------
11 -- |----------------------------< dt_update_dml >-----------------------------|
12 -- ----------------------------------------------------------------------------
13 -- {Start Of Comments}
14 --
15 -- Description:
16 -- This procedure controls the execution of dml from the datetrack mode
17 -- of CORRECTION only. It is important to note that the object version
18 -- number is only increment by 1 because the datetrack correction is
19 -- soley for one datetracked row.
20 -- This procedure controls the actual dml update logic. The functions of this
21 -- procedure are as follows:
22 -- 1) Get the next object_version_number.
23 -- 2) To set and unset the g_api_dml status as required (as we are about to
24 -- perform dml).
25 -- 3) To update the specified row in the schema using the primary key in
26 -- the predicates.
27 -- 4) To trap any constraint violations that may have occurred.
28 -- 5) To raise any other errors.
29 --
30 -- Pre Conditions:
31 -- This is an internal private procedure which must be called from the
32 -- update_dml procedure.
33 --
34 -- In Arguments:
35 -- A Pl/Sql record structre.
36 --
37 -- Post Success:
38 -- The specified row will be updated in the schema.
39 --
40 -- Post Failure:
41 -- On the update 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 -- The update 'set' arguments list should be modified if any of your
50 -- attributes are not updateable.
51 --
52 -- Access Status:
53 -- Internal Table Handler Use Only.
54 --
55 -- {End Of Comments}
56 -- ----------------------------------------------------------------------------
57 Procedure dt_update_dml
58 (p_rec in out nocopy per_asg_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 l_proc varchar2(72) := g_package||'dt_update_dml';
65 --
66 Begin
67 hr_utility.set_location('Entering:'||l_proc, 5);
68 --
69 If (p_datetrack_mode = 'CORRECTION') then
70 hr_utility.set_location(l_proc, 10);
71 --
72 -- Because we are updating a row we must get the next object
73 -- version number.
74 --
75 p_rec.object_version_number :=
76 dt_api.get_object_version_number
77 (p_base_table_name => 'per_all_assignments_f',
78 p_base_key_column => 'assignment_id',
79 p_base_key_value => p_rec.assignment_id);
80 --
81 per_asg_shd.g_api_dml := true; -- Set the api dml status
82 --
83 -- Update the per_all_assignments_f Row
84 --
85 update per_all_assignments_f
86 set
87 assignment_id = p_rec.assignment_id,
88 recruiter_id = p_rec.recruiter_id,
89 grade_id = p_rec.grade_id,
90 position_id = p_rec.position_id,
91 job_id = p_rec.job_id,
92 assignment_status_type_id = p_rec.assignment_status_type_id,
93 payroll_id = p_rec.payroll_id,
94 location_id = p_rec.location_id,
95 person_referred_by_id = p_rec.person_referred_by_id,
96 supervisor_id = p_rec.supervisor_id,
97 special_ceiling_step_id = p_rec.special_ceiling_step_id,
98 recruitment_activity_id = p_rec.recruitment_activity_id,
99 source_organization_id = p_rec.source_organization_id,
100 organization_id = p_rec.organization_id,
101 people_group_id = p_rec.people_group_id,
102 soft_coding_keyflex_id = p_rec.soft_coding_keyflex_id,
103 vacancy_id = p_rec.vacancy_id,
104 pay_basis_id = p_rec.pay_basis_id,
105 application_id = p_rec.application_id,
106 assignment_number = p_rec.assignment_number,
107 change_reason = p_rec.change_reason,
108 comment_id = p_rec.comment_id,
109 date_probation_end = p_rec.date_probation_end,
110 default_code_comb_id = p_rec.default_code_comb_id,
111 employment_category = p_rec.employment_category,
112 frequency = p_rec.frequency,
113 internal_address_line = p_rec.internal_address_line,
114 manager_flag = p_rec.manager_flag,
115 normal_hours = p_rec.normal_hours,
116 perf_review_period = p_rec.perf_review_period,
117 perf_review_period_frequency = p_rec.perf_review_period_frequency,
118 probation_period = p_rec.probation_period,
119 probation_unit = p_rec.probation_unit,
120 sal_review_period = p_rec.sal_review_period,
121 sal_review_period_frequency = p_rec.sal_review_period_frequency,
122 set_of_books_id = p_rec.set_of_books_id,
123 source_type = p_rec.source_type,
124 time_normal_finish = p_rec.time_normal_finish,
125 time_normal_start = p_rec.time_normal_start,
126 bargaining_unit_code = p_rec.bargaining_unit_code,
127 labour_union_member_flag = p_rec.labour_union_member_flag,
128 hourly_salaried_code = p_rec.hourly_salaried_code,
129 request_id = p_rec.request_id,
130 program_application_id = p_rec.program_application_id,
131 program_id = p_rec.program_id,
132 program_update_date = p_rec.program_update_date,
133 ass_attribute_category = p_rec.ass_attribute_category,
134 ass_attribute1 = p_rec.ass_attribute1,
135 ass_attribute2 = p_rec.ass_attribute2,
136 ass_attribute3 = p_rec.ass_attribute3,
137 ass_attribute4 = p_rec.ass_attribute4,
138 ass_attribute5 = p_rec.ass_attribute5,
139 ass_attribute6 = p_rec.ass_attribute6,
140 ass_attribute7 = p_rec.ass_attribute7,
141 ass_attribute8 = p_rec.ass_attribute8,
142 ass_attribute9 = p_rec.ass_attribute9,
143 ass_attribute10 = p_rec.ass_attribute10,
144 ass_attribute11 = p_rec.ass_attribute11,
145 ass_attribute12 = p_rec.ass_attribute12,
146 ass_attribute13 = p_rec.ass_attribute13,
147 ass_attribute14 = p_rec.ass_attribute14,
148 ass_attribute15 = p_rec.ass_attribute15,
149 ass_attribute16 = p_rec.ass_attribute16,
150 ass_attribute17 = p_rec.ass_attribute17,
151 ass_attribute18 = p_rec.ass_attribute18,
152 ass_attribute19 = p_rec.ass_attribute19,
153 ass_attribute20 = p_rec.ass_attribute20,
154 ass_attribute21 = p_rec.ass_attribute21,
155 ass_attribute22 = p_rec.ass_attribute22,
156 ass_attribute23 = p_rec.ass_attribute23,
157 ass_attribute24 = p_rec.ass_attribute24,
158 ass_attribute25 = p_rec.ass_attribute25,
159 ass_attribute26 = p_rec.ass_attribute26,
160 ass_attribute27 = p_rec.ass_attribute27,
161 ass_attribute28 = p_rec.ass_attribute28,
162 ass_attribute29 = p_rec.ass_attribute29,
163 ass_attribute30 = p_rec.ass_attribute30,
164 title = p_rec.title,
165 object_version_number = p_rec.object_version_number ,
166 contract_id = p_rec.contract_id,
167 establishment_id = p_rec.establishment_id,
168 collective_agreement_id = p_rec.collective_agreement_id,
169 cagr_grade_def_id = p_rec.cagr_grade_def_id,
170 cagr_id_flex_num = p_rec.cagr_id_flex_num,
171 notice_period = p_rec.notice_period,
172 notice_period_uom = p_rec.notice_period_uom,
173 employee_category = p_rec.employee_category,
174 work_at_home = p_rec.work_at_home,
175 job_post_source_name = p_rec.job_post_source_name,
176 posting_content_id = p_rec.posting_content_id,
177 period_of_placement_date_start = p_rec.period_of_placement_date_start,
178 vendor_id = p_rec.vendor_id,
179 vendor_employee_number = p_rec.vendor_employee_number,
180 vendor_assignment_number = p_rec.vendor_assignment_number,
181 assignment_category = p_rec.assignment_category,
182 project_title = p_rec.project_title,
183 applicant_rank = p_rec.applicant_rank
184 where assignment_id = p_rec.assignment_id
185 and effective_start_date = p_validation_start_date
186 and effective_end_date = p_validation_end_date;
187 --
188 per_asg_shd.g_api_dml := false; -- Unset the api dml status
189 --
190 -- Set the effective start and end dates
191 --
192 p_rec.effective_start_date := p_validation_start_date;
193 p_rec.effective_end_date := p_validation_end_date;
194 End If;
195 --
196 hr_utility.set_location(' Leaving:'||l_proc, 15);
197 Exception
198 When hr_api.check_integrity_violated Then
199 -- A check constraint has been violated
200 per_asg_shd.g_api_dml := false; -- Unset the api dml status
201 per_asg_shd.constraint_error
202 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
203 When hr_api.unique_integrity_violated Then
204 -- Unique integrity has been violated
205 per_asg_shd.g_api_dml := false; -- Unset the api dml status
206 per_asg_shd.constraint_error
207 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
208 When Others Then
209 per_asg_shd.g_api_dml := false; -- Unset the api dml status
210 Raise;
211 End dt_update_dml;
212 --
213 -- ----------------------------------------------------------------------------
214 -- |------------------------------< update_dml >------------------------------|
215 -- ----------------------------------------------------------------------------
216 -- {Start Of Comments}
217 --
218 -- Description:
219 -- This procedure calls the dt_update_dml control logic which handles
220 -- the actual datetrack dml.
221 --
222 -- Pre Conditions:
223 -- This is an internal private procedure which must be called from the upd
224 -- procedure.
225 --
226 -- In Arguments:
227 -- A Pl/Sql record structre.
228 --
229 -- Post Success:
230 -- Processing contines.
231 --
232 -- Post Failure:
233 -- No specific error handling is required within this procedure.
234 --
235 -- Developer Implementation Notes:
236 -- The update 'set' arguments list should be modified if any of your
237 -- attributes are not updateable.
238 --
239 -- Access Status:
240 -- Internal Table Handler Use Only.
241 --
242 -- {End Of Comments}
243 -- ----------------------------------------------------------------------------
244 Procedure update_dml
245 (p_rec in out nocopy per_asg_shd.g_rec_type,
246 p_effective_date in date,
247 p_datetrack_mode in varchar2,
248 p_validation_start_date in date,
249 p_validation_end_date in date) is
250 --
251 l_proc varchar2(72) := g_package||'update_dml';
252 --
253 Begin
254 hr_utility.set_location('Entering:'||l_proc, 5);
255 --
256 dt_update_dml(p_rec => p_rec,
257 p_effective_date => p_effective_date,
258 p_datetrack_mode => p_datetrack_mode,
259 p_validation_start_date => p_validation_start_date,
260 p_validation_end_date => p_validation_end_date);
261 --
262 hr_utility.set_location(' Leaving:'||l_proc, 10);
263 End update_dml;
264 --
265 -- ----------------------------------------------------------------------------
266 -- |----------------------------< dt_pre_update >-----------------------------|
267 -- ----------------------------------------------------------------------------
268 -- {Start Of Comments}
269 --
270 -- Description:
271 -- The dt_pre_update procedure controls the execution
272 -- of dml for the datetrack modes of: UPDATE, UPDATE_OVERRIDE
273 -- and UPDATE_CHANGE_INSERT only. The execution required is as
274 -- follows:
275 --
276 -- 1) Providing the datetrack update mode is not 'CORRECTION'
277 -- then set the effective end date of the current row (this
278 -- will be the validation_start_date - 1).
279 -- 2) If the datetrack mode is 'UPDATE_OVERRIDE' then call the
280 -- corresponding delete_dml process to delete any future rows
281 -- where the effective_start_date is greater than or equal to
282 -- the validation_start_date.
283 -- 3) Call the insert_dml process to insert the new updated row
284 -- details..
285 --
286 -- Pre Conditions:
287 -- This is an internal procedure which is called from the
288 -- pre_update procedure.
289 --
290 -- In Arguments:
291 --
292 -- Post Success:
293 -- Processing continues.
294 --
295 -- Post Failure:
296 -- If an error has occurred, an error message and exception will be raised
297 -- but not handled.
298 --
299 -- Developer Implementation Notes:
300 -- This is an internal procedure which is required by Datetrack. Don't
301 -- remove or modify.
302 --
303 -- Access Status:
304 -- Internal Table Handler Use Only.
305 --
306 -- {End Of Comments}
307 -- ----------------------------------------------------------------------------
308 Procedure dt_pre_update
309 (p_rec in out nocopy per_asg_shd.g_rec_type,
310 p_effective_date in date,
311 p_datetrack_mode in varchar2,
312 p_validation_start_date in date,
313 p_validation_end_date in date) is
314 --
315 l_proc varchar2(72) := g_package||'dt_pre_update';
316 l_dummy_version_number number;
317 --
318 Begin
319 hr_utility.set_location('Entering:'||l_proc, 5);
320 If (p_datetrack_mode <> 'CORRECTION') then
321 hr_utility.set_location(l_proc, 10);
322 --
323 -- Update the current effective end date
324 --
325 per_asg_shd.upd_effective_end_date
326 (p_effective_date => p_effective_date,
327 p_base_key_value => p_rec.assignment_id,
328 p_new_effective_end_date => (p_validation_start_date - 1),
329 p_validation_start_date => p_validation_start_date,
330 p_validation_end_date => p_validation_end_date,
331 p_object_version_number => l_dummy_version_number);
332 --
333 If (p_datetrack_mode = 'UPDATE_OVERRIDE') then
334 hr_utility.set_location(l_proc, 15);
335 --
336 -- As the datetrack mode is 'UPDATE_OVERRIDE' then we must
337 -- delete any future rows
338 --
339 per_asg_del.delete_dml
340 (p_rec => p_rec,
341 p_effective_date => p_effective_date,
342 p_datetrack_mode => p_datetrack_mode,
343 p_validation_start_date => p_validation_start_date,
344 p_validation_end_date => p_validation_end_date);
345 End If;
346 hr_utility.set_location(l_proc, 20);
347 --
348 -- We must now insert the updated row
349 --
350 ben_asg_ins.insert_dml
351 (p_rec => p_rec,
352 p_effective_date => p_effective_date,
353 p_datetrack_mode => p_datetrack_mode,
354 p_validation_start_date => p_validation_start_date,
355 p_validation_end_date => p_validation_end_date);
356 End If;
357 hr_utility.set_location(' Leaving:'||l_proc, 20);
358 End dt_pre_update;
359 --
360 -- ----------------------------------------------------------------------------
361 -- |------------------------------< pre_update >------------------------------|
362 -- ----------------------------------------------------------------------------
363 -- {Start Of Comments}
364 --
365 -- Description:
366 -- This private procedure contains any processing which is required before
367 -- the update dml.
368 --
369 -- Pre Conditions:
370 -- This is an internal procedure which is called from the upd procedure.
371 --
372 -- In Arguments:
373 -- A Pl/Sql record structre.
374 --
375 -- Post Success:
376 -- Processing continues.
377 --
378 -- Post Failure:
379 -- If an error has occurred, an error message and exception will be raised
380 -- but not handled.
381 --
382 -- Developer Implementation Notes:
383 -- Any pre-processing required before the update dml is issued should be
384 -- coded within this procedure. It is important to note that any 3rd party
385 -- maintenance should be reviewed before placing in this procedure. The call
386 -- to the dt_update_dml procedure should NOT be removed.
387 --
388 -- Access Status:
389 -- Internal Table Handler Use Only.
390 --
391 -- {End Of Comments}
392 -- ----------------------------------------------------------------------------
393 Procedure pre_update
394 (p_rec in out nocopy per_asg_shd.g_rec_type,
395 p_effective_date in date,
396 p_datetrack_mode in varchar2,
397 p_validation_start_date in date,
398 p_validation_end_date in date) is
399 --
400 l_proc varchar2(72) := g_package||'pre_update';
401 l_rowid varchar2(72);
402 l_eed date;
403 l_esd date;
404 --
405 Cursor csr_rowid is
406 select rowid, effective_start_date, effective_end_date
407 from per_all_assignments_f
408 where assignment_id = p_rec.assignment_id
409 and p_effective_date between
410 effective_start_date and effective_end_date;
411 --
412 cursor csr_rowid_u is
413 select rowid
414 from per_all_assignments_f
415 where assignment_id = p_rec.assignment_id
416 and p_effective_date -1 between
417 effective_start_date and effective_end_date;
418 --
419 Begin
420 hr_utility.set_location('Entering:'||l_proc, 1);
421 --
422 -- Insert the comment text if comments exist
423 --
424 If (p_rec.comment_text is not null and p_rec.comment_id is null) then
425 hr_comm_api.ins(p_comment_id => p_rec.comment_id,
426 p_source_table_name => 'PER_ALL_ASSIGNMENTS_F',
427 p_comment_text => p_rec.comment_text);
428 -- Update the comments if they have changed
429 ElsIf (p_rec.comment_id is not null and p_rec.comment_text <>
430 per_asg_shd.g_old_rec.comment_text) then
431 hr_comm_api.upd(p_comment_id => p_rec.comment_id,
432 p_source_table_name => 'PER_ALL_ASSIGNMENTS_F',
433 p_comment_text => p_rec.comment_text);
434 End If;
435 hr_utility.set_location(l_proc, 10);
436 --
437 -- Generate date probation end
438 --
439 -- Business Rule Mapping
440 -- =====================
441 -- Rule CHK_DATE_PROBATION_END c,e and f
442 -- Rule CHK_PROBATION_PERIOD c
443 -- Rule CHK_PROBATION_UNIT d
444 --
445 per_asg_bus2.gen_date_probation_end
446 (p_assignment_id => p_rec.assignment_id
447 ,p_effective_date => P_effective_date
448 ,p_probation_unit => p_rec.probation_unit
449 ,p_probation_period => p_rec.probation_period
450 ,p_validation_start_date => p_validation_start_date
451 ,p_object_version_number => p_rec.object_version_number
452 ,p_date_probation_end => p_rec.date_probation_end
453 );
454 --
455 hr_utility.set_location(l_proc, 20);
456 --
457 dt_pre_update
458 (p_rec => p_rec,
459 p_effective_date => p_effective_date,
460 p_datetrack_mode => p_datetrack_mode,
461 p_validation_start_date => p_validation_start_date,
462 p_validation_end_date => p_validation_end_date);
463 --
464 -- Check for DT mode, if correction use current values
465 -- else use values from currently existing record.
466 --
467 if p_datetrack_mode <> 'CORRECTION' then
468 open csr_rowid_u;
469 fetch csr_rowid_u into l_rowid;
470 close csr_rowid_u;
471 l_esd := p_rec.effective_start_date;
472 l_eed := p_rec.effective_end_date;
473 else
474 open csr_rowid;
475 fetch csr_rowid into l_rowid, l_esd, l_eed;
476 close csr_rowid;
477 end if;
478 --
479 ben_asg_ins.g_trgr_loc_chg := FALSE; --Bug 2666342
480
481 ben_dt_trgr_handle.assignment
482 (p_rowid => l_rowid
483 ,p_assignment_id => p_rec.assignment_id
484 ,p_business_group_id => p_rec.business_group_id
485 ,p_person_id => p_rec.person_id
486 ,p_effective_start_date => l_esd
487 ,p_effective_end_date => l_eed
488 ,p_assignment_status_type_id => p_rec.assignment_status_type_id
489 ,p_assignment_type => p_rec.assignment_type
490 ,p_organization_id => p_rec.organization_id
491 ,p_primary_flag => p_rec.primary_flag
492 ,p_change_reason => p_rec.change_reason
493 ,p_employment_category => p_rec.employment_category
494 ,p_frequency => p_rec.frequency
495 ,p_grade_id => p_rec.grade_id
496 ,p_job_id => p_rec.job_id
497 ,p_position_id => p_rec.position_id
498 ,p_location_id => p_rec.location_id
499 ,p_normal_hours => p_rec.normal_hours
500 ,p_payroll_id => p_rec.payroll_id
501 ,p_pay_basis_id => p_rec.pay_basis_id
502 ,p_bargaining_unit_code => p_rec.bargaining_unit_code
503 ,p_labour_union_member_flag => p_rec.labour_union_member_flag
504 ,p_hourly_salaried_code => p_rec.hourly_salaried_code
505 ,p_people_group_id => p_rec.people_group_id
506 ,p_ass_attribute1 => p_rec.ass_attribute1
507 ,p_ass_attribute2 => p_rec.ass_attribute2
508 ,p_ass_attribute3 => p_rec.ass_attribute3
509 ,p_ass_attribute4 => p_rec.ass_attribute4
510 ,p_ass_attribute5 => p_rec.ass_attribute5
511 ,p_ass_attribute6 => p_rec.ass_attribute6
512 ,p_ass_attribute7 => p_rec.ass_attribute7
513 ,p_ass_attribute8 => p_rec.ass_attribute8
514 ,p_ass_attribute9 => p_rec.ass_attribute9
515 ,p_ass_attribute10 => p_rec.ass_attribute10
516 ,p_ass_attribute11 => p_rec.ass_attribute11
517 ,p_ass_attribute12 => p_rec.ass_attribute12
518 ,p_ass_attribute13 => p_rec.ass_attribute13
519 ,p_ass_attribute14 => p_rec.ass_attribute14
520 ,p_ass_attribute15 => p_rec.ass_attribute15
521 ,p_ass_attribute16 => p_rec.ass_attribute16
522 ,p_ass_attribute17 => p_rec.ass_attribute17
523 ,p_ass_attribute18 => p_rec.ass_attribute18
524 ,p_ass_attribute19 => p_rec.ass_attribute19
525 ,p_ass_attribute20 => p_rec.ass_attribute20
526 ,p_ass_attribute21 => p_rec.ass_attribute21
527 ,p_ass_attribute22 => p_rec.ass_attribute22
528 ,p_ass_attribute23 => p_rec.ass_attribute23
529 ,p_ass_attribute24 => p_rec.ass_attribute24
530 ,p_ass_attribute25 => p_rec.ass_attribute25
531 ,p_ass_attribute26 => p_rec.ass_attribute26
532 ,p_ass_attribute27 => p_rec.ass_attribute27
533 ,p_ass_attribute28 => p_rec.ass_attribute28
534 ,p_ass_attribute29 => p_rec.ass_attribute29
535 ,p_ass_attribute30 => p_rec.ass_attribute30
536 );
537
538 -- Reset the variable after checking for Assignment LEs
539 ben_asg_ins.g_trgr_loc_chg := TRUE;
540
541 --
542 hr_utility.set_location(' Leaving:'||l_proc, 30);
543 End pre_update;
544 --
545 -- ----------------------------------------------------------------------------
546 -- |-----------------------------< post_update >------------------------------|
547 -- ----------------------------------------------------------------------------
548 -- {Start Of Comments}
549 --
550 -- Description:
551 -- This private procedure contains any processing which is required after the
552 -- update dml.
553 --
554 -- Pre Conditions:
555 -- This is an internal procedure which is called from the upd procedure.
556 --
557 -- In Arguments:
558 -- A Pl/Sql record structre.
559 --
560 -- Post Success:
561 -- Processing continues.
562 --
563 -- Post Failure:
564 -- If an error has occurred, an error message and exception will be raised
565 -- but not handled.
566 --
567 -- Developer Implementation Notes:
568 -- Any post-processing required after the update dml is issued should be
569 -- coded within this procedure. It is important to note that any 3rd party
570 -- maintenance should be reviewed before placing in this procedure.
571 --
572 -- Access Status:
573 -- Internal Table Handler Use Only.
574 --
575 -- {End Of Comments}
576 -- ----------------------------------------------------------------------------
577 Procedure post_update
578 (p_rec in per_asg_shd.g_rec_type,
579 p_effective_date in date,
580 p_datetrack_mode in varchar2,
581 p_validation_start_date in date,
582 p_validation_end_date in date,
583 p_payroll_id_updated in boolean,
584 p_other_manager_warning in boolean,
585 p_hourly_salaried_warning in boolean,
586 p_no_managers_warning in boolean,
587 p_org_now_no_manager_warning in boolean) is
588 --
589 l_proc varchar2(72) := g_package||'post_update';
590 --
591 Begin
592 hr_utility.set_location('Entering:'||l_proc, 5);
593 --
594 -- Start of API User Hook for post_update.
595 begin
596 per_asg_rku.after_update
597 (p_effective_date => p_effective_date
598 ,p_datetrack_mode => p_datetrack_mode
599 ,p_validation_start_date => p_validation_start_date
600 ,p_validation_end_date => p_validation_end_date
601 ,p_assignment_id => p_rec.assignment_id
602 ,p_effective_start_date => p_rec.effective_start_date
603 ,p_effective_end_date => p_rec.effective_end_date
604 ,p_recruiter_id => p_rec.recruiter_id
605 ,p_grade_id => p_rec.grade_id
606 ,p_position_id => p_rec.position_id
607 ,p_job_id => p_rec.job_id
608 ,p_assignment_status_type_id => p_rec.assignment_status_type_id
609 ,p_payroll_id => p_rec.payroll_id
610 ,p_location_id => p_rec.location_id
611 ,p_person_referred_by_id => p_rec.person_referred_by_id
612 ,p_supervisor_id => p_rec.supervisor_id
613 ,p_special_ceiling_step_id => p_rec.special_ceiling_step_id
614 ,p_recruitment_activity_id => p_rec.recruitment_activity_id
615 ,p_source_organization_id => p_rec.source_organization_id
616 ,p_organization_id => p_rec.organization_id
617 ,p_people_group_id => p_rec.people_group_id
618 ,p_soft_coding_keyflex_id => p_rec.soft_coding_keyflex_id
619 ,p_vacancy_id => p_rec.vacancy_id
620 ,p_pay_basis_id => p_rec.pay_basis_id
621 ,p_assignment_type => p_rec.assignment_type
622 ,p_primary_flag => p_rec.primary_flag
623 ,p_application_id => p_rec.application_id
624 ,p_assignment_number => p_rec.assignment_number
625 ,p_change_reason => p_rec.change_reason
626 ,p_comment_id => p_rec.comment_id
627 ,p_comments => p_rec.comment_text
628 ,p_date_probation_end => p_rec.date_probation_end
629 ,p_default_code_comb_id => p_rec.default_code_comb_id
630 ,p_employment_category => p_rec.employment_category
631 ,p_frequency => p_rec.frequency
632 ,p_internal_address_line => p_rec.internal_address_line
633 ,p_manager_flag => p_rec.manager_flag
634 ,p_normal_hours => p_rec.normal_hours
635 ,p_perf_review_period => p_rec.perf_review_period
636 ,p_perf_review_period_frequen => p_rec.perf_review_period_frequency
637 ,p_period_of_service_id => p_rec.period_of_service_id
638 ,p_probation_period => p_rec.probation_period
639 ,p_probation_unit => p_rec.probation_unit
640 ,p_sal_review_period => p_rec.sal_review_period
641 ,p_sal_review_period_frequen => p_rec.sal_review_period_frequency
642 ,p_set_of_books_id => p_rec.set_of_books_id
643 ,p_source_type => p_rec.source_type
644 ,p_time_normal_finish => p_rec.time_normal_finish
645 ,p_time_normal_start => p_rec.time_normal_start
646 ,p_bargaining_unit_code => p_rec.bargaining_unit_code
647 ,p_labour_union_member_flag => p_rec.labour_union_member_flag
648 ,p_hourly_salaried_code => p_rec.hourly_salaried_code
649 ,p_request_id => p_rec.request_id
650 ,p_program_application_id => p_rec.program_application_id
651 ,p_program_id => p_rec.program_id
652 ,p_program_update_date => p_rec.program_update_date
653 ,p_ass_attribute_category => p_rec.ass_attribute_category
654 ,p_ass_attribute1 => p_rec.ass_attribute1
655 ,p_ass_attribute2 => p_rec.ass_attribute2
656 ,p_ass_attribute3 => p_rec.ass_attribute3
657 ,p_ass_attribute4 => p_rec.ass_attribute4
658 ,p_ass_attribute5 => p_rec.ass_attribute5
659 ,p_ass_attribute6 => p_rec.ass_attribute6
660 ,p_ass_attribute7 => p_rec.ass_attribute7
661 ,p_ass_attribute8 => p_rec.ass_attribute8
662 ,p_ass_attribute9 => p_rec.ass_attribute9
663 ,p_ass_attribute10 => p_rec.ass_attribute10
664 ,p_ass_attribute11 => p_rec.ass_attribute11
665 ,p_ass_attribute12 => p_rec.ass_attribute12
666 ,p_ass_attribute13 => p_rec.ass_attribute13
667 ,p_ass_attribute14 => p_rec.ass_attribute14
668 ,p_ass_attribute15 => p_rec.ass_attribute15
669 ,p_ass_attribute16 => p_rec.ass_attribute16
670 ,p_ass_attribute17 => p_rec.ass_attribute17
671 ,p_ass_attribute18 => p_rec.ass_attribute18
672 ,p_ass_attribute19 => p_rec.ass_attribute19
673 ,p_ass_attribute20 => p_rec.ass_attribute20
674 ,p_ass_attribute21 => p_rec.ass_attribute21
675 ,p_ass_attribute22 => p_rec.ass_attribute22
676 ,p_ass_attribute23 => p_rec.ass_attribute23
677 ,p_ass_attribute24 => p_rec.ass_attribute24
678 ,p_ass_attribute25 => p_rec.ass_attribute25
679 ,p_ass_attribute26 => p_rec.ass_attribute26
680 ,p_ass_attribute27 => p_rec.ass_attribute27
681 ,p_ass_attribute28 => p_rec.ass_attribute28
682 ,p_ass_attribute29 => p_rec.ass_attribute29
683 ,p_ass_attribute30 => p_rec.ass_attribute30
684 ,p_title => p_rec.title
685 ,p_contract_id => p_rec.contract_id
686 ,p_establishment_id => p_rec.establishment_id
687 ,p_collective_agreement_id => p_rec.collective_agreement_id
688 ,p_cagr_grade_def_id => p_rec.cagr_grade_def_id
689 ,p_cagr_id_flex_num => p_rec.cagr_id_flex_num
690 ,p_object_version_number => p_rec.object_version_number
691 ,p_payroll_id_updated => p_payroll_id_updated
692 ,p_other_manager_warning => p_other_manager_warning
693 ,p_hourly_salaried_warning => p_hourly_salaried_warning
694 ,p_no_managers_warning => p_no_managers_warning
695 ,p_org_now_no_manager_warning => p_org_now_no_manager_warning
696 ,p_notice_period => p_rec.notice_period
697 ,p_notice_period_uom => p_rec.notice_period_uom
698 ,p_employee_category => p_rec.employee_category
699 ,p_work_at_home => p_rec.work_at_home
700 ,p_job_post_source_name => p_rec.job_post_source_name
701 ,p_posting_content_id => p_rec.posting_content_id
702 ,p_placement_date_start => p_rec.period_of_placement_date_start
703 ,p_vendor_id => p_rec.vendor_id
704 ,p_vendor_employee_number => p_rec.vendor_employee_number
705 ,p_vendor_assignment_number => p_rec.vendor_assignment_number
706 ,p_assignment_category => p_rec.assignment_category
707 ,p_project_title => p_rec.project_title
708 ,p_applicant_rank => p_rec.applicant_rank
709 ,p_grade_ladder_pgm_id => p_rec.grade_ladder_pgm_id
710 ,p_supervisor_assignment_id => p_rec.supervisor_assignment_id /*Bug 2976136*/
711 ,p_vendor_site_id => p_rec.vendor_site_id
712 ,p_po_header_id => p_rec.po_header_id
713 ,p_po_line_id => p_rec.po_line_id
714 ,p_projected_assignment_end => p_rec.projected_assignment_end
715 ,p_effective_start_date_o
716 => per_asg_shd.g_old_rec.effective_start_date
717 ,p_effective_end_date_o
718 => per_asg_shd.g_old_rec.effective_end_date
719 ,p_business_group_id_o
720 => per_asg_shd.g_old_rec.business_group_id
721 ,p_recruiter_id_o
722 => per_asg_shd.g_old_rec.recruiter_id
723 ,p_grade_id_o
724 => per_asg_shd.g_old_rec.grade_id
725 ,p_position_id_o
726 => per_asg_shd.g_old_rec.position_id
727 ,p_job_id_o
728 => per_asg_shd.g_old_rec.job_id
729 ,p_assignment_status_type_id_o
730 => per_asg_shd.g_old_rec.assignment_status_type_id
731 ,p_payroll_id_o
732 => per_asg_shd.g_old_rec.payroll_id
733 ,p_location_id_o
734 => per_asg_shd.g_old_rec.location_id
735 ,p_person_referred_by_id_o
736 => per_asg_shd.g_old_rec.person_referred_by_id
737 ,p_supervisor_id_o
738 => per_asg_shd.g_old_rec.supervisor_id
739 ,p_special_ceiling_step_id_o
740 => per_asg_shd.g_old_rec.special_ceiling_step_id
741 ,p_person_id_o
742 => per_asg_shd.g_old_rec.person_id
743 ,p_recruitment_activity_id_o
744 => per_asg_shd.g_old_rec.recruitment_activity_id
745 ,p_source_organization_id_o
746 => per_asg_shd.g_old_rec.source_organization_id
747 ,p_organization_id_o
748 => per_asg_shd.g_old_rec.organization_id
749 ,p_people_group_id_o
750 => per_asg_shd.g_old_rec.people_group_id
751 ,p_soft_coding_keyflex_id_o
752 => per_asg_shd.g_old_rec.soft_coding_keyflex_id
753 ,p_vacancy_id_o
754 => per_asg_shd.g_old_rec.vacancy_id
755 ,p_assignment_sequence_o
756 => per_asg_shd.g_old_rec.assignment_sequence
757 ,p_pay_basis_id_o
758 => per_asg_shd.g_old_rec.pay_basis_id
759 ,p_assignment_type_o
760 => per_asg_shd.g_old_rec.assignment_type
761 ,p_primary_flag_o
762 => per_asg_shd.g_old_rec.primary_flag
763 ,p_application_id_o
764 => per_asg_shd.g_old_rec.application_id
765 ,p_assignment_number_o
766 => per_asg_shd.g_old_rec.assignment_number
767 ,p_change_reason_o
768 => per_asg_shd.g_old_rec.change_reason
769 ,p_comment_id_o
770 => per_asg_shd.g_old_rec.comment_id
771 ,p_date_probation_end_o
772 => per_asg_shd.g_old_rec.date_probation_end
773 ,p_default_code_comb_id_o
774 => per_asg_shd.g_old_rec.default_code_comb_id
775 ,p_employment_category_o
776 => per_asg_shd.g_old_rec.employment_category
777 ,p_frequency_o
778 => per_asg_shd.g_old_rec.frequency
779 ,p_internal_address_line_o
780 => per_asg_shd.g_old_rec.internal_address_line
781 ,p_manager_flag_o
782 => per_asg_shd.g_old_rec.manager_flag
783 ,p_normal_hours_o
784 => per_asg_shd.g_old_rec.normal_hours
785 ,p_perf_review_period_o
786 => per_asg_shd.g_old_rec.perf_review_period
787 ,p_perf_review_period_frequen_o
788 => per_asg_shd.g_old_rec.perf_review_period_frequency
789 ,p_period_of_service_id_o
790 => per_asg_shd.g_old_rec.period_of_service_id
791 ,p_probation_period_o
792 => per_asg_shd.g_old_rec.probation_period
793 ,p_probation_unit_o
794 => per_asg_shd.g_old_rec.probation_unit
795 ,p_sal_review_period_o
796 => per_asg_shd.g_old_rec.sal_review_period
797 ,p_sal_review_period_frequen_o
798 => per_asg_shd.g_old_rec.sal_review_period_frequency
799 ,p_set_of_books_id_o
800 => per_asg_shd.g_old_rec.set_of_books_id
801 ,p_source_type_o
802 => per_asg_shd.g_old_rec.source_type
803 ,p_time_normal_finish_o
804 => per_asg_shd.g_old_rec.time_normal_finish
805 ,p_time_normal_start_o
806 => per_asg_shd.g_old_rec.time_normal_start
807 ,p_bargaining_unit_code_o
808 => per_asg_shd.g_old_rec.bargaining_unit_code
809 ,p_labour_union_member_flag_o
810 => per_asg_shd.g_old_rec.labour_union_member_flag
811 ,p_hourly_salaried_code_o
812 => per_asg_shd.g_old_rec.hourly_salaried_code
813 ,p_request_id_o
814 => per_asg_shd.g_old_rec.request_id
815 ,p_program_application_id_o
816 => per_asg_shd.g_old_rec.program_application_id
817 ,p_program_id_o
818 => per_asg_shd.g_old_rec.program_id
819 ,p_program_update_date_o
820 => per_asg_shd.g_old_rec.program_update_date
821 ,p_ass_attribute_category_o
822 => per_asg_shd.g_old_rec.ass_attribute_category
823 ,p_ass_attribute1_o
824 => per_asg_shd.g_old_rec.ass_attribute1
825 ,p_ass_attribute2_o
826 => per_asg_shd.g_old_rec.ass_attribute2
827 ,p_ass_attribute3_o
828 => per_asg_shd.g_old_rec.ass_attribute3
829 ,p_ass_attribute4_o
830 => per_asg_shd.g_old_rec.ass_attribute4
831 ,p_ass_attribute5_o
832 => per_asg_shd.g_old_rec.ass_attribute5
833 ,p_ass_attribute6_o
834 => per_asg_shd.g_old_rec.ass_attribute6
835 ,p_ass_attribute7_o
836 => per_asg_shd.g_old_rec.ass_attribute7
837 ,p_ass_attribute8_o
838 => per_asg_shd.g_old_rec.ass_attribute8
839 ,p_ass_attribute9_o
840 => per_asg_shd.g_old_rec.ass_attribute9
841 ,p_ass_attribute10_o
842 => per_asg_shd.g_old_rec.ass_attribute10
843 ,p_ass_attribute11_o
844 => per_asg_shd.g_old_rec.ass_attribute11
845 ,p_ass_attribute12_o
846 => per_asg_shd.g_old_rec.ass_attribute12
847 ,p_ass_attribute13_o
848 => per_asg_shd.g_old_rec.ass_attribute13
849 ,p_ass_attribute14_o
850 => per_asg_shd.g_old_rec.ass_attribute14
851 ,p_ass_attribute15_o
852 => per_asg_shd.g_old_rec.ass_attribute15
853 ,p_ass_attribute16_o
854 => per_asg_shd.g_old_rec.ass_attribute16
855 ,p_ass_attribute17_o
856 => per_asg_shd.g_old_rec.ass_attribute17
857 ,p_ass_attribute18_o
858 => per_asg_shd.g_old_rec.ass_attribute18
859 ,p_ass_attribute19_o
860 => per_asg_shd.g_old_rec.ass_attribute19
861 ,p_ass_attribute20_o
862 => per_asg_shd.g_old_rec.ass_attribute20
863 ,p_ass_attribute21_o
864 => per_asg_shd.g_old_rec.ass_attribute21
865 ,p_ass_attribute22_o
866 => per_asg_shd.g_old_rec.ass_attribute22
867 ,p_ass_attribute23_o
868 => per_asg_shd.g_old_rec.ass_attribute23
869 ,p_ass_attribute24_o
870 => per_asg_shd.g_old_rec.ass_attribute24
871 ,p_ass_attribute25_o
872 => per_asg_shd.g_old_rec.ass_attribute25
873 ,p_ass_attribute26_o
874 => per_asg_shd.g_old_rec.ass_attribute26
875 ,p_ass_attribute27_o
876 => per_asg_shd.g_old_rec.ass_attribute27
877 ,p_ass_attribute28_o
878 => per_asg_shd.g_old_rec.ass_attribute28
879 ,p_ass_attribute29_o
880 => per_asg_shd.g_old_rec.ass_attribute29
881 ,p_ass_attribute30_o
882 => per_asg_shd.g_old_rec.ass_attribute30
883 ,p_title_o
884 => per_asg_shd.g_old_rec.title
885 ,p_contract_id_o
886 => per_asg_shd.g_old_rec.contract_id
887 ,p_establishment_id_o
888 => per_asg_shd.g_old_rec.establishment_id
889 ,p_collective_agreement_id_o
890 => per_asg_shd.g_old_rec.collective_agreement_id
891 ,p_cagr_grade_def_id_o
892 => per_asg_shd.g_old_rec.cagr_grade_def_id
893 ,p_cagr_id_flex_num_o
894 => per_asg_shd.g_old_rec.cagr_id_flex_num
895 ,p_object_version_number_o
896 => per_asg_shd.g_old_rec.object_version_number
897 ,p_notice_period_o
898 => per_asg_shd.g_old_rec.notice_period
899 ,p_notice_period_uom_o
900 => per_asg_shd.g_old_rec.notice_period_uom
901 ,p_employee_category_o
902 => per_asg_shd.g_old_rec.employee_category
903 ,p_work_at_home_o
904 => per_asg_shd.g_old_rec.work_at_home
905 ,p_job_post_source_name_o
906 => per_asg_shd.g_old_rec.job_post_source_name
907 ,p_posting_content_id_o
908 => per_asg_shd.g_old_rec.posting_content_id
909 ,p_placement_date_start_o
910 => per_asg_shd.g_old_rec.period_of_placement_date_start
911 ,p_vendor_id_o
912 => per_asg_shd.g_old_rec.vendor_id
913 ,p_vendor_employee_number_o
914 => per_asg_shd.g_old_rec.vendor_employee_number
915 ,p_vendor_assignment_number_o
916 => per_asg_shd.g_old_rec.vendor_assignment_number
917 ,p_assignment_category_o
918 => per_asg_shd.g_old_rec.assignment_category
919 ,p_project_title_o
920 => per_asg_shd.g_old_rec.project_title
921 ,p_applicant_rank_o
922 => per_asg_shd.g_old_rec.applicant_rank
923 ,p_grade_ladder_pgm_id_o
924 => per_asg_shd.g_old_rec.grade_ladder_pgm_id
925 ,p_supervisor_assignment_id_o
926 => per_asg_shd.g_old_rec.supervisor_assignment_id /*Bug 2976136*/
927 ,p_vendor_site_id_o => per_asg_shd.g_old_rec.vendor_site_id
928 ,p_po_header_id_o => per_asg_shd.g_old_rec.po_header_id
929 ,p_po_line_id_o => per_asg_shd.g_old_rec.po_line_id
930 ,p_projected_assignment_end_o => per_asg_shd.g_old_rec.projected_assignment_end
931
932 );
933 exception
934 when hr_api.cannot_find_prog_unit then
935 hr_api.cannot_find_prog_unit_error
936 (p_module_name => 'PER_ALL_ASSIGNMENTS_F'
937 ,p_hook_type => 'AU'
938 );
939 end;
940 -- End of API User Hook for post_update.
941 --
942 hr_utility.set_location(' Leaving:'||l_proc, 10);
943 End post_update;
944 --
945 -- ----------------------------------------------------------------------------
946 -- |-----------------------------< convert_defs >-----------------------------|
947 -- ----------------------------------------------------------------------------
948 -- {Start Of Comments}
949 --
950 -- Description:
951 -- The Convert_Defs procedure has one very important function:
952 -- It must return the record structure for the row with all system defaulted
953 -- values converted into its corresponding argument value for update. When
954 -- we attempt to update a row through the Upd business process , certain
955 -- arguments can be defaulted which enables flexibility in the calling of
956 -- the upd process (e.g. only attributes which need to be updated need to be
957 -- specified). For the upd business process to determine which attributes
958 -- have NOT been specified we need to check if the argument has a reserved
959 -- system default value. Therefore, for all attributes which have a
960 -- corresponding reserved system default mechanism specified we need to
961 -- check if a system default is being used. If a system default is being
962 -- used then we convert the defaulted value into its corresponding attribute
963 -- value held in the g_old_rec data structure.
964 --
965 -- Pre Conditions:
966 -- This private procedure can only be called from the upd process.
967 --
968 -- In Arguments:
969 -- A Pl/Sql record structre.
970 --
971 -- Post Success:
972 -- The record structure will be returned with all system defaulted argument
973 -- values converted into its current row attribute value.
974 --
975 -- Post Failure:
976 -- No direct error handling is required within this function. Any possible
977 -- errors within this procedure will be a PL/SQL value error due to
978 -- conversion of datatypes or data lengths.
979 --
980 -- Developer Implementation Notes:
981 -- None.
982 --
983 -- Access Status:
984 -- Internal Table Handler Use Only.
985 --
986 -- {End Of Comments}
987 -- ----------------------------------------------------------------------------
988 Procedure convert_defs(p_rec in out nocopy per_asg_shd.g_rec_type) is
989 --
990 l_proc varchar2(72) := g_package||'convert_defs';
991 --
992 Begin
993 --
994 hr_utility.set_location('Entering:'||l_proc, 5);
995 --
996 -- We must now examine each argument value in the
997 -- p_rec plsql record structure
998 -- to see if a system default is being used. If a system default
999 -- is being used then we must set to the 'current' argument value.
1000 --
1001 If (p_rec.business_group_id = hr_api.g_number) then
1002 p_rec.business_group_id :=
1003 per_asg_shd.g_old_rec.business_group_id;
1004 End If;
1005 If (p_rec.recruiter_id = hr_api.g_number) then
1006 p_rec.recruiter_id :=
1007 per_asg_shd.g_old_rec.recruiter_id;
1008 End If;
1009 If (p_rec.grade_id = hr_api.g_number) then
1010 p_rec.grade_id :=
1011 per_asg_shd.g_old_rec.grade_id;
1012 End If;
1013 If (p_rec.position_id = hr_api.g_number) then
1014 p_rec.position_id :=
1015 per_asg_shd.g_old_rec.position_id;
1016 End If;
1017 If (p_rec.job_id = hr_api.g_number) then
1018 p_rec.job_id :=
1019 per_asg_shd.g_old_rec.job_id;
1020 End If;
1021 If (p_rec.assignment_status_type_id = hr_api.g_number) then
1022 p_rec.assignment_status_type_id :=
1023 per_asg_shd.g_old_rec.assignment_status_type_id;
1024 End If;
1025 If (p_rec.payroll_id = hr_api.g_number) then
1026 p_rec.payroll_id :=
1027 per_asg_shd.g_old_rec.payroll_id;
1028 End If;
1029 If (p_rec.location_id = hr_api.g_number) then
1030 p_rec.location_id :=
1031 per_asg_shd.g_old_rec.location_id;
1032 End If;
1033 If (p_rec.person_referred_by_id = hr_api.g_number) then
1034 p_rec.person_referred_by_id :=
1035 per_asg_shd.g_old_rec.person_referred_by_id;
1036 End If;
1037 If (p_rec.supervisor_id = hr_api.g_number) then
1038 p_rec.supervisor_id :=
1039 per_asg_shd.g_old_rec.supervisor_id;
1040 End If;
1041 If (p_rec.special_ceiling_step_id = hr_api.g_number) then
1042 p_rec.special_ceiling_step_id :=
1043 per_asg_shd.g_old_rec.special_ceiling_step_id;
1044 End If;
1045 If (p_rec.person_id = hr_api.g_number) then
1046 p_rec.person_id :=
1047 per_asg_shd.g_old_rec.person_id;
1048 End If;
1049 If (p_rec.recruitment_activity_id = hr_api.g_number) then
1050 p_rec.recruitment_activity_id :=
1051 per_asg_shd.g_old_rec.recruitment_activity_id;
1052 End If;
1053 If (p_rec.source_organization_id = hr_api.g_number) then
1054 p_rec.source_organization_id :=
1055 per_asg_shd.g_old_rec.source_organization_id;
1056 End If;
1057 If (p_rec.organization_id = hr_api.g_number) then
1058 p_rec.organization_id :=
1059 per_asg_shd.g_old_rec.organization_id;
1060 End If;
1061 If (p_rec.people_group_id = hr_api.g_number) then
1062 p_rec.people_group_id :=
1063 per_asg_shd.g_old_rec.people_group_id;
1064 End If;
1065 If (p_rec.soft_coding_keyflex_id = hr_api.g_number) then
1066 p_rec.soft_coding_keyflex_id :=
1067 per_asg_shd.g_old_rec.soft_coding_keyflex_id;
1068 End If;
1069 If (p_rec.vacancy_id = hr_api.g_number) then
1070 p_rec.vacancy_id :=
1071 per_asg_shd.g_old_rec.vacancy_id;
1072 End If;
1073 If (p_rec.pay_basis_id = hr_api.g_number) then
1074 p_rec.pay_basis_id :=
1075 per_asg_shd.g_old_rec.pay_basis_id;
1076 End If;
1077 If (p_rec.assignment_sequence = hr_api.g_number) then
1078 p_rec.assignment_sequence :=
1079 per_asg_shd.g_old_rec.assignment_sequence;
1080 End If;
1081 If (p_rec.assignment_type = hr_api.g_varchar2) then
1082 p_rec.assignment_type :=
1083 per_asg_shd.g_old_rec.assignment_type;
1084 End If;
1085 If (p_rec.primary_flag = hr_api.g_varchar2) then
1086 p_rec.primary_flag :=
1087 per_asg_shd.g_old_rec.primary_flag;
1088 End If;
1089 If (p_rec.application_id = hr_api.g_number) then
1090 p_rec.application_id :=
1091 per_asg_shd.g_old_rec.application_id;
1092 End If;
1093 If (p_rec.assignment_number = hr_api.g_varchar2) then
1094 p_rec.assignment_number :=
1095 per_asg_shd.g_old_rec.assignment_number;
1096 End If;
1097 If (p_rec.change_reason = hr_api.g_varchar2) then
1098 p_rec.change_reason :=
1099 per_asg_shd.g_old_rec.change_reason;
1100 End If;
1101 If (p_rec.comment_id = hr_api.g_number) then
1102 p_rec.comment_id :=
1103 per_asg_shd.g_old_rec.comment_id;
1104 End If;
1105 If (p_rec.comment_text = hr_api.g_varchar2) then
1106 p_rec.comment_text :=
1107 per_asg_shd.g_old_rec.comment_text;
1108 End If;
1109 If (p_rec.date_probation_end = hr_api.g_date) then
1110 p_rec.date_probation_end :=
1111 per_asg_shd.g_old_rec.date_probation_end;
1112 End If;
1113 If (p_rec.default_code_comb_id = hr_api.g_number) then
1114 p_rec.default_code_comb_id :=
1115 per_asg_shd.g_old_rec.default_code_comb_id;
1116 End If;
1117 If (p_rec.employment_category = hr_api.g_varchar2) then
1118 p_rec.employment_category :=
1119 per_asg_shd.g_old_rec.employment_category;
1120 End If;
1121 If (p_rec.frequency = hr_api.g_varchar2) then
1122 p_rec.frequency :=
1123 per_asg_shd.g_old_rec.frequency;
1124 End If;
1125 If (p_rec.internal_address_line = hr_api.g_varchar2) then
1126 p_rec.internal_address_line :=
1127 per_asg_shd.g_old_rec.internal_address_line;
1128 End If;
1129 If (p_rec.manager_flag = hr_api.g_varchar2) then
1130 p_rec.manager_flag :=
1131 per_asg_shd.g_old_rec.manager_flag;
1132 End If;
1133 If (p_rec.normal_hours = hr_api.g_number) then
1134 p_rec.normal_hours :=
1135 per_asg_shd.g_old_rec.normal_hours;
1136 End If;
1137 If (p_rec.perf_review_period = hr_api.g_number) then
1138 p_rec.perf_review_period :=
1139 per_asg_shd.g_old_rec.perf_review_period;
1140 End If;
1141 If (p_rec.perf_review_period_frequency = hr_api.g_varchar2) then
1142 p_rec.perf_review_period_frequency :=
1143 per_asg_shd.g_old_rec.perf_review_period_frequency;
1144 End If;
1145 If (p_rec.period_of_service_id = hr_api.g_number) then
1146 p_rec.period_of_service_id :=
1147 per_asg_shd.g_old_rec.period_of_service_id;
1148 End If;
1149 If (p_rec.probation_period = hr_api.g_number) then
1150 p_rec.probation_period :=
1151 per_asg_shd.g_old_rec.probation_period;
1152 End If;
1153 If (p_rec.probation_unit = hr_api.g_varchar2) then
1154 p_rec.probation_unit :=
1155 per_asg_shd.g_old_rec.probation_unit;
1156 End If;
1157 If (p_rec.sal_review_period = hr_api.g_number) then
1158 p_rec.sal_review_period :=
1159 per_asg_shd.g_old_rec.sal_review_period;
1160 End If;
1161 If (p_rec.sal_review_period_frequency = hr_api.g_varchar2) then
1162 p_rec.sal_review_period_frequency :=
1163 per_asg_shd.g_old_rec.sal_review_period_frequency;
1164 End If;
1165 If (p_rec.set_of_books_id = hr_api.g_number) then
1166 p_rec.set_of_books_id :=
1167 per_asg_shd.g_old_rec.set_of_books_id;
1168 End If;
1169 If (p_rec.source_type = hr_api.g_varchar2) then
1170 p_rec.source_type :=
1171 per_asg_shd.g_old_rec.source_type;
1172 End If;
1173 If (p_rec.time_normal_finish = hr_api.g_varchar2) then
1174 p_rec.time_normal_finish :=
1175 per_asg_shd.g_old_rec.time_normal_finish;
1176 End If;
1177 If (p_rec.time_normal_start = hr_api.g_varchar2) then
1178 p_rec.time_normal_start :=
1179 per_asg_shd.g_old_rec.time_normal_start;
1180 End If;
1181 If (p_rec.bargaining_unit_code = hr_api.g_varchar2) then
1182 p_rec.bargaining_unit_code :=
1183 per_asg_shd.g_old_rec.bargaining_unit_code;
1184 End If;
1185 If (p_rec.labour_union_member_flag = hr_api.g_varchar2) then
1186 p_rec.labour_union_member_flag :=
1187 per_asg_shd.g_old_rec.labour_union_member_flag;
1188 End If;
1189 If (p_rec.hourly_salaried_code = hr_api.g_varchar2) then
1190 p_rec.hourly_salaried_code :=
1191 per_asg_shd.g_old_rec.hourly_salaried_code;
1192 End If;
1193 If (p_rec.request_id = hr_api.g_number) then
1194 p_rec.request_id :=
1195 per_asg_shd.g_old_rec.request_id;
1196 End If;
1197 If (p_rec.program_application_id = hr_api.g_number) then
1198 p_rec.program_application_id :=
1199 per_asg_shd.g_old_rec.program_application_id;
1200 End If;
1201 If (p_rec.program_id = hr_api.g_number) then
1202 p_rec.program_id :=
1203 per_asg_shd.g_old_rec.program_id;
1204 End If;
1205 If (p_rec.program_update_date = hr_api.g_date) then
1206 p_rec.program_update_date :=
1207 per_asg_shd.g_old_rec.program_update_date;
1208 End If;
1209 If (p_rec.ass_attribute_category = hr_api.g_varchar2) then
1210 p_rec.ass_attribute_category :=
1211 per_asg_shd.g_old_rec.ass_attribute_category;
1212 End If;
1213 If (p_rec.ass_attribute1 = hr_api.g_varchar2) then
1214 p_rec.ass_attribute1 :=
1215 per_asg_shd.g_old_rec.ass_attribute1;
1216 End If;
1217 If (p_rec.ass_attribute2 = hr_api.g_varchar2) then
1218 p_rec.ass_attribute2 :=
1219 per_asg_shd.g_old_rec.ass_attribute2;
1220 End If;
1221 If (p_rec.ass_attribute3 = hr_api.g_varchar2) then
1222 p_rec.ass_attribute3 :=
1223 per_asg_shd.g_old_rec.ass_attribute3;
1224 End If;
1225 If (p_rec.ass_attribute4 = hr_api.g_varchar2) then
1226 p_rec.ass_attribute4 :=
1227 per_asg_shd.g_old_rec.ass_attribute4;
1228 End If;
1229 If (p_rec.ass_attribute5 = hr_api.g_varchar2) then
1230 p_rec.ass_attribute5 :=
1231 per_asg_shd.g_old_rec.ass_attribute5;
1232 End If;
1233 If (p_rec.ass_attribute6 = hr_api.g_varchar2) then
1234 p_rec.ass_attribute6 :=
1235 per_asg_shd.g_old_rec.ass_attribute6;
1236 End If;
1237 If (p_rec.ass_attribute7 = hr_api.g_varchar2) then
1238 p_rec.ass_attribute7 :=
1239 per_asg_shd.g_old_rec.ass_attribute7;
1240 End If;
1241 If (p_rec.ass_attribute8 = hr_api.g_varchar2) then
1242 p_rec.ass_attribute8 :=
1243 per_asg_shd.g_old_rec.ass_attribute8;
1244 End If;
1245 If (p_rec.ass_attribute9 = hr_api.g_varchar2) then
1246 p_rec.ass_attribute9 :=
1247 per_asg_shd.g_old_rec.ass_attribute9;
1248 End If;
1249 If (p_rec.ass_attribute10 = hr_api.g_varchar2) then
1250 p_rec.ass_attribute10 :=
1251 per_asg_shd.g_old_rec.ass_attribute10;
1252 End If;
1253 If (p_rec.ass_attribute11 = hr_api.g_varchar2) then
1254 p_rec.ass_attribute11 :=
1255 per_asg_shd.g_old_rec.ass_attribute11;
1256 End If;
1257 If (p_rec.ass_attribute12 = hr_api.g_varchar2) then
1258 p_rec.ass_attribute12 :=
1259 per_asg_shd.g_old_rec.ass_attribute12;
1260 End If;
1261 If (p_rec.ass_attribute13 = hr_api.g_varchar2) then
1262 p_rec.ass_attribute13 :=
1263 per_asg_shd.g_old_rec.ass_attribute13;
1264 End If;
1265 If (p_rec.ass_attribute14 = hr_api.g_varchar2) then
1266 p_rec.ass_attribute14 :=
1267 per_asg_shd.g_old_rec.ass_attribute14;
1268 End If;
1269 If (p_rec.ass_attribute15 = hr_api.g_varchar2) then
1270 p_rec.ass_attribute15 :=
1271 per_asg_shd.g_old_rec.ass_attribute15;
1272 End If;
1273 If (p_rec.ass_attribute16 = hr_api.g_varchar2) then
1274 p_rec.ass_attribute16 :=
1275 per_asg_shd.g_old_rec.ass_attribute16;
1276 End If;
1277 If (p_rec.ass_attribute17 = hr_api.g_varchar2) then
1278 p_rec.ass_attribute17 :=
1279 per_asg_shd.g_old_rec.ass_attribute17;
1280 End If;
1281 If (p_rec.ass_attribute18 = hr_api.g_varchar2) then
1282 p_rec.ass_attribute18 :=
1283 per_asg_shd.g_old_rec.ass_attribute18;
1284 End If;
1285 If (p_rec.ass_attribute19 = hr_api.g_varchar2) then
1286 p_rec.ass_attribute19 :=
1287 per_asg_shd.g_old_rec.ass_attribute19;
1288 End If;
1289 If (p_rec.ass_attribute20 = hr_api.g_varchar2) then
1290 p_rec.ass_attribute20 :=
1291 per_asg_shd.g_old_rec.ass_attribute20;
1292 End If;
1293 If (p_rec.ass_attribute21 = hr_api.g_varchar2) then
1294 p_rec.ass_attribute21 :=
1295 per_asg_shd.g_old_rec.ass_attribute21;
1296 End If;
1297 If (p_rec.ass_attribute22 = hr_api.g_varchar2) then
1298 p_rec.ass_attribute22 :=
1299 per_asg_shd.g_old_rec.ass_attribute22;
1300 End If;
1301 If (p_rec.ass_attribute23 = hr_api.g_varchar2) then
1302 p_rec.ass_attribute23 :=
1303 per_asg_shd.g_old_rec.ass_attribute23;
1304 End If;
1305 If (p_rec.ass_attribute24 = hr_api.g_varchar2) then
1306 p_rec.ass_attribute24 :=
1307 per_asg_shd.g_old_rec.ass_attribute24;
1308 End If;
1309 If (p_rec.ass_attribute25 = hr_api.g_varchar2) then
1310 p_rec.ass_attribute25 :=
1311 per_asg_shd.g_old_rec.ass_attribute25;
1312 End If;
1313 If (p_rec.ass_attribute26 = hr_api.g_varchar2) then
1314 p_rec.ass_attribute26 :=
1315 per_asg_shd.g_old_rec.ass_attribute26;
1316 End If;
1317 If (p_rec.ass_attribute27 = hr_api.g_varchar2) then
1318 p_rec.ass_attribute27 :=
1319 per_asg_shd.g_old_rec.ass_attribute27;
1320 End If;
1321 If (p_rec.ass_attribute28 = hr_api.g_varchar2) then
1322 p_rec.ass_attribute28 :=
1323 per_asg_shd.g_old_rec.ass_attribute28;
1324 End If;
1325 If (p_rec.ass_attribute29 = hr_api.g_varchar2) then
1326 p_rec.ass_attribute29 :=
1327 per_asg_shd.g_old_rec.ass_attribute29;
1328 End If;
1329 If (p_rec.ass_attribute30 = hr_api.g_varchar2) then
1330 p_rec.ass_attribute30 :=
1331 per_asg_shd.g_old_rec.ass_attribute30;
1332 End If;
1333 If (p_rec.title = hr_api.g_varchar2) then
1334 p_rec.title :=
1335 per_asg_shd.g_old_rec.title;
1336 End If;
1337 If (p_rec.contract_id = hr_api.g_number) then
1338 p_rec.contract_id :=
1339 per_asg_shd.g_old_rec.contract_id;
1340 End If;
1341 If (p_rec.establishment_id = hr_api.g_number) then
1342 p_rec.establishment_id :=
1343 per_asg_shd.g_old_rec.establishment_id;
1344 End If;
1345 If (p_rec.collective_agreement_id = hr_api.g_number) then
1346 p_rec.collective_agreement_id :=
1347 per_asg_shd.g_old_rec.collective_agreement_id;
1348 End If;
1349 If (p_rec.cagr_grade_def_id = hr_api.g_number) then
1350 p_rec.cagr_grade_def_id :=
1351 per_asg_shd.g_old_rec.cagr_grade_def_id;
1352 End If;
1353 If (p_rec.cagr_id_flex_num = hr_api.g_number) then
1354 p_rec.cagr_id_flex_num :=
1355 per_asg_shd.g_old_rec.cagr_id_flex_num;
1356 End If;
1357 If (p_rec.notice_period = hr_api.g_number) then
1358 p_rec.notice_period :=
1359 per_asg_shd.g_old_rec.notice_period;
1360 End If;
1361 If (p_rec.notice_period_uom = hr_api.g_varchar2) then
1362 p_rec.notice_period_uom :=
1363 per_asg_shd.g_old_rec.notice_period_uom;
1364 End If;
1365 If (p_rec.employee_category = hr_api.g_varchar2) then
1366 p_rec.employee_category :=
1367 per_asg_shd.g_old_rec.employee_category;
1368 End If;
1369 If (p_rec.work_at_home = hr_api.g_varchar2) then
1370 p_rec.work_at_home :=
1371 per_asg_shd.g_old_rec.work_at_home;
1372 End If;
1373 If (p_rec.job_post_source_name = hr_api.g_varchar2) then
1374 p_rec.job_post_source_name :=
1375 per_asg_shd.g_old_rec.job_post_source_name;
1376 End If;
1377 If (p_rec.posting_content_id = hr_api.g_number) then
1378 p_rec.posting_content_id :=
1379 per_asg_shd.g_old_rec.posting_content_id;
1380 End If;
1381 If (p_rec.period_of_placement_date_start = hr_api.g_date) then
1382 p_rec.period_of_placement_date_start :=
1383 per_asg_shd.g_old_rec.period_of_placement_date_start;
1384 End If;
1385 If (p_rec.vendor_id = hr_api.g_number) then
1386 p_rec.vendor_id :=
1387 per_asg_shd.g_old_rec.vendor_id;
1388 End If;
1389 If (p_rec.vendor_employee_number = hr_api.g_varchar2) then
1390 p_rec.vendor_employee_number :=
1391 per_asg_shd.g_old_rec.vendor_employee_number;
1392 End If;
1393 If (p_rec.vendor_assignment_number = hr_api.g_varchar2) then
1394 p_rec.vendor_assignment_number :=
1395 per_asg_shd.g_old_rec.vendor_assignment_number;
1396 End If;
1397 If (p_rec.assignment_category = hr_api.g_varchar2) then
1398 p_rec.assignment_category :=
1399 per_asg_shd.g_old_rec.assignment_category;
1400 End If;
1401 If (p_rec.project_title = hr_api.g_varchar2) then
1402 p_rec.project_title :=
1403 per_asg_shd.g_old_rec.project_title;
1404 End If;
1405
1406 If (p_rec.applicant_rank = hr_api.g_number) then
1407 p_rec.applicant_rank :=
1408 per_asg_shd.g_old_rec.applicant_rank;
1409 End If;
1410 --
1411
1412 hr_utility.set_location(' Leaving:'||l_proc, 10);
1413 --
1414 End convert_defs;
1415 --
1416 -- ----------------------------------------------------------------------------
1417 -- |---------------------------------< upd >----------------------------------|
1418 -- ----------------------------------------------------------------------------
1419 Procedure upd
1420 (
1421 p_rec in out nocopy per_asg_shd.g_rec_type,
1422 p_effective_date in date,
1423 p_datetrack_mode in varchar2,
1424 p_validation_start_date out nocopy date,
1425 p_validation_end_date out nocopy date,
1426 p_validate in boolean default false,
1427 p_payroll_id_updated out nocopy boolean,
1428 p_other_manager_warning out nocopy boolean,
1429 p_hourly_salaried_warning out nocopy boolean,
1430 p_no_managers_warning out nocopy boolean,
1431 p_org_now_no_manager_warning out nocopy boolean
1432 ) is
1433 --
1434 l_proc varchar2(72) := g_package||'upd';
1435 l_validation_start_date date;
1436 l_validation_end_date date;
1437 l_inv_pos_grade_warning boolean;
1438 l_payroll_id_updated boolean;
1439 l_other_manager_warning boolean;
1440 l_hourly_salaried_warning boolean;
1441 l_no_managers_warning boolean;
1442 l_org_now_no_manager_warning boolean;
1443 --
1444 Begin
1445 hr_utility.set_location('Entering:'||l_proc, 5);
1446 --
1447 -- Ensure that the DateTrack update mode is valid
1448 --
1449 dt_api.validate_dt_upd_mode(p_datetrack_mode => p_datetrack_mode);
1450 --
1451 -- Determine if the business process is to be validated.
1452 --
1453 If p_validate then
1454 --
1455 -- Issue the savepoint.
1456 --
1457 SAVEPOINT upd_ben_asg;
1458 --
1459 End If;
1460 --
1461 -- We must lock the row which we need to update.
1462 --
1463 per_asg_shd.lck
1464 (p_effective_date => p_effective_date,
1465 p_datetrack_mode => p_datetrack_mode,
1466 p_assignment_id => p_rec.assignment_id,
1467 p_object_version_number => p_rec.object_version_number,
1468 p_validation_start_date => l_validation_start_date,
1469 p_validation_end_date => l_validation_end_date
1470 );
1471 --
1472 -- 1. During an update system defaults are used to determine if
1473 -- arguments have been defaulted or not. We must therefore
1474 -- derive the full record structure values to be updated.
1475 --
1476 convert_defs(p_rec);
1477
1478 /*
1479 --
1480 -- Removed validations for default benefits assignment
1481 --
1482 -- 2. Call the supporting update validate operations.
1483 --
1484 per_asg_bus1.update_validate
1485 (p_rec => p_rec,
1486 p_effective_date => p_effective_date,
1487 p_datetrack_mode => p_datetrack_mode,
1488 p_validation_start_date => l_validation_start_date,
1489 p_validation_end_date => l_validation_end_date,
1490 p_payroll_id_updated => l_payroll_id_updated,
1491 p_other_manager_warning => p_other_manager_warning,
1492 p_hourly_salaried_warning => p_hourly_salaried_warning,
1493 p_no_managers_warning => p_no_managers_warning,
1494 p_org_now_no_manager_warning => p_org_now_no_manager_warning,
1495 p_inv_pos_grade_warning => l_inv_pos_grade_warning);
1496 */
1497
1498 --
1499 -- Check Business Group
1500 --
1501 hr_api.validate_bus_grp_id(p_rec.business_group_id);
1502
1503 --
1504 -- Generate / Check Assignment Number
1505 --
1506 per_asg_bus1.gen_chk_assignment_number
1507 (p_assignment_id => p_rec.assignment_id
1508 ,p_business_group_id => p_rec.business_group_id
1509 ,p_assignment_type => p_rec.assignment_type
1510 ,p_assignment_sequence => p_rec.assignment_sequence
1511 ,p_assignment_number => p_rec.assignment_number
1512 ,p_person_id => p_rec.person_id
1513 ,p_effective_date => p_effective_date
1514 ,p_object_version_number => p_rec.object_version_number
1515 );
1516
1517 --
1518 -- Call the supporting pre-update operation
1519 --
1520 pre_update
1521 (p_rec => p_rec,
1522 p_effective_date => p_effective_date,
1523 p_datetrack_mode => p_datetrack_mode,
1524 p_validation_start_date => l_validation_start_date,
1525 p_validation_end_date => l_validation_end_date);
1526 --
1527 -- Update the row.
1528 --
1529 update_dml
1530 (p_rec => p_rec,
1531 p_effective_date => p_effective_date,
1532 p_datetrack_mode => p_datetrack_mode,
1533 p_validation_start_date => l_validation_start_date,
1534 p_validation_end_date => l_validation_end_date);
1535 --
1536 -- Call the supporting post-update operation
1537 --
1538 post_update
1539 (p_rec => p_rec,
1540 p_effective_date => p_effective_date,
1541 p_datetrack_mode => p_datetrack_mode,
1542 p_validation_start_date => l_validation_start_date,
1543 p_validation_end_date => l_validation_end_date,
1544 p_payroll_id_updated => l_payroll_id_updated,
1545 p_other_manager_warning => l_other_manager_warning,
1546 p_hourly_salaried_warning => l_hourly_salaried_warning,
1547 p_no_managers_warning => l_no_managers_warning,
1548 p_org_now_no_manager_warning => l_org_now_no_manager_warning);
1549 --
1550 -- Set validation start and end dates
1551 --
1552 p_validation_start_date := l_validation_start_date;
1553 p_validation_end_date := l_validation_end_date;
1554 --
1555 -- Set other output arguments
1556 --
1557 p_payroll_id_updated := l_payroll_id_updated;
1558 --p_other_manager_warning := l_other_manager_warning;
1559 --p_no_managers_warning := l_no_managers_warning;
1560 p_org_now_no_manager_warning := l_org_now_no_manager_warning;
1561 --
1562 -- If we are validating then raise the Validate_Enabled exception
1563 --
1564 If p_validate then
1565 Raise HR_Api.Validate_Enabled;
1566 End If;
1567 --
1568 hr_utility.set_location(' Leaving:'||l_proc, 10);
1569 Exception
1570 When HR_Api.Validate_Enabled Then
1571 --
1572 -- As the Validate_Enabled exception has been raised
1573 -- we must rollback to the savepoint
1574 --
1575 ROLLBACK TO upd_ben_asg;
1576 End upd;
1577 --
1578 -- ----------------------------------------------------------------------------
1579 -- |---------------------------------< upd >----------------------------------|
1580 -- ----------------------------------------------------------------------------
1581 Procedure upd
1582 (
1583 p_assignment_id in number,
1584 p_effective_start_date out nocopy date,
1585 p_effective_end_date out nocopy date,
1586
1587 p_business_group_id out nocopy number,
1588 p_recruiter_id in number default hr_api.g_number,
1589 p_grade_id in number default hr_api.g_number,
1590 p_position_id in number default hr_api.g_number,
1591 p_job_id in number default hr_api.g_number,
1592 p_assignment_status_type_id in number default hr_api.g_number,
1593 p_payroll_id in number default hr_api.g_number,
1594 p_location_id in number default hr_api.g_number,
1595 p_person_referred_by_id in number default hr_api.g_number,
1596 p_supervisor_id in number default hr_api.g_number,
1597 p_special_ceiling_step_id in number default hr_api.g_number,
1598 p_recruitment_activity_id in number default hr_api.g_number,
1599 p_source_organization_id in number default hr_api.g_number,
1600
1601 p_organization_id in number default hr_api.g_number,
1602 p_people_group_id in number default hr_api.g_number,
1603 p_soft_coding_keyflex_id in number default hr_api.g_number,
1604 p_vacancy_id in number default hr_api.g_number,
1605 p_pay_basis_id in number default hr_api.g_number,
1606 p_assignment_type in varchar2 default hr_api.g_varchar2,
1607 p_primary_flag in varchar2 default hr_api.g_varchar2,
1608 p_application_id in number default hr_api.g_number,
1609 p_assignment_number in varchar2 default hr_api.g_varchar2,
1610 p_change_reason in varchar2 default hr_api.g_varchar2,
1611 p_comment_id out nocopy number,
1612 p_comments in varchar2 default hr_api.g_varchar2,
1613 p_date_probation_end in date default hr_api.g_date,
1614
1615 p_default_code_comb_id in number default hr_api.g_number,
1616 p_employment_category in varchar2 default hr_api.g_varchar2,
1617 p_frequency in varchar2 default hr_api.g_varchar2,
1618 p_internal_address_line in varchar2 default hr_api.g_varchar2,
1619 p_manager_flag in varchar2 default hr_api.g_varchar2,
1620 p_normal_hours in number default hr_api.g_number,
1621 p_perf_review_period in number default hr_api.g_number,
1622 p_perf_review_period_frequency in varchar2 default hr_api.g_varchar2,
1623 p_period_of_service_id in number default hr_api.g_number,
1624 p_probation_period in number default hr_api.g_number,
1625 p_probation_unit in varchar2 default hr_api.g_varchar2,
1626 p_sal_review_period in number default hr_api.g_number,
1627 p_sal_review_period_frequency in varchar2 default hr_api.g_varchar2,
1628 p_set_of_books_id in number default hr_api.g_number,
1629
1630 p_source_type in varchar2 default hr_api.g_varchar2,
1631 p_time_normal_finish in varchar2 default hr_api.g_varchar2,
1632 p_time_normal_start in varchar2 default hr_api.g_varchar2,
1633 p_bargaining_unit_code in varchar2 default hr_api.g_varchar2,
1634 p_labour_union_member_flag in varchar2 default hr_api.g_varchar2,
1635 p_hourly_salaried_code in varchar2 default hr_api.g_varchar2,
1636 p_request_id in number default hr_api.g_number,
1637 p_program_application_id in number default hr_api.g_number,
1638 p_program_id in number default hr_api.g_number,
1639 p_program_update_date in date default hr_api.g_date,
1640 p_ass_attribute_category in varchar2 default hr_api.g_varchar2,
1641 p_ass_attribute1 in varchar2 default hr_api.g_varchar2,
1642 p_ass_attribute2 in varchar2 default hr_api.g_varchar2,
1643 p_ass_attribute3 in varchar2 default hr_api.g_varchar2,
1644 p_ass_attribute4 in varchar2 default hr_api.g_varchar2,
1645 p_ass_attribute5 in varchar2 default hr_api.g_varchar2,
1646
1647 p_ass_attribute6 in varchar2 default hr_api.g_varchar2,
1648 p_ass_attribute7 in varchar2 default hr_api.g_varchar2,
1649 p_ass_attribute8 in varchar2 default hr_api.g_varchar2,
1650 p_ass_attribute9 in varchar2 default hr_api.g_varchar2,
1651 p_ass_attribute10 in varchar2 default hr_api.g_varchar2,
1652 p_ass_attribute11 in varchar2 default hr_api.g_varchar2,
1653 p_ass_attribute12 in varchar2 default hr_api.g_varchar2,
1654 p_ass_attribute13 in varchar2 default hr_api.g_varchar2,
1655 p_ass_attribute14 in varchar2 default hr_api.g_varchar2,
1656 p_ass_attribute15 in varchar2 default hr_api.g_varchar2,
1657 p_ass_attribute16 in varchar2 default hr_api.g_varchar2,
1658 p_ass_attribute17 in varchar2 default hr_api.g_varchar2,
1659 p_ass_attribute18 in varchar2 default hr_api.g_varchar2,
1660
1661 p_ass_attribute19 in varchar2 default hr_api.g_varchar2,
1662 p_ass_attribute20 in varchar2 default hr_api.g_varchar2,
1663 p_ass_attribute21 in varchar2 default hr_api.g_varchar2,
1664 p_ass_attribute22 in varchar2 default hr_api.g_varchar2,
1665 p_ass_attribute23 in varchar2 default hr_api.g_varchar2,
1666 p_ass_attribute24 in varchar2 default hr_api.g_varchar2,
1667 p_ass_attribute25 in varchar2 default hr_api.g_varchar2,
1668 p_ass_attribute26 in varchar2 default hr_api.g_varchar2,
1669 p_ass_attribute27 in varchar2 default hr_api.g_varchar2,
1670 p_ass_attribute28 in varchar2 default hr_api.g_varchar2,
1671 p_ass_attribute29 in varchar2 default hr_api.g_varchar2,
1672 p_ass_attribute30 in varchar2 default hr_api.g_varchar2,
1673 p_title in varchar2 default hr_api.g_varchar2,
1674 p_contract_id in number default hr_api.g_number,
1675 p_establishment_id in number default hr_api.g_number,
1676 p_collective_agreement_id in number default hr_api.g_number,
1677 p_cagr_grade_def_id in number default hr_api.g_number,
1678 p_cagr_id_flex_num in number default hr_api.g_number,
1679 p_object_version_number in out nocopy number,
1680 p_notice_period in number default hr_api.g_number,
1681 p_notice_period_uom in varchar2 default hr_api.g_varchar2,
1682 p_employee_category in varchar2 default hr_api.g_varchar2,
1683 p_work_at_home in varchar2 default hr_api.g_varchar2,
1684 p_job_post_source_name in varchar2 default hr_api.g_varchar2,
1685 p_posting_content_id in number default hr_api.g_number,
1686 p_placement_date_start in date default hr_api.g_date,
1687 p_vendor_id in number default hr_api.g_number,
1688 p_vendor_employee_number in varchar2 default hr_api.g_varchar2,
1689 p_vendor_assignment_number in varchar2 default hr_api.g_varchar2,
1690 p_assignment_category in varchar2 default hr_api.g_varchar2,
1691 p_project_title in varchar2 default hr_api.g_varchar2,
1692 p_applicant_rank in number default hr_api.g_number,
1693 p_payroll_id_updated out nocopy boolean,
1694 p_other_manager_warning out nocopy boolean,
1695 p_hourly_salaried_warning out nocopy boolean,
1696 p_no_managers_warning out nocopy boolean,
1697 p_org_now_no_manager_warning out nocopy boolean,
1698 p_validation_start_date out nocopy date,
1699 p_validation_end_date out nocopy date,
1700 p_effective_date in date,
1701 p_datetrack_mode in varchar2,
1702 p_validate in boolean default false
1703 ) is
1704 --
1705 l_rec per_asg_shd.g_rec_type;
1706
1707 l_proc varchar2(72) := g_package||'upd';
1708 --
1709 Begin
1710 hr_utility.set_location('Entering:'||l_proc, 5);
1711 --
1712 -- Call conversion function to turn arguments into the
1713 -- l_rec structure.
1714 --
1715 l_rec :=
1716 per_asg_shd.convert_args
1717 (
1718 p_assignment_id,
1719 null,
1720
1721 null,
1722 hr_api.g_number,
1723 p_recruiter_id,
1724 p_grade_id,
1725 p_position_id,
1726 p_job_id,
1727 p_assignment_status_type_id,
1728 p_payroll_id,
1729 p_location_id,
1730 p_person_referred_by_id,
1731 p_supervisor_id,
1732 p_special_ceiling_step_id,
1733 hr_api.g_number,
1734
1735 p_recruitment_activity_id,
1736 p_source_organization_id,
1737 p_organization_id,
1738 p_people_group_id,
1739 p_soft_coding_keyflex_id,
1740 p_vacancy_id,
1741 p_pay_basis_id,
1742 hr_api.g_number,
1743 p_assignment_type,
1744 p_primary_flag,
1745 p_application_id,
1746 p_assignment_number,
1747 p_change_reason,
1748 hr_api.g_number,
1749 p_comments,
1750 p_date_probation_end,
1751 p_default_code_comb_id,
1752 p_employment_category,
1753 p_frequency,
1754 p_internal_address_line,
1755 p_manager_flag,
1756 p_normal_hours,
1757 p_perf_review_period,
1758 p_perf_review_period_frequency,
1759 p_period_of_service_id,
1760 p_probation_period,
1761 p_probation_unit,
1762 p_sal_review_period,
1763 p_sal_review_period_frequency,
1764 p_set_of_books_id,
1765 p_source_type,
1766 p_time_normal_finish,
1767 p_time_normal_start,
1768 p_bargaining_unit_code,
1769 p_labour_union_member_flag,
1770 p_hourly_salaried_code,
1771 p_request_id,
1772 p_program_application_id,
1773 p_program_id,
1774 p_program_update_date,
1775 p_ass_attribute_category,
1776 p_ass_attribute1,
1777 p_ass_attribute2,
1778 p_ass_attribute3,
1779 p_ass_attribute4,
1780 p_ass_attribute5,
1781 p_ass_attribute6,
1782 p_ass_attribute7,
1783 p_ass_attribute8,
1784 p_ass_attribute9,
1785 p_ass_attribute10,
1786 p_ass_attribute11,
1787 p_ass_attribute12,
1788 p_ass_attribute13,
1789 p_ass_attribute14,
1790 p_ass_attribute15,
1791 p_ass_attribute16,
1792 p_ass_attribute17,
1793 p_ass_attribute18,
1794 p_ass_attribute19,
1795 p_ass_attribute20,
1796 p_ass_attribute21,
1797 p_ass_attribute22,
1798 p_ass_attribute23,
1799 p_ass_attribute24,
1800 p_ass_attribute25,
1801 p_ass_attribute26,
1802 p_ass_attribute27,
1803 p_ass_attribute28,
1804 p_ass_attribute29,
1805 p_ass_attribute30,
1806 p_title,
1807 p_object_version_number,
1808 p_contract_id,
1809 p_establishment_id,
1810 p_collective_agreement_id,
1811 p_cagr_grade_def_id,
1812 p_cagr_id_flex_num,
1813 p_notice_period,
1814 p_notice_period_uom,
1815 p_employee_category,
1816 p_work_at_home,
1817 p_job_post_source_name,
1818 p_posting_content_id,
1819 p_placement_date_start,
1820 p_vendor_id,
1821 p_vendor_employee_number,
1822 p_vendor_assignment_number,
1823 p_assignment_category,
1824 p_project_title,
1825 p_applicant_rank,
1826 null,
1827 null, /*Bug 2976136*/
1828 null, --- p_vendor_site_id
1829 null, --- p_po_header_id
1830 null, --- p_po_line_id
1831 null --- p_projected_assignment_end
1832 );
1833 --
1834 -- Having converted the arguments into the
1835 -- plsql record structure we call the corresponding record
1836 -- business process.
1837 --
1838 upd(l_rec,
1839 p_effective_date,
1840
1841 p_datetrack_mode,
1842 p_validation_start_date,
1843 p_validation_end_date,
1844 p_validate,
1845 p_payroll_id_updated,
1846 p_other_manager_warning,
1847 p_hourly_salaried_warning,
1848 p_no_managers_warning,
1849 p_org_now_no_manager_warning);
1850 --
1851 p_business_group_id := l_rec.business_group_id;
1852 p_comment_id := l_rec.comment_id;
1853 p_effective_end_date := l_rec.effective_end_date;
1854 p_effective_start_date := l_rec.effective_start_date;
1855
1856 p_object_version_number := l_rec.object_version_number;
1857 --
1858 hr_utility.set_location(' Leaving:'||l_proc, 10);
1859 End upd;
1860 --
1861 end ben_asg_upd;