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: hr_utility.set_location('Entering:'||l_proc, 6);
36: --
37: If (p_constraint_name = 'AVCON_BEN_C_WHNVR_000') Then
38: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
31: l_proc varchar2(72) := g_package||'constraint_error';
32: --
33: Begin
34: hr_utility.set_location('Entering:'||l_proc, 5);
35: hr_utility.set_location('Entering:'||l_proc, 6);
36: --
37: If (p_constraint_name = 'AVCON_BEN_C_WHNVR_000') Then
38: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
39: hr_utility.set_message_token('PROCEDURE', l_proc);
34: hr_utility.set_location('Entering:'||l_proc, 5);
35: hr_utility.set_location('Entering:'||l_proc, 6);
36: --
37: If (p_constraint_name = 'AVCON_BEN_C_WHNVR_000') Then
38: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
39: hr_utility.set_message_token('PROCEDURE', l_proc);
40: hr_utility.set_message_token('STEP','5');
41: hr_utility.raise_error;
42: ElsIf (p_constraint_name = 'BEN_CM_TYP_F_PK') Then
35: hr_utility.set_location('Entering:'||l_proc, 6);
36: --
37: If (p_constraint_name = 'AVCON_BEN_C_WHNVR_000') Then
38: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
39: hr_utility.set_message_token('PROCEDURE', l_proc);
40: hr_utility.set_message_token('STEP','5');
41: hr_utility.raise_error;
42: ElsIf (p_constraint_name = 'BEN_CM_TYP_F_PK') Then
43: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
36: --
37: If (p_constraint_name = 'AVCON_BEN_C_WHNVR_000') Then
38: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
39: hr_utility.set_message_token('PROCEDURE', l_proc);
40: hr_utility.set_message_token('STEP','5');
41: hr_utility.raise_error;
42: ElsIf (p_constraint_name = 'BEN_CM_TYP_F_PK') Then
43: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
44: hr_utility.set_message_token('PROCEDURE', l_proc);
37: If (p_constraint_name = 'AVCON_BEN_C_WHNVR_000') Then
38: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
39: hr_utility.set_message_token('PROCEDURE', l_proc);
40: hr_utility.set_message_token('STEP','5');
41: hr_utility.raise_error;
42: ElsIf (p_constraint_name = 'BEN_CM_TYP_F_PK') Then
43: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
44: hr_utility.set_message_token('PROCEDURE', l_proc);
45: hr_utility.set_message_token('STEP','10');
39: hr_utility.set_message_token('PROCEDURE', l_proc);
40: hr_utility.set_message_token('STEP','5');
41: hr_utility.raise_error;
42: ElsIf (p_constraint_name = 'BEN_CM_TYP_F_PK') Then
43: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
44: hr_utility.set_message_token('PROCEDURE', l_proc);
45: hr_utility.set_message_token('STEP','10');
46: hr_utility.raise_error;
47: Else
40: hr_utility.set_message_token('STEP','5');
41: hr_utility.raise_error;
42: ElsIf (p_constraint_name = 'BEN_CM_TYP_F_PK') Then
43: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
44: hr_utility.set_message_token('PROCEDURE', l_proc);
45: hr_utility.set_message_token('STEP','10');
46: hr_utility.raise_error;
47: Else
48: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
41: hr_utility.raise_error;
42: ElsIf (p_constraint_name = 'BEN_CM_TYP_F_PK') Then
43: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
44: hr_utility.set_message_token('PROCEDURE', l_proc);
45: hr_utility.set_message_token('STEP','10');
46: hr_utility.raise_error;
47: Else
48: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
49: hr_utility.set_message_token('PROCEDURE', l_proc);
42: ElsIf (p_constraint_name = 'BEN_CM_TYP_F_PK') Then
43: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
44: hr_utility.set_message_token('PROCEDURE', l_proc);
45: hr_utility.set_message_token('STEP','10');
46: hr_utility.raise_error;
47: Else
48: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
49: hr_utility.set_message_token('PROCEDURE', l_proc);
50: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
44: hr_utility.set_message_token('PROCEDURE', l_proc);
45: hr_utility.set_message_token('STEP','10');
46: hr_utility.raise_error;
47: Else
48: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
49: hr_utility.set_message_token('PROCEDURE', l_proc);
50: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
51: hr_utility.raise_error;
52: End If;
45: hr_utility.set_message_token('STEP','10');
46: hr_utility.raise_error;
47: Else
48: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
49: hr_utility.set_message_token('PROCEDURE', l_proc);
50: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
51: hr_utility.raise_error;
52: End If;
53: --
46: hr_utility.raise_error;
47: Else
48: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
49: hr_utility.set_message_token('PROCEDURE', l_proc);
50: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
51: hr_utility.raise_error;
52: End If;
53: --
54: hr_utility.set_location(' Leaving:'||l_proc, 10);
47: Else
48: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
49: hr_utility.set_message_token('PROCEDURE', l_proc);
50: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
51: hr_utility.raise_error;
52: End If;
53: --
54: hr_utility.set_location(' Leaving:'||l_proc, 10);
55: End constraint_error;
50: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
51: hr_utility.raise_error;
52: End If;
53: --
54: hr_utility.set_location(' Leaving:'||l_proc, 10);
55: End constraint_error;
56: --
57: -- ----------------------------------------------------------------------------
58: -- |-----------------------------< api_updating >-----------------------------|
128: l_proc varchar2(72) := g_package||'api_updating';
129: l_fct_ret boolean;
130: --
131: Begin
132: hr_utility.set_location('Entering:'||l_proc, 5);
133: --
134: If (p_effective_date is null or
135: p_cm_typ_id is null or
136: p_object_version_number is null) Then
141: l_fct_ret := false;
142: Else
143: If (p_cm_typ_id = g_old_rec.cm_typ_id and
144: p_object_version_number = g_old_rec.object_version_number) Then
145: hr_utility.set_location(l_proc, 10);
146: --
147: -- The g_old_rec is current therefore we must
148: -- set the returning function to true
149: --
158: Close C_Sel1;
159: --
160: -- The primary key is invalid therefore we must error
161: --
162: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
163: hr_utility.raise_error;
164: End If;
165: Close C_Sel1;
166: If (p_object_version_number <> g_old_rec.object_version_number) Then
159: --
160: -- The primary key is invalid therefore we must error
161: --
162: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
163: hr_utility.raise_error;
164: End If;
165: Close C_Sel1;
166: If (p_object_version_number <> g_old_rec.object_version_number) Then
167: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
163: hr_utility.raise_error;
164: End If;
165: Close C_Sel1;
166: If (p_object_version_number <> g_old_rec.object_version_number) Then
167: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
168: hr_utility.raise_error;
169: End If;
170: hr_utility.set_location(l_proc, 15);
171: l_fct_ret := true;
164: End If;
165: Close C_Sel1;
166: If (p_object_version_number <> g_old_rec.object_version_number) Then
167: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
168: hr_utility.raise_error;
169: End If;
170: hr_utility.set_location(l_proc, 15);
171: l_fct_ret := true;
172: End If;
166: If (p_object_version_number <> g_old_rec.object_version_number) Then
167: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
168: hr_utility.raise_error;
169: End If;
170: hr_utility.set_location(l_proc, 15);
171: l_fct_ret := true;
172: End If;
173: End If;
174: hr_utility.set_location(' Leaving:'||l_proc, 20);
170: hr_utility.set_location(l_proc, 15);
171: l_fct_ret := true;
172: End If;
173: End If;
174: hr_utility.set_location(' Leaving:'||l_proc, 20);
175: Return (l_fct_ret);
176: --
177: End api_updating;
178: --
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: If C_Sel1%notfound then
206: Close C_Sel1;
203: Open C_Sel1;
204: Fetch C_Sel1 Into l_parent_key_value1;
205: If C_Sel1%notfound then
206: Close C_Sel1;
207: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
208: hr_utility.set_message_token('PROCEDURE', l_proc);
209: hr_utility.set_message_token('STEP','10');
210: hr_utility.raise_error;
211: End If;
204: Fetch C_Sel1 Into l_parent_key_value1;
205: If C_Sel1%notfound then
206: Close C_Sel1;
207: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
208: hr_utility.set_message_token('PROCEDURE', l_proc);
209: hr_utility.set_message_token('STEP','10');
210: hr_utility.raise_error;
211: End If;
212: Close C_Sel1;
205: If C_Sel1%notfound then
206: Close C_Sel1;
207: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
208: hr_utility.set_message_token('PROCEDURE', l_proc);
209: hr_utility.set_message_token('STEP','10');
210: hr_utility.raise_error;
211: End If;
212: Close C_Sel1;
213: --
206: Close C_Sel1;
207: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
208: hr_utility.set_message_token('PROCEDURE', l_proc);
209: hr_utility.set_message_token('STEP','10');
210: hr_utility.raise_error;
211: End If;
212: Close C_Sel1;
213: --
214: -- Call the corresponding datetrack api
225: p_delete => p_delete,
226: p_future_change => p_future_change,
227: p_delete_next_change => p_delete_next_change);
228: --
229: hr_utility.set_location(' Leaving:'||l_proc, 10);
230: End find_dt_del_modes;
231: --
232: -- ----------------------------------------------------------------------------
233: -- |--------------------------< find_dt_upd_modes >---------------------------|
242: --
243: l_proc varchar2(72) := g_package||'find_dt_upd_modes';
244: --
245: Begin
246: hr_utility.set_location('Entering:'||l_proc, 5);
247: --
248: -- Call the corresponding datetrack api
249: --
250: dt_api.find_dt_upd_modes
256: p_update => p_update,
257: p_update_override => p_update_override,
258: p_update_change_insert => p_update_change_insert);
259: --
260: hr_utility.set_location(' Leaving:'||l_proc, 10);
261: End find_dt_upd_modes;
262: --
263: -- ----------------------------------------------------------------------------
264: -- |------------------------< upd_effective_end_date >------------------------|
274: l_proc varchar2(72) := g_package||'upd_effective_end_date';
275: l_object_version_number number;
276: --
277: Begin
278: hr_utility.set_location('Entering:'||l_proc, 5);
279: --
280: -- Because we are updating a row we must get the next object
281: -- version number.
282: --
285: (p_base_table_name => 'ben_cm_typ_f',
286: p_base_key_column => 'cm_typ_id',
287: p_base_key_value => p_base_key_value);
288: --
289: hr_utility.set_location(l_proc, 10);
290: g_api_dml := true; -- Set the api dml status
291: --
292: -- Update the specified datetrack row setting the effective
293: -- end date to the specified new effective end date.
309: between t.effective_start_date and t.effective_end_date;
310: --
311: g_api_dml := false; -- Unset the api dml status
312: p_object_version_number := l_object_version_number;
313: hr_utility.set_location(' Leaving:'||l_proc, 15);
314: --
315: Exception
316: When Others Then
317: g_api_dml := false; -- Unset the api dml status
400: --
401: --
402: --
403: Begin
404: hr_utility.set_location('Entering:'||l_proc, 5);
405: --
406: -- Ensure that all the mandatory arguments are not null
407: --
408: hr_api.mandatory_arg_error(p_api_name => l_proc,
433: Close C_Sel1;
434: --
435: -- The primary key is invalid therefore we must error
436: --
437: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
438: hr_utility.raise_error;
439: End If;
440: Close C_Sel1;
441: If (p_object_version_number <> g_old_rec.object_version_number) Then
434: --
435: -- The primary key is invalid therefore we must error
436: --
437: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
438: hr_utility.raise_error;
439: End If;
440: Close C_Sel1;
441: If (p_object_version_number <> g_old_rec.object_version_number) Then
442: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
438: hr_utility.raise_error;
439: End If;
440: Close C_Sel1;
441: If (p_object_version_number <> g_old_rec.object_version_number) Then
442: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
443: hr_utility.raise_error;
444: End If;
445: hr_utility.set_location(l_proc, 15);
446: --
439: End If;
440: Close C_Sel1;
441: If (p_object_version_number <> g_old_rec.object_version_number) Then
442: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
443: hr_utility.raise_error;
444: End If;
445: hr_utility.set_location(l_proc, 15);
446: --
447: --
441: If (p_object_version_number <> g_old_rec.object_version_number) Then
442: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
443: hr_utility.raise_error;
444: End If;
445: hr_utility.set_location(l_proc, 15);
446: --
447: --
448: -- Validate the datetrack mode mode getting the validation start
449: -- and end dates for the specified datetrack operation.
473: -- We are doing a datetrack 'INSERT' which is illegal within this
474: -- procedure therefore we must error (note: to lck on insert the
475: -- private procedure ins_lck should be called).
476: --
477: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
478: hr_utility.set_message_token('PROCEDURE', l_proc);
479: hr_utility.set_message_token('STEP','20');
480: hr_utility.raise_error;
481: End If;
474: -- procedure therefore we must error (note: to lck on insert the
475: -- private procedure ins_lck should be called).
476: --
477: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
478: hr_utility.set_message_token('PROCEDURE', l_proc);
479: hr_utility.set_message_token('STEP','20');
480: hr_utility.raise_error;
481: End If;
482: --
475: -- private procedure ins_lck should be called).
476: --
477: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
478: hr_utility.set_message_token('PROCEDURE', l_proc);
479: hr_utility.set_message_token('STEP','20');
480: hr_utility.raise_error;
481: End If;
482: --
483: -- Set the validation start and end date OUT arguments
476: --
477: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
478: hr_utility.set_message_token('PROCEDURE', l_proc);
479: hr_utility.set_message_token('STEP','20');
480: hr_utility.raise_error;
481: End If;
482: --
483: -- Set the validation start and end date OUT arguments
484: --
484: --
485: p_validation_start_date := l_validation_start_date;
486: p_validation_end_date := l_validation_end_date;
487: --
488: hr_utility.set_location(' Leaving:'||l_proc, 30);
489: --
490: -- We need to trap the ORA LOCK exception
491: --
492: Exception
494: --
495: -- The object is locked therefore we need to supply a meaningful
496: -- error message.
497: --
498: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
499: hr_utility.set_message_token('TABLE_NAME', 'ben_cm_typ_f');
500: hr_utility.raise_error;
501: When l_object_invalid then
502: --
495: -- The object is locked therefore we need to supply a meaningful
496: -- error message.
497: --
498: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
499: hr_utility.set_message_token('TABLE_NAME', 'ben_cm_typ_f');
500: hr_utility.raise_error;
501: When l_object_invalid then
502: --
503: -- The object doesn't exist or is invalid
496: -- error message.
497: --
498: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
499: hr_utility.set_message_token('TABLE_NAME', 'ben_cm_typ_f');
500: hr_utility.raise_error;
501: When l_object_invalid then
502: --
503: -- The object doesn't exist or is invalid
504: --
501: When l_object_invalid then
502: --
503: -- The object doesn't exist or is invalid
504: --
505: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
506: hr_utility.set_message_token('TABLE_NAME', 'ben_cm_typ_f');
507: hr_utility.raise_error;
508: End lck;
509: --
502: --
503: -- The object doesn't exist or is invalid
504: --
505: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
506: hr_utility.set_message_token('TABLE_NAME', 'ben_cm_typ_f');
507: hr_utility.raise_error;
508: End lck;
509: --
510: -- ----------------------------------------------------------------------------
503: -- The object doesn't exist or is invalid
504: --
505: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
506: hr_utility.set_message_token('TABLE_NAME', 'ben_cm_typ_f');
507: hr_utility.raise_error;
508: End lck;
509: --
510: -- ----------------------------------------------------------------------------
511: -- |-----------------------------< convert_args >-----------------------------|
571: l_proc varchar2(72) := g_package||'convert_args';
572: --
573: Begin
574: --
575: hr_utility.set_location('Entering:'||l_proc, 5);
576: --
577: -- Convert arguments into local l_rec structure.
578: --
579: l_rec.cm_typ_id := p_cm_typ_id;
630: l_rec.object_version_number := p_object_version_number;
631: --
632: -- Return the plsql record structure.
633: --
634: hr_utility.set_location(' Leaving:'||l_proc, 10);
635: Return(l_rec);
636: --
637: End convert_args;
638: --