67:
68:
69: SAVEPOINT create_resource_job_role_pvt;
70:
71: x_return_status := fnd_api.g_ret_sts_success;
72:
73:
74: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN
75:
70:
71: x_return_status := fnd_api.g_ret_sts_success;
72:
73:
74: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN
75:
76: RAISE fnd_api.g_exc_unexpected_error;
77:
78: END IF;
72:
73:
74: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN
75:
76: RAISE fnd_api.g_exc_unexpected_error;
77:
78: END IF;
79:
80:
77:
78: END IF;
79:
80:
81: IF fnd_api.to_boolean(p_init_msg_list) THEN
82:
83: fnd_msg_pub.initialize;
84:
85: END IF;
96: AND role_id = l_role_id;
97:
98: IF l_check_count > 0 THEN
99:
100: x_return_status := fnd_api.g_ret_sts_error;
101:
102: fnd_message.set_name('JTF', 'JTF_RS_JOB_EXISTS');
103: fnd_msg_pub.add;
104:
101:
102: fnd_message.set_name('JTF', 'JTF_RS_JOB_EXISTS');
103: fnd_msg_pub.add;
104:
105: RAISE fnd_api.g_exc_unexpected_error;
106:
107: END IF;
108:
109:
151:
152:
153: IF c_jtf_rs_job_roles%NOTFOUND THEN
154:
155: x_return_status := fnd_api.g_ret_sts_unexp_error;
156:
157: fnd_message.set_name('JTF', 'JTF_RS_TABLE_HANDLER_ERROR');
158: fnd_msg_pub.add;
159:
162: CLOSE c_jtf_rs_job_roles;
163:
164: END IF;
165:
166: RAISE fnd_api.g_exc_unexpected_error;
167:
168: ELSE
169:
170: x_job_role_id := l_job_role_id;
180:
181: END IF;
182:
183:
184: IF fnd_api.to_boolean(p_commit) THEN
185:
186: COMMIT WORK;
187:
188: END IF;
192:
193: EXCEPTION
194:
195:
196: WHEN fnd_api.g_exc_unexpected_error THEN
197:
198: ROLLBACK TO create_resource_job_role_pvt;
199:
200: x_return_status := fnd_api.g_ret_sts_unexp_error;
196: WHEN fnd_api.g_exc_unexpected_error THEN
197:
198: ROLLBACK TO create_resource_job_role_pvt;
199:
200: x_return_status := fnd_api.g_ret_sts_unexp_error;
201:
202: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data);
203:
204:
205: WHEN OTHERS THEN
206:
207: ROLLBACK TO create_resource_job_role_pvt;
208:
209: x_return_status := fnd_api.g_ret_sts_unexp_error;
210:
211: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data);
212:
213:
240:
241:
242: SAVEPOINT delete_resource_job_role_pvt;
243:
244: x_return_status := fnd_api.g_ret_sts_success;
245:
246:
247: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN
248:
243:
244: x_return_status := fnd_api.g_ret_sts_success;
245:
246:
247: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN
248:
249: RAISE fnd_api.g_exc_unexpected_error;
250:
251: END IF;
245:
246:
247: IF NOT fnd_api.compatible_api_call(l_api_version, p_api_version, l_api_name, g_pkg_name) THEN
248:
249: RAISE fnd_api.g_exc_unexpected_error;
250:
251: END IF;
252:
253:
250:
251: END IF;
252:
253:
254: IF fnd_api.to_boolean(p_init_msg_list) THEN
255:
256: fnd_msg_pub.initialize;
257:
258: END IF;
272: EXCEPTION
273:
274: WHEN OTHERS THEN
275:
276: x_return_status := fnd_api.g_ret_sts_unexp_error;
277:
278: fnd_message.set_name('JTF', 'JTF_RS_ROW_LOCK_ERROR');
279: fnd_msg_pub.add;
280:
277:
278: fnd_message.set_name('JTF', 'JTF_RS_ROW_LOCK_ERROR');
279: fnd_msg_pub.add;
280:
281: RAISE fnd_api.g_exc_unexpected_error;
282:
283: END;
284:
285:
296: EXCEPTION
297:
298: WHEN NO_DATA_FOUND THEN
299:
300: x_return_status := fnd_api.g_ret_sts_unexp_error;
301:
302: fnd_message.set_name('JTF', 'JTF_RS_TABLE_HANDLER_ERROR');
303: fnd_msg_pub.add;
304:
301:
302: fnd_message.set_name('JTF', 'JTF_RS_TABLE_HANDLER_ERROR');
303: fnd_msg_pub.add;
304:
305: RAISE fnd_api.g_exc_unexpected_error;
306:
307: END;
308:
309:
306:
307: END;
308:
309:
310: IF fnd_api.to_boolean(p_commit) THEN
311:
312: COMMIT WORK;
313:
314: END IF;
318:
319: EXCEPTION
320:
321:
322: WHEN fnd_api.g_exc_unexpected_error THEN
323:
324: ROLLBACK TO delete_resource_job_role_pvt;
325:
326: x_return_status := fnd_api.g_ret_sts_unexp_error;
322: WHEN fnd_api.g_exc_unexpected_error THEN
323:
324: ROLLBACK TO delete_resource_job_role_pvt;
325:
326: x_return_status := fnd_api.g_ret_sts_unexp_error;
327:
328: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data);
329:
330:
331: WHEN OTHERS THEN
332:
333: ROLLBACK TO delete_resource_job_role_pvt;
334:
335: x_return_status := fnd_api.g_ret_sts_unexp_error;
336:
337: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data);
338:
339: