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_CVG_AMT_CALC_MTHD_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_CVG_AMT_CALC_MTHD_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_CVG_AMT_CALC_MTHD_FK2') Then
34: hr_utility.set_location('Entering:'||l_proc, 5);
35: --
36: If (p_constraint_name = 'BEN_CVG_AMT_CALC_MTHD_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_CVG_AMT_CALC_MTHD_FK2') Then
42: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
35: --
36: If (p_constraint_name = 'BEN_CVG_AMT_CALC_MTHD_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_CVG_AMT_CALC_MTHD_FK2') 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_CVG_AMT_CALC_MTHD_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_CVG_AMT_CALC_MTHD_FK2') 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_CVG_AMT_CALC_MTHD_FK2') 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: ElsIf (p_constraint_name = 'BEN_CVG_AMT_CALC_MTHD_PK') Then
39: hr_utility.set_message_token('STEP','5');
40: hr_utility.raise_error;
41: ElsIf (p_constraint_name = 'BEN_CVG_AMT_CALC_MTHD_FK2') 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: ElsIf (p_constraint_name = 'BEN_CVG_AMT_CALC_MTHD_PK') Then
47: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
40: hr_utility.raise_error;
41: ElsIf (p_constraint_name = 'BEN_CVG_AMT_CALC_MTHD_FK2') 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: ElsIf (p_constraint_name = 'BEN_CVG_AMT_CALC_MTHD_PK') Then
47: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
48: hr_utility.set_message_token('PROCEDURE', l_proc);
41: ElsIf (p_constraint_name = 'BEN_CVG_AMT_CALC_MTHD_FK2') 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: ElsIf (p_constraint_name = 'BEN_CVG_AMT_CALC_MTHD_PK') Then
47: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
48: hr_utility.set_message_token('PROCEDURE', l_proc);
49: hr_utility.set_message_token('STEP','15');
43: hr_utility.set_message_token('PROCEDURE', l_proc);
44: hr_utility.set_message_token('STEP','10');
45: hr_utility.raise_error;
46: ElsIf (p_constraint_name = 'BEN_CVG_AMT_CALC_MTHD_PK') Then
47: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
48: hr_utility.set_message_token('PROCEDURE', l_proc);
49: hr_utility.set_message_token('STEP','15');
50: hr_utility.raise_error;
51: Else
44: hr_utility.set_message_token('STEP','10');
45: hr_utility.raise_error;
46: ElsIf (p_constraint_name = 'BEN_CVG_AMT_CALC_MTHD_PK') Then
47: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
48: hr_utility.set_message_token('PROCEDURE', l_proc);
49: hr_utility.set_message_token('STEP','15');
50: hr_utility.raise_error;
51: Else
52: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
45: hr_utility.raise_error;
46: ElsIf (p_constraint_name = 'BEN_CVG_AMT_CALC_MTHD_PK') Then
47: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
48: hr_utility.set_message_token('PROCEDURE', l_proc);
49: hr_utility.set_message_token('STEP','15');
50: hr_utility.raise_error;
51: Else
52: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
53: hr_utility.set_message_token('PROCEDURE', l_proc);
46: ElsIf (p_constraint_name = 'BEN_CVG_AMT_CALC_MTHD_PK') Then
47: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
48: hr_utility.set_message_token('PROCEDURE', l_proc);
49: hr_utility.set_message_token('STEP','15');
50: hr_utility.raise_error;
51: Else
52: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
53: hr_utility.set_message_token('PROCEDURE', l_proc);
54: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
48: hr_utility.set_message_token('PROCEDURE', l_proc);
49: hr_utility.set_message_token('STEP','15');
50: hr_utility.raise_error;
51: Else
52: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
53: hr_utility.set_message_token('PROCEDURE', l_proc);
54: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
55: hr_utility.raise_error;
56: End If;
49: hr_utility.set_message_token('STEP','15');
50: hr_utility.raise_error;
51: Else
52: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
53: hr_utility.set_message_token('PROCEDURE', l_proc);
54: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
55: hr_utility.raise_error;
56: End If;
57: --
50: hr_utility.raise_error;
51: Else
52: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
53: hr_utility.set_message_token('PROCEDURE', l_proc);
54: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
55: hr_utility.raise_error;
56: End If;
57: --
58: hr_utility.set_location(' Leaving:'||l_proc, 10);
51: Else
52: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
53: hr_utility.set_message_token('PROCEDURE', l_proc);
54: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
55: hr_utility.raise_error;
56: End If;
57: --
58: hr_utility.set_location(' Leaving:'||l_proc, 10);
59: End constraint_error;
54: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
55: hr_utility.raise_error;
56: End If;
57: --
58: hr_utility.set_location(' Leaving:'||l_proc, 10);
59: End constraint_error;
60: --
61: -- ----------------------------------------------------------------------------
62: -- |-----------------------------< api_updating >-----------------------------|
144: l_proc varchar2(72) := g_package||'api_updating';
145: l_fct_ret boolean;
146: --
147: Begin
148: hr_utility.set_location('Entering:'||l_proc, 5);
149: --
150: If (p_effective_date is null or
151: p_cvg_amt_calc_mthd_id is null or
152: p_object_version_number is null) Then
157: l_fct_ret := false;
158: Else
159: If (p_cvg_amt_calc_mthd_id = g_old_rec.cvg_amt_calc_mthd_id and
160: p_object_version_number = g_old_rec.object_version_number) Then
161: hr_utility.set_location(l_proc, 10);
162: --
163: -- The g_old_rec is current therefore we must
164: -- set the returning function to true
165: --
174: Close C_Sel1;
175: --
176: -- The primary key is invalid therefore we must error
177: --
178: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
179: hr_utility.raise_error;
180: End If;
181: Close C_Sel1;
182: If (p_object_version_number <> g_old_rec.object_version_number) Then
175: --
176: -- The primary key is invalid therefore we must error
177: --
178: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
179: hr_utility.raise_error;
180: End If;
181: Close C_Sel1;
182: If (p_object_version_number <> g_old_rec.object_version_number) Then
183: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
179: hr_utility.raise_error;
180: End If;
181: Close C_Sel1;
182: If (p_object_version_number <> g_old_rec.object_version_number) Then
183: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
184: hr_utility.raise_error;
185: End If;
186: hr_utility.set_location(l_proc, 15);
187: l_fct_ret := true;
180: End If;
181: Close C_Sel1;
182: If (p_object_version_number <> g_old_rec.object_version_number) Then
183: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
184: hr_utility.raise_error;
185: End If;
186: hr_utility.set_location(l_proc, 15);
187: l_fct_ret := true;
188: End If;
182: If (p_object_version_number <> g_old_rec.object_version_number) Then
183: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
184: hr_utility.raise_error;
185: End If;
186: hr_utility.set_location(l_proc, 15);
187: l_fct_ret := true;
188: End If;
189: End If;
190: hr_utility.set_location(' Leaving:'||l_proc, 20);
186: hr_utility.set_location(l_proc, 15);
187: l_fct_ret := true;
188: End If;
189: End If;
190: hr_utility.set_location(' Leaving:'||l_proc, 20);
191: Return (l_fct_ret);
192: --
193: End api_updating;
194: --
218: and p_effective_date
219: between t.effective_start_date and t.effective_end_date;
220: --
221: Begin
222: hr_utility.set_location('Entering:'||l_proc, 5);
223: Open C_Sel1;
224: Fetch C_Sel1 Into l_parent_key_value1,
225: l_parent_key_value2,
226: l_parent_key_value3;
225: l_parent_key_value2,
226: l_parent_key_value3;
227: If C_Sel1%notfound then
228: Close C_Sel1;
229: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
230: hr_utility.set_message_token('PROCEDURE', l_proc);
231: hr_utility.set_message_token('STEP','10');
232: hr_utility.raise_error;
233: End If;
226: l_parent_key_value3;
227: If C_Sel1%notfound then
228: Close C_Sel1;
229: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
230: hr_utility.set_message_token('PROCEDURE', l_proc);
231: hr_utility.set_message_token('STEP','10');
232: hr_utility.raise_error;
233: End If;
234: Close C_Sel1;
227: If C_Sel1%notfound then
228: Close C_Sel1;
229: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
230: hr_utility.set_message_token('PROCEDURE', l_proc);
231: hr_utility.set_message_token('STEP','10');
232: hr_utility.raise_error;
233: End If;
234: Close C_Sel1;
235: --
228: Close C_Sel1;
229: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
230: hr_utility.set_message_token('PROCEDURE', l_proc);
231: hr_utility.set_message_token('STEP','10');
232: hr_utility.raise_error;
233: End If;
234: Close C_Sel1;
235: --
236: -- Call the corresponding datetrack api
253: p_delete => p_delete,
254: p_future_change => p_future_change,
255: p_delete_next_change => p_delete_next_change);
256: --
257: hr_utility.set_location(' Leaving:'||l_proc, 10);
258: End find_dt_del_modes;
259: --
260: -- ----------------------------------------------------------------------------
261: -- |--------------------------< find_dt_upd_modes >---------------------------|
270: --
271: l_proc varchar2(72) := g_package||'find_dt_upd_modes';
272: --
273: Begin
274: hr_utility.set_location('Entering:'||l_proc, 5);
275: --
276: -- Call the corresponding datetrack api
277: --
278: dt_api.find_dt_upd_modes
284: p_update => p_update,
285: p_update_override => p_update_override,
286: p_update_change_insert => p_update_change_insert);
287: --
288: hr_utility.set_location(' Leaving:'||l_proc, 10);
289: End find_dt_upd_modes;
290: --
291: -- ----------------------------------------------------------------------------
292: -- |------------------------< upd_effective_end_date >------------------------|
302: l_proc varchar2(72) := g_package||'upd_effective_end_date';
303: l_object_version_number number;
304: --
305: Begin
306: hr_utility.set_location('Entering:'||l_proc, 5);
307: --
308: -- Because we are updating a row we must get the next object
309: -- version number.
310: --
313: (p_base_table_name => 'ben_cvg_amt_calc_mthd_f',
314: p_base_key_column => 'cvg_amt_calc_mthd_id',
315: p_base_key_value => p_base_key_value);
316: --
317: hr_utility.set_location(l_proc, 10);
318: g_api_dml := true; -- Set the api dml status
319: --
320: -- Update the specified datetrack row setting the effective
321: -- end date to the specified new effective end date.
328: between t.effective_start_date and t.effective_end_date;
329: --
330: g_api_dml := false; -- Unset the api dml status
331: p_object_version_number := l_object_version_number;
332: hr_utility.set_location(' Leaving:'||l_proc, 15);
333: --
334: Exception
335: When Others Then
336: g_api_dml := false; -- Unset the api dml status
431: --
432: --
433: --
434: Begin
435: hr_utility.set_location('Entering:'||l_proc, 5);
436: --
437: -- Ensure that all the mandatory arguments are not null
438: --
439: hr_api.mandatory_arg_error(p_api_name => l_proc,
464: Close C_Sel1;
465: --
466: -- The primary key is invalid therefore we must error
467: --
468: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
469: hr_utility.raise_error;
470: End If;
471: Close C_Sel1;
472: If (p_object_version_number <> g_old_rec.object_version_number) Then
465: --
466: -- The primary key is invalid therefore we must error
467: --
468: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
469: hr_utility.raise_error;
470: End If;
471: Close C_Sel1;
472: If (p_object_version_number <> g_old_rec.object_version_number) Then
473: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
469: hr_utility.raise_error;
470: End If;
471: Close C_Sel1;
472: If (p_object_version_number <> g_old_rec.object_version_number) Then
473: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
474: hr_utility.raise_error;
475: End If;
476: hr_utility.set_location(l_proc, 15);
477: --
470: End If;
471: Close C_Sel1;
472: If (p_object_version_number <> g_old_rec.object_version_number) Then
473: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
474: hr_utility.raise_error;
475: End If;
476: hr_utility.set_location(l_proc, 15);
477: --
478: --
472: If (p_object_version_number <> g_old_rec.object_version_number) Then
473: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
474: hr_utility.raise_error;
475: End If;
476: hr_utility.set_location(l_proc, 15);
477: --
478: --
479: -- Validate the datetrack mode mode getting the validation start
480: -- and end dates for the specified datetrack operation.
510: -- We are doing a datetrack 'INSERT' which is illegal within this
511: -- procedure therefore we must error (note: to lck on insert the
512: -- private procedure ins_lck should be called).
513: --
514: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
515: hr_utility.set_message_token('PROCEDURE', l_proc);
516: hr_utility.set_message_token('STEP','20');
517: hr_utility.raise_error;
518: End If;
511: -- procedure therefore we must error (note: to lck on insert the
512: -- private procedure ins_lck should be called).
513: --
514: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
515: hr_utility.set_message_token('PROCEDURE', l_proc);
516: hr_utility.set_message_token('STEP','20');
517: hr_utility.raise_error;
518: End If;
519: --
512: -- private procedure ins_lck should be called).
513: --
514: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
515: hr_utility.set_message_token('PROCEDURE', l_proc);
516: hr_utility.set_message_token('STEP','20');
517: hr_utility.raise_error;
518: End If;
519: --
520: -- Set the validation start and end date OUT arguments
513: --
514: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
515: hr_utility.set_message_token('PROCEDURE', l_proc);
516: hr_utility.set_message_token('STEP','20');
517: hr_utility.raise_error;
518: End If;
519: --
520: -- Set the validation start and end date OUT arguments
521: --
521: --
522: p_validation_start_date := l_validation_start_date;
523: p_validation_end_date := l_validation_end_date;
524: --
525: hr_utility.set_location(' Leaving:'||l_proc, 30);
526: --
527: -- We need to trap the ORA LOCK exception
528: --
529: Exception
531: --
532: -- The object is locked therefore we need to supply a meaningful
533: -- error message.
534: --
535: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
536: hr_utility.set_message_token('TABLE_NAME', 'ben_cvg_amt_calc_mthd_f');
537: hr_utility.raise_error;
538: When l_object_invalid then
539: --
532: -- The object is locked therefore we need to supply a meaningful
533: -- error message.
534: --
535: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
536: hr_utility.set_message_token('TABLE_NAME', 'ben_cvg_amt_calc_mthd_f');
537: hr_utility.raise_error;
538: When l_object_invalid then
539: --
540: -- The object doesn't exist or is invalid
533: -- error message.
534: --
535: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
536: hr_utility.set_message_token('TABLE_NAME', 'ben_cvg_amt_calc_mthd_f');
537: hr_utility.raise_error;
538: When l_object_invalid then
539: --
540: -- The object doesn't exist or is invalid
541: --
538: When l_object_invalid then
539: --
540: -- The object doesn't exist or is invalid
541: --
542: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
543: hr_utility.set_message_token('TABLE_NAME', 'ben_cvg_amt_calc_mthd_f');
544: hr_utility.raise_error;
545: End lck;
546: --
539: --
540: -- The object doesn't exist or is invalid
541: --
542: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
543: hr_utility.set_message_token('TABLE_NAME', 'ben_cvg_amt_calc_mthd_f');
544: hr_utility.raise_error;
545: End lck;
546: --
547: -- ----------------------------------------------------------------------------
540: -- The object doesn't exist or is invalid
541: --
542: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
543: hr_utility.set_message_token('TABLE_NAME', 'ben_cvg_amt_calc_mthd_f');
544: hr_utility.raise_error;
545: End lck;
546: --
547: -- ----------------------------------------------------------------------------
548: -- |-----------------------------< convert_args >-----------------------------|
620: l_proc varchar2(72) := g_package||'convert_args';
621: --
622: Begin
623: --
624: hr_utility.set_location('Entering:'||l_proc, 5);
625: --
626: -- Convert arguments into local l_rec structure.
627: --
628: l_rec.cvg_amt_calc_mthd_id := p_cvg_amt_calc_mthd_id;
691: l_rec.object_version_number := p_object_version_number;
692: --
693: -- Return the plsql record structure.
694: --
695: hr_utility.set_location(' Leaving:'||l_proc, 10);
696: Return(l_rec);
697: --
698: End convert_args;
699: --