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_asg_ins.g_assignment_id_i := p_assignment_id;
27: --
28: hr_utility.set_location(' Leaving:'||l_proc, 20);
24: hr_utility.set_location('Entering:'||l_proc, 10);
25: --
26: per_asg_ins.g_assignment_id_i := p_assignment_id;
27: --
28: hr_utility.set_location(' Leaving:'||l_proc, 20);
29: End set_base_key_value;
30: --
31: -- ----------------------------------------------------------------------------
32: -- |----------------------------< dt_insert_dml >-----------------------------|
101: l_last_updated_by per_all_assignments_f.last_updated_by%TYPE;
102: l_last_update_login per_all_assignments_f.last_update_login%TYPE;
103: --
104: Begin
105: hr_utility.set_location('Entering:'||l_proc, 5);
106: --
107: -- Get the object version number for the insert
108: --
109: p_rec.object_version_number :=
121: -- If the datetrack_mode is not INSERT then we must populate the WHO
122: -- columns with the 'old' creation values and 'new' updated values.
123: --
124: If (p_datetrack_mode <> 'INSERT') then
125: hr_utility.set_location(l_proc, 10);
126: --
127: -- Select the 'old' created values
128: --
129: Open C_Sel1;
133: -- The previous 'old' created row has not been found. We need
134: -- to error as an internal datetrack problem exists.
135: --
136: Close C_Sel1;
137: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
138: hr_utility.set_message_token('PROCEDURE', l_proc);
139: hr_utility.set_message_token('STEP','10');
140: hr_utility.raise_error;
141: End If;
134: -- to error as an internal datetrack problem exists.
135: --
136: Close C_Sel1;
137: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
138: hr_utility.set_message_token('PROCEDURE', l_proc);
139: hr_utility.set_message_token('STEP','10');
140: hr_utility.raise_error;
141: End If;
142: Close C_Sel1;
135: --
136: Close C_Sel1;
137: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
138: hr_utility.set_message_token('PROCEDURE', l_proc);
139: hr_utility.set_message_token('STEP','10');
140: hr_utility.raise_error;
141: End If;
142: Close C_Sel1;
143: --
136: Close C_Sel1;
137: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
138: hr_utility.set_message_token('PROCEDURE', l_proc);
139: hr_utility.set_message_token('STEP','10');
140: hr_utility.raise_error;
141: End If;
142: Close C_Sel1;
143: --
144: -- Set the AOL updated WHO values
389: p_rec.projected_assignment_end
390: );
391: --
392: per_asg_shd.g_api_dml := false; -- Unset the api dml status
393: hr_utility.set_location(' Leaving:'||l_proc, 15);
394: --
395: Exception
396: When hr_api.check_integrity_violated Then
397: -- A check constraint has been violated
420: --
421: l_proc varchar2(72) := g_package||'insert_dml';
422: --
423: Begin
424: hr_utility.set_location('Entering:'||l_proc, 5);
425: --
426: dt_insert_dml(p_rec => p_rec,
427: p_effective_date => p_effective_date,
428: p_datetrack_mode => p_datetrack_mode,
428: p_datetrack_mode => p_datetrack_mode,
429: p_validation_start_date => p_validation_start_date,
430: p_validation_end_date => p_validation_end_date);
431: --
432: hr_utility.set_location(' Leaving:'||l_proc, 10);
433: End insert_dml;
434: --
435: -- ----------------------------------------------------------------------------
436: -- |------------------------------< pre_insert >------------------------------|
490: where assignment_id =
491: per_asg_ins.g_assignment_id_i;
492: --
493: Begin
494: hr_utility.set_location('Entering:'||l_proc, 1);
495: --
496: If (per_asg_ins.g_assignment_id_i is not null) Then
497: --
498: -- Verify registered primary key values not already in use
504: --
505: -- The primary key values are already in use.
506: --
507: -- Bug 2661569
508: -- Changed the calls to hr_utility package.
509: hr_utility.set_message(800, 'PER_289391_KEY_ALREADY_USED');
510: hr_utility.set_message_token('TABLE_NAME', 'per_all_assignments_f');
511: hr_utility.raise_error;
512: End If;
505: -- The primary key values are already in use.
506: --
507: -- Bug 2661569
508: -- Changed the calls to hr_utility package.
509: hr_utility.set_message(800, 'PER_289391_KEY_ALREADY_USED');
510: hr_utility.set_message_token('TABLE_NAME', 'per_all_assignments_f');
511: hr_utility.raise_error;
512: End If;
513: Close C_Sel2;
506: --
507: -- Bug 2661569
508: -- Changed the calls to hr_utility package.
509: hr_utility.set_message(800, 'PER_289391_KEY_ALREADY_USED');
510: hr_utility.set_message_token('TABLE_NAME', 'per_all_assignments_f');
511: hr_utility.raise_error;
512: End If;
513: Close C_Sel2;
514: --
507: -- Bug 2661569
508: -- Changed the calls to hr_utility package.
509: hr_utility.set_message(800, 'PER_289391_KEY_ALREADY_USED');
510: hr_utility.set_message_token('TABLE_NAME', 'per_all_assignments_f');
511: hr_utility.raise_error;
512: End If;
513: Close C_Sel2;
514: --
515: -- Use registered key values and clear globals
526: --
527: Open C_Sel1;
528: Fetch C_Sel1 Into p_rec.assignment_id;
529: Close C_Sel1;
530: hr_utility.set_location(l_proc, 10);
531: --
532: -- Insert the comment text if comments exist
533: --
534: If (p_rec.comment_text is not null) then
535: hr_comm_api.ins(p_comment_id => p_rec.comment_id,
536: p_source_table_name => 'PER_ALL_ASSIGNMENTS_F',
537: p_comment_text => p_rec.comment_text);
538: End If;
539: hr_utility.set_location(l_proc, 20);
540: End If;
541: --
542: -- Generate date probation end
543: --
561: );
562: end if;
563: -- Bug 4041992 Ends Here
564: --
565: hr_utility.set_location(l_proc, 30);
566: --
567: End pre_insert;
568: --
569: -- ----------------------------------------------------------------------------
607: --
608: l_proc varchar2(72) := g_package||'post_insert';
609: --
610: Begin
611: hr_utility.set_location('Entering:'||l_proc, 5);
612: --
613: ben_dt_trgr_handle.assignment
614: (p_rowid => null
615: ,p_assignment_id => p_rec.assignment_id
945: p_datetrack_mode);
946:
947: -- End of call to Workflow Sync Procedure For Assignments
948: --
949: hr_utility.set_location(' Leaving:'||l_proc, 10);
950: End post_insert;
951: -- ----------------------------------------------------------------------------
952: -- |-------------------------------< ins_lck >--------------------------------|
953: -- ----------------------------------------------------------------------------
996: l_validation_start_date date;
997: l_validation_end_date date;
998: --
999: Begin
1000: hr_utility.set_location('Entering:'||l_proc, 5);
1001: --
1002: -- Validate the datetrack mode getting the validation start
1003: -- and end dates for the specified datetrack operation.
1004: --
1033: --
1034: p_validation_start_date := l_validation_start_date;
1035: p_validation_end_date := l_validation_end_date;
1036: --
1037: hr_utility.set_location(' Leaving:'||l_proc, 15);
1038: --
1039: End ins_lck;
1040: --
1041: -- ----------------------------------------------------------------------------
1057: l_validation_end_date date;
1058: l_inv_pos_grade_warning boolean;
1059: --
1060: Begin
1061: hr_utility.set_location('Entering:'||l_proc, 5);
1062: --
1063: -- Determine if the business process is to be validated.
1064: --
1065: If p_validate then
1140: If p_validate then
1141: Raise HR_Api.Validate_Enabled;
1142: End If;
1143: --
1144: hr_utility.set_location(' Leaving:'||l_proc, 10);
1145: Exception
1146: When HR_Api.Validate_Enabled Then
1147: --
1148: -- As the Validate_Enabled exception has been raised
1279: l_rec per_asg_shd.g_rec_type;
1280: l_proc varchar2(72) := g_package||'ins';
1281: --
1282: Begin
1283: hr_utility.set_location('Entering:'||l_proc, 5);
1284: --
1285: -- Call conversion function to turn arguments into the
1286: -- p_rec structure.
1287: --
1423: p_comment_id := l_rec.comment_id;
1424: p_assignment_number := l_rec.assignment_number;
1425: p_assignment_sequence := l_rec.assignment_sequence;
1426: --
1427: hr_utility.set_location(' Leaving:'||l_proc, 10);
1428: End ins;
1429: --
1430: end per_asg_ins;