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 = 'AVCON_BEN_B_ELIG__000') 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 = 'AVCON_BEN_B_ELIG__000') 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_BATCH_ELIG_INFO_FK1') Then
34: hr_utility.set_location('Entering:'||l_proc, 5);
35: --
36: If (p_constraint_name = 'AVCON_BEN_B_ELIG__000') 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_BATCH_ELIG_INFO_FK1') Then
42: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
35: --
36: If (p_constraint_name = 'AVCON_BEN_B_ELIG__000') 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_BATCH_ELIG_INFO_FK1') 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 = 'AVCON_BEN_B_ELIG__000') 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_BATCH_ELIG_INFO_FK1') 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_BATCH_ELIG_INFO_FK1') 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: ElsIf (p_constraint_name = 'BEN_BATCH_ELIG_INFO_FK2') Then
39: hr_utility.set_message_token('STEP','5');
40: hr_utility.raise_error;
41: ElsIf (p_constraint_name = 'BEN_BATCH_ELIG_INFO_FK1') 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: ElsIf (p_constraint_name = 'BEN_BATCH_ELIG_INFO_FK2') Then
47: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
40: hr_utility.raise_error;
41: ElsIf (p_constraint_name = 'BEN_BATCH_ELIG_INFO_FK1') 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: ElsIf (p_constraint_name = 'BEN_BATCH_ELIG_INFO_FK2') 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 = 'BEN_BATCH_ELIG_INFO_FK1') 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: ElsIf (p_constraint_name = 'BEN_BATCH_ELIG_INFO_FK2') 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','15');
43: hr_utility.set_message_token('PROCEDURE', l_proc);
44: hr_utility.set_message_token('STEP','10');
45: hr_utility.raise_error;
46: ElsIf (p_constraint_name = 'BEN_BATCH_ELIG_INFO_FK2') 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','15');
50: hr_utility.raise_error;
51: ElsIf (p_constraint_name = 'BEN_BATCH_ELIG_INFO_PK') Then
44: hr_utility.set_message_token('STEP','10');
45: hr_utility.raise_error;
46: ElsIf (p_constraint_name = 'BEN_BATCH_ELIG_INFO_FK2') 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','15');
50: hr_utility.raise_error;
51: ElsIf (p_constraint_name = 'BEN_BATCH_ELIG_INFO_PK') Then
52: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
45: hr_utility.raise_error;
46: ElsIf (p_constraint_name = 'BEN_BATCH_ELIG_INFO_FK2') 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','15');
50: hr_utility.raise_error;
51: ElsIf (p_constraint_name = 'BEN_BATCH_ELIG_INFO_PK') Then
52: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
53: hr_utility.set_message_token('PROCEDURE', l_proc);
46: ElsIf (p_constraint_name = 'BEN_BATCH_ELIG_INFO_FK2') 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','15');
50: hr_utility.raise_error;
51: ElsIf (p_constraint_name = 'BEN_BATCH_ELIG_INFO_PK') Then
52: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
53: hr_utility.set_message_token('PROCEDURE', l_proc);
54: hr_utility.set_message_token('STEP','20');
48: hr_utility.set_message_token('PROCEDURE', l_proc);
49: hr_utility.set_message_token('STEP','15');
50: hr_utility.raise_error;
51: ElsIf (p_constraint_name = 'BEN_BATCH_ELIG_INFO_PK') Then
52: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
53: hr_utility.set_message_token('PROCEDURE', l_proc);
54: hr_utility.set_message_token('STEP','20');
55: hr_utility.raise_error;
56: Else
49: hr_utility.set_message_token('STEP','15');
50: hr_utility.raise_error;
51: ElsIf (p_constraint_name = 'BEN_BATCH_ELIG_INFO_PK') Then
52: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
53: hr_utility.set_message_token('PROCEDURE', l_proc);
54: hr_utility.set_message_token('STEP','20');
55: hr_utility.raise_error;
56: Else
57: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
50: hr_utility.raise_error;
51: ElsIf (p_constraint_name = 'BEN_BATCH_ELIG_INFO_PK') Then
52: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
53: hr_utility.set_message_token('PROCEDURE', l_proc);
54: hr_utility.set_message_token('STEP','20');
55: hr_utility.raise_error;
56: Else
57: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
58: hr_utility.set_message_token('PROCEDURE', l_proc);
51: ElsIf (p_constraint_name = 'BEN_BATCH_ELIG_INFO_PK') Then
52: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
53: hr_utility.set_message_token('PROCEDURE', l_proc);
54: hr_utility.set_message_token('STEP','20');
55: hr_utility.raise_error;
56: Else
57: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
58: hr_utility.set_message_token('PROCEDURE', l_proc);
59: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
53: hr_utility.set_message_token('PROCEDURE', l_proc);
54: hr_utility.set_message_token('STEP','20');
55: hr_utility.raise_error;
56: Else
57: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
58: hr_utility.set_message_token('PROCEDURE', l_proc);
59: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
60: hr_utility.raise_error;
61: End If;
54: hr_utility.set_message_token('STEP','20');
55: hr_utility.raise_error;
56: Else
57: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
58: hr_utility.set_message_token('PROCEDURE', l_proc);
59: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
60: hr_utility.raise_error;
61: End If;
62: --
55: hr_utility.raise_error;
56: Else
57: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
58: hr_utility.set_message_token('PROCEDURE', l_proc);
59: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
60: hr_utility.raise_error;
61: End If;
62: --
63: hr_utility.set_location(' Leaving:'||l_proc, 10);
56: Else
57: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
58: hr_utility.set_message_token('PROCEDURE', l_proc);
59: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
60: hr_utility.raise_error;
61: End If;
62: --
63: hr_utility.set_location(' Leaving:'||l_proc, 10);
64: End constraint_error;
59: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
60: hr_utility.raise_error;
61: End If;
62: --
63: hr_utility.set_location(' Leaving:'||l_proc, 10);
64: End constraint_error;
65: --
66: -- ----------------------------------------------------------------------------
67: -- |-----------------------------< api_updating >-----------------------------|
93: l_proc varchar2(72) := g_package||'api_updating';
94: l_fct_ret boolean;
95: --
96: Begin
97: hr_utility.set_location('Entering:'||l_proc, 5);
98: --
99: If (
100: p_batch_elig_id is null and
101: p_object_version_number is null
109: If (
110: p_batch_elig_id = g_old_rec.batch_elig_id and
111: p_object_version_number = g_old_rec.object_version_number
112: ) Then
113: hr_utility.set_location(l_proc, 10);
114: --
115: -- The g_old_rec is current therefore we must
116: -- set the returning function to true
117: --
126: Close C_Sel1;
127: --
128: -- The primary key is invalid therefore we must error
129: --
130: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
131: hr_utility.raise_error;
132: End If;
133: Close C_Sel1;
134: If (p_object_version_number <> g_old_rec.object_version_number) Then
127: --
128: -- The primary key is invalid therefore we must error
129: --
130: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
131: hr_utility.raise_error;
132: End If;
133: Close C_Sel1;
134: If (p_object_version_number <> g_old_rec.object_version_number) Then
135: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
131: hr_utility.raise_error;
132: End If;
133: Close C_Sel1;
134: If (p_object_version_number <> g_old_rec.object_version_number) Then
135: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
136: hr_utility.raise_error;
137: End If;
138: hr_utility.set_location(l_proc, 15);
139: l_fct_ret := true;
132: End If;
133: Close C_Sel1;
134: If (p_object_version_number <> g_old_rec.object_version_number) Then
135: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
136: hr_utility.raise_error;
137: End If;
138: hr_utility.set_location(l_proc, 15);
139: l_fct_ret := true;
140: End If;
134: If (p_object_version_number <> g_old_rec.object_version_number) Then
135: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
136: hr_utility.raise_error;
137: End If;
138: hr_utility.set_location(l_proc, 15);
139: l_fct_ret := true;
140: End If;
141: End If;
142: hr_utility.set_location(' Leaving:'||l_proc, 20);
138: hr_utility.set_location(l_proc, 15);
139: l_fct_ret := true;
140: End If;
141: End If;
142: hr_utility.set_location(' Leaving:'||l_proc, 20);
143: Return (l_fct_ret);
144: --
145: End api_updating;
146: --
172: --
173: l_proc varchar2(72) := g_package||'lck';
174: --
175: Begin
176: hr_utility.set_location('Entering:'||l_proc, 5);
177: --
178: -- Add any mandatory argument checking here:
179: -- Example:
180: -- hr_api.mandatory_arg_error
188: Close C_Sel1;
189: --
190: -- The primary key is invalid therefore we must error
191: --
192: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
193: hr_utility.raise_error;
194: End If;
195: Close C_Sel1;
196: If (p_object_version_number <> g_old_rec.object_version_number) Then
189: --
190: -- The primary key is invalid therefore we must error
191: --
192: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
193: hr_utility.raise_error;
194: End If;
195: Close C_Sel1;
196: If (p_object_version_number <> g_old_rec.object_version_number) Then
197: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
193: hr_utility.raise_error;
194: End If;
195: Close C_Sel1;
196: If (p_object_version_number <> g_old_rec.object_version_number) Then
197: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
198: hr_utility.raise_error;
199: End If;
200: --
201: hr_utility.set_location(' Leaving:'||l_proc, 10);
194: End If;
195: Close C_Sel1;
196: If (p_object_version_number <> g_old_rec.object_version_number) Then
197: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
198: hr_utility.raise_error;
199: End If;
200: --
201: hr_utility.set_location(' Leaving:'||l_proc, 10);
202: --
197: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
198: hr_utility.raise_error;
199: End If;
200: --
201: hr_utility.set_location(' Leaving:'||l_proc, 10);
202: --
203: -- We need to trap the ORA LOCK exception
204: --
205: Exception
207: --
208: -- The object is locked therefore we need to supply a meaningful
209: -- error message.
210: --
211: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
212: hr_utility.set_message_token('TABLE_NAME', 'ben_batch_elig_info');
213: hr_utility.raise_error;
214: End lck;
215: --
208: -- The object is locked therefore we need to supply a meaningful
209: -- error message.
210: --
211: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
212: hr_utility.set_message_token('TABLE_NAME', 'ben_batch_elig_info');
213: hr_utility.raise_error;
214: End lck;
215: --
216: -- ----------------------------------------------------------------------------
209: -- error message.
210: --
211: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
212: hr_utility.set_message_token('TABLE_NAME', 'ben_batch_elig_info');
213: hr_utility.raise_error;
214: End lck;
215: --
216: -- ----------------------------------------------------------------------------
217: -- |-----------------------------< convert_args >-----------------------------|
235: l_proc varchar2(72) := g_package||'convert_args';
236: --
237: Begin
238: --
239: hr_utility.set_location('Entering:'||l_proc, 5);
240: --
241: -- Convert arguments into local l_rec structure.
242: --
243: l_rec.batch_elig_id := p_batch_elig_id;
252: l_rec.object_version_number := p_object_version_number;
253: --
254: -- Return the plsql record structure.
255: --
256: hr_utility.set_location(' Leaving:'||l_proc, 10);
257: Return(l_rec);
258: --
259: End convert_args;
260: --