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_WV_PRTN_RSN_PTIP_FK1') 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_WV_PRTN_RSN_PTIP_FK1') 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_WV_PRTN_RSN_PTIP_PK') Then
34: hr_utility.set_location('Entering:'||l_proc, 5);
35: --
36: If (p_constraint_name = 'BEN_WV_PRTN_RSN_PTIP_FK1') 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_WV_PRTN_RSN_PTIP_PK') Then
42: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
35: --
36: If (p_constraint_name = 'BEN_WV_PRTN_RSN_PTIP_FK1') 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_WV_PRTN_RSN_PTIP_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 = 'BEN_WV_PRTN_RSN_PTIP_FK1') 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_WV_PRTN_RSN_PTIP_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_WV_PRTN_RSN_PTIP_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_WV_PRTN_RSN_PTIP_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_WV_PRTN_RSN_PTIP_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_WV_PRTN_RSN_PTIP_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 >-----------------------------|
114: l_proc varchar2(72) := g_package||'api_updating';
115: l_fct_ret boolean;
116: --
117: Begin
118: hr_utility.set_location('Entering:'||l_proc, 5);
119: --
120: If (p_effective_date is null or
121: p_wv_prtn_rsn_ptip_id is null or
122: p_object_version_number is null) Then
127: l_fct_ret := false;
128: Else
129: If (p_wv_prtn_rsn_ptip_id = g_old_rec.wv_prtn_rsn_ptip_id and
130: p_object_version_number = g_old_rec.object_version_number) Then
131: hr_utility.set_location(l_proc, 10);
132: --
133: -- The g_old_rec is current therefore we must
134: -- set the returning function to true
135: --
144: Close C_Sel1;
145: --
146: -- The primary key is invalid therefore we must error
147: --
148: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
149: hr_utility.raise_error;
150: End If;
151: Close C_Sel1;
152: If (p_object_version_number <> g_old_rec.object_version_number) Then
145: --
146: -- The primary key is invalid therefore we must error
147: --
148: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
149: hr_utility.raise_error;
150: End If;
151: Close C_Sel1;
152: If (p_object_version_number <> g_old_rec.object_version_number) Then
153: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
149: hr_utility.raise_error;
150: End If;
151: Close C_Sel1;
152: If (p_object_version_number <> g_old_rec.object_version_number) Then
153: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
154: hr_utility.raise_error;
155: End If;
156: hr_utility.set_location(l_proc, 15);
157: l_fct_ret := true;
150: End If;
151: Close C_Sel1;
152: If (p_object_version_number <> g_old_rec.object_version_number) Then
153: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
154: hr_utility.raise_error;
155: End If;
156: hr_utility.set_location(l_proc, 15);
157: l_fct_ret := true;
158: End If;
152: If (p_object_version_number <> g_old_rec.object_version_number) Then
153: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
154: hr_utility.raise_error;
155: End If;
156: hr_utility.set_location(l_proc, 15);
157: l_fct_ret := true;
158: End If;
159: End If;
160: hr_utility.set_location(' Leaving:'||l_proc, 20);
156: hr_utility.set_location(l_proc, 15);
157: l_fct_ret := true;
158: End If;
159: End If;
160: hr_utility.set_location(' Leaving:'||l_proc, 20);
161: Return (l_fct_ret);
162: --
163: End api_updating;
164: --
185: and p_effective_date
186: between t.effective_start_date and t.effective_end_date;
187: --
188: Begin
189: hr_utility.set_location('Entering:'||l_proc, 5);
190: Open C_Sel1;
191: Fetch C_Sel1 Into l_parent_key_value1;
192: If C_Sel1%notfound then
193: Close C_Sel1;
190: Open C_Sel1;
191: Fetch C_Sel1 Into l_parent_key_value1;
192: If C_Sel1%notfound then
193: Close C_Sel1;
194: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
195: hr_utility.set_message_token('PROCEDURE', l_proc);
196: hr_utility.set_message_token('STEP','10');
197: hr_utility.raise_error;
198: End If;
191: Fetch C_Sel1 Into l_parent_key_value1;
192: If C_Sel1%notfound then
193: Close C_Sel1;
194: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
195: hr_utility.set_message_token('PROCEDURE', l_proc);
196: hr_utility.set_message_token('STEP','10');
197: hr_utility.raise_error;
198: End If;
199: Close C_Sel1;
192: If C_Sel1%notfound then
193: Close C_Sel1;
194: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
195: hr_utility.set_message_token('PROCEDURE', l_proc);
196: hr_utility.set_message_token('STEP','10');
197: hr_utility.raise_error;
198: End If;
199: Close C_Sel1;
200: --
193: Close C_Sel1;
194: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
195: hr_utility.set_message_token('PROCEDURE', l_proc);
196: hr_utility.set_message_token('STEP','10');
197: hr_utility.raise_error;
198: End If;
199: Close C_Sel1;
200: --
201: -- Call the corresponding datetrack api
212: p_delete => p_delete,
213: p_future_change => p_future_change,
214: p_delete_next_change => p_delete_next_change);
215: --
216: hr_utility.set_location(' Leaving:'||l_proc, 10);
217: End find_dt_del_modes;
218: --
219: -- ----------------------------------------------------------------------------
220: -- |--------------------------< find_dt_upd_modes >---------------------------|
229: --
230: l_proc varchar2(72) := g_package||'find_dt_upd_modes';
231: --
232: Begin
233: hr_utility.set_location('Entering:'||l_proc, 5);
234: --
235: -- Call the corresponding datetrack api
236: --
237: dt_api.find_dt_upd_modes
243: p_update => p_update,
244: p_update_override => p_update_override,
245: p_update_change_insert => p_update_change_insert);
246: --
247: hr_utility.set_location(' Leaving:'||l_proc, 10);
248: End find_dt_upd_modes;
249: --
250: -- ----------------------------------------------------------------------------
251: -- |------------------------< upd_effective_end_date >------------------------|
261: l_proc varchar2(72) := g_package||'upd_effective_end_date';
262: l_object_version_number number;
263: --
264: Begin
265: hr_utility.set_location('Entering:'||l_proc, 5);
266: --
267: -- Because we are updating a row we must get the next object
268: -- version number.
269: --
272: (p_base_table_name => 'ben_wv_prtn_rsn_ptip_f',
273: p_base_key_column => 'wv_prtn_rsn_ptip_id',
274: p_base_key_value => p_base_key_value);
275: --
276: hr_utility.set_location(l_proc, 10);
277: g_api_dml := true; -- Set the api dml status
278: --
279: -- Update the specified datetrack row setting the effective
280: -- end date to the specified new effective end date.
287: between t.effective_start_date and t.effective_end_date;
288: --
289: g_api_dml := false; -- Unset the api dml status
290: p_object_version_number := l_object_version_number;
291: hr_utility.set_location(' Leaving:'||l_proc, 15);
292: --
293: Exception
294: When Others Then
295: g_api_dml := false; -- Unset the api dml status
365: --
366: --
367: --
368: Begin
369: hr_utility.set_location('Entering:'||l_proc, 5);
370: --
371: -- Ensure that all the mandatory arguments are not null
372: --
373: hr_api.mandatory_arg_error(p_api_name => l_proc,
398: Close C_Sel1;
399: --
400: -- The primary key is invalid therefore we must error
401: --
402: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
403: hr_utility.raise_error;
404: End If;
405: Close C_Sel1;
406: If (p_object_version_number <> g_old_rec.object_version_number) Then
399: --
400: -- The primary key is invalid therefore we must error
401: --
402: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
403: hr_utility.raise_error;
404: End If;
405: Close C_Sel1;
406: If (p_object_version_number <> g_old_rec.object_version_number) Then
407: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
403: hr_utility.raise_error;
404: End If;
405: Close C_Sel1;
406: If (p_object_version_number <> g_old_rec.object_version_number) Then
407: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
408: hr_utility.raise_error;
409: End If;
410: hr_utility.set_location(l_proc, 15);
411: --
404: End If;
405: Close C_Sel1;
406: If (p_object_version_number <> g_old_rec.object_version_number) Then
407: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
408: hr_utility.raise_error;
409: End If;
410: hr_utility.set_location(l_proc, 15);
411: --
412: --
406: If (p_object_version_number <> g_old_rec.object_version_number) Then
407: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
408: hr_utility.raise_error;
409: End If;
410: hr_utility.set_location(l_proc, 15);
411: --
412: --
413: -- Validate the datetrack mode mode getting the validation start
414: -- and end dates for the specified datetrack operation.
432: -- We are doing a datetrack 'INSERT' which is illegal within this
433: -- procedure therefore we must error (note: to lck on insert the
434: -- private procedure ins_lck should be called).
435: --
436: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
437: hr_utility.set_message_token('PROCEDURE', l_proc);
438: hr_utility.set_message_token('STEP','20');
439: hr_utility.raise_error;
440: End If;
433: -- procedure therefore we must error (note: to lck on insert the
434: -- private procedure ins_lck should be called).
435: --
436: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
437: hr_utility.set_message_token('PROCEDURE', l_proc);
438: hr_utility.set_message_token('STEP','20');
439: hr_utility.raise_error;
440: End If;
441: --
434: -- private procedure ins_lck should be called).
435: --
436: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
437: hr_utility.set_message_token('PROCEDURE', l_proc);
438: hr_utility.set_message_token('STEP','20');
439: hr_utility.raise_error;
440: End If;
441: --
442: -- Set the validation start and end date OUT arguments
435: --
436: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
437: hr_utility.set_message_token('PROCEDURE', l_proc);
438: hr_utility.set_message_token('STEP','20');
439: hr_utility.raise_error;
440: End If;
441: --
442: -- Set the validation start and end date OUT arguments
443: --
443: --
444: p_validation_start_date := l_validation_start_date;
445: p_validation_end_date := l_validation_end_date;
446: --
447: hr_utility.set_location(' Leaving:'||l_proc, 30);
448: --
449: -- We need to trap the ORA LOCK exception
450: --
451: Exception
453: --
454: -- The object is locked therefore we need to supply a meaningful
455: -- error message.
456: --
457: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
458: hr_utility.set_message_token('TABLE_NAME', 'ben_wv_prtn_rsn_ptip_f');
459: hr_utility.raise_error;
460: When l_object_invalid then
461: --
454: -- The object is locked therefore we need to supply a meaningful
455: -- error message.
456: --
457: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
458: hr_utility.set_message_token('TABLE_NAME', 'ben_wv_prtn_rsn_ptip_f');
459: hr_utility.raise_error;
460: When l_object_invalid then
461: --
462: -- The object doesn't exist or is invalid
455: -- error message.
456: --
457: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
458: hr_utility.set_message_token('TABLE_NAME', 'ben_wv_prtn_rsn_ptip_f');
459: hr_utility.raise_error;
460: When l_object_invalid then
461: --
462: -- The object doesn't exist or is invalid
463: --
460: When l_object_invalid then
461: --
462: -- The object doesn't exist or is invalid
463: --
464: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
465: hr_utility.set_message_token('TABLE_NAME', 'ben_wv_prtn_rsn_ptip_f');
466: hr_utility.raise_error;
467: End lck;
468: --
461: --
462: -- The object doesn't exist or is invalid
463: --
464: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
465: hr_utility.set_message_token('TABLE_NAME', 'ben_wv_prtn_rsn_ptip_f');
466: hr_utility.raise_error;
467: End lck;
468: --
469: -- ----------------------------------------------------------------------------
462: -- The object doesn't exist or is invalid
463: --
464: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
465: hr_utility.set_message_token('TABLE_NAME', 'ben_wv_prtn_rsn_ptip_f');
466: hr_utility.raise_error;
467: End lck;
468: --
469: -- ----------------------------------------------------------------------------
470: -- |-----------------------------< convert_args >-----------------------------|
517: l_proc varchar2(72) := g_package||'convert_args';
518: --
519: Begin
520: --
521: hr_utility.set_location('Entering:'||l_proc, 5);
522: --
523: -- Convert arguments into local l_rec structure.
524: --
525: l_rec.wv_prtn_rsn_ptip_id := p_wv_prtn_rsn_ptip_id;
563: l_rec.object_version_number := p_object_version_number;
564: --
565: -- Return the plsql record structure.
566: --
567: hr_utility.set_location(' Leaving:'||l_proc, 10);
568: Return(l_rec);
569: --
570: End convert_args;
571: --