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_CM_TYP_USG_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_CM_TYP_USG_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_CM_TYP_USG_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_CM_TYP_USG_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_CM_TYP_USG_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 >-----------------------------|
116: l_proc varchar2(72) := g_package||'api_updating';
117: l_fct_ret boolean;
118: --
119: Begin
120: hr_utility.set_location('Entering:'||l_proc, 5);
121: --
122: If (p_effective_date is null or
123: p_cm_typ_usg_id is null or
124: p_object_version_number is null) Then
129: l_fct_ret := false;
130: Else
131: If (p_cm_typ_usg_id = g_old_rec.cm_typ_usg_id and
132: p_object_version_number = g_old_rec.object_version_number) Then
133: hr_utility.set_location(l_proc, 10);
134: --
135: -- The g_old_rec is current therefore we must
136: -- set the returning function to true
137: --
146: Close C_Sel1;
147: --
148: -- The primary key is invalid therefore we must error
149: --
150: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
151: hr_utility.raise_error;
152: End If;
153: Close C_Sel1;
154: If (p_object_version_number <> g_old_rec.object_version_number) Then
147: --
148: -- The primary key is invalid therefore we must error
149: --
150: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
151: hr_utility.raise_error;
152: End If;
153: Close C_Sel1;
154: If (p_object_version_number <> g_old_rec.object_version_number) Then
155: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
151: hr_utility.raise_error;
152: End If;
153: Close C_Sel1;
154: If (p_object_version_number <> g_old_rec.object_version_number) Then
155: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
156: hr_utility.raise_error;
157: End If;
158: hr_utility.set_location(l_proc, 15);
159: l_fct_ret := true;
152: End If;
153: Close C_Sel1;
154: If (p_object_version_number <> g_old_rec.object_version_number) Then
155: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
156: hr_utility.raise_error;
157: End If;
158: hr_utility.set_location(l_proc, 15);
159: l_fct_ret := true;
160: End If;
154: If (p_object_version_number <> g_old_rec.object_version_number) Then
155: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
156: hr_utility.raise_error;
157: End If;
158: hr_utility.set_location(l_proc, 15);
159: l_fct_ret := true;
160: End If;
161: End If;
162: hr_utility.set_location(' Leaving:'||l_proc, 20);
158: hr_utility.set_location(l_proc, 15);
159: l_fct_ret := true;
160: End If;
161: End If;
162: hr_utility.set_location(' Leaving:'||l_proc, 20);
163: Return (l_fct_ret);
164: --
165: End api_updating;
166: --
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: l_parent_key_value2,
200: l_parent_key_value3,
200: l_parent_key_value3,
201: l_parent_key_value4;
202: If C_Sel1%notfound then
203: Close C_Sel1;
204: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
205: hr_utility.set_message_token('PROCEDURE', l_proc);
206: hr_utility.set_message_token('STEP','10');
207: hr_utility.raise_error;
208: End If;
201: l_parent_key_value4;
202: If C_Sel1%notfound then
203: Close C_Sel1;
204: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
205: hr_utility.set_message_token('PROCEDURE', l_proc);
206: hr_utility.set_message_token('STEP','10');
207: hr_utility.raise_error;
208: End If;
209: Close C_Sel1;
202: If C_Sel1%notfound then
203: Close C_Sel1;
204: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
205: hr_utility.set_message_token('PROCEDURE', l_proc);
206: hr_utility.set_message_token('STEP','10');
207: hr_utility.raise_error;
208: End If;
209: Close C_Sel1;
210: --
203: Close C_Sel1;
204: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
205: hr_utility.set_message_token('PROCEDURE', l_proc);
206: hr_utility.set_message_token('STEP','10');
207: hr_utility.raise_error;
208: End If;
209: Close C_Sel1;
210: --
211: -- Call the corresponding datetrack api
231: p_delete => p_delete,
232: p_future_change => p_future_change,
233: p_delete_next_change => p_delete_next_change);
234: --
235: hr_utility.set_location(' Leaving:'||l_proc, 10);
236: End find_dt_del_modes;
237: --
238: -- ----------------------------------------------------------------------------
239: -- |--------------------------< find_dt_upd_modes >---------------------------|
248: --
249: l_proc varchar2(72) := g_package||'find_dt_upd_modes';
250: --
251: Begin
252: hr_utility.set_location('Entering:'||l_proc, 5);
253: --
254: -- Call the corresponding datetrack api
255: --
256: dt_api.find_dt_upd_modes
262: p_update => p_update,
263: p_update_override => p_update_override,
264: p_update_change_insert => p_update_change_insert);
265: --
266: hr_utility.set_location(' Leaving:'||l_proc, 10);
267: End find_dt_upd_modes;
268: --
269: -- ----------------------------------------------------------------------------
270: -- |------------------------< upd_effective_end_date >------------------------|
280: l_proc varchar2(72) := g_package||'upd_effective_end_date';
281: l_object_version_number number;
282: --
283: Begin
284: hr_utility.set_location('Entering:'||l_proc, 5);
285: --
286: -- Because we are updating a row we must get the next object
287: -- version number.
288: --
291: (p_base_table_name => 'ben_cm_typ_usg_f',
292: p_base_key_column => 'cm_typ_usg_id',
293: p_base_key_value => p_base_key_value);
294: --
295: hr_utility.set_location(l_proc, 10);
296: g_api_dml := true; -- Set the api dml status
297: --
298: -- Update the specified datetrack row setting the effective
299: -- end date to the specified new effective end date.
306: between t.effective_start_date and t.effective_end_date;
307: --
308: g_api_dml := false; -- Unset the api dml status
309: p_object_version_number := l_object_version_number;
310: hr_utility.set_location(' Leaving:'||l_proc, 15);
311: --
312: Exception
313: When Others Then
314: g_api_dml := false; -- Unset the api dml status
391: --
392: --
393: --
394: Begin
395: hr_utility.set_location('Entering:'||l_proc, 5);
396: --
397: -- Ensure that all the mandatory arguments are not null
398: --
399: hr_api.mandatory_arg_error(p_api_name => l_proc,
424: Close C_Sel1;
425: --
426: -- The primary key is invalid therefore we must error
427: --
428: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
429: hr_utility.raise_error;
430: End If;
431: Close C_Sel1;
432: If (p_object_version_number <> g_old_rec.object_version_number) Then
425: --
426: -- The primary key is invalid therefore we must error
427: --
428: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
429: hr_utility.raise_error;
430: End If;
431: Close C_Sel1;
432: If (p_object_version_number <> g_old_rec.object_version_number) Then
433: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
429: hr_utility.raise_error;
430: End If;
431: Close C_Sel1;
432: If (p_object_version_number <> g_old_rec.object_version_number) Then
433: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
434: hr_utility.raise_error;
435: End If;
436: hr_utility.set_location(l_proc, 15);
437: --
430: End If;
431: Close C_Sel1;
432: If (p_object_version_number <> g_old_rec.object_version_number) Then
433: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
434: hr_utility.raise_error;
435: End If;
436: hr_utility.set_location(l_proc, 15);
437: --
438: --
432: If (p_object_version_number <> g_old_rec.object_version_number) Then
433: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
434: hr_utility.raise_error;
435: End If;
436: hr_utility.set_location(l_proc, 15);
437: --
438: --
439: -- Validate the datetrack mode mode getting the validation start
440: -- and end dates for the specified datetrack operation.
467: -- We are doing a datetrack 'INSERT' which is illegal within this
468: -- procedure therefore we must error (note: to lck on insert the
469: -- private procedure ins_lck should be called).
470: --
471: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
472: hr_utility.set_message_token('PROCEDURE', l_proc);
473: hr_utility.set_message_token('STEP','20');
474: hr_utility.raise_error;
475: End If;
468: -- procedure therefore we must error (note: to lck on insert the
469: -- private procedure ins_lck should be called).
470: --
471: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
472: hr_utility.set_message_token('PROCEDURE', l_proc);
473: hr_utility.set_message_token('STEP','20');
474: hr_utility.raise_error;
475: End If;
476: --
469: -- private procedure ins_lck should be called).
470: --
471: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
472: hr_utility.set_message_token('PROCEDURE', l_proc);
473: hr_utility.set_message_token('STEP','20');
474: hr_utility.raise_error;
475: End If;
476: --
477: -- Set the validation start and end date OUT arguments
470: --
471: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
472: hr_utility.set_message_token('PROCEDURE', l_proc);
473: hr_utility.set_message_token('STEP','20');
474: hr_utility.raise_error;
475: End If;
476: --
477: -- Set the validation start and end date OUT arguments
478: --
478: --
479: p_validation_start_date := l_validation_start_date;
480: p_validation_end_date := l_validation_end_date;
481: --
482: hr_utility.set_location(' Leaving:'||l_proc, 30);
483: --
484: -- We need to trap the ORA LOCK exception
485: --
486: Exception
488: --
489: -- The object is locked therefore we need to supply a meaningful
490: -- error message.
491: --
492: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
493: hr_utility.set_message_token('TABLE_NAME', 'ben_cm_typ_usg_f');
494: hr_utility.raise_error;
495: When l_object_invalid then
496: --
489: -- The object is locked therefore we need to supply a meaningful
490: -- error message.
491: --
492: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
493: hr_utility.set_message_token('TABLE_NAME', 'ben_cm_typ_usg_f');
494: hr_utility.raise_error;
495: When l_object_invalid then
496: --
497: -- The object doesn't exist or is invalid
490: -- error message.
491: --
492: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
493: hr_utility.set_message_token('TABLE_NAME', 'ben_cm_typ_usg_f');
494: hr_utility.raise_error;
495: When l_object_invalid then
496: --
497: -- The object doesn't exist or is invalid
498: --
495: When l_object_invalid then
496: --
497: -- The object doesn't exist or is invalid
498: --
499: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
500: hr_utility.set_message_token('TABLE_NAME', 'ben_cm_typ_usg_f');
501: hr_utility.raise_error;
502: End lck;
503: --
496: --
497: -- The object doesn't exist or is invalid
498: --
499: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
500: hr_utility.set_message_token('TABLE_NAME', 'ben_cm_typ_usg_f');
501: hr_utility.raise_error;
502: End lck;
503: --
504: -- ----------------------------------------------------------------------------
497: -- The object doesn't exist or is invalid
498: --
499: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
500: hr_utility.set_message_token('TABLE_NAME', 'ben_cm_typ_usg_f');
501: hr_utility.raise_error;
502: End lck;
503: --
504: -- ----------------------------------------------------------------------------
505: -- |-----------------------------< convert_args >-----------------------------|
559: l_proc varchar2(72) := g_package||'convert_args';
560: --
561: Begin
562: --
563: hr_utility.set_location('Entering:'||l_proc, 5);
564: --
565: -- Convert arguments into local l_rec structure.
566: --
567: l_rec.cm_typ_usg_id := p_cm_typ_usg_id;
612: l_rec.object_version_number := p_object_version_number;
613: --
614: -- Return the plsql record structure.
615: --
616: hr_utility.set_location(' Leaving:'||l_proc, 10);
617: Return(l_rec);
618: --
619: End convert_args;
620: --