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_PL_DPNT_CVG_CTFN_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_PL_DPNT_CVG_CTFN_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_PL_DPNT_CVG_CTFN_PK') Then
34: hr_utility.set_location('Entering:'||l_proc, 5);
35: --
36: If (p_constraint_name = 'BEN_PL_DPNT_CVG_CTFN_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_PL_DPNT_CVG_CTFN_PK') Then
42: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
35: --
36: If (p_constraint_name = 'BEN_PL_DPNT_CVG_CTFN_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_PL_DPNT_CVG_CTFN_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_PL_DPNT_CVG_CTFN_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_PL_DPNT_CVG_CTFN_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_PL_DPNT_CVG_CTFN_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_PL_DPNT_CVG_CTFN_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_PL_DPNT_CVG_CTFN_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_PL_DPNT_CVG_CTFN_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 >-----------------------------|
122: l_proc varchar2(72) := g_package||'api_updating';
123: l_fct_ret boolean;
124: --
125: Begin
126: hr_utility.set_location('Entering:'||l_proc, 5);
127: --
128: If (p_effective_date is null or
129: p_pl_dpnt_cvg_ctfn_id is null or
130: p_object_version_number is null) Then
135: l_fct_ret := false;
136: Else
137: If (p_pl_dpnt_cvg_ctfn_id = g_old_rec.pl_dpnt_cvg_ctfn_id and
138: p_object_version_number = g_old_rec.object_version_number) Then
139: hr_utility.set_location(l_proc, 10);
140: --
141: -- The g_old_rec is current therefore we must
142: -- set the returning function to true
143: --
152: Close C_Sel1;
153: --
154: -- The primary key is invalid therefore we must error
155: --
156: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
157: hr_utility.raise_error;
158: End If;
159: Close C_Sel1;
160: If (p_object_version_number <> g_old_rec.object_version_number) Then
153: --
154: -- The primary key is invalid therefore we must error
155: --
156: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
157: hr_utility.raise_error;
158: End If;
159: Close C_Sel1;
160: If (p_object_version_number <> g_old_rec.object_version_number) Then
161: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
157: hr_utility.raise_error;
158: End If;
159: Close C_Sel1;
160: If (p_object_version_number <> g_old_rec.object_version_number) Then
161: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
162: hr_utility.raise_error;
163: End If;
164: hr_utility.set_location(l_proc, 15);
165: l_fct_ret := true;
158: End If;
159: Close C_Sel1;
160: If (p_object_version_number <> g_old_rec.object_version_number) Then
161: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
162: hr_utility.raise_error;
163: End If;
164: hr_utility.set_location(l_proc, 15);
165: l_fct_ret := true;
166: End If;
160: If (p_object_version_number <> g_old_rec.object_version_number) Then
161: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
162: hr_utility.raise_error;
163: End If;
164: hr_utility.set_location(l_proc, 15);
165: l_fct_ret := true;
166: End If;
167: End If;
168: hr_utility.set_location(' Leaving:'||l_proc, 20);
164: hr_utility.set_location(l_proc, 15);
165: l_fct_ret := true;
166: End If;
167: End If;
168: hr_utility.set_location(' Leaving:'||l_proc, 20);
169: Return (l_fct_ret);
170: --
171: End api_updating;
172: --
192: and p_effective_date
193: between t.effective_start_date and t.effective_end_date;
194: --
195: Begin
196: hr_utility.set_location('Entering:'||l_proc, 5);
197: Open C_Sel1;
198: Fetch C_Sel1 Into l_parent_key_value1;
199: If C_Sel1%notfound then
200: Close C_Sel1;
197: Open C_Sel1;
198: Fetch C_Sel1 Into l_parent_key_value1;
199: If C_Sel1%notfound then
200: Close C_Sel1;
201: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
202: hr_utility.set_message_token('PROCEDURE', l_proc);
203: hr_utility.set_message_token('STEP','10');
204: hr_utility.raise_error;
205: End If;
198: Fetch C_Sel1 Into l_parent_key_value1;
199: If C_Sel1%notfound then
200: Close C_Sel1;
201: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
202: hr_utility.set_message_token('PROCEDURE', l_proc);
203: hr_utility.set_message_token('STEP','10');
204: hr_utility.raise_error;
205: End If;
206: Close C_Sel1;
199: If C_Sel1%notfound then
200: Close C_Sel1;
201: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
202: hr_utility.set_message_token('PROCEDURE', l_proc);
203: hr_utility.set_message_token('STEP','10');
204: hr_utility.raise_error;
205: End If;
206: Close C_Sel1;
207: --
200: Close C_Sel1;
201: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
202: hr_utility.set_message_token('PROCEDURE', l_proc);
203: hr_utility.set_message_token('STEP','10');
204: hr_utility.raise_error;
205: End If;
206: Close C_Sel1;
207: --
208: -- Call the corresponding datetrack api
219: p_delete => p_delete,
220: p_future_change => p_future_change,
221: p_delete_next_change => p_delete_next_change);
222: --
223: hr_utility.set_location(' Leaving:'||l_proc, 10);
224: End find_dt_del_modes;
225: --
226: -- ----------------------------------------------------------------------------
227: -- |--------------------------< find_dt_upd_modes >---------------------------|
236: --
237: l_proc varchar2(72) := g_package||'find_dt_upd_modes';
238: --
239: Begin
240: hr_utility.set_location('Entering:'||l_proc, 5);
241: --
242: -- Call the corresponding datetrack api
243: --
244: dt_api.find_dt_upd_modes
250: p_update => p_update,
251: p_update_override => p_update_override,
252: p_update_change_insert => p_update_change_insert);
253: --
254: hr_utility.set_location(' Leaving:'||l_proc, 10);
255: End find_dt_upd_modes;
256: --
257: -- ----------------------------------------------------------------------------
258: -- |------------------------< upd_effective_end_date >------------------------|
268: l_proc varchar2(72) := g_package||'upd_effective_end_date';
269: l_object_version_number number;
270: --
271: Begin
272: hr_utility.set_location('Entering:'||l_proc, 5);
273: --
274: -- Because we are updating a row we must get the next object
275: -- version number.
276: --
279: (p_base_table_name => 'ben_pl_dpnt_cvg_ctfn_f',
280: p_base_key_column => 'pl_dpnt_cvg_ctfn_id',
281: p_base_key_value => p_base_key_value);
282: --
283: hr_utility.set_location(l_proc, 10);
284: g_api_dml := true; -- Set the api dml status
285: --
286: -- Update the specified datetrack row setting the effective
287: -- end date to the specified new effective end date.
294: between t.effective_start_date and t.effective_end_date;
295: --
296: g_api_dml := false; -- Unset the api dml status
297: p_object_version_number := l_object_version_number;
298: hr_utility.set_location(' Leaving:'||l_proc, 15);
299: --
300: Exception
301: When Others Then
302: g_api_dml := false; -- Unset the api dml status
380: --
381: --
382: --
383: Begin
384: hr_utility.set_location('Entering:'||l_proc, 5);
385: --
386: -- Ensure that all the mandatory arguments are not null
387: --
388: hr_api.mandatory_arg_error(p_api_name => l_proc,
413: Close C_Sel1;
414: --
415: -- The primary key is invalid therefore we must error
416: --
417: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
418: hr_utility.raise_error;
419: End If;
420: Close C_Sel1;
421: If (p_object_version_number <> g_old_rec.object_version_number) Then
414: --
415: -- The primary key is invalid therefore we must error
416: --
417: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
418: hr_utility.raise_error;
419: End If;
420: Close C_Sel1;
421: If (p_object_version_number <> g_old_rec.object_version_number) Then
422: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
418: hr_utility.raise_error;
419: End If;
420: Close C_Sel1;
421: If (p_object_version_number <> g_old_rec.object_version_number) Then
422: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
423: hr_utility.raise_error;
424: End If;
425: hr_utility.set_location(l_proc, 15);
426: --
419: End If;
420: Close C_Sel1;
421: If (p_object_version_number <> g_old_rec.object_version_number) Then
422: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
423: hr_utility.raise_error;
424: End If;
425: hr_utility.set_location(l_proc, 15);
426: --
427: --
421: If (p_object_version_number <> g_old_rec.object_version_number) Then
422: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
423: hr_utility.raise_error;
424: End If;
425: hr_utility.set_location(l_proc, 15);
426: --
427: --
428: -- Validate the datetrack mode mode getting the validation start
429: -- and end dates for the specified datetrack operation.
445: -- We are doing a datetrack 'INSERT' which is illegal within this
446: -- procedure therefore we must error (note: to lck on insert the
447: -- private procedure ins_lck should be called).
448: --
449: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
450: hr_utility.set_message_token('PROCEDURE', l_proc);
451: hr_utility.set_message_token('STEP','20');
452: hr_utility.raise_error;
453: End If;
446: -- procedure therefore we must error (note: to lck on insert the
447: -- private procedure ins_lck should be called).
448: --
449: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
450: hr_utility.set_message_token('PROCEDURE', l_proc);
451: hr_utility.set_message_token('STEP','20');
452: hr_utility.raise_error;
453: End If;
454: --
447: -- private procedure ins_lck should be called).
448: --
449: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
450: hr_utility.set_message_token('PROCEDURE', l_proc);
451: hr_utility.set_message_token('STEP','20');
452: hr_utility.raise_error;
453: End If;
454: --
455: -- Set the validation start and end date OUT arguments
448: --
449: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
450: hr_utility.set_message_token('PROCEDURE', l_proc);
451: hr_utility.set_message_token('STEP','20');
452: hr_utility.raise_error;
453: End If;
454: --
455: -- Set the validation start and end date OUT arguments
456: --
456: --
457: p_validation_start_date := l_validation_start_date;
458: p_validation_end_date := l_validation_end_date;
459: --
460: hr_utility.set_location(' Leaving:'||l_proc, 30);
461: --
462: -- We need to trap the ORA LOCK exception
463: --
464: Exception
466: --
467: -- The object is locked therefore we need to supply a meaningful
468: -- error message.
469: --
470: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
471: hr_utility.set_message_token('TABLE_NAME', 'ben_pl_dpnt_cvg_ctfn_f');
472: hr_utility.raise_error;
473: When l_object_invalid then
474: --
467: -- The object is locked therefore we need to supply a meaningful
468: -- error message.
469: --
470: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
471: hr_utility.set_message_token('TABLE_NAME', 'ben_pl_dpnt_cvg_ctfn_f');
472: hr_utility.raise_error;
473: When l_object_invalid then
474: --
475: -- The object doesn't exist or is invalid
468: -- error message.
469: --
470: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
471: hr_utility.set_message_token('TABLE_NAME', 'ben_pl_dpnt_cvg_ctfn_f');
472: hr_utility.raise_error;
473: When l_object_invalid then
474: --
475: -- The object doesn't exist or is invalid
476: --
473: When l_object_invalid then
474: --
475: -- The object doesn't exist or is invalid
476: --
477: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
478: hr_utility.set_message_token('TABLE_NAME', 'ben_pl_dpnt_cvg_ctfn_f');
479: hr_utility.raise_error;
480: End lck;
481: --
474: --
475: -- The object doesn't exist or is invalid
476: --
477: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
478: hr_utility.set_message_token('TABLE_NAME', 'ben_pl_dpnt_cvg_ctfn_f');
479: hr_utility.raise_error;
480: End lck;
481: --
482: -- ----------------------------------------------------------------------------
475: -- The object doesn't exist or is invalid
476: --
477: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
478: hr_utility.set_message_token('TABLE_NAME', 'ben_pl_dpnt_cvg_ctfn_f');
479: hr_utility.raise_error;
480: End lck;
481: --
482: -- ----------------------------------------------------------------------------
483: -- |-----------------------------< convert_args >-----------------------------|
538: l_proc varchar2(72) := g_package||'convert_args';
539: --
540: Begin
541: --
542: hr_utility.set_location('Entering:'||l_proc, 5);
543: --
544: -- Convert arguments into local l_rec structure.
545: --
546: l_rec.pl_dpnt_cvg_ctfn_id := p_pl_dpnt_cvg_ctfn_id;
592: l_rec.object_version_number := p_object_version_number;
593: --
594: -- Return the plsql record structure.
595: --
596: hr_utility.set_location(' Leaving:'||l_proc, 10);
597: Return(l_rec);
598: --
599: End convert_args;
600: --