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 = 'OTA_ACTIVITY_VERSIONS_FK1') Then
37: fnd_message.set_name('OTA', 'OTA_13292_TAV_NO_TAD');
38: fnd_message.raise_error;
68: ElsIf (p_constraint_name = 'OTA_TAV_VERS_START_END_ORDER') Then
69: fnd_message.set_name('OTA', 'OTA_13312_GEN_DATE_ORDER');
70: fnd_message.raise_error;
71: ElsIf (p_constraint_name = 'OTA_ACTIVITY_VERSIONS_PK') Then
72: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
73: hr_utility.set_message_token('PROCEDURE', l_proc);
74: hr_utility.set_message_token('STEP','5');
75: hr_utility.raise_error;
76: ElsIf (p_constraint_name = 'OTA_ACTIVITY_VERSIONS_UK2') Then
69: fnd_message.set_name('OTA', 'OTA_13312_GEN_DATE_ORDER');
70: fnd_message.raise_error;
71: ElsIf (p_constraint_name = 'OTA_ACTIVITY_VERSIONS_PK') Then
72: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
73: hr_utility.set_message_token('PROCEDURE', l_proc);
74: hr_utility.set_message_token('STEP','5');
75: hr_utility.raise_error;
76: ElsIf (p_constraint_name = 'OTA_ACTIVITY_VERSIONS_UK2') Then
77: fnd_message.set_name('OTA', 'OTA_13301_TAV_DUPLICATE');
70: fnd_message.raise_error;
71: ElsIf (p_constraint_name = 'OTA_ACTIVITY_VERSIONS_PK') Then
72: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
73: hr_utility.set_message_token('PROCEDURE', l_proc);
74: hr_utility.set_message_token('STEP','5');
75: hr_utility.raise_error;
76: ElsIf (p_constraint_name = 'OTA_ACTIVITY_VERSIONS_UK2') Then
77: fnd_message.set_name('OTA', 'OTA_13301_TAV_DUPLICATE');
78: fnd_message.raise_error;
71: ElsIf (p_constraint_name = 'OTA_ACTIVITY_VERSIONS_PK') Then
72: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
73: hr_utility.set_message_token('PROCEDURE', l_proc);
74: hr_utility.set_message_token('STEP','5');
75: hr_utility.raise_error;
76: ElsIf (p_constraint_name = 'OTA_ACTIVITY_VERSIONS_UK2') Then
77: fnd_message.set_name('OTA', 'OTA_13301_TAV_DUPLICATE');
78: fnd_message.raise_error;
79: ElsIf (p_constraint_name = 'OTA_ACTIVITY_VERSIONS_UK4') Then
87: fnd_message.set_token('CONSTRAINT',p_constraint_name);
88: fnd_message.raise_error;
89: End If;
90: --
91: hr_utility.set_location(' Leaving:'||l_proc, 10);
92: End constraint_error;
93: --
94: -- ----------------------------------------------------------------------------
95: -- |-----------------------------< api_updating >-----------------------------|
168: l_proc varchar2(72) := g_package||'api_updating';
169: l_fct_ret boolean;
170: --
171: Begin
172: hr_utility.set_location('Entering:'||l_proc, 5);
173: --
174: If (
175: p_activity_version_id is null and
176: p_object_version_number is null
184: If (
185: p_activity_version_id = g_old_rec.activity_version_id and
186: p_object_version_number = g_old_rec.object_version_number
187: ) Then
188: hr_utility.set_location(l_proc, 10);
189: --
190: -- The g_old_rec is current therefore we must
191: -- set the returning function to true
192: --
201: Close C_Sel1;
202: --
203: -- The primary key is invalid therefore we must error
204: --
205: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
206: hr_utility.raise_error;
207: End If;
208: Close C_Sel1;
209: If (p_object_version_number <> g_old_rec.object_version_number) Then
202: --
203: -- The primary key is invalid therefore we must error
204: --
205: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
206: hr_utility.raise_error;
207: End If;
208: Close C_Sel1;
209: If (p_object_version_number <> g_old_rec.object_version_number) Then
210: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
206: hr_utility.raise_error;
207: End If;
208: Close C_Sel1;
209: If (p_object_version_number <> g_old_rec.object_version_number) Then
210: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
211: hr_utility.raise_error;
212: End If;
213: hr_utility.set_location(l_proc, 15);
214: l_fct_ret := true;
207: End If;
208: Close C_Sel1;
209: If (p_object_version_number <> g_old_rec.object_version_number) Then
210: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
211: hr_utility.raise_error;
212: End If;
213: hr_utility.set_location(l_proc, 15);
214: l_fct_ret := true;
215: End If;
209: If (p_object_version_number <> g_old_rec.object_version_number) Then
210: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
211: hr_utility.raise_error;
212: End If;
213: hr_utility.set_location(l_proc, 15);
214: l_fct_ret := true;
215: End If;
216: End If;
217: hr_utility.set_location(' Leaving:'||l_proc, 20);
213: hr_utility.set_location(l_proc, 15);
214: l_fct_ret := true;
215: End If;
216: End If;
217: hr_utility.set_location(' Leaving:'||l_proc, 20);
218: Return (l_fct_ret);
219: --
220: End api_updating;
221: --
294: --
295: l_proc varchar2(72) := g_package||'lck';
296: --
297: Begin
298: hr_utility.set_location('Entering:'||l_proc, 5);
299: --
300: -- Add any mandatory argument checking here:
301: -- Example:
302: -- hr_api.mandatory_arg_error
310: Close C_Sel1;
311: --
312: -- The primary key is invalid therefore we must error
313: --
314: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
315: hr_utility.raise_error;
316: End If;
317: Close C_Sel1;
318: If (p_object_version_number <> g_old_rec.object_version_number) Then
311: --
312: -- The primary key is invalid therefore we must error
313: --
314: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
315: hr_utility.raise_error;
316: End If;
317: Close C_Sel1;
318: If (p_object_version_number <> g_old_rec.object_version_number) Then
319: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
315: hr_utility.raise_error;
316: End If;
317: Close C_Sel1;
318: If (p_object_version_number <> g_old_rec.object_version_number) Then
319: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
320: hr_utility.raise_error;
321: End If;
322: --
323: hr_utility.set_location(' Leaving:'||l_proc, 10);
316: End If;
317: Close C_Sel1;
318: If (p_object_version_number <> g_old_rec.object_version_number) Then
319: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
320: hr_utility.raise_error;
321: End If;
322: --
323: hr_utility.set_location(' Leaving:'||l_proc, 10);
324: --
319: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
320: hr_utility.raise_error;
321: End If;
322: --
323: hr_utility.set_location(' Leaving:'||l_proc, 10);
324: --
325: -- We need to trap the ORA LOCK exception
326: --
327: Exception
329: --
330: -- The object is locked therefore we need to supply a meaningful
331: -- error message.
332: --
333: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
334: hr_utility.set_message_token('TABLE_NAME', 'ota_activity_versions');
335: hr_utility.raise_error;
336: End lck;
337: --
330: -- The object is locked therefore we need to supply a meaningful
331: -- error message.
332: --
333: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
334: hr_utility.set_message_token('TABLE_NAME', 'ota_activity_versions');
335: hr_utility.raise_error;
336: End lck;
337: --
338: -- ----------------------------------------------------------------------------
331: -- error message.
332: --
333: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
334: hr_utility.set_message_token('TABLE_NAME', 'ota_activity_versions');
335: hr_utility.raise_error;
336: End lck;
337: --
338: -- ----------------------------------------------------------------------------
339: -- |-----------------------------< convert_args >-----------------------------|
404: l_proc varchar2(72) := g_package||'convert_args';
405: --
406: Begin
407: --
408: hr_utility.set_location('Entering:'||l_proc, 5);
409: --
410: -- Convert arguments into local l_rec structure.
411: --
412: l_rec.activity_version_id := p_activity_version_id;
469:
470: --
471: -- Return the plsql record structure.
472: --
473: hr_utility.set_location(' Leaving:'||l_proc, 10);
474: Return(l_rec);
475: --
476: End convert_args;
477: --