40: , x_data => l_data
41: , x_count => l_count
42: , x_return_code => l_return_code);
43:
44: IF (l_return_code = FND_API.G_RET_STS_ERROR) THEN
45: RAISE FND_API.G_EXC_ERROR;
46: ELSIF (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR) THEN
47: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
48: END IF;
41: , x_count => l_count
42: , x_return_code => l_return_code);
43:
44: IF (l_return_code = FND_API.G_RET_STS_ERROR) THEN
45: RAISE FND_API.G_EXC_ERROR;
46: ELSIF (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR) THEN
47: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
48: END IF;
49:
42: , x_return_code => l_return_code);
43:
44: IF (l_return_code = FND_API.G_RET_STS_ERROR) THEN
45: RAISE FND_API.G_EXC_ERROR;
46: ELSIF (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR) THEN
47: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
48: END IF;
49:
50: -- Standard call to check for call compatibility
43:
44: IF (l_return_code = FND_API.G_RET_STS_ERROR) THEN
45: RAISE FND_API.G_EXC_ERROR;
46: ELSIF (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR) THEN
47: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
48: END IF;
49:
50: -- Standard call to check for call compatibility
51: IF NOT fnd_api.compatible_api_call( l_api_version
47: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
48: END IF;
49:
50: -- Standard call to check for call compatibility
51: IF NOT fnd_api.compatible_api_call( l_api_version
52: , p_api_version
53: , l_api_name
54: , g_pkg_name) THEN
55: RAISE fnd_api.g_exc_unexpected_error;
51: IF NOT fnd_api.compatible_api_call( l_api_version
52: , p_api_version
53: , l_api_name
54: , g_pkg_name) THEN
55: RAISE fnd_api.g_exc_unexpected_error;
56: END IF;
57:
58: -- Initialize message list if p_init_msg_list is set to TRUE
59: IF fnd_api.to_boolean(p_init_msg_list) THEN
55: RAISE fnd_api.g_exc_unexpected_error;
56: END IF;
57:
58: -- Initialize message list if p_init_msg_list is set to TRUE
59: IF fnd_api.to_boolean(p_init_msg_list) THEN
60: fnd_msg_pub.initialize;
61: END IF;
62:
63: -- Initialize API return status to success
60: fnd_msg_pub.initialize;
61: END IF;
62:
63: -- Initialize API return status to success
64: x_return_status := fnd_api.g_ret_sts_success;
65:
66: --
67: -- Validate user and login session IDs
68: --
67: -- Validate user and login session IDs
68: --
69: IF (p_user_id IS NULL) THEN
70: IEC_SCHEDULE_MGMT_UTIL_PVT.add_null_parameter_msg(l_api_name_full, 'p_user_id');
71: RAISE fnd_api.g_exc_error;
72: ELSE
73: IEC_SCHEDULE_MGMT_UTIL_PVT.validate_who_info
74: ( p_api_name => l_api_name_full
75: , p_parameter_name_usr => 'p_user_id'
77: , p_user_id => p_user_id
78: , p_login_id => p_login_id
79: , x_return_status => l_return_status);
80:
81: IF (l_return_status <> fnd_api.g_ret_sts_success) THEN
82: RAISE fnd_api.g_exc_error;
83: END IF;
84: END IF;
85:
78: , p_login_id => p_login_id
79: , x_return_status => l_return_status);
80:
81: IF (l_return_status <> fnd_api.g_ret_sts_success) THEN
82: RAISE fnd_api.g_exc_error;
83: END IF;
84: END IF;
85:
86: ---------------------------------------------------------------------
92: , p_dest_schedule_id => l_dest_schedule_id
93: , p_commit => FALSE
94: , x_return_status => l_return_code);
95:
96: IF (l_return_code = FND_API.G_RET_STS_ERROR) THEN
97: RAISE FND_API.G_EXC_ERROR;
98: ELSIF (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR) THEN
99: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
100: END IF;
93: , p_commit => FALSE
94: , x_return_status => l_return_code);
95:
96: IF (l_return_code = FND_API.G_RET_STS_ERROR) THEN
97: RAISE FND_API.G_EXC_ERROR;
98: ELSIF (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR) THEN
99: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
100: END IF;
101:
94: , x_return_status => l_return_code);
95:
96: IF (l_return_code = FND_API.G_RET_STS_ERROR) THEN
97: RAISE FND_API.G_EXC_ERROR;
98: ELSIF (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR) THEN
99: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
100: END IF;
101:
102: ---------------------------------------------------------------------
95:
96: IF (l_return_code = FND_API.G_RET_STS_ERROR) THEN
97: RAISE FND_API.G_EXC_ERROR;
98: ELSIF (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR) THEN
99: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
100: END IF;
101:
102: ---------------------------------------------------------------------
103:
108: , x_data => l_data
109: , x_count => l_count
110: , x_return_code => l_return_code);
111:
112: IF (l_return_code = FND_API.G_RET_STS_ERROR) THEN
113: RAISE FND_API.G_EXC_ERROR;
114: ELSIF (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR) THEN
115: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
116: END IF;
109: , x_count => l_count
110: , x_return_code => l_return_code);
111:
112: IF (l_return_code = FND_API.G_RET_STS_ERROR) THEN
113: RAISE FND_API.G_EXC_ERROR;
114: ELSIF (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR) THEN
115: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
116: END IF;
117:
110: , x_return_code => l_return_code);
111:
112: IF (l_return_code = FND_API.G_RET_STS_ERROR) THEN
113: RAISE FND_API.G_EXC_ERROR;
114: ELSIF (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR) THEN
115: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
116: END IF;
117:
118: IF fnd_api.to_boolean(p_commit) THEN
111:
112: IF (l_return_code = FND_API.G_RET_STS_ERROR) THEN
113: RAISE FND_API.G_EXC_ERROR;
114: ELSIF (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR) THEN
115: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
116: END IF;
117:
118: IF fnd_api.to_boolean(p_commit) THEN
119: COMMIT WORK;
114: ELSIF (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR) THEN
115: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
116: END IF;
117:
118: IF fnd_api.to_boolean(p_commit) THEN
119: COMMIT WORK;
120: END IF;
121:
122: -- Standard call to get message count and if count is 1, get message info
123: fnd_msg_pub.count_and_get( p_count => x_msg_count
124: , p_data => x_msg_data );
125:
126: EXCEPTION
127: WHEN fnd_api.g_exc_error THEN
128: ROLLBACK TO copy_schedule_entries_pub;
129: x_return_status := fnd_api.g_ret_sts_error;
130: fnd_msg_pub.count_and_get( p_count => x_msg_count
131: , p_data => x_msg_data );
125:
126: EXCEPTION
127: WHEN fnd_api.g_exc_error THEN
128: ROLLBACK TO copy_schedule_entries_pub;
129: x_return_status := fnd_api.g_ret_sts_error;
130: fnd_msg_pub.count_and_get( p_count => x_msg_count
131: , p_data => x_msg_data );
132: WHEN fnd_api.g_exc_unexpected_error THEN
133: ROLLBACK TO copy_schedule_entries_pub;
128: ROLLBACK TO copy_schedule_entries_pub;
129: x_return_status := fnd_api.g_ret_sts_error;
130: fnd_msg_pub.count_and_get( p_count => x_msg_count
131: , p_data => x_msg_data );
132: WHEN fnd_api.g_exc_unexpected_error THEN
133: ROLLBACK TO copy_schedule_entries_pub;
134: x_return_status := fnd_api.g_ret_sts_unexp_error;
135: fnd_msg_pub.count_and_get( p_count => x_msg_count
136: , p_data => x_msg_data );
130: fnd_msg_pub.count_and_get( p_count => x_msg_count
131: , p_data => x_msg_data );
132: WHEN fnd_api.g_exc_unexpected_error THEN
133: ROLLBACK TO copy_schedule_entries_pub;
134: x_return_status := fnd_api.g_ret_sts_unexp_error;
135: fnd_msg_pub.count_and_get( p_count => x_msg_count
136: , p_data => x_msg_data );
137: WHEN OTHERS THEN
138: ROLLBACK TO copy_schedule_entries_pub;
135: fnd_msg_pub.count_and_get( p_count => x_msg_count
136: , p_data => x_msg_data );
137: WHEN OTHERS THEN
138: ROLLBACK TO copy_schedule_entries_pub;
139: x_return_status := fnd_api.g_ret_sts_unexp_error;
140: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
141: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
142: END IF;
143: fnd_msg_pub.count_and_get( p_count => x_msg_count
182: , x_data => l_data
183: , x_count => l_count
184: , x_return_code => l_return_code);
185:
186: IF (l_return_code = FND_API.G_RET_STS_ERROR) THEN
187: RAISE FND_API.G_EXC_ERROR;
188: ELSIF (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR) THEN
189: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
190: END IF;
183: , x_count => l_count
184: , x_return_code => l_return_code);
185:
186: IF (l_return_code = FND_API.G_RET_STS_ERROR) THEN
187: RAISE FND_API.G_EXC_ERROR;
188: ELSIF (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR) THEN
189: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
190: END IF;
191:
184: , x_return_code => l_return_code);
185:
186: IF (l_return_code = FND_API.G_RET_STS_ERROR) THEN
187: RAISE FND_API.G_EXC_ERROR;
188: ELSIF (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR) THEN
189: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
190: END IF;
191:
192: -- Standard call to check for call compatibility
185:
186: IF (l_return_code = FND_API.G_RET_STS_ERROR) THEN
187: RAISE FND_API.G_EXC_ERROR;
188: ELSIF (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR) THEN
189: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
190: END IF;
191:
192: -- Standard call to check for call compatibility
193: IF NOT fnd_api.compatible_api_call( l_api_version
189: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
190: END IF;
191:
192: -- Standard call to check for call compatibility
193: IF NOT fnd_api.compatible_api_call( l_api_version
194: , p_api_version
195: , l_api_name
196: , g_pkg_name) THEN
197: RAISE fnd_api.g_exc_unexpected_error;
193: IF NOT fnd_api.compatible_api_call( l_api_version
194: , p_api_version
195: , l_api_name
196: , g_pkg_name) THEN
197: RAISE fnd_api.g_exc_unexpected_error;
198: END IF;
199:
200: -- Initialize message list if p_init_msg_list is set to TRUE
201: IF fnd_api.to_boolean(p_init_msg_list) THEN
197: RAISE fnd_api.g_exc_unexpected_error;
198: END IF;
199:
200: -- Initialize message list if p_init_msg_list is set to TRUE
201: IF fnd_api.to_boolean(p_init_msg_list) THEN
202: fnd_msg_pub.initialize;
203: END IF;
204:
205: -- Initialize API return status to success
202: fnd_msg_pub.initialize;
203: END IF;
204:
205: -- Initialize API return status to success
206: x_return_status := fnd_api.g_ret_sts_success;
207:
208: --
209: -- Validate user and login session IDs
210: --
209: -- Validate user and login session IDs
210: --
211: IF (p_user_id IS NULL) THEN
212: IEC_SCHEDULE_MGMT_UTIL_PVT.add_null_parameter_msg(l_api_name_full, 'p_user_id');
213: RAISE fnd_api.g_exc_error;
214: ELSE
215: IEC_SCHEDULE_MGMT_UTIL_PVT.validate_who_info
216: ( p_api_name => l_api_name_full
217: , p_parameter_name_usr => 'p_user_id'
219: , p_user_id => p_user_id
220: , p_login_id => p_login_id
221: , x_return_status => l_return_status);
222:
223: IF (l_return_status <> fnd_api.g_ret_sts_success) THEN
224: RAISE fnd_api.g_exc_error;
225: END IF;
226: END IF;
227:
220: , p_login_id => p_login_id
221: , x_return_status => l_return_status);
222:
223: IF (l_return_status <> fnd_api.g_ret_sts_success) THEN
224: RAISE fnd_api.g_exc_error;
225: END IF;
226: END IF;
227:
228: ---------------------------------------------------------------------
234: , p_dest_schedule_id => l_dest_schedule_id
235: , p_commit => FALSE
236: , x_return_status => l_return_code);
237:
238: IF (l_return_code = FND_API.G_RET_STS_ERROR) THEN
239: RAISE FND_API.G_EXC_ERROR;
240: ELSIF (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR) THEN
241: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
242: END IF;
235: , p_commit => FALSE
236: , x_return_status => l_return_code);
237:
238: IF (l_return_code = FND_API.G_RET_STS_ERROR) THEN
239: RAISE FND_API.G_EXC_ERROR;
240: ELSIF (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR) THEN
241: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
242: END IF;
243:
236: , x_return_status => l_return_code);
237:
238: IF (l_return_code = FND_API.G_RET_STS_ERROR) THEN
239: RAISE FND_API.G_EXC_ERROR;
240: ELSIF (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR) THEN
241: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
242: END IF;
243:
244: ---------------------------------------------------------------------
237:
238: IF (l_return_code = FND_API.G_RET_STS_ERROR) THEN
239: RAISE FND_API.G_EXC_ERROR;
240: ELSIF (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR) THEN
241: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
242: END IF;
243:
244: ---------------------------------------------------------------------
245:
250: , x_data => l_data
251: , x_count => l_count
252: , x_return_code => l_return_code);
253:
254: IF (l_return_code = FND_API.G_RET_STS_ERROR) THEN
255: RAISE FND_API.G_EXC_ERROR;
256: ELSIF (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR) THEN
257: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
258: END IF;
251: , x_count => l_count
252: , x_return_code => l_return_code);
253:
254: IF (l_return_code = FND_API.G_RET_STS_ERROR) THEN
255: RAISE FND_API.G_EXC_ERROR;
256: ELSIF (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR) THEN
257: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
258: END IF;
259:
252: , x_return_code => l_return_code);
253:
254: IF (l_return_code = FND_API.G_RET_STS_ERROR) THEN
255: RAISE FND_API.G_EXC_ERROR;
256: ELSIF (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR) THEN
257: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
258: END IF;
259:
260: IF fnd_api.to_boolean(p_commit) THEN
253:
254: IF (l_return_code = FND_API.G_RET_STS_ERROR) THEN
255: RAISE FND_API.G_EXC_ERROR;
256: ELSIF (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR) THEN
257: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
258: END IF;
259:
260: IF fnd_api.to_boolean(p_commit) THEN
261: COMMIT WORK;
256: ELSIF (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR) THEN
257: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
258: END IF;
259:
260: IF fnd_api.to_boolean(p_commit) THEN
261: COMMIT WORK;
262: END IF;
263:
264: -- Standard call to get message count and if count is 1, get message info
265: fnd_msg_pub.count_and_get( p_count => x_msg_count
266: , p_data => x_msg_data );
267:
268: EXCEPTION
269: WHEN fnd_api.g_exc_error THEN
270: ROLLBACK TO move_schedule_entries_pub;
271: x_return_status := fnd_api.g_ret_sts_error;
272: fnd_msg_pub.count_and_get( p_count => x_msg_count
273: , p_data => x_msg_data );
267:
268: EXCEPTION
269: WHEN fnd_api.g_exc_error THEN
270: ROLLBACK TO move_schedule_entries_pub;
271: x_return_status := fnd_api.g_ret_sts_error;
272: fnd_msg_pub.count_and_get( p_count => x_msg_count
273: , p_data => x_msg_data );
274: WHEN fnd_api.g_exc_unexpected_error THEN
275: ROLLBACK TO move_schedule_entries_pub;
270: ROLLBACK TO move_schedule_entries_pub;
271: x_return_status := fnd_api.g_ret_sts_error;
272: fnd_msg_pub.count_and_get( p_count => x_msg_count
273: , p_data => x_msg_data );
274: WHEN fnd_api.g_exc_unexpected_error THEN
275: ROLLBACK TO move_schedule_entries_pub;
276: x_return_status := fnd_api.g_ret_sts_unexp_error;
277: fnd_msg_pub.count_and_get( p_count => x_msg_count
278: , p_data => x_msg_data );
272: fnd_msg_pub.count_and_get( p_count => x_msg_count
273: , p_data => x_msg_data );
274: WHEN fnd_api.g_exc_unexpected_error THEN
275: ROLLBACK TO move_schedule_entries_pub;
276: x_return_status := fnd_api.g_ret_sts_unexp_error;
277: fnd_msg_pub.count_and_get( p_count => x_msg_count
278: , p_data => x_msg_data );
279: WHEN OTHERS THEN
280: ROLLBACK TO move_schedule_entries_pub;
277: fnd_msg_pub.count_and_get( p_count => x_msg_count
278: , p_data => x_msg_data );
279: WHEN OTHERS THEN
280: ROLLBACK TO move_schedule_entries_pub;
281: x_return_status := fnd_api.g_ret_sts_unexp_error;
282: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
283: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
284: END IF;
285: fnd_msg_pub.count_and_get( p_count => x_msg_count
321: , x_data => l_data
322: , x_count => l_count
323: , x_return_code => l_return_code);
324:
325: IF (l_return_code = FND_API.G_RET_STS_ERROR) THEN
326: RAISE FND_API.G_EXC_ERROR;
327: ELSIF (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR) THEN
328: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
329: END IF;
322: , x_count => l_count
323: , x_return_code => l_return_code);
324:
325: IF (l_return_code = FND_API.G_RET_STS_ERROR) THEN
326: RAISE FND_API.G_EXC_ERROR;
327: ELSIF (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR) THEN
328: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
329: END IF;
330:
323: , x_return_code => l_return_code);
324:
325: IF (l_return_code = FND_API.G_RET_STS_ERROR) THEN
326: RAISE FND_API.G_EXC_ERROR;
327: ELSIF (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR) THEN
328: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
329: END IF;
330:
331: -- Standard call to check for call compatibility
324:
325: IF (l_return_code = FND_API.G_RET_STS_ERROR) THEN
326: RAISE FND_API.G_EXC_ERROR;
327: ELSIF (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR) THEN
328: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
329: END IF;
330:
331: -- Standard call to check for call compatibility
332: IF NOT fnd_api.compatible_api_call( l_api_version
328: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
329: END IF;
330:
331: -- Standard call to check for call compatibility
332: IF NOT fnd_api.compatible_api_call( l_api_version
333: , p_api_version
334: , l_api_name
335: , g_pkg_name) THEN
336: RAISE fnd_api.g_exc_unexpected_error;
332: IF NOT fnd_api.compatible_api_call( l_api_version
333: , p_api_version
334: , l_api_name
335: , g_pkg_name) THEN
336: RAISE fnd_api.g_exc_unexpected_error;
337: END IF;
338:
339: -- Initialize message list if p_init_msg_list is set to TRUE
340: IF fnd_api.to_boolean(p_init_msg_list) THEN
336: RAISE fnd_api.g_exc_unexpected_error;
337: END IF;
338:
339: -- Initialize message list if p_init_msg_list is set to TRUE
340: IF fnd_api.to_boolean(p_init_msg_list) THEN
341: fnd_msg_pub.initialize;
342: END IF;
343:
344: -- Initialize API return status to success
341: fnd_msg_pub.initialize;
342: END IF;
343:
344: -- Initialize API return status to success
345: x_return_status := fnd_api.g_ret_sts_success;
346:
347: --
348: -- Validate user and login session IDs
349: --
348: -- Validate user and login session IDs
349: --
350: IF (p_user_id IS NULL) THEN
351: IEC_SCHEDULE_MGMT_UTIL_PVT.add_null_parameter_msg(l_api_name_full, 'p_user_id');
352: RAISE fnd_api.g_exc_error;
353: ELSE
354: IEC_SCHEDULE_MGMT_UTIL_PVT.validate_who_info
355: ( p_api_name => l_api_name_full
356: , p_parameter_name_usr => 'p_user_id'
358: , p_user_id => p_user_id
359: , p_login_id => p_login_id
360: , x_return_status => l_return_status);
361:
362: IF (l_return_status <> fnd_api.g_ret_sts_success) THEN
363: RAISE fnd_api.g_exc_error;
364: END IF;
365: END IF;
366:
359: , p_login_id => p_login_id
360: , x_return_status => l_return_status);
361:
362: IF (l_return_status <> fnd_api.g_ret_sts_success) THEN
363: RAISE fnd_api.g_exc_error;
364: END IF;
365: END IF;
366:
367: ---------------------------------------------------------------------
372: ( p_schedule_id => l_schedule_id
373: , p_commit => FALSE
374: , x_return_status => l_return_code);
375:
376: IF (l_return_code = FND_API.G_RET_STS_ERROR) THEN
377: RAISE FND_API.G_EXC_ERROR;
378: ELSIF (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR) THEN
379: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
380: END IF;
373: , p_commit => FALSE
374: , x_return_status => l_return_code);
375:
376: IF (l_return_code = FND_API.G_RET_STS_ERROR) THEN
377: RAISE FND_API.G_EXC_ERROR;
378: ELSIF (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR) THEN
379: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
380: END IF;
381:
374: , x_return_status => l_return_code);
375:
376: IF (l_return_code = FND_API.G_RET_STS_ERROR) THEN
377: RAISE FND_API.G_EXC_ERROR;
378: ELSIF (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR) THEN
379: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
380: END IF;
381:
382: ---------------------------------------------------------------------
375:
376: IF (l_return_code = FND_API.G_RET_STS_ERROR) THEN
377: RAISE FND_API.G_EXC_ERROR;
378: ELSIF (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR) THEN
379: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
380: END IF;
381:
382: ---------------------------------------------------------------------
383:
387: , x_data => l_data
388: , x_count => l_count
389: , x_return_code => l_return_code);
390:
391: IF (l_return_code = FND_API.G_RET_STS_ERROR) THEN
392: RAISE FND_API.G_EXC_ERROR;
393: ELSIF (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR) THEN
394: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
395: END IF;
388: , x_count => l_count
389: , x_return_code => l_return_code);
390:
391: IF (l_return_code = FND_API.G_RET_STS_ERROR) THEN
392: RAISE FND_API.G_EXC_ERROR;
393: ELSIF (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR) THEN
394: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
395: END IF;
396:
389: , x_return_code => l_return_code);
390:
391: IF (l_return_code = FND_API.G_RET_STS_ERROR) THEN
392: RAISE FND_API.G_EXC_ERROR;
393: ELSIF (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR) THEN
394: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
395: END IF;
396:
397: IF fnd_api.to_boolean(p_commit) THEN
390:
391: IF (l_return_code = FND_API.G_RET_STS_ERROR) THEN
392: RAISE FND_API.G_EXC_ERROR;
393: ELSIF (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR) THEN
394: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
395: END IF;
396:
397: IF fnd_api.to_boolean(p_commit) THEN
398: COMMIT WORK;
393: ELSIF (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR) THEN
394: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
395: END IF;
396:
397: IF fnd_api.to_boolean(p_commit) THEN
398: COMMIT WORK;
399: END IF;
400:
401: -- Standard call to get message count and if count is 1, get message info
402: fnd_msg_pub.count_and_get( p_count => x_msg_count
403: , p_data => x_msg_data );
404:
405: EXCEPTION
406: WHEN fnd_api.g_exc_error THEN
407: ROLLBACK TO purge_schedule_entries_pub;
408: x_return_status := fnd_api.g_ret_sts_error;
409: fnd_msg_pub.count_and_get( p_count => x_msg_count
410: , p_data => x_msg_data );
404:
405: EXCEPTION
406: WHEN fnd_api.g_exc_error THEN
407: ROLLBACK TO purge_schedule_entries_pub;
408: x_return_status := fnd_api.g_ret_sts_error;
409: fnd_msg_pub.count_and_get( p_count => x_msg_count
410: , p_data => x_msg_data );
411: WHEN fnd_api.g_exc_unexpected_error THEN
412: ROLLBACK TO purge_schedule_entries_pub;
407: ROLLBACK TO purge_schedule_entries_pub;
408: x_return_status := fnd_api.g_ret_sts_error;
409: fnd_msg_pub.count_and_get( p_count => x_msg_count
410: , p_data => x_msg_data );
411: WHEN fnd_api.g_exc_unexpected_error THEN
412: ROLLBACK TO purge_schedule_entries_pub;
413: x_return_status := fnd_api.g_ret_sts_unexp_error;
414: fnd_msg_pub.count_and_get( p_count => x_msg_count
415: , p_data => x_msg_data );
409: fnd_msg_pub.count_and_get( p_count => x_msg_count
410: , p_data => x_msg_data );
411: WHEN fnd_api.g_exc_unexpected_error THEN
412: ROLLBACK TO purge_schedule_entries_pub;
413: x_return_status := fnd_api.g_ret_sts_unexp_error;
414: fnd_msg_pub.count_and_get( p_count => x_msg_count
415: , p_data => x_msg_data );
416: WHEN OTHERS THEN
417: ROLLBACK TO purge_schedule_entries_pub;
414: fnd_msg_pub.count_and_get( p_count => x_msg_count
415: , p_data => x_msg_data );
416: WHEN OTHERS THEN
417: ROLLBACK TO purge_schedule_entries_pub;
418: x_return_status := fnd_api.g_ret_sts_unexp_error;
419: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
420: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
421: END IF;
422: fnd_msg_pub.count_and_get( p_count => x_msg_count
458: , x_data => l_data
459: , x_count => l_count
460: , x_return_code => l_return_code);
461:
462: IF (l_return_code = FND_API.G_RET_STS_ERROR) THEN
463: RAISE FND_API.G_EXC_ERROR;
464: ELSIF (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR) THEN
465: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
466: END IF;
459: , x_count => l_count
460: , x_return_code => l_return_code);
461:
462: IF (l_return_code = FND_API.G_RET_STS_ERROR) THEN
463: RAISE FND_API.G_EXC_ERROR;
464: ELSIF (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR) THEN
465: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
466: END IF;
467:
460: , x_return_code => l_return_code);
461:
462: IF (l_return_code = FND_API.G_RET_STS_ERROR) THEN
463: RAISE FND_API.G_EXC_ERROR;
464: ELSIF (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR) THEN
465: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
466: END IF;
467:
468: -- Standard call to check for call compatibility
461:
462: IF (l_return_code = FND_API.G_RET_STS_ERROR) THEN
463: RAISE FND_API.G_EXC_ERROR;
464: ELSIF (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR) THEN
465: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
466: END IF;
467:
468: -- Standard call to check for call compatibility
469: IF NOT fnd_api.compatible_api_call( l_api_version
465: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
466: END IF;
467:
468: -- Standard call to check for call compatibility
469: IF NOT fnd_api.compatible_api_call( l_api_version
470: , p_api_version
471: , l_api_name
472: , g_pkg_name) THEN
473: RAISE fnd_api.g_exc_unexpected_error;
469: IF NOT fnd_api.compatible_api_call( l_api_version
470: , p_api_version
471: , l_api_name
472: , g_pkg_name) THEN
473: RAISE fnd_api.g_exc_unexpected_error;
474: END IF;
475:
476: -- Initialize message list if p_init_msg_list is set to TRUE
477: IF fnd_api.to_boolean(p_init_msg_list) THEN
473: RAISE fnd_api.g_exc_unexpected_error;
474: END IF;
475:
476: -- Initialize message list if p_init_msg_list is set to TRUE
477: IF fnd_api.to_boolean(p_init_msg_list) THEN
478: fnd_msg_pub.initialize;
479: END IF;
480:
481: -- Initialize API return status to success
478: fnd_msg_pub.initialize;
479: END IF;
480:
481: -- Initialize API return status to success
482: x_return_status := fnd_api.g_ret_sts_success;
483:
484: --
485: -- Validate user and login session IDs
486: --
485: -- Validate user and login session IDs
486: --
487: IF (p_user_id IS NULL) THEN
488: IEC_SCHEDULE_MGMT_UTIL_PVT.add_null_parameter_msg(l_api_name_full, 'p_user_id');
489: RAISE fnd_api.g_exc_error;
490: ELSE
491: IEC_SCHEDULE_MGMT_UTIL_PVT.validate_who_info
492: ( p_api_name => l_api_name_full
493: , p_parameter_name_usr => 'p_user_id'
495: , p_user_id => p_user_id
496: , p_login_id => p_login_id
497: , x_return_status => l_return_status);
498:
499: IF (l_return_status <> fnd_api.g_ret_sts_success) THEN
500: RAISE fnd_api.g_exc_error;
501: END IF;
502: END IF;
503:
496: , p_login_id => p_login_id
497: , x_return_status => l_return_status);
498:
499: IF (l_return_status <> fnd_api.g_ret_sts_success) THEN
500: RAISE fnd_api.g_exc_error;
501: END IF;
502: END IF;
503:
504: ---------------------------------------------------------------------
509: ( p_schedule_id => l_schedule_id
510: , p_commit => FALSE
511: , x_return_status => l_return_code);
512:
513: IF (l_return_code = FND_API.G_RET_STS_ERROR) THEN
514: RAISE FND_API.G_EXC_ERROR;
515: ELSIF (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR) THEN
516: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
517: END IF;
510: , p_commit => FALSE
511: , x_return_status => l_return_code);
512:
513: IF (l_return_code = FND_API.G_RET_STS_ERROR) THEN
514: RAISE FND_API.G_EXC_ERROR;
515: ELSIF (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR) THEN
516: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
517: END IF;
518:
511: , x_return_status => l_return_code);
512:
513: IF (l_return_code = FND_API.G_RET_STS_ERROR) THEN
514: RAISE FND_API.G_EXC_ERROR;
515: ELSIF (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR) THEN
516: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
517: END IF;
518:
519: ---------------------------------------------------------------------
512:
513: IF (l_return_code = FND_API.G_RET_STS_ERROR) THEN
514: RAISE FND_API.G_EXC_ERROR;
515: ELSIF (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR) THEN
516: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
517: END IF;
518:
519: ---------------------------------------------------------------------
520:
524: , x_data => l_data
525: , x_count => l_count
526: , x_return_code => l_return_code);
527:
528: IF (l_return_code = FND_API.G_RET_STS_ERROR) THEN
529: RAISE FND_API.G_EXC_ERROR;
530: ELSIF (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR) THEN
531: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
532: END IF;
525: , x_count => l_count
526: , x_return_code => l_return_code);
527:
528: IF (l_return_code = FND_API.G_RET_STS_ERROR) THEN
529: RAISE FND_API.G_EXC_ERROR;
530: ELSIF (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR) THEN
531: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
532: END IF;
533:
526: , x_return_code => l_return_code);
527:
528: IF (l_return_code = FND_API.G_RET_STS_ERROR) THEN
529: RAISE FND_API.G_EXC_ERROR;
530: ELSIF (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR) THEN
531: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
532: END IF;
533:
534: IF fnd_api.to_boolean(p_commit) THEN
527:
528: IF (l_return_code = FND_API.G_RET_STS_ERROR) THEN
529: RAISE FND_API.G_EXC_ERROR;
530: ELSIF (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR) THEN
531: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
532: END IF;
533:
534: IF fnd_api.to_boolean(p_commit) THEN
535: COMMIT WORK;
530: ELSIF (l_return_code = FND_API.G_RET_STS_UNEXP_ERROR) THEN
531: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
532: END IF;
533:
534: IF fnd_api.to_boolean(p_commit) THEN
535: COMMIT WORK;
536: END IF;
537:
538: -- Standard call to get message count and if count is 1, get message info
539: fnd_msg_pub.count_and_get( p_count => x_msg_count
540: , p_data => x_msg_data );
541:
542: EXCEPTION
543: WHEN fnd_api.g_exc_error THEN
544: ROLLBACK TO stop_schedule_pub;
545: x_return_status := fnd_api.g_ret_sts_error;
546: fnd_msg_pub.count_and_get( p_count => x_msg_count
547: , p_data => x_msg_data );
541:
542: EXCEPTION
543: WHEN fnd_api.g_exc_error THEN
544: ROLLBACK TO stop_schedule_pub;
545: x_return_status := fnd_api.g_ret_sts_error;
546: fnd_msg_pub.count_and_get( p_count => x_msg_count
547: , p_data => x_msg_data );
548: WHEN fnd_api.g_exc_unexpected_error THEN
549: ROLLBACK TO stop_schedule_pub;
544: ROLLBACK TO stop_schedule_pub;
545: x_return_status := fnd_api.g_ret_sts_error;
546: fnd_msg_pub.count_and_get( p_count => x_msg_count
547: , p_data => x_msg_data );
548: WHEN fnd_api.g_exc_unexpected_error THEN
549: ROLLBACK TO stop_schedule_pub;
550: x_return_status := fnd_api.g_ret_sts_unexp_error;
551: fnd_msg_pub.count_and_get( p_count => x_msg_count
552: , p_data => x_msg_data );
546: fnd_msg_pub.count_and_get( p_count => x_msg_count
547: , p_data => x_msg_data );
548: WHEN fnd_api.g_exc_unexpected_error THEN
549: ROLLBACK TO stop_schedule_pub;
550: x_return_status := fnd_api.g_ret_sts_unexp_error;
551: fnd_msg_pub.count_and_get( p_count => x_msg_count
552: , p_data => x_msg_data );
553: WHEN OTHERS THEN
554: ROLLBACK TO stop_schedule_pub;
551: fnd_msg_pub.count_and_get( p_count => x_msg_count
552: , p_data => x_msg_data );
553: WHEN OTHERS THEN
554: ROLLBACK TO stop_schedule_pub;
555: x_return_status := fnd_api.g_ret_sts_unexp_error;
556: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
557: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
558: END IF;
559: fnd_msg_pub.count_and_get( p_count => x_msg_count