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_DPNT_INFO_FK1') 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_DPNT_INFO_FK1') 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_DPNT_INFO_FK2') Then
34: hr_utility.set_location('Entering:'||l_proc, 5);
35: --
36: If (p_constraint_name = 'BEN_BATCH_DPNT_INFO_FK1') 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_DPNT_INFO_FK2') Then
42: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
35: --
36: If (p_constraint_name = 'BEN_BATCH_DPNT_INFO_FK1') 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_DPNT_INFO_FK2') 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_BATCH_DPNT_INFO_FK1') 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_DPNT_INFO_FK2') 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_DPNT_INFO_FK2') 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_DPNT_INFO_PK') Then
39: hr_utility.set_message_token('STEP','5');
40: hr_utility.raise_error;
41: ElsIf (p_constraint_name = 'BEN_BATCH_DPNT_INFO_FK2') 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_DPNT_INFO_PK') Then
47: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
40: hr_utility.raise_error;
41: ElsIf (p_constraint_name = 'BEN_BATCH_DPNT_INFO_FK2') 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_DPNT_INFO_PK') 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_DPNT_INFO_FK2') 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_DPNT_INFO_PK') 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_DPNT_INFO_PK') 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: Else
44: hr_utility.set_message_token('STEP','10');
45: hr_utility.raise_error;
46: ElsIf (p_constraint_name = 'BEN_BATCH_DPNT_INFO_PK') 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: Else
52: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
45: hr_utility.raise_error;
46: ElsIf (p_constraint_name = 'BEN_BATCH_DPNT_INFO_PK') 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: 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 = 'BEN_BATCH_DPNT_INFO_PK') 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: 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','15');
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','15');
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 >-----------------------------|
91: l_proc varchar2(72) := g_package||'api_updating';
92: l_fct_ret boolean;
93: --
94: Begin
95: hr_utility.set_location('Entering:'||l_proc, 5);
96: --
97: If (
98: p_batch_dpnt_id is null and
99: p_object_version_number is null
107: If (
108: p_batch_dpnt_id = g_old_rec.batch_dpnt_id and
109: p_object_version_number = g_old_rec.object_version_number
110: ) Then
111: hr_utility.set_location(l_proc, 10);
112: --
113: -- The g_old_rec is current therefore we must
114: -- set the returning function to true
115: --
124: Close C_Sel1;
125: --
126: -- The primary key is invalid therefore we must error
127: --
128: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
129: hr_utility.raise_error;
130: End If;
131: Close C_Sel1;
132: If (p_object_version_number <> g_old_rec.object_version_number) Then
125: --
126: -- The primary key is invalid therefore we must error
127: --
128: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
129: hr_utility.raise_error;
130: End If;
131: Close C_Sel1;
132: If (p_object_version_number <> g_old_rec.object_version_number) Then
133: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
129: hr_utility.raise_error;
130: End If;
131: Close C_Sel1;
132: If (p_object_version_number <> g_old_rec.object_version_number) Then
133: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
134: hr_utility.raise_error;
135: End If;
136: hr_utility.set_location(l_proc, 15);
137: l_fct_ret := true;
130: End If;
131: Close C_Sel1;
132: If (p_object_version_number <> g_old_rec.object_version_number) Then
133: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
134: hr_utility.raise_error;
135: End If;
136: hr_utility.set_location(l_proc, 15);
137: l_fct_ret := true;
138: End If;
132: If (p_object_version_number <> g_old_rec.object_version_number) Then
133: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
134: hr_utility.raise_error;
135: End If;
136: hr_utility.set_location(l_proc, 15);
137: l_fct_ret := true;
138: End If;
139: End If;
140: hr_utility.set_location(' Leaving:'||l_proc, 20);
136: hr_utility.set_location(l_proc, 15);
137: l_fct_ret := true;
138: End If;
139: End If;
140: hr_utility.set_location(' Leaving:'||l_proc, 20);
141: Return (l_fct_ret);
142: --
143: End api_updating;
144: --
173: --
174: l_proc varchar2(72) := g_package||'lck';
175: --
176: Begin
177: hr_utility.set_location('Entering:'||l_proc, 5);
178: --
179: -- Add any mandatory argument checking here:
180: -- Example:
181: -- hr_api.mandatory_arg_error
189: Close C_Sel1;
190: --
191: -- The primary key is invalid therefore we must error
192: --
193: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
194: hr_utility.raise_error;
195: End If;
196: Close C_Sel1;
197: If (p_object_version_number <> g_old_rec.object_version_number) Then
190: --
191: -- The primary key is invalid therefore we must error
192: --
193: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
194: hr_utility.raise_error;
195: End If;
196: Close C_Sel1;
197: If (p_object_version_number <> g_old_rec.object_version_number) Then
198: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
194: hr_utility.raise_error;
195: End If;
196: Close C_Sel1;
197: If (p_object_version_number <> g_old_rec.object_version_number) Then
198: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
199: hr_utility.raise_error;
200: End If;
201: --
202: hr_utility.set_location(' Leaving:'||l_proc, 10);
195: End If;
196: Close C_Sel1;
197: If (p_object_version_number <> g_old_rec.object_version_number) Then
198: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
199: hr_utility.raise_error;
200: End If;
201: --
202: hr_utility.set_location(' Leaving:'||l_proc, 10);
203: --
198: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
199: hr_utility.raise_error;
200: End If;
201: --
202: hr_utility.set_location(' Leaving:'||l_proc, 10);
203: --
204: -- We need to trap the ORA LOCK exception
205: --
206: Exception
208: --
209: -- The object is locked therefore we need to supply a meaningful
210: -- error message.
211: --
212: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
213: hr_utility.set_message_token('TABLE_NAME', 'ben_batch_dpnt_info');
214: hr_utility.raise_error;
215: End lck;
216: --
209: -- The object is locked therefore we need to supply a meaningful
210: -- error message.
211: --
212: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
213: hr_utility.set_message_token('TABLE_NAME', 'ben_batch_dpnt_info');
214: hr_utility.raise_error;
215: End lck;
216: --
217: -- ----------------------------------------------------------------------------
210: -- error message.
211: --
212: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
213: hr_utility.set_message_token('TABLE_NAME', 'ben_batch_dpnt_info');
214: hr_utility.raise_error;
215: End lck;
216: --
217: -- ----------------------------------------------------------------------------
218: -- |-----------------------------< convert_args >-----------------------------|
239: l_proc varchar2(72) := g_package||'convert_args';
240: --
241: Begin
242: --
243: hr_utility.set_location('Entering:'||l_proc, 5);
244: --
245: -- Convert arguments into local l_rec structure.
246: --
247: l_rec.batch_dpnt_id := p_batch_dpnt_id;
259: l_rec.actn_cd := p_actn_cd;
260: --
261: -- Return the plsql record structure.
262: --
263: hr_utility.set_location(' Leaving:'||l_proc, 10);
264: Return(l_rec);
265: --
266: End convert_args;
267: --