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_VALD_RLSHP_FOR_REIMB_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_VALD_RLSHP_FOR_REIMB_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_VALD_RLSHP_FOR_REIMB_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_VALD_RLSHP_FOR_REIMB_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_VALD_RLSHP_FOR_REIMB_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_vald_rlshp_for_reimb_id is null or
116: p_object_version_number is null) Then
121: l_fct_ret := false;
122: Else
123: If (p_vald_rlshp_for_reimb_id = g_old_rec.vald_rlshp_for_reimb_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: --
178: and p_effective_date
179: between t.effective_start_date and t.effective_end_date;
180: --
181: Begin
182: hr_utility.set_location('Entering:'||l_proc, 5);
183: Open C_Sel1;
184: Fetch C_Sel1 Into l_parent_key_value1;
185: If C_Sel1%notfound then
186: Close C_Sel1;
183: Open C_Sel1;
184: Fetch C_Sel1 Into l_parent_key_value1;
185: If C_Sel1%notfound then
186: Close C_Sel1;
187: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
188: hr_utility.set_message_token('PROCEDURE', l_proc);
189: hr_utility.set_message_token('STEP','10');
190: hr_utility.raise_error;
191: End If;
184: Fetch C_Sel1 Into l_parent_key_value1;
185: If C_Sel1%notfound then
186: Close C_Sel1;
187: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
188: hr_utility.set_message_token('PROCEDURE', l_proc);
189: hr_utility.set_message_token('STEP','10');
190: hr_utility.raise_error;
191: End If;
192: Close C_Sel1;
185: If C_Sel1%notfound then
186: Close C_Sel1;
187: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
188: hr_utility.set_message_token('PROCEDURE', l_proc);
189: hr_utility.set_message_token('STEP','10');
190: hr_utility.raise_error;
191: End If;
192: Close C_Sel1;
193: --
186: Close C_Sel1;
187: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
188: hr_utility.set_message_token('PROCEDURE', l_proc);
189: hr_utility.set_message_token('STEP','10');
190: hr_utility.raise_error;
191: End If;
192: Close C_Sel1;
193: --
194: -- Call the corresponding datetrack api
205: p_delete => p_delete,
206: p_future_change => p_future_change,
207: p_delete_next_change => p_delete_next_change);
208: --
209: hr_utility.set_location(' Leaving:'||l_proc, 10);
210: End find_dt_del_modes;
211: --
212: -- ----------------------------------------------------------------------------
213: -- |--------------------------< find_dt_upd_modes >---------------------------|
222: --
223: l_proc varchar2(72) := g_package||'find_dt_upd_modes';
224: --
225: Begin
226: hr_utility.set_location('Entering:'||l_proc, 5);
227: --
228: -- Call the corresponding datetrack api
229: --
230: dt_api.find_dt_upd_modes
236: p_update => p_update,
237: p_update_override => p_update_override,
238: p_update_change_insert => p_update_change_insert);
239: --
240: hr_utility.set_location(' Leaving:'||l_proc, 10);
241: End find_dt_upd_modes;
242: --
243: -- ----------------------------------------------------------------------------
244: -- |------------------------< upd_effective_end_date >------------------------|
254: l_proc varchar2(72) := g_package||'upd_effective_end_date';
255: l_object_version_number number;
256: --
257: Begin
258: hr_utility.set_location('Entering:'||l_proc, 5);
259: --
260: -- Because we are updating a row we must get the next object
261: -- version number.
262: --
265: (p_base_table_name => 'ben_vald_rlshp_for_reimb_f',
266: p_base_key_column => 'vald_rlshp_for_reimb_id',
267: p_base_key_value => p_base_key_value);
268: --
269: hr_utility.set_location(l_proc, 10);
270: g_api_dml := true; -- Set the api dml status
271: --
272: -- Update the specified datetrack row setting the effective
273: -- end date to the specified new effective end date.
280: between t.effective_start_date and t.effective_end_date;
281: --
282: g_api_dml := false; -- Unset the api dml status
283: p_object_version_number := l_object_version_number;
284: hr_utility.set_location(' Leaving:'||l_proc, 15);
285: --
286: Exception
287: When Others Then
288: g_api_dml := false; -- Unset the api dml status
357: --
358: --
359: --
360: Begin
361: hr_utility.set_location('Entering:'||l_proc, 5);
362: --
363: -- Ensure that all the mandatory arguments are not null
364: --
365: hr_api.mandatory_arg_error(p_api_name => l_proc,
390: Close C_Sel1;
391: --
392: -- The primary key is invalid therefore we must error
393: --
394: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
395: hr_utility.raise_error;
396: End If;
397: Close C_Sel1;
398: If (p_object_version_number <> g_old_rec.object_version_number) Then
391: --
392: -- The primary key is invalid therefore we must error
393: --
394: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
395: hr_utility.raise_error;
396: End If;
397: Close C_Sel1;
398: If (p_object_version_number <> g_old_rec.object_version_number) Then
399: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
395: hr_utility.raise_error;
396: End If;
397: Close C_Sel1;
398: If (p_object_version_number <> g_old_rec.object_version_number) Then
399: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
400: hr_utility.raise_error;
401: End If;
402: hr_utility.set_location(l_proc, 15);
403: --
396: End If;
397: Close C_Sel1;
398: If (p_object_version_number <> g_old_rec.object_version_number) Then
399: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
400: hr_utility.raise_error;
401: End If;
402: hr_utility.set_location(l_proc, 15);
403: --
404: --
398: If (p_object_version_number <> g_old_rec.object_version_number) Then
399: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
400: hr_utility.raise_error;
401: End If;
402: hr_utility.set_location(l_proc, 15);
403: --
404: --
405: -- Validate the datetrack mode mode getting the validation start
406: -- and end dates for the specified datetrack operation.
422: -- We are doing a datetrack 'INSERT' which is illegal within this
423: -- procedure therefore we must error (note: to lck on insert the
424: -- private procedure ins_lck should be called).
425: --
426: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
427: hr_utility.set_message_token('PROCEDURE', l_proc);
428: hr_utility.set_message_token('STEP','20');
429: hr_utility.raise_error;
430: End If;
423: -- procedure therefore we must error (note: to lck on insert the
424: -- private procedure ins_lck should be called).
425: --
426: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
427: hr_utility.set_message_token('PROCEDURE', l_proc);
428: hr_utility.set_message_token('STEP','20');
429: hr_utility.raise_error;
430: End If;
431: --
424: -- private procedure ins_lck should be called).
425: --
426: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
427: hr_utility.set_message_token('PROCEDURE', l_proc);
428: hr_utility.set_message_token('STEP','20');
429: hr_utility.raise_error;
430: End If;
431: --
432: -- Set the validation start and end date OUT arguments
425: --
426: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
427: hr_utility.set_message_token('PROCEDURE', l_proc);
428: hr_utility.set_message_token('STEP','20');
429: hr_utility.raise_error;
430: End If;
431: --
432: -- Set the validation start and end date OUT arguments
433: --
433: --
434: p_validation_start_date := l_validation_start_date;
435: p_validation_end_date := l_validation_end_date;
436: --
437: hr_utility.set_location(' Leaving:'||l_proc, 30);
438: --
439: -- We need to trap the ORA LOCK exception
440: --
441: Exception
443: --
444: -- The object is locked therefore we need to supply a meaningful
445: -- error message.
446: --
447: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
448: hr_utility.set_message_token('TABLE_NAME', 'ben_vald_rlshp_for_reimb_f');
449: hr_utility.raise_error;
450: When l_object_invalid then
451: --
444: -- The object is locked therefore we need to supply a meaningful
445: -- error message.
446: --
447: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
448: hr_utility.set_message_token('TABLE_NAME', 'ben_vald_rlshp_for_reimb_f');
449: hr_utility.raise_error;
450: When l_object_invalid then
451: --
452: -- The object doesn't exist or is invalid
445: -- error message.
446: --
447: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
448: hr_utility.set_message_token('TABLE_NAME', 'ben_vald_rlshp_for_reimb_f');
449: hr_utility.raise_error;
450: When l_object_invalid then
451: --
452: -- The object doesn't exist or is invalid
453: --
450: When l_object_invalid then
451: --
452: -- The object doesn't exist or is invalid
453: --
454: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
455: hr_utility.set_message_token('TABLE_NAME', 'ben_vald_rlshp_for_reimb_f');
456: hr_utility.raise_error;
457: End lck;
458: --
451: --
452: -- The object doesn't exist or is invalid
453: --
454: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
455: hr_utility.set_message_token('TABLE_NAME', 'ben_vald_rlshp_for_reimb_f');
456: hr_utility.raise_error;
457: End lck;
458: --
459: -- ----------------------------------------------------------------------------
452: -- The object doesn't exist or is invalid
453: --
454: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
455: hr_utility.set_message_token('TABLE_NAME', 'ben_vald_rlshp_for_reimb_f');
456: hr_utility.raise_error;
457: End lck;
458: --
459: -- ----------------------------------------------------------------------------
460: -- |-----------------------------< convert_args >-----------------------------|
506: l_proc varchar2(72) := g_package||'convert_args';
507: --
508: Begin
509: --
510: hr_utility.set_location('Entering:'||l_proc, 5);
511: --
512: -- Convert arguments into local l_rec structure.
513: --
514: l_rec.vald_rlshp_for_reimb_id := p_vald_rlshp_for_reimb_id;
551: l_rec.object_version_number := p_object_version_number;
552: --
553: -- Return the plsql record structure.
554: --
555: hr_utility.set_location(' Leaving:'||l_proc, 10);
556: Return(l_rec);
557: --
558: End convert_args;
559: --