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_BATCH_PARAMETER_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_BATCH_PARAMETER_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_BATCH_PARAMETER_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_BATCH_PARAMETER_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_BATCH_PARAMETER_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 >-----------------------------|
75: l_proc varchar2(72) := g_package||'api_updating';
76: l_fct_ret boolean;
77: --
78: Begin
79: hr_utility.set_location('Entering:'||l_proc, 5);
80: --
81: If (
82: p_batch_parameter_id is null and
83: p_object_version_number is null
91: If (
92: p_batch_parameter_id = g_old_rec.batch_parameter_id and
93: p_object_version_number = g_old_rec.object_version_number
94: ) Then
95: hr_utility.set_location(l_proc, 10);
96: --
97: -- The g_old_rec is current therefore we must
98: -- set the returning function to true
99: --
108: Close C_Sel1;
109: --
110: -- The primary key is invalid therefore we must error
111: --
112: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
113: hr_utility.raise_error;
114: End If;
115: Close C_Sel1;
116: If (p_object_version_number <> g_old_rec.object_version_number) Then
109: --
110: -- The primary key is invalid therefore we must error
111: --
112: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
113: hr_utility.raise_error;
114: End If;
115: Close C_Sel1;
116: If (p_object_version_number <> g_old_rec.object_version_number) Then
117: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
113: hr_utility.raise_error;
114: End If;
115: Close C_Sel1;
116: If (p_object_version_number <> g_old_rec.object_version_number) Then
117: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
118: hr_utility.raise_error;
119: End If;
120: hr_utility.set_location(l_proc, 15);
121: l_fct_ret := true;
114: End If;
115: Close C_Sel1;
116: If (p_object_version_number <> g_old_rec.object_version_number) Then
117: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
118: hr_utility.raise_error;
119: End If;
120: hr_utility.set_location(l_proc, 15);
121: l_fct_ret := true;
122: End If;
116: If (p_object_version_number <> g_old_rec.object_version_number) Then
117: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
118: hr_utility.raise_error;
119: End If;
120: hr_utility.set_location(l_proc, 15);
121: l_fct_ret := true;
122: End If;
123: End If;
124: hr_utility.set_location(' Leaving:'||l_proc, 20);
120: hr_utility.set_location(l_proc, 15);
121: l_fct_ret := true;
122: End If;
123: End If;
124: hr_utility.set_location(' Leaving:'||l_proc, 20);
125: Return (l_fct_ret);
126: --
127: End api_updating;
128: --
151: --
152: l_proc varchar2(72) := g_package||'lck';
153: --
154: Begin
155: hr_utility.set_location('Entering:'||l_proc, 5);
156: --
157: -- Add any mandatory argument checking here:
158: -- Example:
159: -- hr_api.mandatory_arg_error
167: Close C_Sel1;
168: --
169: -- The primary key is invalid therefore we must error
170: --
171: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
172: hr_utility.raise_error;
173: End If;
174: Close C_Sel1;
175: If (p_object_version_number <> g_old_rec.object_version_number) Then
168: --
169: -- The primary key is invalid therefore we must error
170: --
171: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
172: hr_utility.raise_error;
173: End If;
174: Close C_Sel1;
175: If (p_object_version_number <> g_old_rec.object_version_number) Then
176: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
172: hr_utility.raise_error;
173: End If;
174: Close C_Sel1;
175: If (p_object_version_number <> g_old_rec.object_version_number) Then
176: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
177: hr_utility.raise_error;
178: End If;
179: --
180: hr_utility.set_location(' Leaving:'||l_proc, 10);
173: End If;
174: Close C_Sel1;
175: If (p_object_version_number <> g_old_rec.object_version_number) Then
176: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
177: hr_utility.raise_error;
178: End If;
179: --
180: hr_utility.set_location(' Leaving:'||l_proc, 10);
181: --
176: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
177: hr_utility.raise_error;
178: End If;
179: --
180: hr_utility.set_location(' Leaving:'||l_proc, 10);
181: --
182: -- We need to trap the ORA LOCK exception
183: --
184: Exception
186: --
187: -- The object is locked therefore we need to supply a meaningful
188: -- error message.
189: --
190: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
191: hr_utility.set_message_token('TABLE_NAME', 'ben_batch_parameter');
192: hr_utility.raise_error;
193: End lck;
194: --
187: -- The object is locked therefore we need to supply a meaningful
188: -- error message.
189: --
190: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
191: hr_utility.set_message_token('TABLE_NAME', 'ben_batch_parameter');
192: hr_utility.raise_error;
193: End lck;
194: --
195: -- ----------------------------------------------------------------------------
188: -- error message.
189: --
190: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
191: hr_utility.set_message_token('TABLE_NAME', 'ben_batch_parameter');
192: hr_utility.raise_error;
193: End lck;
194: --
195: -- ----------------------------------------------------------------------------
196: -- |-----------------------------< convert_args >-----------------------------|
211: l_proc varchar2(72) := g_package||'convert_args';
212: --
213: Begin
214: --
215: hr_utility.set_location('Entering:'||l_proc, 5);
216: --
217: -- Convert arguments into local l_rec structure.
218: --
219: l_rec.batch_parameter_id := p_batch_parameter_id;
225: l_rec.object_version_number := p_object_version_number;
226: --
227: -- Return the plsql record structure.
228: --
229: hr_utility.set_location(' Leaving:'||l_proc, 10);
230: Return(l_rec);
231: --
232: End convert_args;
233: --