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_DSGN_RQMT_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_DSGN_RQMT_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_DSGN_RQMT_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_DSGN_RQMT_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_DSGN_RQMT_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_dsgn_rqmt_id is null or
124: p_object_version_number is null) Then
129: l_fct_ret := false;
130: Else
131: If (p_dsgn_rqmt_id = g_old_rec.dsgn_rqmt_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: --
190: and p_effective_date
191: between t.effective_start_date and t.effective_end_date;
192: --
193: Begin
194: hr_utility.set_location('Entering:'||l_proc, 5);
195: Open C_Sel1;
196: Fetch C_Sel1 Into l_parent_key_value1,
197: l_parent_key_value2,
198: l_parent_key_value3;
197: l_parent_key_value2,
198: l_parent_key_value3;
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: l_parent_key_value3;
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
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_dsgn_rqmt_f',
286: p_base_key_column => 'dsgn_rqmt_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.
300: between t.effective_start_date and t.effective_end_date;
301: --
302: g_api_dml := false; -- Unset the api dml status
303: p_object_version_number := l_object_version_number;
304: hr_utility.set_location(' Leaving:'||l_proc, 15);
305: --
306: Exception
307: When Others Then
308: g_api_dml := false; -- Unset the api dml status
385: --
386: --
387: --
388: Begin
389: hr_utility.set_location('Entering:'||l_proc, 5);
390: --
391: -- Ensure that all the mandatory arguments are not null
392: --
393: hr_api.mandatory_arg_error(p_api_name => l_proc,
418: Close C_Sel1;
419: --
420: -- The primary key is invalid therefore we must error
421: --
422: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
423: hr_utility.raise_error;
424: End If;
425: Close C_Sel1;
426: If (p_object_version_number <> g_old_rec.object_version_number) Then
419: --
420: -- The primary key is invalid therefore we must error
421: --
422: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
423: hr_utility.raise_error;
424: End If;
425: Close C_Sel1;
426: If (p_object_version_number <> g_old_rec.object_version_number) Then
427: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
423: hr_utility.raise_error;
424: End If;
425: Close C_Sel1;
426: If (p_object_version_number <> g_old_rec.object_version_number) Then
427: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
428: hr_utility.raise_error;
429: End If;
430: hr_utility.set_location(l_proc, 15);
431: --
424: End If;
425: Close C_Sel1;
426: If (p_object_version_number <> g_old_rec.object_version_number) Then
427: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
428: hr_utility.raise_error;
429: End If;
430: hr_utility.set_location(l_proc, 15);
431: --
432: --
426: If (p_object_version_number <> g_old_rec.object_version_number) Then
427: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
428: hr_utility.raise_error;
429: End If;
430: hr_utility.set_location(l_proc, 15);
431: --
432: --
433: -- Validate the datetrack mode mode getting the validation start
434: -- and end dates for the specified datetrack operation.
456: -- We are doing a datetrack 'INSERT' which is illegal within this
457: -- procedure therefore we must error (note: to lck on insert the
458: -- private procedure ins_lck should be called).
459: --
460: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
461: hr_utility.set_message_token('PROCEDURE', l_proc);
462: hr_utility.set_message_token('STEP','20');
463: hr_utility.raise_error;
464: End If;
457: -- procedure therefore we must error (note: to lck on insert the
458: -- private procedure ins_lck should be called).
459: --
460: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
461: hr_utility.set_message_token('PROCEDURE', l_proc);
462: hr_utility.set_message_token('STEP','20');
463: hr_utility.raise_error;
464: End If;
465: --
458: -- private procedure ins_lck should be called).
459: --
460: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
461: hr_utility.set_message_token('PROCEDURE', l_proc);
462: hr_utility.set_message_token('STEP','20');
463: hr_utility.raise_error;
464: End If;
465: --
466: -- Set the validation start and end date OUT arguments
459: --
460: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
461: hr_utility.set_message_token('PROCEDURE', l_proc);
462: hr_utility.set_message_token('STEP','20');
463: hr_utility.raise_error;
464: End If;
465: --
466: -- Set the validation start and end date OUT arguments
467: --
467: --
468: p_validation_start_date := l_validation_start_date;
469: p_validation_end_date := l_validation_end_date;
470: --
471: hr_utility.set_location(' Leaving:'||l_proc, 30);
472: --
473: -- We need to trap the ORA LOCK exception
474: --
475: Exception
477: --
478: -- The object is locked therefore we need to supply a meaningful
479: -- error message.
480: --
481: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
482: hr_utility.set_message_token('TABLE_NAME', 'ben_dsgn_rqmt_f');
483: hr_utility.raise_error;
484: When l_object_invalid then
485: --
478: -- The object is locked therefore we need to supply a meaningful
479: -- error message.
480: --
481: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
482: hr_utility.set_message_token('TABLE_NAME', 'ben_dsgn_rqmt_f');
483: hr_utility.raise_error;
484: When l_object_invalid then
485: --
486: -- The object doesn't exist or is invalid
479: -- error message.
480: --
481: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
482: hr_utility.set_message_token('TABLE_NAME', 'ben_dsgn_rqmt_f');
483: hr_utility.raise_error;
484: When l_object_invalid then
485: --
486: -- The object doesn't exist or is invalid
487: --
484: When l_object_invalid then
485: --
486: -- The object doesn't exist or is invalid
487: --
488: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
489: hr_utility.set_message_token('TABLE_NAME', 'ben_dsgn_rqmt_f');
490: hr_utility.raise_error;
491: End lck;
492: --
485: --
486: -- The object doesn't exist or is invalid
487: --
488: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
489: hr_utility.set_message_token('TABLE_NAME', 'ben_dsgn_rqmt_f');
490: hr_utility.raise_error;
491: End lck;
492: --
493: -- ----------------------------------------------------------------------------
486: -- The object doesn't exist or is invalid
487: --
488: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
489: hr_utility.set_message_token('TABLE_NAME', 'ben_dsgn_rqmt_f');
490: hr_utility.raise_error;
491: End lck;
492: --
493: -- ----------------------------------------------------------------------------
494: -- |-----------------------------< convert_args >-----------------------------|
548: l_proc varchar2(72) := g_package||'convert_args';
549: --
550: Begin
551: --
552: hr_utility.set_location('Entering:'||l_proc, 5);
553: --
554: -- Convert arguments into local l_rec structure.
555: --
556: l_rec.dsgn_rqmt_id := p_dsgn_rqmt_id;
601: l_rec.object_version_number := p_object_version_number;
602: --
603: -- Return the plsql record structure.
604: --
605: hr_utility.set_location(' Leaving:'||l_proc, 10);
606: Return(l_rec);
607: --
608: End convert_args;
609: --