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_ENRT_BNFT_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_ENRT_BNFT_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: ElsIf (p_constraint_name = 'DFLT_FLAG_FLG') Then
34: hr_utility.set_location('Entering:'||l_proc, 5);
35: --
36: If (p_constraint_name = 'BEN_ENRT_BNFT_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: ElsIf (p_constraint_name = 'DFLT_FLAG_FLG') Then
42: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
35: --
36: If (p_constraint_name = 'BEN_ENRT_BNFT_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: ElsIf (p_constraint_name = 'DFLT_FLAG_FLG') 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_ENRT_BNFT_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: ElsIf (p_constraint_name = 'DFLT_FLAG_FLG') 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','15');
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 = 'DFLT_FLAG_FLG') 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','15');
45: hr_utility.raise_error;
46: ElsIf (p_constraint_name = 'VAL_HAS_BN_FLAG_FLG1') Then
39: hr_utility.set_message_token('STEP','5');
40: hr_utility.raise_error;
41: ElsIf (p_constraint_name = 'DFLT_FLAG_FLG') 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','15');
45: hr_utility.raise_error;
46: ElsIf (p_constraint_name = 'VAL_HAS_BN_FLAG_FLG1') Then
47: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
40: hr_utility.raise_error;
41: ElsIf (p_constraint_name = 'DFLT_FLAG_FLG') 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','15');
45: hr_utility.raise_error;
46: ElsIf (p_constraint_name = 'VAL_HAS_BN_FLAG_FLG1') Then
47: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
48: hr_utility.set_message_token('PROCEDURE', l_proc);
41: ElsIf (p_constraint_name = 'DFLT_FLAG_FLG') 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','15');
45: hr_utility.raise_error;
46: ElsIf (p_constraint_name = 'VAL_HAS_BN_FLAG_FLG1') Then
47: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
48: hr_utility.set_message_token('PROCEDURE', l_proc);
49: hr_utility.set_message_token('STEP','20');
43: hr_utility.set_message_token('PROCEDURE', l_proc);
44: hr_utility.set_message_token('STEP','15');
45: hr_utility.raise_error;
46: ElsIf (p_constraint_name = 'VAL_HAS_BN_FLAG_FLG1') Then
47: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
48: hr_utility.set_message_token('PROCEDURE', l_proc);
49: hr_utility.set_message_token('STEP','20');
50: hr_utility.raise_error;
51: Else
44: hr_utility.set_message_token('STEP','15');
45: hr_utility.raise_error;
46: ElsIf (p_constraint_name = 'VAL_HAS_BN_FLAG_FLG1') Then
47: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
48: hr_utility.set_message_token('PROCEDURE', l_proc);
49: hr_utility.set_message_token('STEP','20');
50: hr_utility.raise_error;
51: Else
52: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
45: hr_utility.raise_error;
46: ElsIf (p_constraint_name = 'VAL_HAS_BN_FLAG_FLG1') Then
47: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
48: hr_utility.set_message_token('PROCEDURE', l_proc);
49: hr_utility.set_message_token('STEP','20');
50: hr_utility.raise_error;
51: Else
52: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
53: hr_utility.set_message_token('PROCEDURE', l_proc);
46: ElsIf (p_constraint_name = 'VAL_HAS_BN_FLAG_FLG1') Then
47: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
48: hr_utility.set_message_token('PROCEDURE', l_proc);
49: hr_utility.set_message_token('STEP','20');
50: hr_utility.raise_error;
51: Else
52: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
53: hr_utility.set_message_token('PROCEDURE', l_proc);
54: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
48: hr_utility.set_message_token('PROCEDURE', l_proc);
49: hr_utility.set_message_token('STEP','20');
50: hr_utility.raise_error;
51: Else
52: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
53: hr_utility.set_message_token('PROCEDURE', l_proc);
54: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
55: hr_utility.raise_error;
56: End If;
49: hr_utility.set_message_token('STEP','20');
50: hr_utility.raise_error;
51: Else
52: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
53: hr_utility.set_message_token('PROCEDURE', l_proc);
54: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
55: hr_utility.raise_error;
56: End If;
57: --
50: hr_utility.raise_error;
51: Else
52: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
53: hr_utility.set_message_token('PROCEDURE', l_proc);
54: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
55: hr_utility.raise_error;
56: End If;
57: --
58: hr_utility.set_location(' Leaving:'||l_proc, 10);
51: Else
52: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
53: hr_utility.set_message_token('PROCEDURE', l_proc);
54: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
55: hr_utility.raise_error;
56: End If;
57: --
58: hr_utility.set_location(' Leaving:'||l_proc, 10);
59: End constraint_error;
54: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
55: hr_utility.raise_error;
56: End If;
57: --
58: hr_utility.set_location(' Leaving:'||l_proc, 10);
59: End constraint_error;
60: --
61: -- ----------------------------------------------------------------------------
62: -- |-----------------------------< api_updating >-----------------------------|
138: l_proc varchar2(72) := g_package||'api_updating';
139: l_fct_ret boolean;
140: --
141: Begin
142: hr_utility.set_location('Entering:'||l_proc, 5);
143: --
144: If (
145: p_enrt_bnft_id is null and
146: p_object_version_number is null
154: If (
155: p_enrt_bnft_id = g_old_rec.enrt_bnft_id and
156: p_object_version_number = g_old_rec.object_version_number
157: ) Then
158: hr_utility.set_location(l_proc, 10);
159: --
160: -- The g_old_rec is current therefore we must
161: -- set the returning function to true
162: --
171: Close C_Sel1;
172: --
173: -- The primary key is invalid therefore we must error
174: --
175: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
176: hr_utility.raise_error;
177: End If;
178: Close C_Sel1;
179: If (p_object_version_number <> g_old_rec.object_version_number) Then
172: --
173: -- The primary key is invalid therefore we must error
174: --
175: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
176: hr_utility.raise_error;
177: End If;
178: Close C_Sel1;
179: If (p_object_version_number <> g_old_rec.object_version_number) Then
180: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
176: hr_utility.raise_error;
177: End If;
178: Close C_Sel1;
179: If (p_object_version_number <> g_old_rec.object_version_number) Then
180: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
181: hr_utility.raise_error;
182: End If;
183: hr_utility.set_location(l_proc, 15);
184: l_fct_ret := true;
177: End If;
178: Close C_Sel1;
179: If (p_object_version_number <> g_old_rec.object_version_number) Then
180: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
181: hr_utility.raise_error;
182: End If;
183: hr_utility.set_location(l_proc, 15);
184: l_fct_ret := true;
185: End If;
179: If (p_object_version_number <> g_old_rec.object_version_number) Then
180: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
181: hr_utility.raise_error;
182: End If;
183: hr_utility.set_location(l_proc, 15);
184: l_fct_ret := true;
185: End If;
186: End If;
187: hr_utility.set_location(' Leaving:'||l_proc, 20);
183: hr_utility.set_location(l_proc, 15);
184: l_fct_ret := true;
185: End If;
186: End If;
187: hr_utility.set_location(' Leaving:'||l_proc, 20);
188: Return (l_fct_ret);
189: --
190: End api_updating;
191: --
267: --
268: l_proc varchar2(72) := g_package||'lck';
269: --
270: Begin
271: hr_utility.set_location('Entering:'||l_proc, 5);
272: --
273: -- Add any mandatory argument checking here:
274: -- Example:
275: -- hr_api.mandatory_arg_error
283: Close C_Sel1;
284: --
285: -- The primary key is invalid therefore we must error
286: --
287: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
288: hr_utility.raise_error;
289: End If;
290: Close C_Sel1;
291: If (p_object_version_number <> g_old_rec.object_version_number) Then
284: --
285: -- The primary key is invalid therefore we must error
286: --
287: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
288: hr_utility.raise_error;
289: End If;
290: Close C_Sel1;
291: If (p_object_version_number <> g_old_rec.object_version_number) Then
292: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
288: hr_utility.raise_error;
289: End If;
290: Close C_Sel1;
291: If (p_object_version_number <> g_old_rec.object_version_number) Then
292: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
293: hr_utility.raise_error;
294: End If;
295: --
296: hr_utility.set_location(' Leaving:'||l_proc, 10);
289: End If;
290: Close C_Sel1;
291: If (p_object_version_number <> g_old_rec.object_version_number) Then
292: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
293: hr_utility.raise_error;
294: End If;
295: --
296: hr_utility.set_location(' Leaving:'||l_proc, 10);
297: --
292: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
293: hr_utility.raise_error;
294: End If;
295: --
296: hr_utility.set_location(' Leaving:'||l_proc, 10);
297: --
298: -- We need to trap the ORA LOCK exception
299: --
300: Exception
302: --
303: -- The object is locked therefore we need to supply a meaningful
304: -- error message.
305: --
306: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
307: hr_utility.set_message_token('TABLE_NAME', 'ben_enrt_bnft');
308: hr_utility.raise_error;
309: End lck;
310: --
303: -- The object is locked therefore we need to supply a meaningful
304: -- error message.
305: --
306: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
307: hr_utility.set_message_token('TABLE_NAME', 'ben_enrt_bnft');
308: hr_utility.raise_error;
309: End lck;
310: --
311: -- ----------------------------------------------------------------------------
304: -- error message.
305: --
306: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
307: hr_utility.set_message_token('TABLE_NAME', 'ben_enrt_bnft');
308: hr_utility.raise_error;
309: End lck;
310: --
311: -- ----------------------------------------------------------------------------
312: -- |-----------------------------< convert_args >-----------------------------|
379: l_proc varchar2(72) := g_package||'convert_args';
380: --
381: Begin
382: --
383: hr_utility.set_location('Entering:'||l_proc, 5);
384: --
385: -- Convert arguments into local l_rec structure.
386: --
387: l_rec.enrt_bnft_id := p_enrt_bnft_id ;
445: l_rec.object_version_number := p_object_version_number ;
446: --
447: -- Return the plsql record structure.
448: --
449: hr_utility.set_location(' Leaving:'||l_proc, 10);
450: Return(l_rec);
451: --
452: End convert_args;
453: --