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