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_ENRT_PERD_FOR_PL_F_PK') 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_ENRT_PERD_FOR_PL_F_PK') 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: Else
34: hr_utility.set_location('Entering:'||l_proc, 5);
35: --
36: If (p_constraint_name = 'BEN_ENRT_PERD_FOR_PL_F_PK') 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: Else
42: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
35: --
36: If (p_constraint_name = 'BEN_ENRT_PERD_FOR_PL_F_PK') 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: Else
42: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
43: hr_utility.set_message_token('PROCEDURE', l_proc);
36: If (p_constraint_name = 'BEN_ENRT_PERD_FOR_PL_F_PK') 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: Else
42: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
43: hr_utility.set_message_token('PROCEDURE', l_proc);
44: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
38: hr_utility.set_message_token('PROCEDURE', l_proc);
39: hr_utility.set_message_token('STEP','5');
40: hr_utility.raise_error;
41: Else
42: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
43: hr_utility.set_message_token('PROCEDURE', l_proc);
44: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
45: hr_utility.raise_error;
46: End If;
39: hr_utility.set_message_token('STEP','5');
40: hr_utility.raise_error;
41: Else
42: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
43: hr_utility.set_message_token('PROCEDURE', l_proc);
44: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
45: hr_utility.raise_error;
46: End If;
47: --
40: hr_utility.raise_error;
41: Else
42: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
43: hr_utility.set_message_token('PROCEDURE', l_proc);
44: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
45: hr_utility.raise_error;
46: End If;
47: --
48: hr_utility.set_location(' Leaving:'||l_proc, 10);
41: Else
42: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
43: hr_utility.set_message_token('PROCEDURE', l_proc);
44: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
45: hr_utility.raise_error;
46: End If;
47: --
48: hr_utility.set_location(' Leaving:'||l_proc, 10);
49: End constraint_error;
44: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
45: hr_utility.raise_error;
46: End If;
47: --
48: hr_utility.set_location(' Leaving:'||l_proc, 10);
49: End constraint_error;
50: --
51: -- ----------------------------------------------------------------------------
52: -- |-----------------------------< api_updating >-----------------------------|
117: l_proc varchar2(72) := g_package||'api_updating';
118: l_fct_ret boolean;
119: --
120: Begin
121: hr_utility.set_location('Entering:'||l_proc, 5);
122: --
123: If (p_effective_date is null or
124: p_enrt_perd_for_pl_id is null or
125: p_object_version_number is null) Then
130: l_fct_ret := false;
131: Else
132: If (p_enrt_perd_for_pl_id = g_old_rec.enrt_perd_for_pl_id and
133: p_object_version_number = g_old_rec.object_version_number) Then
134: hr_utility.set_location(l_proc, 10);
135: --
136: -- The g_old_rec is current therefore we must
137: -- set the returning function to true
138: --
147: Close C_Sel1;
148: --
149: -- The primary key is invalid therefore we must error
150: --
151: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
152: hr_utility.raise_error;
153: End If;
154: Close C_Sel1;
155: If (p_object_version_number <> g_old_rec.object_version_number) Then
148: --
149: -- The primary key is invalid therefore we must error
150: --
151: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
152: hr_utility.raise_error;
153: End If;
154: Close C_Sel1;
155: If (p_object_version_number <> g_old_rec.object_version_number) Then
156: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
152: hr_utility.raise_error;
153: End If;
154: Close C_Sel1;
155: If (p_object_version_number <> g_old_rec.object_version_number) Then
156: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
157: hr_utility.raise_error;
158: End If;
159: hr_utility.set_location(l_proc, 15);
160: l_fct_ret := true;
153: End If;
154: Close C_Sel1;
155: If (p_object_version_number <> g_old_rec.object_version_number) Then
156: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
157: hr_utility.raise_error;
158: End If;
159: hr_utility.set_location(l_proc, 15);
160: l_fct_ret := true;
161: End If;
155: If (p_object_version_number <> g_old_rec.object_version_number) Then
156: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
157: hr_utility.raise_error;
158: End If;
159: hr_utility.set_location(l_proc, 15);
160: l_fct_ret := true;
161: End If;
162: End If;
163: hr_utility.set_location(' Leaving:'||l_proc, 20);
159: hr_utility.set_location(l_proc, 15);
160: l_fct_ret := true;
161: End If;
162: End If;
163: hr_utility.set_location(' Leaving:'||l_proc, 20);
164: Return (l_fct_ret);
165: --
166: End api_updating;
167: --
189: and p_effective_date
190: between t.effective_start_date and t.effective_end_date;
191: --
192: Begin
193: hr_utility.set_location('Entering:'||l_proc, 5);
194: Open C_Sel1;
195: Fetch C_Sel1 Into l_parent_key_value1,
196: l_parent_key_value2;
197: If C_Sel1%notfound then
195: Fetch C_Sel1 Into l_parent_key_value1,
196: l_parent_key_value2;
197: If C_Sel1%notfound then
198: Close C_Sel1;
199: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
200: hr_utility.set_message_token('PROCEDURE', l_proc);
201: hr_utility.set_message_token('STEP','10');
202: hr_utility.raise_error;
203: End If;
196: l_parent_key_value2;
197: If C_Sel1%notfound then
198: Close C_Sel1;
199: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
200: hr_utility.set_message_token('PROCEDURE', l_proc);
201: hr_utility.set_message_token('STEP','10');
202: hr_utility.raise_error;
203: End If;
204: Close C_Sel1;
197: If C_Sel1%notfound then
198: Close C_Sel1;
199: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
200: hr_utility.set_message_token('PROCEDURE', l_proc);
201: hr_utility.set_message_token('STEP','10');
202: hr_utility.raise_error;
203: End If;
204: Close C_Sel1;
205: --
198: Close C_Sel1;
199: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
200: hr_utility.set_message_token('PROCEDURE', l_proc);
201: hr_utility.set_message_token('STEP','10');
202: hr_utility.raise_error;
203: End If;
204: Close C_Sel1;
205: --
206: -- Call the corresponding datetrack api
220: p_delete => p_delete,
221: p_future_change => p_future_change,
222: p_delete_next_change => p_delete_next_change);
223: --
224: hr_utility.set_location(' Leaving:'||l_proc, 10);
225: End find_dt_del_modes;
226: --
227: -- ----------------------------------------------------------------------------
228: -- |--------------------------< find_dt_upd_modes >---------------------------|
237: --
238: l_proc varchar2(72) := g_package||'find_dt_upd_modes';
239: --
240: Begin
241: hr_utility.set_location('Entering:'||l_proc, 5);
242: --
243: -- Call the corresponding datetrack api
244: --
245: dt_api.find_dt_upd_modes
251: p_update => p_update,
252: p_update_override => p_update_override,
253: p_update_change_insert => p_update_change_insert);
254: --
255: hr_utility.set_location(' Leaving:'||l_proc, 10);
256: End find_dt_upd_modes;
257: --
258: -- ----------------------------------------------------------------------------
259: -- |------------------------< upd_effective_end_date >------------------------|
269: l_proc varchar2(72) := g_package||'upd_effective_end_date';
270: l_object_version_number number;
271: --
272: Begin
273: hr_utility.set_location('Entering:'||l_proc, 5);
274: --
275: -- Because we are updating a row we must get the next object
276: -- version number.
277: --
280: (p_base_table_name => 'ben_enrt_perd_for_pl_f',
281: p_base_key_column => 'enrt_perd_for_pl_id',
282: p_base_key_value => p_base_key_value);
283: --
284: hr_utility.set_location(l_proc, 10);
285: g_api_dml := true; -- Set the api dml status
286: --
287: -- Update the specified datetrack row setting the effective
288: -- end date to the specified new effective end date.
295: between t.effective_start_date and t.effective_end_date;
296: --
297: g_api_dml := false; -- Unset the api dml status
298: p_object_version_number := l_object_version_number;
299: hr_utility.set_location(' Leaving:'||l_proc, 15);
300: --
301: Exception
302: When Others Then
303: g_api_dml := false; -- Unset the api dml status
381: --
382: --
383: --
384: Begin
385: hr_utility.set_location('Entering:'||l_proc, 5);
386: --
387: -- Ensure that all the mandatory arguments are not null
388: --
389: hr_api.mandatory_arg_error(p_api_name => l_proc,
414: Close C_Sel1;
415: --
416: -- The primary key is invalid therefore we must error
417: --
418: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
419: hr_utility.raise_error;
420: End If;
421: Close C_Sel1;
422: If (p_object_version_number <> g_old_rec.object_version_number) Then
415: --
416: -- The primary key is invalid therefore we must error
417: --
418: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
419: hr_utility.raise_error;
420: End If;
421: Close C_Sel1;
422: If (p_object_version_number <> g_old_rec.object_version_number) Then
423: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
419: hr_utility.raise_error;
420: End If;
421: Close C_Sel1;
422: If (p_object_version_number <> g_old_rec.object_version_number) Then
423: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
424: hr_utility.raise_error;
425: End If;
426: hr_utility.set_location(l_proc, 15);
427: --
420: End If;
421: Close C_Sel1;
422: If (p_object_version_number <> g_old_rec.object_version_number) Then
423: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
424: hr_utility.raise_error;
425: End If;
426: hr_utility.set_location(l_proc, 15);
427: --
428: --
422: If (p_object_version_number <> g_old_rec.object_version_number) Then
423: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
424: hr_utility.raise_error;
425: End If;
426: hr_utility.set_location(l_proc, 15);
427: --
428: --
429: -- Validate the datetrack mode mode getting the validation start
430: -- and end dates for the specified datetrack operation.
449: -- We are doing a datetrack 'INSERT' which is illegal within this
450: -- procedure therefore we must error (note: to lck on insert the
451: -- private procedure ins_lck should be called).
452: --
453: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
454: hr_utility.set_message_token('PROCEDURE', l_proc);
455: hr_utility.set_message_token('STEP','20');
456: hr_utility.raise_error;
457: End If;
450: -- procedure therefore we must error (note: to lck on insert the
451: -- private procedure ins_lck should be called).
452: --
453: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
454: hr_utility.set_message_token('PROCEDURE', l_proc);
455: hr_utility.set_message_token('STEP','20');
456: hr_utility.raise_error;
457: End If;
458: --
451: -- private procedure ins_lck should be called).
452: --
453: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
454: hr_utility.set_message_token('PROCEDURE', l_proc);
455: hr_utility.set_message_token('STEP','20');
456: hr_utility.raise_error;
457: End If;
458: --
459: -- Set the validation start and end date OUT arguments
452: --
453: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
454: hr_utility.set_message_token('PROCEDURE', l_proc);
455: hr_utility.set_message_token('STEP','20');
456: hr_utility.raise_error;
457: End If;
458: --
459: -- Set the validation start and end date OUT arguments
460: --
460: --
461: p_validation_start_date := l_validation_start_date;
462: p_validation_end_date := l_validation_end_date;
463: --
464: hr_utility.set_location(' Leaving:'||l_proc, 30);
465: --
466: -- We need to trap the ORA LOCK exception
467: --
468: Exception
470: --
471: -- The object is locked therefore we need to supply a meaningful
472: -- error message.
473: --
474: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
475: hr_utility.set_message_token('TABLE_NAME', 'ben_enrt_perd_for_pl_f');
476: hr_utility.raise_error;
477: When l_object_invalid then
478: --
471: -- The object is locked therefore we need to supply a meaningful
472: -- error message.
473: --
474: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
475: hr_utility.set_message_token('TABLE_NAME', 'ben_enrt_perd_for_pl_f');
476: hr_utility.raise_error;
477: When l_object_invalid then
478: --
479: -- The object doesn't exist or is invalid
472: -- error message.
473: --
474: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
475: hr_utility.set_message_token('TABLE_NAME', 'ben_enrt_perd_for_pl_f');
476: hr_utility.raise_error;
477: When l_object_invalid then
478: --
479: -- The object doesn't exist or is invalid
480: --
477: When l_object_invalid then
478: --
479: -- The object doesn't exist or is invalid
480: --
481: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
482: hr_utility.set_message_token('TABLE_NAME', 'ben_enrt_perd_for_pl_f');
483: hr_utility.raise_error;
484: End lck;
485: --
478: --
479: -- The object doesn't exist or is invalid
480: --
481: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
482: hr_utility.set_message_token('TABLE_NAME', 'ben_enrt_perd_for_pl_f');
483: hr_utility.raise_error;
484: End lck;
485: --
486: -- ----------------------------------------------------------------------------
479: -- The object doesn't exist or is invalid
480: --
481: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
482: hr_utility.set_message_token('TABLE_NAME', 'ben_enrt_perd_for_pl_f');
483: hr_utility.raise_error;
484: End lck;
485: --
486: -- ----------------------------------------------------------------------------
487: -- |-----------------------------< convert_args >-----------------------------|
542: l_proc varchar2(72) := g_package||'convert_args';
543: --
544: Begin
545: --
546: hr_utility.set_location('Entering:'||l_proc, 5);
547: --
548: -- Convert arguments into local l_rec structure.
549: --
550: l_rec.enrt_perd_for_pl_id := p_enrt_perd_for_pl_id;
596: l_rec.object_version_number := p_object_version_number;
597: --
598: -- Return the plsql record structure.
599: --
600: hr_utility.set_location(' Leaving:'||l_proc, 10);
601: Return(l_rec);
602: --
603: End convert_args;
604: --