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 = 'AVCON_BEN_C_WHNVR_000') 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 = 'AVCON_BEN_C_WHNVR_000') 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_CM_TYP_F_PK') Then
34: hr_utility.set_location('Entering:'||l_proc, 5);
35: --
36: If (p_constraint_name = 'AVCON_BEN_C_WHNVR_000') 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_CM_TYP_F_PK') Then
42: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
35: --
36: If (p_constraint_name = 'AVCON_BEN_C_WHNVR_000') 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_CM_TYP_F_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 = 'AVCON_BEN_C_WHNVR_000') 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_CM_TYP_F_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_CM_TYP_F_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_CM_TYP_F_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_CM_TYP_F_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_CM_TYP_F_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_cm_typ_id is null or
134: p_object_version_number is null) Then
139: l_fct_ret := false;
140: Else
141: If (p_cm_typ_id = g_old_rec.cm_typ_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: --
196: and p_effective_date
197: between t.effective_start_date and t.effective_end_date;
198: --
199: Begin
200: hr_utility.set_location('Entering:'||l_proc, 5);
201: Open C_Sel1;
202: Fetch C_Sel1 Into l_parent_key_value1;
203: If C_Sel1%notfound then
204: Close C_Sel1;
201: Open C_Sel1;
202: Fetch C_Sel1 Into l_parent_key_value1;
203: If C_Sel1%notfound then
204: Close C_Sel1;
205: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
206: hr_utility.set_message_token('PROCEDURE', l_proc);
207: hr_utility.set_message_token('STEP','10');
208: hr_utility.raise_error;
209: End If;
202: Fetch C_Sel1 Into l_parent_key_value1;
203: If C_Sel1%notfound then
204: Close C_Sel1;
205: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
206: hr_utility.set_message_token('PROCEDURE', l_proc);
207: hr_utility.set_message_token('STEP','10');
208: hr_utility.raise_error;
209: End If;
210: Close C_Sel1;
203: If C_Sel1%notfound then
204: Close C_Sel1;
205: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
206: hr_utility.set_message_token('PROCEDURE', l_proc);
207: hr_utility.set_message_token('STEP','10');
208: hr_utility.raise_error;
209: End If;
210: Close C_Sel1;
211: --
204: Close C_Sel1;
205: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
206: hr_utility.set_message_token('PROCEDURE', l_proc);
207: hr_utility.set_message_token('STEP','10');
208: hr_utility.raise_error;
209: End If;
210: Close C_Sel1;
211: --
212: -- Call the corresponding datetrack api
223: p_delete => p_delete,
224: p_future_change => p_future_change,
225: p_delete_next_change => p_delete_next_change);
226: --
227: hr_utility.set_location(' Leaving:'||l_proc, 10);
228: End find_dt_del_modes;
229: --
230: -- ----------------------------------------------------------------------------
231: -- |--------------------------< find_dt_upd_modes >---------------------------|
240: --
241: l_proc varchar2(72) := g_package||'find_dt_upd_modes';
242: --
243: Begin
244: hr_utility.set_location('Entering:'||l_proc, 5);
245: --
246: -- Call the corresponding datetrack api
247: --
248: dt_api.find_dt_upd_modes
254: p_update => p_update,
255: p_update_override => p_update_override,
256: p_update_change_insert => p_update_change_insert);
257: --
258: hr_utility.set_location(' Leaving:'||l_proc, 10);
259: End find_dt_upd_modes;
260: --
261: -- ----------------------------------------------------------------------------
262: -- |------------------------< upd_effective_end_date >------------------------|
272: l_proc varchar2(72) := g_package||'upd_effective_end_date';
273: l_object_version_number number;
274: --
275: Begin
276: hr_utility.set_location('Entering:'||l_proc, 5);
277: --
278: -- Because we are updating a row we must get the next object
279: -- version number.
280: --
283: (p_base_table_name => 'ben_cm_typ_f',
284: p_base_key_column => 'cm_typ_id',
285: p_base_key_value => p_base_key_value);
286: --
287: hr_utility.set_location(l_proc, 10);
288: g_api_dml := true; -- Set the api dml status
289: --
290: -- Update the specified datetrack row setting the effective
291: -- end date to the specified new effective end date.
307: between t.effective_start_date and t.effective_end_date;
308: --
309: g_api_dml := false; -- Unset the api dml status
310: p_object_version_number := l_object_version_number;
311: hr_utility.set_location(' Leaving:'||l_proc, 15);
312: --
313: Exception
314: When Others Then
315: g_api_dml := false; -- Unset the api dml status
397: --
398: --
399: --
400: Begin
401: hr_utility.set_location('Entering:'||l_proc, 5);
402: --
403: -- Ensure that all the mandatory arguments are not null
404: --
405: hr_api.mandatory_arg_error(p_api_name => l_proc,
430: Close C_Sel1;
431: --
432: -- The primary key is invalid therefore we must error
433: --
434: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
435: hr_utility.raise_error;
436: End If;
437: Close C_Sel1;
438: If (p_object_version_number <> g_old_rec.object_version_number) Then
431: --
432: -- The primary key is invalid therefore we must error
433: --
434: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
435: hr_utility.raise_error;
436: End If;
437: Close C_Sel1;
438: If (p_object_version_number <> g_old_rec.object_version_number) Then
439: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
435: hr_utility.raise_error;
436: End If;
437: Close C_Sel1;
438: If (p_object_version_number <> g_old_rec.object_version_number) Then
439: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
440: hr_utility.raise_error;
441: End If;
442: hr_utility.set_location(l_proc, 15);
443: --
436: End If;
437: Close C_Sel1;
438: If (p_object_version_number <> g_old_rec.object_version_number) Then
439: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
440: hr_utility.raise_error;
441: End If;
442: hr_utility.set_location(l_proc, 15);
443: --
444: --
438: If (p_object_version_number <> g_old_rec.object_version_number) Then
439: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
440: hr_utility.raise_error;
441: End If;
442: hr_utility.set_location(l_proc, 15);
443: --
444: --
445: -- Validate the datetrack mode mode getting the validation start
446: -- and end dates for the specified datetrack operation.
470: -- We are doing a datetrack 'INSERT' which is illegal within this
471: -- procedure therefore we must error (note: to lck on insert the
472: -- private procedure ins_lck should be called).
473: --
474: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
475: hr_utility.set_message_token('PROCEDURE', l_proc);
476: hr_utility.set_message_token('STEP','20');
477: hr_utility.raise_error;
478: End If;
471: -- procedure therefore we must error (note: to lck on insert the
472: -- private procedure ins_lck should be called).
473: --
474: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
475: hr_utility.set_message_token('PROCEDURE', l_proc);
476: hr_utility.set_message_token('STEP','20');
477: hr_utility.raise_error;
478: End If;
479: --
472: -- private procedure ins_lck should be called).
473: --
474: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
475: hr_utility.set_message_token('PROCEDURE', l_proc);
476: hr_utility.set_message_token('STEP','20');
477: hr_utility.raise_error;
478: End If;
479: --
480: -- Set the validation start and end date OUT arguments
473: --
474: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
475: hr_utility.set_message_token('PROCEDURE', l_proc);
476: hr_utility.set_message_token('STEP','20');
477: hr_utility.raise_error;
478: End If;
479: --
480: -- Set the validation start and end date OUT arguments
481: --
481: --
482: p_validation_start_date := l_validation_start_date;
483: p_validation_end_date := l_validation_end_date;
484: --
485: hr_utility.set_location(' Leaving:'||l_proc, 30);
486: --
487: -- We need to trap the ORA LOCK exception
488: --
489: Exception
491: --
492: -- The object is locked therefore we need to supply a meaningful
493: -- error message.
494: --
495: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
496: hr_utility.set_message_token('TABLE_NAME', 'ben_cm_typ_f');
497: hr_utility.raise_error;
498: When l_object_invalid then
499: --
492: -- The object is locked therefore we need to supply a meaningful
493: -- error message.
494: --
495: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
496: hr_utility.set_message_token('TABLE_NAME', 'ben_cm_typ_f');
497: hr_utility.raise_error;
498: When l_object_invalid then
499: --
500: -- The object doesn't exist or is invalid
493: -- error message.
494: --
495: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
496: hr_utility.set_message_token('TABLE_NAME', 'ben_cm_typ_f');
497: hr_utility.raise_error;
498: When l_object_invalid then
499: --
500: -- The object doesn't exist or is invalid
501: --
498: When l_object_invalid then
499: --
500: -- The object doesn't exist or is invalid
501: --
502: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
503: hr_utility.set_message_token('TABLE_NAME', 'ben_cm_typ_f');
504: hr_utility.raise_error;
505: End lck;
506: --
499: --
500: -- The object doesn't exist or is invalid
501: --
502: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
503: hr_utility.set_message_token('TABLE_NAME', 'ben_cm_typ_f');
504: hr_utility.raise_error;
505: End lck;
506: --
507: -- ----------------------------------------------------------------------------
500: -- The object doesn't exist or is invalid
501: --
502: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
503: hr_utility.set_message_token('TABLE_NAME', 'ben_cm_typ_f');
504: hr_utility.raise_error;
505: End lck;
506: --
507: -- ----------------------------------------------------------------------------
508: -- |-----------------------------< convert_args >-----------------------------|
567: l_proc varchar2(72) := g_package||'convert_args';
568: --
569: Begin
570: --
571: hr_utility.set_location('Entering:'||l_proc, 5);
572: --
573: -- Convert arguments into local l_rec structure.
574: --
575: l_rec.cm_typ_id := p_cm_typ_id;
625: l_rec.object_version_number := p_object_version_number;
626: --
627: -- Return the plsql record structure.
628: --
629: hr_utility.set_location(' Leaving:'||l_proc, 10);
630: Return(l_rec);
631: --
632: End convert_args;
633: --