14: --
15: l_proc varchar2(72) := g_package||'return_api_dml_status';
16: --
17: Begin
18: hr_utility.set_location('Entering:'||l_proc, 5);
19: --
20: Return (nvl(g_api_dml, false));
21: --
22: hr_utility.set_location(' Leaving:'||l_proc, 10);
18: hr_utility.set_location('Entering:'||l_proc, 5);
19: --
20: Return (nvl(g_api_dml, false));
21: --
22: hr_utility.set_location(' Leaving:'||l_proc, 10);
23: End return_api_dml_status;
24: --
25: -- ----------------------------------------------------------------------------
26: -- |---------------------------< constraint_error >---------------------------|
30: --
31: l_proc varchar2(72) := g_package||'constraint_error';
32: --
33: Begin
34: hr_utility.set_location('Entering:'||l_proc, 5);
35: --
36: If (p_constraint_name = 'BEN_PAIRD_RT_FK1') Then
37: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
38: hr_utility.set_message_token('PROCEDURE', l_proc);
33: Begin
34: hr_utility.set_location('Entering:'||l_proc, 5);
35: --
36: If (p_constraint_name = 'BEN_PAIRD_RT_FK1') Then
37: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
38: hr_utility.set_message_token('PROCEDURE', l_proc);
39: hr_utility.set_message_token('STEP','5');
40: hr_utility.raise_error;
41: ElsIf (p_constraint_name = 'BEN_PAIRD_RT_PK') Then
34: hr_utility.set_location('Entering:'||l_proc, 5);
35: --
36: If (p_constraint_name = 'BEN_PAIRD_RT_FK1') Then
37: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
38: hr_utility.set_message_token('PROCEDURE', l_proc);
39: hr_utility.set_message_token('STEP','5');
40: hr_utility.raise_error;
41: ElsIf (p_constraint_name = 'BEN_PAIRD_RT_PK') Then
42: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
35: --
36: If (p_constraint_name = 'BEN_PAIRD_RT_FK1') Then
37: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
38: hr_utility.set_message_token('PROCEDURE', l_proc);
39: hr_utility.set_message_token('STEP','5');
40: hr_utility.raise_error;
41: ElsIf (p_constraint_name = 'BEN_PAIRD_RT_PK') Then
42: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
43: hr_utility.set_message_token('PROCEDURE', l_proc);
36: If (p_constraint_name = 'BEN_PAIRD_RT_FK1') Then
37: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
38: hr_utility.set_message_token('PROCEDURE', l_proc);
39: hr_utility.set_message_token('STEP','5');
40: hr_utility.raise_error;
41: ElsIf (p_constraint_name = 'BEN_PAIRD_RT_PK') Then
42: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
43: hr_utility.set_message_token('PROCEDURE', l_proc);
44: hr_utility.set_message_token('STEP','10');
38: hr_utility.set_message_token('PROCEDURE', l_proc);
39: hr_utility.set_message_token('STEP','5');
40: hr_utility.raise_error;
41: ElsIf (p_constraint_name = 'BEN_PAIRD_RT_PK') Then
42: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
43: hr_utility.set_message_token('PROCEDURE', l_proc);
44: hr_utility.set_message_token('STEP','10');
45: hr_utility.raise_error;
46: Else
39: hr_utility.set_message_token('STEP','5');
40: hr_utility.raise_error;
41: ElsIf (p_constraint_name = 'BEN_PAIRD_RT_PK') Then
42: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
43: hr_utility.set_message_token('PROCEDURE', l_proc);
44: hr_utility.set_message_token('STEP','10');
45: hr_utility.raise_error;
46: Else
47: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
40: hr_utility.raise_error;
41: ElsIf (p_constraint_name = 'BEN_PAIRD_RT_PK') Then
42: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
43: hr_utility.set_message_token('PROCEDURE', l_proc);
44: hr_utility.set_message_token('STEP','10');
45: hr_utility.raise_error;
46: Else
47: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
48: hr_utility.set_message_token('PROCEDURE', l_proc);
41: ElsIf (p_constraint_name = 'BEN_PAIRD_RT_PK') Then
42: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
43: hr_utility.set_message_token('PROCEDURE', l_proc);
44: hr_utility.set_message_token('STEP','10');
45: hr_utility.raise_error;
46: Else
47: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
48: hr_utility.set_message_token('PROCEDURE', l_proc);
49: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
43: hr_utility.set_message_token('PROCEDURE', l_proc);
44: hr_utility.set_message_token('STEP','10');
45: hr_utility.raise_error;
46: Else
47: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
48: hr_utility.set_message_token('PROCEDURE', l_proc);
49: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
50: hr_utility.raise_error;
51: End If;
44: hr_utility.set_message_token('STEP','10');
45: hr_utility.raise_error;
46: Else
47: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
48: hr_utility.set_message_token('PROCEDURE', l_proc);
49: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
50: hr_utility.raise_error;
51: End If;
52: --
45: hr_utility.raise_error;
46: Else
47: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
48: hr_utility.set_message_token('PROCEDURE', l_proc);
49: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
50: hr_utility.raise_error;
51: End If;
52: --
53: hr_utility.set_location(' Leaving:'||l_proc, 10);
46: Else
47: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
48: hr_utility.set_message_token('PROCEDURE', l_proc);
49: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
50: hr_utility.raise_error;
51: End If;
52: --
53: hr_utility.set_location(' Leaving:'||l_proc, 10);
54: End constraint_error;
49: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
50: hr_utility.raise_error;
51: End If;
52: --
53: hr_utility.set_location(' Leaving:'||l_proc, 10);
54: End constraint_error;
55: --
56: -- ----------------------------------------------------------------------------
57: -- |-----------------------------< api_updating >-----------------------------|
126: l_proc varchar2(72) := g_package||'api_updating';
127: l_fct_ret boolean;
128: --
129: Begin
130: hr_utility.set_location('Entering:'||l_proc, 5);
131: --
132: If (p_effective_date is null or
133: p_paird_rt_id is null or
134: p_object_version_number is null) Then
139: l_fct_ret := false;
140: Else
141: If (p_paird_rt_id = g_old_rec.paird_rt_id and
142: p_object_version_number = g_old_rec.object_version_number) Then
143: hr_utility.set_location(l_proc, 10);
144: --
145: -- The g_old_rec is current therefore we must
146: -- set the returning function to true
147: --
156: Close C_Sel1;
157: --
158: -- The primary key is invalid therefore we must error
159: --
160: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
161: hr_utility.raise_error;
162: End If;
163: Close C_Sel1;
164: If (p_object_version_number <> g_old_rec.object_version_number) Then
157: --
158: -- The primary key is invalid therefore we must error
159: --
160: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
161: hr_utility.raise_error;
162: End If;
163: Close C_Sel1;
164: If (p_object_version_number <> g_old_rec.object_version_number) Then
165: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
161: hr_utility.raise_error;
162: End If;
163: Close C_Sel1;
164: If (p_object_version_number <> g_old_rec.object_version_number) Then
165: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
166: hr_utility.raise_error;
167: End If;
168: hr_utility.set_location(l_proc, 15);
169: l_fct_ret := true;
162: End If;
163: Close C_Sel1;
164: If (p_object_version_number <> g_old_rec.object_version_number) Then
165: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
166: hr_utility.raise_error;
167: End If;
168: hr_utility.set_location(l_proc, 15);
169: l_fct_ret := true;
170: End If;
164: If (p_object_version_number <> g_old_rec.object_version_number) Then
165: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
166: hr_utility.raise_error;
167: End If;
168: hr_utility.set_location(l_proc, 15);
169: l_fct_ret := true;
170: End If;
171: End If;
172: hr_utility.set_location(' Leaving:'||l_proc, 20);
168: hr_utility.set_location(l_proc, 15);
169: l_fct_ret := true;
170: End If;
171: End If;
172: hr_utility.set_location(' Leaving:'||l_proc, 20);
173: Return (l_fct_ret);
174: --
175: End api_updating;
176: --
198: and p_effective_date
199: between t.effective_start_date and t.effective_end_date;
200: --
201: Begin
202: hr_utility.set_location('Entering:'||l_proc, 5);
203: Open C_Sel1;
204: Fetch C_Sel1 Into l_parent_key_value1,
205: l_parent_key_value2;
206: If C_Sel1%notfound then
204: Fetch C_Sel1 Into l_parent_key_value1,
205: l_parent_key_value2;
206: If C_Sel1%notfound then
207: Close C_Sel1;
208: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
209: hr_utility.set_message_token('PROCEDURE', l_proc);
210: hr_utility.set_message_token('STEP','10');
211: hr_utility.raise_error;
212: End If;
205: l_parent_key_value2;
206: If C_Sel1%notfound then
207: Close C_Sel1;
208: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
209: hr_utility.set_message_token('PROCEDURE', l_proc);
210: hr_utility.set_message_token('STEP','10');
211: hr_utility.raise_error;
212: End If;
213: Close C_Sel1;
206: If C_Sel1%notfound then
207: Close C_Sel1;
208: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
209: hr_utility.set_message_token('PROCEDURE', l_proc);
210: hr_utility.set_message_token('STEP','10');
211: hr_utility.raise_error;
212: End If;
213: Close C_Sel1;
214: --
207: Close C_Sel1;
208: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
209: hr_utility.set_message_token('PROCEDURE', l_proc);
210: hr_utility.set_message_token('STEP','10');
211: hr_utility.raise_error;
212: End If;
213: Close C_Sel1;
214: --
215: -- Call the corresponding datetrack api
229: p_delete => p_delete,
230: p_future_change => p_future_change,
231: p_delete_next_change => p_delete_next_change);
232: --
233: hr_utility.set_location(' Leaving:'||l_proc, 10);
234: End find_dt_del_modes;
235: --
236: -- ----------------------------------------------------------------------------
237: -- |--------------------------< find_dt_upd_modes >---------------------------|
246: --
247: l_proc varchar2(72) := g_package||'find_dt_upd_modes';
248: --
249: Begin
250: hr_utility.set_location('Entering:'||l_proc, 5);
251: --
252: -- Call the corresponding datetrack api
253: --
254: dt_api.find_dt_upd_modes
260: p_update => p_update,
261: p_update_override => p_update_override,
262: p_update_change_insert => p_update_change_insert);
263: --
264: hr_utility.set_location(' Leaving:'||l_proc, 10);
265: End find_dt_upd_modes;
266: --
267: -- ----------------------------------------------------------------------------
268: -- |------------------------< upd_effective_end_date >------------------------|
278: l_proc varchar2(72) := g_package||'upd_effective_end_date';
279: l_object_version_number number;
280: --
281: Begin
282: hr_utility.set_location('Entering:'||l_proc, 5);
283: --
284: -- Because we are updating a row we must get the next object
285: -- version number.
286: --
289: (p_base_table_name => 'ben_paird_rt_f',
290: p_base_key_column => 'paird_rt_id',
291: p_base_key_value => p_base_key_value);
292: --
293: hr_utility.set_location(l_proc, 10);
294: g_api_dml := true; -- Set the api dml status
295: --
296: -- Update the specified datetrack row setting the effective
297: -- end date to the specified new effective end date.
304: between t.effective_start_date and t.effective_end_date;
305: --
306: g_api_dml := false; -- Unset the api dml status
307: p_object_version_number := l_object_version_number;
308: hr_utility.set_location(' Leaving:'||l_proc, 15);
309: --
310: Exception
311: When Others Then
312: g_api_dml := false; -- Unset the api dml status
394: --
395: --
396: --
397: Begin
398: hr_utility.set_location('Entering:'||l_proc, 5);
399: --
400: -- Ensure that all the mandatory arguments are not null
401: --
402: hr_api.mandatory_arg_error(p_api_name => l_proc,
427: Close C_Sel1;
428: --
429: -- The primary key is invalid therefore we must error
430: --
431: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
432: hr_utility.raise_error;
433: End If;
434: Close C_Sel1;
435: If (p_object_version_number <> g_old_rec.object_version_number) Then
428: --
429: -- The primary key is invalid therefore we must error
430: --
431: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
432: hr_utility.raise_error;
433: End If;
434: Close C_Sel1;
435: If (p_object_version_number <> g_old_rec.object_version_number) Then
436: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
432: hr_utility.raise_error;
433: End If;
434: Close C_Sel1;
435: If (p_object_version_number <> g_old_rec.object_version_number) Then
436: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
437: hr_utility.raise_error;
438: End If;
439: hr_utility.set_location(l_proc, 15);
440: --
433: End If;
434: Close C_Sel1;
435: If (p_object_version_number <> g_old_rec.object_version_number) Then
436: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
437: hr_utility.raise_error;
438: End If;
439: hr_utility.set_location(l_proc, 15);
440: --
441: --
435: If (p_object_version_number <> g_old_rec.object_version_number) Then
436: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
437: hr_utility.raise_error;
438: End If;
439: hr_utility.set_location(l_proc, 15);
440: --
441: --
442: -- Validate the datetrack mode mode getting the validation start
443: -- and end dates for the specified datetrack operation.
462: -- We are doing a datetrack 'INSERT' which is illegal within this
463: -- procedure therefore we must error (note: to lck on insert the
464: -- private procedure ins_lck should be called).
465: --
466: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
467: hr_utility.set_message_token('PROCEDURE', l_proc);
468: hr_utility.set_message_token('STEP','20');
469: hr_utility.raise_error;
470: End If;
463: -- procedure therefore we must error (note: to lck on insert the
464: -- private procedure ins_lck should be called).
465: --
466: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
467: hr_utility.set_message_token('PROCEDURE', l_proc);
468: hr_utility.set_message_token('STEP','20');
469: hr_utility.raise_error;
470: End If;
471: --
464: -- private procedure ins_lck should be called).
465: --
466: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
467: hr_utility.set_message_token('PROCEDURE', l_proc);
468: hr_utility.set_message_token('STEP','20');
469: hr_utility.raise_error;
470: End If;
471: --
472: -- Set the validation start and end date OUT arguments
465: --
466: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
467: hr_utility.set_message_token('PROCEDURE', l_proc);
468: hr_utility.set_message_token('STEP','20');
469: hr_utility.raise_error;
470: End If;
471: --
472: -- Set the validation start and end date OUT arguments
473: --
473: --
474: p_validation_start_date := l_validation_start_date;
475: p_validation_end_date := l_validation_end_date;
476: --
477: hr_utility.set_location(' Leaving:'||l_proc, 30);
478: --
479: -- We need to trap the ORA LOCK exception
480: --
481: Exception
483: --
484: -- The object is locked therefore we need to supply a meaningful
485: -- error message.
486: --
487: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
488: hr_utility.set_message_token('TABLE_NAME', 'ben_paird_rt_f');
489: hr_utility.raise_error;
490: When l_object_invalid then
491: --
484: -- The object is locked therefore we need to supply a meaningful
485: -- error message.
486: --
487: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
488: hr_utility.set_message_token('TABLE_NAME', 'ben_paird_rt_f');
489: hr_utility.raise_error;
490: When l_object_invalid then
491: --
492: -- The object doesn't exist or is invalid
485: -- error message.
486: --
487: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
488: hr_utility.set_message_token('TABLE_NAME', 'ben_paird_rt_f');
489: hr_utility.raise_error;
490: When l_object_invalid then
491: --
492: -- The object doesn't exist or is invalid
493: --
490: When l_object_invalid then
491: --
492: -- The object doesn't exist or is invalid
493: --
494: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
495: hr_utility.set_message_token('TABLE_NAME', 'ben_paird_rt_f');
496: hr_utility.raise_error;
497: End lck;
498: --
491: --
492: -- The object doesn't exist or is invalid
493: --
494: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
495: hr_utility.set_message_token('TABLE_NAME', 'ben_paird_rt_f');
496: hr_utility.raise_error;
497: End lck;
498: --
499: -- ----------------------------------------------------------------------------
492: -- The object doesn't exist or is invalid
493: --
494: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
495: hr_utility.set_message_token('TABLE_NAME', 'ben_paird_rt_f');
496: hr_utility.raise_error;
497: End lck;
498: --
499: -- ----------------------------------------------------------------------------
500: -- |-----------------------------< convert_args >-----------------------------|
559: l_proc varchar2(72) := g_package||'convert_args';
560: --
561: Begin
562: --
563: hr_utility.set_location('Entering:'||l_proc, 5);
564: --
565: -- Convert arguments into local l_rec structure.
566: --
567: l_rec.paird_rt_id := p_paird_rt_id;
617: l_rec.object_version_number := p_object_version_number;
618: --
619: -- Return the plsql record structure.
620: --
621: hr_utility.set_location(' Leaving:'||l_proc, 10);
622: Return(l_rec);
623: --
624: End convert_args;
625: --