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_PER_TYP_RTS_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_PER_TYP_RTS_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_PER_TYP_RTS_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_PER_TYP_RTS_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_PER_TYP_RTS_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 >-----------------------------|
111: l_proc varchar2(72) := g_package||'api_updating';
112: l_fct_ret boolean;
113: --
114: Begin
115: hr_utility.set_location('Entering:'||l_proc, 5);
116: --
117: If (p_effective_date is null or
118: p_per_typ_rt_id is null or
119: p_object_version_number is null) Then
124: l_fct_ret := false;
125: Else
126: If (p_per_typ_rt_id = g_old_rec.per_typ_rt_id and
127: p_object_version_number = g_old_rec.object_version_number) Then
128: hr_utility.set_location(l_proc, 10);
129: --
130: -- The g_old_rec is current therefore we must
131: -- set the returning function to true
132: --
141: Close C_Sel1;
142: --
143: -- The primary key is invalid therefore we must error
144: --
145: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
146: hr_utility.raise_error;
147: End If;
148: Close C_Sel1;
149: If (p_object_version_number <> g_old_rec.object_version_number) Then
142: --
143: -- The primary key is invalid therefore we must error
144: --
145: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
146: hr_utility.raise_error;
147: End If;
148: Close C_Sel1;
149: If (p_object_version_number <> g_old_rec.object_version_number) Then
150: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
146: hr_utility.raise_error;
147: End If;
148: Close C_Sel1;
149: If (p_object_version_number <> g_old_rec.object_version_number) Then
150: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
151: hr_utility.raise_error;
152: End If;
153: hr_utility.set_location(l_proc, 15);
154: l_fct_ret := true;
147: End If;
148: Close C_Sel1;
149: If (p_object_version_number <> g_old_rec.object_version_number) Then
150: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
151: hr_utility.raise_error;
152: End If;
153: hr_utility.set_location(l_proc, 15);
154: l_fct_ret := true;
155: End If;
149: If (p_object_version_number <> g_old_rec.object_version_number) Then
150: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
151: hr_utility.raise_error;
152: End If;
153: hr_utility.set_location(l_proc, 15);
154: l_fct_ret := true;
155: End If;
156: End If;
157: hr_utility.set_location(' Leaving:'||l_proc, 20);
153: hr_utility.set_location(l_proc, 15);
154: l_fct_ret := true;
155: End If;
156: End If;
157: hr_utility.set_location(' Leaving:'||l_proc, 20);
158: Return (l_fct_ret);
159: --
160: End api_updating;
161: --
181: and p_effective_date
182: between t.effective_start_date and t.effective_end_date;
183: --
184: Begin
185: hr_utility.set_location('Entering:'||l_proc, 5);
186: --
187: Open C_Sel1;
188: Fetch C_Sel1 Into l_parent_key_value1;
189: If C_Sel1%notfound then
187: Open C_Sel1;
188: Fetch C_Sel1 Into l_parent_key_value1;
189: If C_Sel1%notfound then
190: Close C_Sel1;
191: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
192: hr_utility.set_message_token('PROCEDURE', l_proc);
193: hr_utility.set_message_token('STEP','10');
194: hr_utility.raise_error;
195: End If;
188: Fetch C_Sel1 Into l_parent_key_value1;
189: If C_Sel1%notfound then
190: Close C_Sel1;
191: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
192: hr_utility.set_message_token('PROCEDURE', l_proc);
193: hr_utility.set_message_token('STEP','10');
194: hr_utility.raise_error;
195: End If;
196: Close C_Sel1;
189: If C_Sel1%notfound then
190: Close C_Sel1;
191: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
192: hr_utility.set_message_token('PROCEDURE', l_proc);
193: hr_utility.set_message_token('STEP','10');
194: hr_utility.raise_error;
195: End If;
196: Close C_Sel1;
197: --
190: Close C_Sel1;
191: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
192: hr_utility.set_message_token('PROCEDURE', l_proc);
193: hr_utility.set_message_token('STEP','10');
194: hr_utility.raise_error;
195: End If;
196: Close C_Sel1;
197: --
198: -- Call the corresponding datetrack api
209: p_delete => p_delete,
210: p_future_change => p_future_change,
211: p_delete_next_change => p_delete_next_change);
212: --
213: hr_utility.set_location(' Leaving:'||l_proc, 10);
214: End find_dt_del_modes;
215: --
216: -- ----------------------------------------------------------------------------
217: -- |--------------------------< find_dt_upd_modes >---------------------------|
226: --
227: l_proc varchar2(72) := g_package||'find_dt_upd_modes';
228: --
229: Begin
230: hr_utility.set_location('Entering:'||l_proc, 5);
231: --
232: -- Call the corresponding datetrack api
233: --
234: dt_api.find_dt_upd_modes
240: p_update => p_update,
241: p_update_override => p_update_override,
242: p_update_change_insert => p_update_change_insert);
243: --
244: hr_utility.set_location(' Leaving:'||l_proc, 10);
245: End find_dt_upd_modes;
246: --
247: -- ----------------------------------------------------------------------------
248: -- |------------------------< upd_effective_end_date >------------------------|
258: l_proc varchar2(72) := g_package||'upd_effective_end_date';
259: l_object_version_number number;
260: --
261: Begin
262: hr_utility.set_location('Entering:'||l_proc, 5);
263: --
264: -- Because we are updating a row we must get the next object
265: -- version number.
266: --
269: (p_base_table_name => 'ben_per_typ_rt_f',
270: p_base_key_column => 'per_typ_rt_id',
271: p_base_key_value => p_base_key_value);
272: --
273: hr_utility.set_location(l_proc, 10);
274: g_api_dml := true; -- Set the api dml status
275: --
276: -- Update the specified datetrack row setting the effective
277: -- end date to the specified new effective end date.
284: between t.effective_start_date and t.effective_end_date;
285: --
286: g_api_dml := false; -- Unset the api dml status
287: p_object_version_number := l_object_version_number;
288: hr_utility.set_location(' Leaving:'||l_proc, 15);
289: --
290: Exception
291: When Others Then
292: g_api_dml := false; -- Unset the api dml status
364: --
365: --
366: --
367: Begin
368: hr_utility.set_location('Entering:'||l_proc, 5);
369: --
370: -- Ensure that all the mandatory arguments are not null
371: --
372: hr_api.mandatory_arg_error(p_api_name => l_proc,
397: Close C_Sel1;
398: --
399: -- The primary key is invalid therefore we must error
400: --
401: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
402: hr_utility.raise_error;
403: End If;
404: Close C_Sel1;
405: If (p_object_version_number <> g_old_rec.object_version_number) Then
398: --
399: -- The primary key is invalid therefore we must error
400: --
401: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
402: hr_utility.raise_error;
403: End If;
404: Close C_Sel1;
405: If (p_object_version_number <> g_old_rec.object_version_number) Then
406: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
402: hr_utility.raise_error;
403: End If;
404: Close C_Sel1;
405: If (p_object_version_number <> g_old_rec.object_version_number) Then
406: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
407: hr_utility.raise_error;
408: End If;
409: hr_utility.set_location(l_proc, 15);
410: --
403: End If;
404: Close C_Sel1;
405: If (p_object_version_number <> g_old_rec.object_version_number) Then
406: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
407: hr_utility.raise_error;
408: End If;
409: hr_utility.set_location(l_proc, 15);
410: --
411: --
405: If (p_object_version_number <> g_old_rec.object_version_number) Then
406: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
407: hr_utility.raise_error;
408: End If;
409: hr_utility.set_location(l_proc, 15);
410: --
411: --
412: -- Validate the datetrack mode mode getting the validation start
413: -- and end dates for the specified datetrack operation.
429: -- We are doing a datetrack 'INSERT' which is illegal within this
430: -- procedure therefore we must error (note: to lck on insert the
431: -- private procedure ins_lck should be called).
432: --
433: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
434: hr_utility.set_message_token('PROCEDURE', l_proc);
435: hr_utility.set_message_token('STEP','20');
436: hr_utility.raise_error;
437: End If;
430: -- procedure therefore we must error (note: to lck on insert the
431: -- private procedure ins_lck should be called).
432: --
433: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
434: hr_utility.set_message_token('PROCEDURE', l_proc);
435: hr_utility.set_message_token('STEP','20');
436: hr_utility.raise_error;
437: End If;
438: --
431: -- private procedure ins_lck should be called).
432: --
433: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
434: hr_utility.set_message_token('PROCEDURE', l_proc);
435: hr_utility.set_message_token('STEP','20');
436: hr_utility.raise_error;
437: End If;
438: --
439: -- Set the validation start and end date OUT arguments
432: --
433: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
434: hr_utility.set_message_token('PROCEDURE', l_proc);
435: hr_utility.set_message_token('STEP','20');
436: hr_utility.raise_error;
437: End If;
438: --
439: -- Set the validation start and end date OUT arguments
440: --
440: --
441: p_validation_start_date := l_validation_start_date;
442: p_validation_end_date := l_validation_end_date;
443: --
444: hr_utility.set_location(' Leaving:'||l_proc, 30);
445: --
446: -- We need to trap the ORA LOCK exception
447: --
448: Exception
450: --
451: -- The object is locked therefore we need to supply a meaningful
452: -- error message.
453: --
454: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
455: hr_utility.set_message_token('TABLE_NAME', 'ben_per_typ_rt_f');
456: hr_utility.raise_error;
457: When l_object_invalid then
458: --
451: -- The object is locked therefore we need to supply a meaningful
452: -- error message.
453: --
454: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
455: hr_utility.set_message_token('TABLE_NAME', 'ben_per_typ_rt_f');
456: hr_utility.raise_error;
457: When l_object_invalid then
458: --
459: -- The object doesn't exist or is invalid
452: -- error message.
453: --
454: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
455: hr_utility.set_message_token('TABLE_NAME', 'ben_per_typ_rt_f');
456: hr_utility.raise_error;
457: When l_object_invalid then
458: --
459: -- The object doesn't exist or is invalid
460: --
457: When l_object_invalid then
458: --
459: -- The object doesn't exist or is invalid
460: --
461: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
462: hr_utility.set_message_token('TABLE_NAME', 'ben_per_typ_rt_f');
463: hr_utility.raise_error;
464: End lck;
465: --
458: --
459: -- The object doesn't exist or is invalid
460: --
461: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
462: hr_utility.set_message_token('TABLE_NAME', 'ben_per_typ_rt_f');
463: hr_utility.raise_error;
464: End lck;
465: --
466: -- ----------------------------------------------------------------------------
459: -- The object doesn't exist or is invalid
460: --
461: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
462: hr_utility.set_message_token('TABLE_NAME', 'ben_per_typ_rt_f');
463: hr_utility.raise_error;
464: End lck;
465: --
466: -- ----------------------------------------------------------------------------
467: -- |-----------------------------< convert_args >-----------------------------|
516: l_proc varchar2(72) := g_package||'convert_args';
517: --
518: Begin
519: --
520: hr_utility.set_location('Entering:'||l_proc, 5);
521: --
522: -- Convert arguments into local l_rec structure.
523: --
524: l_rec.per_typ_rt_id := p_per_typ_rt_id;
564: l_rec.object_version_number := p_object_version_number;
565: --
566: -- Return the plsql record structure.
567: --
568: hr_utility.set_location(' Leaving:'||l_proc, 10);
569: Return(l_rec);
570: --
571: End convert_args;
572: --