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 = 'PQP_ALIEN_TRANSACTION_DATA_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 = 'PQP_ALIEN_TRANSACTION_DATA_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 = 'PQP_ALIEN_TRANSACTION_DATA_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 = 'PQP_ALIEN_TRANSACTION_DATA_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 = 'PQP_ALIEN_TRANSACTION_DATA_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 >-----------------------------|
120: l_proc varchar2(72) := g_package||'api_updating';
121: l_fct_ret boolean;
122: --
123: Begin
124: hr_utility.set_location('Entering:'||l_proc, 5);
125: --
126: If (
127: p_alien_transaction_id is null and
128: p_object_version_number is null
136: If (
137: p_alien_transaction_id = g_old_rec.alien_transaction_id and
138: p_object_version_number = g_old_rec.object_version_number
139: ) Then
140: hr_utility.set_location(l_proc, 10);
141: --
142: -- The g_old_rec is current therefore we must
143: -- set the returning function to true
144: --
153: Close C_Sel1;
154: --
155: -- The primary key is invalid therefore we must error
156: --
157: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
158: hr_utility.raise_error;
159: End If;
160: Close C_Sel1;
161: If (p_object_version_number <> g_old_rec.object_version_number) Then
154: --
155: -- The primary key is invalid therefore we must error
156: --
157: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
158: hr_utility.raise_error;
159: End If;
160: Close C_Sel1;
161: If (p_object_version_number <> g_old_rec.object_version_number) Then
162: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
158: hr_utility.raise_error;
159: End If;
160: Close C_Sel1;
161: If (p_object_version_number <> g_old_rec.object_version_number) Then
162: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
163: hr_utility.raise_error;
164: End If;
165: hr_utility.set_location(l_proc, 15);
166: l_fct_ret := true;
159: End If;
160: Close C_Sel1;
161: If (p_object_version_number <> g_old_rec.object_version_number) Then
162: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
163: hr_utility.raise_error;
164: End If;
165: hr_utility.set_location(l_proc, 15);
166: l_fct_ret := true;
167: End If;
161: If (p_object_version_number <> g_old_rec.object_version_number) Then
162: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
163: hr_utility.raise_error;
164: End If;
165: hr_utility.set_location(l_proc, 15);
166: l_fct_ret := true;
167: End If;
168: End If;
169: hr_utility.set_location(' Leaving:'||l_proc, 20);
165: hr_utility.set_location(l_proc, 15);
166: l_fct_ret := true;
167: End If;
168: End If;
169: hr_utility.set_location(' Leaving:'||l_proc, 20);
170: Return (l_fct_ret);
171: --
172: End api_updating;
173: --
241: --
242: l_proc varchar2(72) := g_package||'lck';
243: --
244: Begin
245: hr_utility.set_location('Entering:'||l_proc, 5);
246: --
247: -- Add any mandatory argument checking here:
248: -- Example:
249: -- hr_api.mandatory_arg_error
257: Close C_Sel1;
258: --
259: -- The primary key is invalid therefore we must error
260: --
261: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
262: hr_utility.raise_error;
263: End If;
264: Close C_Sel1;
265: If (p_object_version_number <> g_old_rec.object_version_number) Then
258: --
259: -- The primary key is invalid therefore we must error
260: --
261: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
262: hr_utility.raise_error;
263: End If;
264: Close C_Sel1;
265: If (p_object_version_number <> g_old_rec.object_version_number) Then
266: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
262: hr_utility.raise_error;
263: End If;
264: Close C_Sel1;
265: If (p_object_version_number <> g_old_rec.object_version_number) Then
266: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
267: hr_utility.raise_error;
268: End If;
269: --
270: hr_utility.set_location(' Leaving:'||l_proc, 10);
263: End If;
264: Close C_Sel1;
265: If (p_object_version_number <> g_old_rec.object_version_number) Then
266: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
267: hr_utility.raise_error;
268: End If;
269: --
270: hr_utility.set_location(' Leaving:'||l_proc, 10);
271: --
266: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
267: hr_utility.raise_error;
268: End If;
269: --
270: hr_utility.set_location(' Leaving:'||l_proc, 10);
271: --
272: -- We need to trap the ORA LOCK exception
273: --
274: Exception
276: --
277: -- The object is locked therefore we need to supply a meaningful
278: -- error message.
279: --
280: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
281: hr_utility.set_message_token('TABLE_NAME', 'pqp_alien_transaction_data');
282: hr_utility.raise_error;
283: End lck;
284: --
277: -- The object is locked therefore we need to supply a meaningful
278: -- error message.
279: --
280: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
281: hr_utility.set_message_token('TABLE_NAME', 'pqp_alien_transaction_data');
282: hr_utility.raise_error;
283: End lck;
284: --
285: -- ----------------------------------------------------------------------------
278: -- error message.
279: --
280: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
281: hr_utility.set_message_token('TABLE_NAME', 'pqp_alien_transaction_data');
282: hr_utility.raise_error;
283: End lck;
284: --
285: -- ----------------------------------------------------------------------------
286: -- |-----------------------------< convert_args >-----------------------------|
346: l_proc varchar2(72) := g_package||'convert_args';
347: --
348: Begin
349: --
350: hr_utility.set_location('Entering:'||l_proc, 5);
351: --
352: -- Convert arguments into local l_rec structure.
353: --
354: l_rec.alien_transaction_id := p_alien_transaction_id;
405: l_rec.forecast_income_code := p_forecast_income_code;
406: --
407: -- Return the plsql record structure.
408: --
409: hr_utility.set_location(' Leaving:'||l_proc, 10);
410: Return(l_rec);
411: --
412: End convert_args;
413: --