6:
7:
8: Procedure assign_work(
9: p_api_version in NUMBER,
10: p_init_msg_list in VARCHAR2 := FND_API.G_FALSE,
11: p_commit in VARCHAR2 := FND_API.G_FALSE,
12: p_validation_level in NUMBER := FND_API.G_VALID_LEVEL_FULL,
13: x_return_status out NOCOPY VARCHAR2,
14: x_msg_count out NOCOPY NUMBER,
7:
8: Procedure assign_work(
9: p_api_version in NUMBER,
10: p_init_msg_list in VARCHAR2 := FND_API.G_FALSE,
11: p_commit in VARCHAR2 := FND_API.G_FALSE,
12: p_validation_level in NUMBER := FND_API.G_VALID_LEVEL_FULL,
13: x_return_status out NOCOPY VARCHAR2,
14: x_msg_count out NOCOPY NUMBER,
15: x_msg_data out NOCOPY VARCHAR2,
8: Procedure assign_work(
9: p_api_version in NUMBER,
10: p_init_msg_list in VARCHAR2 := FND_API.G_FALSE,
11: p_commit in VARCHAR2 := FND_API.G_FALSE,
12: p_validation_level in NUMBER := FND_API.G_VALID_LEVEL_FULL,
13: x_return_status out NOCOPY VARCHAR2,
14: x_msg_count out NOCOPY NUMBER,
15: x_msg_data out NOCOPY VARCHAR2,
16: p_wip_entity_id in NUMBER,
33: -- Standard Start of API savepoint
34: SAVEPOINT eam_assign_work;
35:
36: -- Standard call to check for call compatibility.
37: IF NOT fnd_api.compatible_api_call
38: (l_api_version
39: ,p_api_version
40: ,l_api_name
41: ,g_pkg_name) THEN
38: (l_api_version
39: ,p_api_version
40: ,l_api_name
41: ,g_pkg_name) THEN
42: RAISE fnd_api.g_exc_unexpected_error;
43: END IF;
44:
45: -- Initialize message list if p_init_msg_list is set to TRUE.
46: IF fnd_api.to_boolean(p_init_msg_list) THEN
42: RAISE fnd_api.g_exc_unexpected_error;
43: END IF;
44:
45: -- Initialize message list if p_init_msg_list is set to TRUE.
46: IF fnd_api.to_boolean(p_init_msg_list) THEN
47: fnd_msg_pub.initialize;
48: END IF;
49:
50: -- Initialize API return status to success
47: fnd_msg_pub.initialize;
48: END IF;
49:
50: -- Initialize API return status to success
51: x_return_status := fnd_api.g_ret_sts_success;
52:
53: -- Standard check of p_commit.
54: select organization_id , status_type
55: into l_organization_id , l_status_type
155: end if;
156: End if;
157:
158:
159: IF fnd_api.to_boolean(p_commit) THEN
160: COMMIT WORK;
161: END IF;
162:
163: -- Standard call to get message count and if count is 1, get message info.
161: END IF;
162:
163: -- Standard call to get message count and if count is 1, get message info.
164: fnd_msg_pub.count_and_get(
165: p_encoded => fnd_api.g_false
166: ,p_count => x_msg_count
167: ,p_data => x_msg_data);
168:
169: EXCEPTION
168:
169: EXCEPTION
170: WHEN eam_mng_work_req_error THEN
171: ROLLBACK TO eam_assign_work;
172: x_return_status := fnd_api.g_ret_sts_error;
173: eam_execution_jsp.add_message(p_app_short_name => 'EAM',
174: p_msg_name => 'EAM_MNG_WORK_REQ_ERROR');
175:
176: WHEN eam_mng_req_assgn_error THEN
174: p_msg_name => 'EAM_MNG_WORK_REQ_ERROR');
175:
176: WHEN eam_mng_req_assgn_error THEN
177: ROLLBACK TO eam_assign_work;
178: x_return_status := fnd_api.g_ret_sts_error;
179: eam_execution_jsp.add_message(p_app_short_name => 'EAM',
180: p_msg_name => 'EAM_MNG_REQ_ASSGN_ERROR');
181: -- fnd_msg_pub.count_and_get(
182: -- p_encoded => fnd_api.g_false
178: x_return_status := fnd_api.g_ret_sts_error;
179: eam_execution_jsp.add_message(p_app_short_name => 'EAM',
180: p_msg_name => 'EAM_MNG_REQ_ASSGN_ERROR');
181: -- fnd_msg_pub.count_and_get(
182: -- p_encoded => fnd_api.g_false
183: -- ,p_count => x_msg_count
184: -- ,p_data => x_msg_data);
185:
186:
183: -- ,p_count => x_msg_count
184: -- ,p_data => x_msg_data);
185:
186:
187: WHEN fnd_api.g_exc_error THEN
188: ROLLBACK TO eam_assign_work;
189: x_return_status := fnd_api.g_ret_sts_error;
190: fnd_msg_pub.count_and_get(
191: p_encoded => fnd_api.g_false
185:
186:
187: WHEN fnd_api.g_exc_error THEN
188: ROLLBACK TO eam_assign_work;
189: x_return_status := fnd_api.g_ret_sts_error;
190: fnd_msg_pub.count_and_get(
191: p_encoded => fnd_api.g_false
192: ,p_count => x_msg_count
193: ,p_data => x_msg_data);
187: WHEN fnd_api.g_exc_error THEN
188: ROLLBACK TO eam_assign_work;
189: x_return_status := fnd_api.g_ret_sts_error;
190: fnd_msg_pub.count_and_get(
191: p_encoded => fnd_api.g_false
192: ,p_count => x_msg_count
193: ,p_data => x_msg_data);
194:
195: WHEN fnd_api.g_exc_unexpected_error THEN
191: p_encoded => fnd_api.g_false
192: ,p_count => x_msg_count
193: ,p_data => x_msg_data);
194:
195: WHEN fnd_api.g_exc_unexpected_error THEN
196: ROLLBACK TO eam_assign_work;
197: x_return_status := fnd_api.g_ret_sts_unexp_error;
198: fnd_msg_pub.count_and_get(
199: p_encoded => fnd_api.g_false
193: ,p_data => x_msg_data);
194:
195: WHEN fnd_api.g_exc_unexpected_error THEN
196: ROLLBACK TO eam_assign_work;
197: x_return_status := fnd_api.g_ret_sts_unexp_error;
198: fnd_msg_pub.count_and_get(
199: p_encoded => fnd_api.g_false
200: ,p_count => x_msg_count
201: ,p_data => x_msg_data);
195: WHEN fnd_api.g_exc_unexpected_error THEN
196: ROLLBACK TO eam_assign_work;
197: x_return_status := fnd_api.g_ret_sts_unexp_error;
198: fnd_msg_pub.count_and_get(
199: p_encoded => fnd_api.g_false
200: ,p_count => x_msg_count
201: ,p_data => x_msg_data);
202:
203: WHEN OTHERS THEN
201: ,p_data => x_msg_data);
202:
203: WHEN OTHERS THEN
204: ROLLBACK TO eam_assign_work;
205: x_return_status := fnd_api.g_ret_sts_unexp_error;
206: IF fnd_msg_pub.check_msg_level(
207: fnd_msg_pub.g_msg_lvl_unexp_error) THEN
208: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
209: END IF;
207: fnd_msg_pub.g_msg_lvl_unexp_error) THEN
208: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
209: END IF;
210: fnd_msg_pub.count_and_get(
211: p_encoded => fnd_api.g_false
212: ,p_count => x_msg_count
213: ,p_data => x_msg_data);
214: end assign_work;
215:
215:
216:
217: procedure delete_assignment(
218: p_api_version in NUMBER,
219: p_init_msg_list in VARCHAR2 := FND_API.G_FALSE,
220: p_commit in VARCHAR2 := FND_API.G_FALSE,
221: p_validation_level in NUMBER := FND_API.G_VALID_LEVEL_FULL,
222: x_return_status out NOCOPY VARCHAR2,
223: x_msg_count out NOCOPY NUMBER,
216:
217: procedure delete_assignment(
218: p_api_version in NUMBER,
219: p_init_msg_list in VARCHAR2 := FND_API.G_FALSE,
220: p_commit in VARCHAR2 := FND_API.G_FALSE,
221: p_validation_level in NUMBER := FND_API.G_VALID_LEVEL_FULL,
222: x_return_status out NOCOPY VARCHAR2,
223: x_msg_count out NOCOPY NUMBER,
224: x_msg_data out NOCOPY VARCHAR2,
217: procedure delete_assignment(
218: p_api_version in NUMBER,
219: p_init_msg_list in VARCHAR2 := FND_API.G_FALSE,
220: p_commit in VARCHAR2 := FND_API.G_FALSE,
221: p_validation_level in NUMBER := FND_API.G_VALID_LEVEL_FULL,
222: x_return_status out NOCOPY VARCHAR2,
223: x_msg_count out NOCOPY NUMBER,
224: x_msg_data out NOCOPY VARCHAR2,
225: p_wip_entity_id in NUMBER,
237: -- Standard Start of API savepoint
238: SAVEPOINT eam_delete_assignment;
239:
240: -- Standard call to check for call compatibility.
241: IF NOT fnd_api.compatible_api_call(
242: l_api_version
243: ,p_api_version
244: ,l_api_name
245: ,g_pkg_name) THEN
242: l_api_version
243: ,p_api_version
244: ,l_api_name
245: ,g_pkg_name) THEN
246: RAISE fnd_api.g_exc_unexpected_error;
247: END IF;
248:
249: -- Initialize message list if p_init_msg_list is set to TRUE.
250: IF fnd_api.to_boolean(p_init_msg_list) THEN
246: RAISE fnd_api.g_exc_unexpected_error;
247: END IF;
248:
249: -- Initialize message list if p_init_msg_list is set to TRUE.
250: IF fnd_api.to_boolean(p_init_msg_list) THEN
251: fnd_msg_pub.initialize;
252: END IF;
253:
254: -- Initialize API return status to success
251: fnd_msg_pub.initialize;
252: END IF;
253:
254: -- Initialize API return status to success
255: x_return_status := fnd_api.g_ret_sts_success;
256:
257: -- Standard check of p_commit.
258: select organization_id
259: into l_organization_id
289: exception
290: WHEN OTHERS THEN
291:
292: eam_execution_jsp.add_message(p_app_short_name => 'EAM', p_msg_name => 'EAM_EZWO_BAD_SERVICE_REQUEST');
293: x_return_status := FND_API.G_RET_STS_ERROR;
294: end;
295: end if;
296:
297:
294: end;
295: end if;
296:
297:
298: IF fnd_api.to_boolean(p_commit) THEN
299: COMMIT WORK;
300: END IF;
301:
302: -- Standard call to get message count and if count is 1, get message info.
300: END IF;
301:
302: -- Standard call to get message count and if count is 1, get message info.
303: fnd_msg_pub.count_and_get(
304: p_encoded => fnd_api.g_false
305: ,p_count => x_msg_count
306: ,p_data => x_msg_data);
307: EXCEPTION
308:
305: ,p_count => x_msg_count
306: ,p_data => x_msg_data);
307: EXCEPTION
308:
309: WHEN fnd_api.g_exc_error THEN
310:
311: ROLLBACK TO eam_delete_assignment;
312: x_return_status := fnd_api.g_ret_sts_error;
313: fnd_msg_pub.count_and_get(
308:
309: WHEN fnd_api.g_exc_error THEN
310:
311: ROLLBACK TO eam_delete_assignment;
312: x_return_status := fnd_api.g_ret_sts_error;
313: fnd_msg_pub.count_and_get(
314: p_encoded => fnd_api.g_false
315: ,p_count => x_msg_count
316: ,p_data => x_msg_data);
310:
311: ROLLBACK TO eam_delete_assignment;
312: x_return_status := fnd_api.g_ret_sts_error;
313: fnd_msg_pub.count_and_get(
314: p_encoded => fnd_api.g_false
315: ,p_count => x_msg_count
316: ,p_data => x_msg_data);
317: WHEN fnd_api.g_exc_unexpected_error THEN
318:
313: fnd_msg_pub.count_and_get(
314: p_encoded => fnd_api.g_false
315: ,p_count => x_msg_count
316: ,p_data => x_msg_data);
317: WHEN fnd_api.g_exc_unexpected_error THEN
318:
319: ROLLBACK TO eam_delete_assignment;
320: x_return_status := fnd_api.g_ret_sts_unexp_error;
321: fnd_msg_pub.count_and_get(
316: ,p_data => x_msg_data);
317: WHEN fnd_api.g_exc_unexpected_error THEN
318:
319: ROLLBACK TO eam_delete_assignment;
320: x_return_status := fnd_api.g_ret_sts_unexp_error;
321: fnd_msg_pub.count_and_get(
322: p_encoded => fnd_api.g_false
323: ,p_count => x_msg_count
324: ,p_data => x_msg_data);
318:
319: ROLLBACK TO eam_delete_assignment;
320: x_return_status := fnd_api.g_ret_sts_unexp_error;
321: fnd_msg_pub.count_and_get(
322: p_encoded => fnd_api.g_false
323: ,p_count => x_msg_count
324: ,p_data => x_msg_data);
325: WHEN OTHERS THEN
326:
324: ,p_data => x_msg_data);
325: WHEN OTHERS THEN
326:
327: ROLLBACK TO eam_delete_assignment;
328: x_return_status := fnd_api.g_ret_sts_unexp_error;
329: IF fnd_msg_pub.check_msg_level(
330: fnd_msg_pub.g_msg_lvl_unexp_error) THEN
331: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
332: END IF;
330: fnd_msg_pub.g_msg_lvl_unexp_error) THEN
331: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
332: END IF;
333: fnd_msg_pub.count_and_get(
334: p_encoded => fnd_api.g_false
335: ,p_count => x_msg_count
336: ,p_data => x_msg_data);
337: end delete_assignment;
338: