247: x_return_status := fnd_api.g_ret_sts_unexp_error;
248: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
249: WHEN OTHERS THEN
250: ROLLBACK TO create_task_pub2;
251: fnd_message.set_name('JTF', 'JTF_TASK_UNKNOWN_ERROR');
252: fnd_message.set_token('P_TEXT', SQLCODE || SQLERRM);
253: fnd_msg_pub.ADD;
254: x_return_status := fnd_api.g_ret_sts_unexp_error;
255: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
248: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
249: WHEN OTHERS THEN
250: ROLLBACK TO create_task_pub2;
251: fnd_message.set_name('JTF', 'JTF_TASK_UNKNOWN_ERROR');
252: fnd_message.set_token('P_TEXT', SQLCODE || SQLERRM);
253: fnd_msg_pub.ADD;
254: x_return_status := fnd_api.g_ret_sts_unexp_error;
255: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
256: END;
513: x_return_status := fnd_api.g_ret_sts_unexp_error;
514: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
515: WHEN OTHERS THEN
516: ROLLBACK TO create_task_pub1;
517: fnd_message.set_name('JTF', 'JTF_TASK_UNKNOWN_ERROR');
518: fnd_message.set_token('P_TEXT', SQLCODE || SQLERRM);
519: fnd_msg_pub.ADD;
520: x_return_status := fnd_api.g_ret_sts_unexp_error;
521: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
514: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
515: WHEN OTHERS THEN
516: ROLLBACK TO create_task_pub1;
517: fnd_message.set_name('JTF', 'JTF_TASK_UNKNOWN_ERROR');
518: fnd_message.set_token('P_TEXT', SQLCODE || SQLERRM);
519: fnd_msg_pub.ADD;
520: x_return_status := fnd_api.g_ret_sts_unexp_error;
521: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
522: END;
735: RAISE fnd_api.g_exc_unexpected_error;
736: END IF;
737:
738: IF l_task_type_id IS NULL THEN
739: fnd_message.set_name('JTF', 'JTF_TASK_MISSING_TASK_TYPE');
740: fnd_msg_pub.ADD;
741: RAISE fnd_api.g_exc_unexpected_error;
742: END IF;
743:
758: , x_task_status_id => l_task_status_id
759: );
760:
761: IF l_task_status_id IS NULL THEN
762: fnd_message.set_name('JTF', 'JTF_TASK_MISSING_TASK_STATUS');
763: fnd_msg_pub.ADD;
764: RAISE fnd_api.g_exc_unexpected_error;
765: END IF;
766:
853: , x_owner_type_code => l_owner_type_code
854: );
855:
856: IF NOT(x_return_status = fnd_api.g_ret_sts_success) THEN
857: fnd_message.set_name('JTF', 'JTF_TASK_MISSING_OWNER');
858: fnd_msg_pub.ADD;
859: x_return_status := fnd_api.g_ret_sts_unexp_error;
860: RAISE fnd_api.g_exc_unexpected_error;
861: END IF;
860: RAISE fnd_api.g_exc_unexpected_error;
861: END IF;
862:
863: IF l_owner_id IS NULL THEN
864: fnd_message.set_name('JTF', 'JTF_TASK_OWNER');
865: fnd_msg_pub.ADD;
866: RAISE fnd_api.g_exc_unexpected_error;
867: END IF;
868:
866: RAISE fnd_api.g_exc_unexpected_error;
867: END IF;
868:
869: IF l_owner_type_code IS NULL THEN
870: fnd_message.set_name('JTF', 'JTF_TASK_OWNER_TYPE_CODE');
871: fnd_msg_pub.ADD;
872: RAISE fnd_api.g_exc_unexpected_error;
873: END IF;
874:
1247: ------- Validate Percentage Complete
1248: -------
1249: IF p_percentage_complete IS NOT NULL THEN
1250: IF p_percentage_complete < 0 OR p_percentage_complete > 100 THEN
1251: fnd_message.set_name('JTF', 'JTF_TASK_INVALID_PCT_COMPLETE');
1252: fnd_msg_pub.ADD;
1253: x_return_status := fnd_api.g_ret_sts_unexp_error;
1254: RAISE fnd_api.g_exc_unexpected_error;
1255: END IF;
1760: x_return_status := fnd_api.g_ret_sts_unexp_error;
1761: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1762: WHEN OTHERS THEN
1763: ROLLBACK TO create_task_pub;
1764: fnd_message.set_name('JTF', 'JTF_TASK_UNKNOWN_ERROR');
1765: fnd_message.set_token('P_TEXT', SQLCODE || SQLERRM);
1766: fnd_msg_pub.ADD;
1767: x_return_status := fnd_api.g_ret_sts_unexp_error;
1768: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1761: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1762: WHEN OTHERS THEN
1763: ROLLBACK TO create_task_pub;
1764: fnd_message.set_name('JTF', 'JTF_TASK_UNKNOWN_ERROR');
1765: fnd_message.set_token('P_TEXT', SQLCODE || SQLERRM);
1766: fnd_msg_pub.ADD;
1767: x_return_status := fnd_api.g_ret_sts_unexp_error;
1768: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1769: END;
2032: x_return_status := fnd_api.g_ret_sts_unexp_error;
2033: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2034: WHEN OTHERS THEN
2035: ROLLBACK TO create_task_pub2;
2036: fnd_message.set_name('JTF', 'JTF_TASK_UNKNOWN_ERROR');
2037: fnd_message.set_token('P_TEXT', SQLCODE || SQLERRM);
2038: fnd_msg_pub.ADD;
2039: x_return_status := fnd_api.g_ret_sts_unexp_error;
2040: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2033: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2034: WHEN OTHERS THEN
2035: ROLLBACK TO create_task_pub2;
2036: fnd_message.set_name('JTF', 'JTF_TASK_UNKNOWN_ERROR');
2037: fnd_message.set_token('P_TEXT', SQLCODE || SQLERRM);
2038: fnd_msg_pub.ADD;
2039: x_return_status := fnd_api.g_ret_sts_unexp_error;
2040: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2041: END;
2283: x_return_status := fnd_api.g_ret_sts_unexp_error;
2284: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2285: WHEN OTHERS THEN
2286: ROLLBACK TO update_task_pub1;
2287: fnd_message.set_name('JTF', 'JTF_TASK_UNKNOWN_ERROR');
2288: fnd_message.set_token('P_TEXT', SQLCODE || SQLERRM);
2289: fnd_msg_pub.ADD;
2290: x_return_status := fnd_api.g_ret_sts_unexp_error;
2291: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2284: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2285: WHEN OTHERS THEN
2286: ROLLBACK TO update_task_pub1;
2287: fnd_message.set_name('JTF', 'JTF_TASK_UNKNOWN_ERROR');
2288: fnd_message.set_token('P_TEXT', SQLCODE || SQLERRM);
2289: fnd_msg_pub.ADD;
2290: x_return_status := fnd_api.g_ret_sts_unexp_error;
2291: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2292: END;
2539: x_return_status := fnd_api.g_ret_sts_unexp_error;
2540: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2541: WHEN OTHERS THEN
2542: ROLLBACK TO update_task_pub2;
2543: fnd_message.set_name('JTF', 'JTF_TASK_UNKNOWN_ERROR');
2544: fnd_message.set_token('P_TEXT', SQLCODE || SQLERRM);
2545: fnd_msg_pub.ADD;
2546: x_return_status := fnd_api.g_ret_sts_unexp_error;
2547: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2540: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2541: WHEN OTHERS THEN
2542: ROLLBACK TO update_task_pub2;
2543: fnd_message.set_name('JTF', 'JTF_TASK_UNKNOWN_ERROR');
2544: fnd_message.set_token('P_TEXT', SQLCODE || SQLERRM);
2545: fnd_msg_pub.ADD;
2546: x_return_status := fnd_api.g_ret_sts_unexp_error;
2547: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2548: END;
2799: x_return_status := fnd_api.g_ret_sts_unexp_error;
2800: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2801: WHEN OTHERS THEN
2802: ROLLBACK TO update_task_pub3;
2803: fnd_message.set_name('JTF', 'JTF_TASK_UNKNOWN_ERROR');
2804: fnd_message.set_token('P_TEXT', SQLCODE || SQLERRM);
2805: fnd_msg_pub.ADD;
2806: x_return_status := fnd_api.g_ret_sts_unexp_error;
2807: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2800: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2801: WHEN OTHERS THEN
2802: ROLLBACK TO update_task_pub3;
2803: fnd_message.set_name('JTF', 'JTF_TASK_UNKNOWN_ERROR');
2804: fnd_message.set_token('P_TEXT', SQLCODE || SQLERRM);
2805: fnd_msg_pub.ADD;
2806: x_return_status := fnd_api.g_ret_sts_unexp_error;
2807: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2808: END;
3300: -----
3301: ----- Validate Tasks
3302: -----
3303: IF (l_task_id = fnd_api.g_miss_num AND l_task_number = fnd_api.g_miss_char) THEN
3304: fnd_message.set_name('JTF', 'JTF_TASK_MISSING_TASK');
3305: fnd_msg_pub.ADD;
3306: x_return_status := fnd_api.g_ret_sts_unexp_error;
3307: RAISE fnd_api.g_exc_unexpected_error;
3308: ELSE
3326: RAISE fnd_api.g_exc_unexpected_error;
3327: END IF;
3328:
3329: IF l_task_id IS NULL THEN
3330: fnd_message.set_name('JTF', 'JTF_TASK_INVALID_TASK_NUMBER');
3331: fnd_message.set_token('P_TASK_NUMBER', l_task_number);
3332: fnd_msg_pub.ADD;
3333: x_return_status := fnd_api.g_ret_sts_unexp_error;
3334: RAISE fnd_api.g_exc_unexpected_error;
3327: END IF;
3328:
3329: IF l_task_id IS NULL THEN
3330: fnd_message.set_name('JTF', 'JTF_TASK_INVALID_TASK_NUMBER');
3331: fnd_message.set_token('P_TASK_NUMBER', l_task_number);
3332: fnd_msg_pub.ADD;
3333: x_return_status := fnd_api.g_ret_sts_unexp_error;
3334: RAISE fnd_api.g_exc_unexpected_error;
3335: END IF;
3338: -----
3339: ----- Task Name
3340: -----
3341: IF l_task_name IS NULL THEN
3342: fnd_message.set_name('JTF', 'JTF_TASK_INVALID_TASK_NAME');
3343: fnd_msg_pub.ADD;
3344: x_return_status := fnd_api.g_ret_sts_unexp_error;
3345: RAISE fnd_api.g_exc_unexpected_error;
3346: END IF;
3355: FETCH c_task_update
3356: INTO task_rec;
3357:
3358: IF c_task_update%NOTFOUND THEN
3359: fnd_message.set_name('JTF', 'JTF_TASK_INVALID_TASK_ID');
3360: fnd_message.set_token('P_TASK_ID', l_task_id);
3361: fnd_msg_pub.ADD;
3362: x_return_status := fnd_api.g_ret_sts_unexp_error;
3363: RAISE fnd_api.g_exc_unexpected_error;
3356: INTO task_rec;
3357:
3358: IF c_task_update%NOTFOUND THEN
3359: fnd_message.set_name('JTF', 'JTF_TASK_INVALID_TASK_ID');
3360: fnd_message.set_token('P_TASK_ID', l_task_id);
3361: fnd_msg_pub.ADD;
3362: x_return_status := fnd_api.g_ret_sts_unexp_error;
3363: RAISE fnd_api.g_exc_unexpected_error;
3364: END IF;
3396: RAISE fnd_api.g_exc_unexpected_error;
3397: END IF;
3398:
3399: IF l_task_type_id IS NULL THEN
3400: fnd_message.set_name('JTF', 'JTF_TASK_MISSING_TYPE');
3401: fnd_msg_pub.ADD;
3402: RAISE fnd_api.g_exc_unexpected_error;
3403: END IF;
3404:
3459: RAISE fnd_api.g_exc_unexpected_error;
3460: END IF;
3461:
3462: IF l_task_status_id IS NULL THEN
3463: fnd_message.set_name('JTF', 'JTF_TASK_MISSING_status');
3464: fnd_msg_pub.ADD;
3465: RAISE fnd_api.g_exc_unexpected_error;
3466: END IF;
3467:
3814: ------- Validate percentage complete
3815: -------
3816: IF (p_percentage_complete <> fnd_api.g_miss_num OR p_percentage_complete IS NULL) THEN
3817: IF p_percentage_complete < 0 OR p_percentage_complete > 100 THEN
3818: fnd_message.set_name('JTF', 'JTF_TASK_INVALID_PCT_COMPLETE');
3819: fnd_msg_pub.ADD;
3820: x_return_status := fnd_api.g_ret_sts_unexp_error;
3821: RAISE fnd_api.g_exc_unexpected_error;
3822: END IF;
4226: , x_return_status => x_return_status
4227: );
4228:
4229: IF NOT(x_return_status = fnd_api.g_ret_sts_success) THEN
4230: fnd_message.set_name('JTF', 'INVALID_NOTIFICATION');
4231: fnd_msg_pub.ADD;
4232: x_return_status := fnd_api.g_ret_sts_unexp_error;
4233: RAISE fnd_api.g_exc_unexpected_error;
4234: END IF;
4274: , x_return_status => x_return_status
4275: );
4276:
4277: IF NOT(x_return_status = fnd_api.g_ret_sts_success) THEN
4278: fnd_message.set_name('JTF', 'INVALID_ALARM_PARAM');
4279: fnd_msg_pub.ADD;
4280: x_return_status := fnd_api.g_ret_sts_unexp_error;
4281: RAISE fnd_api.g_exc_unexpected_error;
4282: END IF;
4282: END IF;
4283:
4284: IF l_alarm_fired_count IS NOT NULL THEN
4285: IF l_alarm_fired_count > l_alarm_count THEN
4286: fnd_message.set_name('JTF', 'INVALID_ALARM_PARAM');
4287: fnd_msg_pub.ADD;
4288: x_return_status := fnd_api.g_ret_sts_unexp_error;
4289: RAISE fnd_api.g_exc_unexpected_error;
4290: END IF;
4564: ROLLBACK TO update_task_pub;
4565: x_return_status := fnd_api.g_ret_sts_unexp_error;
4566: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
4567: WHEN OTHERS THEN
4568: fnd_message.set_name('JTF', 'JTF_TASK_UNKNOWN_ERROR');
4569: fnd_message.set_token('P_TEXT', SQLCODE || SQLERRM);
4570: fnd_msg_pub.ADD;
4571: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
4572: ROLLBACK TO update_task_pub;
4565: x_return_status := fnd_api.g_ret_sts_unexp_error;
4566: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
4567: WHEN OTHERS THEN
4568: fnd_message.set_name('JTF', 'JTF_TASK_UNKNOWN_ERROR');
4569: fnd_message.set_token('P_TEXT', SQLCODE || SQLERRM);
4570: fnd_msg_pub.ADD;
4571: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
4572: ROLLBACK TO update_task_pub;
4573: x_return_status := fnd_api.g_ret_sts_unexp_error;
4630: ROLLBACK TO delete_task_pub2;
4631: x_return_status := fnd_api.g_ret_sts_unexp_error;
4632: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
4633: WHEN OTHERS THEN
4634: fnd_message.set_name('JTF', 'JTF_TASK_UNKNOWN_ERROR');
4635: fnd_message.set_token('P_TEXT', SQLCODE || SQLERRM);
4636: fnd_msg_pub.ADD;
4637: ROLLBACK TO delete_task_pub2;
4638: x_return_status := fnd_api.g_ret_sts_unexp_error;
4631: x_return_status := fnd_api.g_ret_sts_unexp_error;
4632: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
4633: WHEN OTHERS THEN
4634: fnd_message.set_name('JTF', 'JTF_TASK_UNKNOWN_ERROR');
4635: fnd_message.set_token('P_TEXT', SQLCODE || SQLERRM);
4636: fnd_msg_pub.ADD;
4637: ROLLBACK TO delete_task_pub2;
4638: x_return_status := fnd_api.g_ret_sts_unexp_error;
4639: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
4670: fnd_msg_pub.initialize;
4671: END IF;
4672:
4673: IF (l_task_id IS NULL AND l_task_number IS NULL) THEN
4674: fnd_message.set_name('JTF', 'JTF_TASK_MISSING_TASK');
4675: fnd_msg_pub.ADD;
4676: x_return_status := fnd_api.g_ret_sts_unexp_error;
4677: RAISE fnd_api.g_exc_unexpected_error;
4678: ELSE
4718: ROLLBACK TO delete_task_pub;
4719: x_return_status := fnd_api.g_ret_sts_unexp_error;
4720: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
4721: WHEN OTHERS THEN
4722: fnd_message.set_name('JTF', 'JTF_TASK_UNKNOWN_ERROR');
4723: fnd_message.set_token('P_TEXT', SQLCODE || SQLERRM);
4724: fnd_msg_pub.ADD;
4725: ROLLBACK TO delete_task_pub;
4726: x_return_status := fnd_api.g_ret_sts_unexp_error;
4719: x_return_status := fnd_api.g_ret_sts_unexp_error;
4720: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
4721: WHEN OTHERS THEN
4722: fnd_message.set_name('JTF', 'JTF_TASK_UNKNOWN_ERROR');
4723: fnd_message.set_token('P_TEXT', SQLCODE || SQLERRM);
4724: fnd_msg_pub.ADD;
4725: ROLLBACK TO delete_task_pub;
4726: x_return_status := fnd_api.g_ret_sts_unexp_error;
4727: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
5205: -- required parameters to control records returned
5206:
5207: -- p_file_name must not be null
5208: IF (p_file_name IS NULL) THEN
5209: fnd_message.set_name('JTF', 'JTF_TK_EXP_FILE_NAME_NULL');
5210: RAISE fnd_api.g_exc_error;
5211: END IF;
5212:
5213: -- l_table_count must be > 0, or no records are in the table
5211: END IF;
5212:
5213: -- l_table_count must be > 0, or no records are in the table
5214: IF (l_tbl_count = 0) THEN
5215: fnd_message.set_name('JTF', 'JTF_TK_EXP_TABLE_EMPTY');
5216: RAISE fnd_api.g_exc_error;
5217: END IF;
5218:
5219: jtf_tasks_pvt.export_file(l_path, p_file_name, p_task_table, x_return_status, x_msg_count
5264:
5265: IF c_task_number%NOTFOUND THEN
5266: CLOSE c_task_number;
5267:
5268: fnd_message.set_name('JTF', 'JTF_TASK_INVALID_TASK_NUMBER');
5269: fnd_message.set_token('P_TASK_NUMBER', p_task_number);
5270: fnd_msg_pub.ADD;
5271: RAISE fnd_api.g_exc_error;
5272: ELSE
5265: IF c_task_number%NOTFOUND THEN
5266: CLOSE c_task_number;
5267:
5268: fnd_message.set_name('JTF', 'JTF_TASK_INVALID_TASK_NUMBER');
5269: fnd_message.set_token('P_TASK_NUMBER', p_task_number);
5270: fnd_msg_pub.ADD;
5271: RAISE fnd_api.g_exc_error;
5272: ELSE
5273: CLOSE c_task_number;
5280:
5281: IF c_task_name%NOTFOUND THEN
5282: CLOSE c_task_name;
5283:
5284: fnd_message.set_name('JTF', 'JTF_TASK_INV_TK_NAME');
5285: fnd_msg_pub.ADD;
5286: RAISE fnd_api.g_exc_error;
5287: ELSE
5288: CLOSE c_task_name;
5306:
5307: IF c_task_id%NOTFOUND THEN
5308: CLOSE c_task_id;
5309:
5310: fnd_message.set_name('JTF', 'JTF_TASK_INVALID_TASK_ID');
5311: fnd_message.set_token('P_TASK_ID', p_task_id);
5312: fnd_msg_pub.ADD;
5313: RAISE fnd_api.g_exc_error;
5314: ELSE
5307: IF c_task_id%NOTFOUND THEN
5308: CLOSE c_task_id;
5309:
5310: fnd_message.set_name('JTF', 'JTF_TASK_INVALID_TASK_ID');
5311: fnd_message.set_token('P_TASK_ID', p_task_id);
5312: fnd_msg_pub.ADD;
5313: RAISE fnd_api.g_exc_error;
5314: ELSE
5315: CLOSE c_task_id;
5320: PROCEDURE val_dates(p_start IN DATE, p_end IN DATE) IS
5321: BEGIN
5322: IF (p_start IS NOT NULL) AND(p_end IS NOT NULL) THEN
5323: IF (p_end < p_start) THEN
5324: fnd_message.set_name('JTF', 'JTF_TASK_INVALID_DATES');
5325: fnd_message.set_token('P_DATE_TAG', p_start);
5326: fnd_msg_pub.ADD;
5327: RAISE fnd_api.g_exc_error;
5328: END IF;
5321: BEGIN
5322: IF (p_start IS NOT NULL) AND(p_end IS NOT NULL) THEN
5323: IF (p_end < p_start) THEN
5324: fnd_message.set_name('JTF', 'JTF_TASK_INVALID_DATES');
5325: fnd_message.set_token('P_DATE_TAG', p_start);
5326: fnd_msg_pub.ADD;
5327: RAISE fnd_api.g_exc_error;
5328: END IF;
5329: END IF;
5348:
5349: IF c_assigned_by_name%NOTFOUND THEN
5350: CLOSE c_assigned_by_name;
5351:
5352: fnd_message.set_name('JTF', 'JTF_TASK_INVALID_ASSIGNED_NAME');
5353: fnd_msg_pub.ADD;
5354: RAISE fnd_api.g_exc_error;
5355: ELSE
5356: CLOSE c_assigned_by_name;
5377:
5378: IF c_object_type_name%NOTFOUND THEN
5379: CLOSE c_object_type_name;
5380:
5381: fnd_message.set_name('JTF', 'JTF_TASK_INVALID_OBJECT_CODE');
5382: fnd_message.set_token('P_object_type_code', p_object_name);
5383: fnd_msg_pub.ADD;
5384: RAISE fnd_api.g_exc_error;
5385: ELSE
5378: IF c_object_type_name%NOTFOUND THEN
5379: CLOSE c_object_type_name;
5380:
5381: fnd_message.set_name('JTF', 'JTF_TASK_INVALID_OBJECT_CODE');
5382: fnd_message.set_token('P_object_type_code', p_object_name);
5383: fnd_msg_pub.ADD;
5384: RAISE fnd_api.g_exc_error;
5385: ELSE
5386: CLOSE c_object_type_name;
5411:
5412: IF c2%NOTFOUND THEN
5413: CLOSE c2;
5414:
5415: fnd_message.set_name('JTF', 'JTF_TASK_INVALID_CUST_NUMBER');
5416: fnd_message.set_token('P_customer_number', p_customer_number);
5417: fnd_msg_pub.ADD;
5418: RAISE fnd_api.g_exc_error;
5419: ELSE
5412: IF c2%NOTFOUND THEN
5413: CLOSE c2;
5414:
5415: fnd_message.set_name('JTF', 'JTF_TASK_INVALID_CUST_NUMBER');
5416: fnd_message.set_token('P_customer_number', p_customer_number);
5417: fnd_msg_pub.ADD;
5418: RAISE fnd_api.g_exc_error;
5419: ELSE
5420: CLOSE c2;
5427:
5428: IF c1%NOTFOUND THEN
5429: CLOSE c1;
5430:
5431: fnd_message.set_name('JTF', 'JTF_TASK_INVALID_CUST_NAME');
5432: fnd_message.set_token('P_customer_name', p_customer_name);
5433: fnd_msg_pub.ADD;
5434: RAISE fnd_api.g_exc_error;
5435: ELSE
5428: IF c1%NOTFOUND THEN
5429: CLOSE c1;
5430:
5431: fnd_message.set_name('JTF', 'JTF_TASK_INVALID_CUST_NAME');
5432: fnd_message.set_token('P_customer_name', p_customer_name);
5433: fnd_msg_pub.ADD;
5434: RAISE fnd_api.g_exc_error;
5435: ELSE
5436: CLOSE c1;
5455:
5456: IF c1%NOTFOUND THEN
5457: CLOSE c1;
5458:
5459: fnd_message.set_name('JTF', 'JTF_TASK_INVALID_CUST_ACCT_NUM');
5460: fnd_message.set_token('P_CUST_ACCOUNT_NUMBER', p_cust_account_number);
5461: fnd_msg_pub.ADD;
5462: RAISE fnd_api.g_exc_error;
5463: ELSE
5456: IF c1%NOTFOUND THEN
5457: CLOSE c1;
5458:
5459: fnd_message.set_name('JTF', 'JTF_TASK_INVALID_CUST_ACCT_NUM');
5460: fnd_message.set_token('P_CUST_ACCOUNT_NUMBER', p_cust_account_number);
5461: fnd_msg_pub.ADD;
5462: RAISE fnd_api.g_exc_error;
5463: ELSE
5464: CLOSE c1;
5485:
5486: IF c_task_priority_name%NOTFOUND THEN
5487: CLOSE c_task_priority_name;
5488:
5489: fnd_message.set_name('JTF', 'JTF_TASK_INVALID_PRIORITY_NAME');
5490: fnd_message.set_token('P_TASK_PRIORITY_NAME', p_task_priority_name);
5491: fnd_msg_pub.ADD;
5492: RAISE fnd_api.g_exc_error;
5493: ELSE
5486: IF c_task_priority_name%NOTFOUND THEN
5487: CLOSE c_task_priority_name;
5488:
5489: fnd_message.set_name('JTF', 'JTF_TASK_INVALID_PRIORITY_NAME');
5490: fnd_message.set_token('P_TASK_PRIORITY_NAME', p_task_priority_name);
5491: fnd_msg_pub.ADD;
5492: RAISE fnd_api.g_exc_error;
5493: ELSE
5494: CLOSE c_task_priority_name;
5851:
5852: -- p_ref_object_type_code or p_ref object_id is not null then both must exist
5853: IF (p_ref_object_type_code IS NOT NULL) OR(p_ref_object_id IS NOT NULL) THEN
5854: IF (p_ref_object_type_code IS NULL) OR(p_ref_object_id IS NULL) THEN
5855: fnd_message.set_name('JTF', 'JTF_TK_OBJECT_TYPE_ID_RQD');
5856: fnd_msg_pub.ADD;
5857: RAISE fnd_api.g_exc_error;
5858: END IF;
5859: END IF;
5859: END IF;
5860:
5861: -- p_query_or_next_code should be Q or N
5862: IF (p_query_or_next_code NOT IN('Q', 'N')) OR(p_query_or_next_code IS NULL) THEN
5863: fnd_message.set_name('JTF', 'JTF_TK_INV_QRY_NXT');
5864: fnd_msg_pub.ADD;
5865: RAISE fnd_api.g_exc_error;
5866: END IF;
5867:
5866: END IF;
5867:
5868: -- p_show_all should be Y or N
5869: IF (p_show_all NOT IN('Y', 'N')) OR(p_show_all IS NULL) THEN
5870: fnd_message.set_name('JTF', 'JTF_TK_INV_SHOW_ALL');
5871: fnd_msg_pub.ADD;
5872: RAISE fnd_api.g_exc_error;
5873: END IF;
5874:
5873: END IF;
5874:
5875: IF (p_show_all = 'N') THEN
5876: IF (p_start_pointer IS NULL) THEN
5877: fnd_message.set_name('JTF', 'JTF_TK_NULL_STRT_PTR');
5878: fnd_msg_pub.ADD;
5879: RAISE fnd_api.g_exc_error;
5880: END IF;
5881:
5879: RAISE fnd_api.g_exc_error;
5880: END IF;
5881:
5882: IF (p_rec_wanted IS NULL) THEN
5883: fnd_message.set_name('JTF', 'JTF_TK_NULL_REC_WANT');
5884: fnd_msg_pub.ADD;
5885: RAISE fnd_api.g_exc_error;
5886: END IF;
5887: END IF;
6166: -- required parameters to control records returned
6167:
6168: -- p_query_or_next_code should be Q or N
6169: IF (p_query_or_next_code NOT IN('Q', 'N')) OR(p_query_or_next_code IS NULL) THEN
6170: fnd_message.set_name('JTF', 'JTF_TK_INV_QRY_NXT');
6171: fnd_msg_pub.ADD;
6172: RAISE fnd_api.g_exc_error;
6173: END IF;
6174:
6173: END IF;
6174:
6175: -- p_show_all should be Y or N
6176: IF (p_show_all NOT IN('Y', 'N')) OR(p_show_all IS NULL) THEN
6177: fnd_message.set_name('JTF', 'JTF_TK_INV_SHOW_ALL');
6178: fnd_msg_pub.ADD;
6179: RAISE fnd_api.g_exc_error;
6180: END IF;
6181:
6180: END IF;
6181:
6182: IF (p_show_all = 'N') THEN
6183: IF (p_start_pointer IS NULL) THEN
6184: fnd_message.set_name('JTF', 'JTF_TK_NULL_STRT_PTR');
6185: fnd_msg_pub.ADD;
6186: RAISE fnd_api.g_exc_error;
6187: END IF;
6188:
6186: RAISE fnd_api.g_exc_error;
6187: END IF;
6188:
6189: IF (p_rec_wanted IS NULL) THEN
6190: fnd_message.set_name('JTF', 'JTF_TK_NULL_REC_WANT');
6191: fnd_msg_pub.ADD;
6192: RAISE fnd_api.g_exc_error;
6193: END IF;
6194: END IF;
6194: END IF;
6195:
6196: -- parameters to control querying
6197: IF (l_query_type NOT IN('DEPENDENCY', 'ASSIGNED', 'OWNER')) THEN
6198: fnd_message.set_name('JTF', 'JTF_TK_QRY_NXT_INV_QRY_TYP');
6199: fnd_msg_pub.ADD;
6200: RAISE fnd_api.g_exc_error;
6201: ELSE
6202: -- check date_type and date_start_or_end
6200: RAISE fnd_api.g_exc_error;
6201: ELSE
6202: -- check date_type and date_start_or_end
6203: IF (l_date_type NOT IN('SCHEDULED', 'PLANNED', 'ACTUAL')) THEN
6204: fnd_message.set_name('JTF', 'JTF_TK_QRY_NXT_INV_DT_TYPE');
6205: fnd_msg_pub.ADD;
6206: RAISE fnd_api.g_exc_error;
6207: END IF;
6208:
6206: RAISE fnd_api.g_exc_error;
6207: END IF;
6208:
6209: IF (l_date_start_or_end NOT IN('END', 'START')) THEN
6210: fnd_message.set_name('JTF', 'JTF_TK_QRY_NXT_INV_STRT_END_DT');
6211: fnd_msg_pub.ADD;
6212: RAISE fnd_api.g_exc_error;
6213: END IF;
6214:
6213: END IF;
6214:
6215: IF (l_query_type = 'ASSIGNED') THEN
6216: IF (p_assigned_by IS NULL) THEN
6217: fnd_message.set_name('JTF', 'JTF_TK_QRY_NXT_NUL_ASGND_BY');
6218: fnd_msg_pub.ADD;
6219: RAISE fnd_api.g_exc_error;
6220: END IF;
6221: ELSIF(l_query_type = 'OWNER') THEN
6219: RAISE fnd_api.g_exc_error;
6220: END IF;
6221: ELSIF(l_query_type = 'OWNER') THEN
6222: IF (p_owner_type_code IS NULL OR p_owner_id IS NULL) THEN
6223: fnd_message.set_name('JTF', 'JTF_TK_QRY_NXT_NUL_OWNER');
6224: fnd_msg_pub.ADD;
6225: RAISE fnd_api.g_exc_error;
6226: END IF;
6227: END IF;
6230: -- validate query parameters
6231:
6232: -- task id should not be null
6233: IF (p_task_id IS NULL) THEN
6234: fnd_message.set_name('JTF', 'JTF_TASK_MISSING_TASK');
6235: fnd_msg_pub.ADD;
6236: RAISE fnd_api.g_exc_error;
6237: END IF;
6238:
6610: END IF;
6611:
6612: IF l_source_task_id IS NULL THEN
6613: x_return_status := fnd_api.g_ret_sts_unexp_error;
6614: fnd_message.set_name('JTF', 'JTF_TASK_MISSING_TASK_ID');
6615: fnd_msg_pub.ADD;
6616: RAISE fnd_api.g_exc_unexpected_error;
6617: END IF;
6618:
6631: OPEN c_task;
6632: FETCH c_task INTO tasks;
6633: IF c_task%NOTFOUND THEN
6634: x_return_status := fnd_api.g_ret_sts_unexp_error;
6635: fnd_message.set_name('JTF', 'JTF_TASK_INVALID_TASK_ID');
6636: fnd_message.set_token('P_TASK_ID', l_source_task_id);
6637: fnd_msg_pub.ADD;
6638: RAISE fnd_api.g_exc_unexpected_error;
6639: CLOSE c_task;
6632: FETCH c_task INTO tasks;
6633: IF c_task%NOTFOUND THEN
6634: x_return_status := fnd_api.g_ret_sts_unexp_error;
6635: fnd_message.set_name('JTF', 'JTF_TASK_INVALID_TASK_ID');
6636: fnd_message.set_token('P_TASK_ID', l_source_task_id);
6637: fnd_msg_pub.ADD;
6638: RAISE fnd_api.g_exc_unexpected_error;
6639: CLOSE c_task;
6640: END IF;
7176: WHERE task_id = l_source_task_id;
7177: EXCEPTION
7178: WHEN NO_DATA_FOUND THEN
7179: x_return_status := fnd_api.g_ret_sts_unexp_error;
7180: fnd_message.set_name('JTF', 'JTF_TASK_INVALID_TASK_ID');
7181: fnd_message.set_token('P_TASK_ID', l_source_task_id);
7182: fnd_msg_pub.ADD;
7183: RAISE fnd_api.g_exc_unexpected_error;
7184: WHEN OTHERS THEN
7177: EXCEPTION
7178: WHEN NO_DATA_FOUND THEN
7179: x_return_status := fnd_api.g_ret_sts_unexp_error;
7180: fnd_message.set_name('JTF', 'JTF_TASK_INVALID_TASK_ID');
7181: fnd_message.set_token('P_TASK_ID', l_source_task_id);
7182: fnd_msg_pub.ADD;
7183: RAISE fnd_api.g_exc_unexpected_error;
7184: WHEN OTHERS THEN
7185: fnd_message.set_name('JTF', 'JTF_TASK_UNKNOWN_ERROR');
7181: fnd_message.set_token('P_TASK_ID', l_source_task_id);
7182: fnd_msg_pub.ADD;
7183: RAISE fnd_api.g_exc_unexpected_error;
7184: WHEN OTHERS THEN
7185: fnd_message.set_name('JTF', 'JTF_TASK_UNKNOWN_ERROR');
7186: fnd_message.set_token('P_TEXT', SQLCODE || SQLERRM);
7187: x_return_status := fnd_api.g_ret_sts_unexp_error;
7188: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
7189: RAISE fnd_api.g_exc_unexpected_error;
7182: fnd_msg_pub.ADD;
7183: RAISE fnd_api.g_exc_unexpected_error;
7184: WHEN OTHERS THEN
7185: fnd_message.set_name('JTF', 'JTF_TASK_UNKNOWN_ERROR');
7186: fnd_message.set_token('P_TEXT', SQLCODE || SQLERRM);
7187: x_return_status := fnd_api.g_ret_sts_unexp_error;
7188: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
7189: RAISE fnd_api.g_exc_unexpected_error;
7190: END;
7372: CLOSE c_notes;
7373: END IF;
7374: WHEN OTHERS THEN
7375: ROLLBACK TO copy_task;
7376: fnd_message.set_name('JTF', 'JTF_TASK_UNKNOWN_ERROR');
7377: fnd_message.set_token('P_TEXT', SQLCODE || SQLERRM);
7378: x_return_status := fnd_api.g_ret_sts_unexp_error;
7379: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
7380:
7373: END IF;
7374: WHEN OTHERS THEN
7375: ROLLBACK TO copy_task;
7376: fnd_message.set_name('JTF', 'JTF_TASK_UNKNOWN_ERROR');
7377: fnd_message.set_token('P_TEXT', SQLCODE || SQLERRM);
7378: x_return_status := fnd_api.g_ret_sts_unexp_error;
7379: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
7380:
7381: IF c_task%ISOPEN THEN
7573: x_return_status := fnd_api.g_ret_sts_unexp_error;
7574: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
7575: WHEN OTHERS THEN
7576: ROLLBACK TO create_task_from_template_pub1;
7577: fnd_message.set_name('JTF', 'JTF_TASK_UNKNOWN_ERROR');
7578: fnd_message.set_token('P_TEXT', SQLCODE || SQLERRM);
7579: fnd_msg_pub.ADD;
7580: x_return_status := fnd_api.g_ret_sts_unexp_error;
7581: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
7574: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
7575: WHEN OTHERS THEN
7576: ROLLBACK TO create_task_from_template_pub1;
7577: fnd_message.set_name('JTF', 'JTF_TASK_UNKNOWN_ERROR');
7578: fnd_message.set_token('P_TEXT', SQLCODE || SQLERRM);
7579: fnd_msg_pub.ADD;
7580: x_return_status := fnd_api.g_ret_sts_unexp_error;
7581: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
7582: END;
7743: x_return_status := fnd_api.g_ret_sts_unexp_error;
7744: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
7745: WHEN OTHERS THEN
7746: ROLLBACK TO create_task_from_template_pub; -- Fix Bug 2896377
7747: fnd_message.set_name('JTF', 'JTF_TASK_UNKNOWN_ERROR');
7748: fnd_message.set_token('P_TEXT', SQLCODE || SQLERRM);
7749: fnd_msg_pub.ADD;
7750: x_return_status := fnd_api.g_ret_sts_unexp_error;
7751: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
7744: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
7745: WHEN OTHERS THEN
7746: ROLLBACK TO create_task_from_template_pub; -- Fix Bug 2896377
7747: fnd_message.set_name('JTF', 'JTF_TASK_UNKNOWN_ERROR');
7748: fnd_message.set_token('P_TEXT', SQLCODE || SQLERRM);
7749: fnd_msg_pub.ADD;
7750: x_return_status := fnd_api.g_ret_sts_unexp_error;
7751: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
7752: END;
7783: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
7784: EXCEPTION
7785: WHEN resource_locked THEN
7786: ROLLBACK TO lock_tasks_pub;
7787: fnd_message.set_name('JTF', 'JTF_TASK_RESOURCE_LOCKED');
7788: fnd_message.set_token('P_LOCKED_RESOURCE', 'Task');
7789: x_return_status := fnd_api.g_ret_sts_unexp_error;
7790: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
7791: WHEN fnd_api.g_exc_unexpected_error THEN
7784: EXCEPTION
7785: WHEN resource_locked THEN
7786: ROLLBACK TO lock_tasks_pub;
7787: fnd_message.set_name('JTF', 'JTF_TASK_RESOURCE_LOCKED');
7788: fnd_message.set_token('P_LOCKED_RESOURCE', 'Task');
7789: x_return_status := fnd_api.g_ret_sts_unexp_error;
7790: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
7791: WHEN fnd_api.g_exc_unexpected_error THEN
7792: ROLLBACK TO lock_tasks_pub;
7793: x_return_status := fnd_api.g_ret_sts_unexp_error;
7794: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
7795: WHEN OTHERS THEN
7796: ROLLBACK TO lock_tasks_pub;
7797: fnd_message.set_name('JTF', 'JTF_TASK_UNKNOWN_ERROR');
7798: fnd_message.set_token('P_TEXT', SQLCODE || SQLERRM);
7799: x_return_status := fnd_api.g_ret_sts_unexp_error;
7800: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
7801: END;
7794: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
7795: WHEN OTHERS THEN
7796: ROLLBACK TO lock_tasks_pub;
7797: fnd_message.set_name('JTF', 'JTF_TASK_UNKNOWN_ERROR');
7798: fnd_message.set_token('P_TEXT', SQLCODE || SQLERRM);
7799: x_return_status := fnd_api.g_ret_sts_unexp_error;
7800: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
7801: END;
7802:
7901: x_return_status := fnd_api.g_ret_sts_unexp_error;
7902: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
7903: WHEN OTHERS THEN
7904: ROLLBACK TO update_task_source;
7905: fnd_message.set_name('JTF', 'JTF_TASK_UNKNOWN_ERROR');
7906: fnd_message.set_token('P_TEXT', SQLCODE || SQLERRM);
7907: x_return_status := fnd_api.g_ret_sts_unexp_error;
7908: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
7909: END;
7902: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
7903: WHEN OTHERS THEN
7904: ROLLBACK TO update_task_source;
7905: fnd_message.set_name('JTF', 'JTF_TASK_UNKNOWN_ERROR');
7906: fnd_message.set_token('P_TEXT', SQLCODE || SQLERRM);
7907: x_return_status := fnd_api.g_ret_sts_unexp_error;
7908: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
7909: END;
7910:
7916: )
7917: RETURN VARCHAR2 IS
7918: BEGIN
7919: IF LENGTH(p_task_name) > p_length THEN
7920: fnd_message.set_name('JTF', p_message_name);
7921: fnd_msg_pub.ADD;
7922: RAISE fnd_api.g_exc_unexpected_error;
7923: ELSE
7924: RETURN p_task_name;
7989: FETCH c_task_validate
7990: INTO task_val;
7991:
7992: IF c_task_validate%NOTFOUND THEN
7993: fnd_message.set_name('JTF', 'JTF_TASK_INVALID_TASK_ID');
7994: fnd_message.set_token('P_TASK_ID', p_task_id);
7995: fnd_msg_pub.ADD;
7996: RAISE fnd_api.g_exc_unexpected_error;
7997: END IF;
7990: INTO task_val;
7991:
7992: IF c_task_validate%NOTFOUND THEN
7993: fnd_message.set_name('JTF', 'JTF_TASK_INVALID_TASK_ID');
7994: fnd_message.set_token('P_TASK_ID', p_task_id);
7995: fnd_msg_pub.ADD;
7996: RAISE fnd_api.g_exc_unexpected_error;
7997: END IF;
7998:
7998:
7999: CLOSE c_task_validate;
8000:
8001: IF (p_task_split_flag IS NULL) THEN
8002: fnd_message.set_name('JTF', 'JTF_TASK_SPLIT_FLAG_NULL');
8003: fnd_msg_pub.ADD;
8004: RAISE fnd_api.g_exc_unexpected_error;
8005: END IF;
8006:
8004: RAISE fnd_api.g_exc_unexpected_error;
8005: END IF;
8006:
8007: IF (task_val.task_split_flag IS NULL) THEN
8008: fnd_message.set_name('JTF', 'JTF_TASK_SPLIT_FLAG_NOT_EXIST');
8009: fnd_msg_pub.ADD;
8010: RAISE fnd_api.g_exc_unexpected_error;
8011: END IF;
8012:
8010: RAISE fnd_api.g_exc_unexpected_error;
8011: END IF;
8012:
8013: IF (task_val.task_split_flag <> 'D' OR task_val.task_split_flag <> 'M') THEN
8014: fnd_message.set_name('JTF', 'JTF_TASK_SPLIT_FLAG_NOT_VALID');
8015: fnd_message.set_token('P_TASK_ID', p_task_id);
8016: fnd_message.set_token('P_TASK_SPLIT_FLAG', task_val.task_split_flag);
8017: fnd_msg_pub.ADD;
8018: RAISE fnd_api.g_exc_unexpected_error;
8011: END IF;
8012:
8013: IF (task_val.task_split_flag <> 'D' OR task_val.task_split_flag <> 'M') THEN
8014: fnd_message.set_name('JTF', 'JTF_TASK_SPLIT_FLAG_NOT_VALID');
8015: fnd_message.set_token('P_TASK_ID', p_task_id);
8016: fnd_message.set_token('P_TASK_SPLIT_FLAG', task_val.task_split_flag);
8017: fnd_msg_pub.ADD;
8018: RAISE fnd_api.g_exc_unexpected_error;
8019: END IF;
8012:
8013: IF (task_val.task_split_flag <> 'D' OR task_val.task_split_flag <> 'M') THEN
8014: fnd_message.set_name('JTF', 'JTF_TASK_SPLIT_FLAG_NOT_VALID');
8015: fnd_message.set_token('P_TASK_ID', p_task_id);
8016: fnd_message.set_token('P_TASK_SPLIT_FLAG', task_val.task_split_flag);
8017: fnd_msg_pub.ADD;
8018: RAISE fnd_api.g_exc_unexpected_error;
8019: END IF;
8020:
8018: RAISE fnd_api.g_exc_unexpected_error;
8019: END IF;
8020:
8021: IF (task_val.task_split_flag <> p_task_split_flag) THEN
8022: fnd_message.set_name('JTF', 'JTF_TASK_INVALID_SPLIT_FLAG');
8023: fnd_message.set_token('P_TASK_SPLIT_FLAG', p_task_split_flag);
8024: fnd_message.set_token('P_TASK_ID', p_task_id);
8025: fnd_msg_pub.ADD;
8026: RAISE fnd_api.g_exc_unexpected_error;
8019: END IF;
8020:
8021: IF (task_val.task_split_flag <> p_task_split_flag) THEN
8022: fnd_message.set_name('JTF', 'JTF_TASK_INVALID_SPLIT_FLAG');
8023: fnd_message.set_token('P_TASK_SPLIT_FLAG', p_task_split_flag);
8024: fnd_message.set_token('P_TASK_ID', p_task_id);
8025: fnd_msg_pub.ADD;
8026: RAISE fnd_api.g_exc_unexpected_error;
8027: END IF;
8020:
8021: IF (task_val.task_split_flag <> p_task_split_flag) THEN
8022: fnd_message.set_name('JTF', 'JTF_TASK_INVALID_SPLIT_FLAG');
8023: fnd_message.set_token('P_TASK_SPLIT_FLAG', p_task_split_flag);
8024: fnd_message.set_token('P_TASK_ID', p_task_id);
8025: fnd_msg_pub.ADD;
8026: RAISE fnd_api.g_exc_unexpected_error;
8027: END IF;
8028:
8130: ROLLBACK TO delete_split_tasks_pub;
8131: x_return_status := fnd_api.g_ret_sts_unexp_error;
8132: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
8133: WHEN OTHERS THEN
8134: fnd_message.set_name('JTF', 'JTF_TASK_UNKNOWN_ERROR');
8135: fnd_message.set_token('P_TEXT', SQLCODE || SQLERRM);
8136: fnd_msg_pub.ADD;
8137: ROLLBACK TO delete_split_tasks_pub;
8138: x_return_status := fnd_api.g_ret_sts_unexp_error;
8131: x_return_status := fnd_api.g_ret_sts_unexp_error;
8132: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
8133: WHEN OTHERS THEN
8134: fnd_message.set_name('JTF', 'JTF_TASK_UNKNOWN_ERROR');
8135: fnd_message.set_token('P_TEXT', SQLCODE || SQLERRM);
8136: fnd_msg_pub.ADD;
8137: ROLLBACK TO delete_split_tasks_pub;
8138: x_return_status := fnd_api.g_ret_sts_unexp_error;
8139: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);