3235:
3236: EXCEPTION
3237: WHEN fnd_api.g_exc_error THEN
3238: x_return_status := fnd_api.g_ret_sts_error;
3239: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
3240: DEBUG(' Exception occured at l_progress = ' || l_progress || ' during ' || to_char(SYSDATE, 'YYYY-MM-DD HH:DD:SS'),l_proc_name,1);
3241: DEBUG(SQLERRM,l_proc_name,1);
3242:
3243: IF c_all_mmtt_cursor%ISOPEN THEN
3248:
3249:
3250: WHEN fnd_api.g_exc_unexpected_error THEN
3251: x_return_status := fnd_api.g_ret_sts_unexp_error;
3252: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
3253:
3254: DEBUG(' Exception occured at l_progress = ' || l_progress || ' during ' || to_char(SYSDATE, 'YYYY-MM-DD HH:DD:SS'),l_proc_name,1);
3255: DEBUG(SQLERRM,l_proc_name,1);
3256:
3262:
3263:
3264: WHEN OTHERS THEN
3265: x_return_status := fnd_api.g_ret_sts_unexp_error;
3266: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
3267: DEBUG(' Exception occured at l_progress = ' || l_progress || ' during ' || to_char(SYSDATE, 'YYYY-MM-DD HH:DD:SS'),l_proc_name,1);
3268: DEBUG(SQLERRM,l_proc_name,1);
3269:
3270: IF c_all_mmtt_cursor%ISOPEN THEN
3407:
3408: EXCEPTION
3409: WHEN fnd_api.g_exc_error THEN
3410: x_return_status := fnd_api.g_ret_sts_error;
3411: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
3412: DEBUG(' Exception occured at l_progress = ' || l_progress || ' during ' || to_char(SYSDATE, 'YYYY-MM-DD HH:DD:SS'),l_proc_name,1);
3413: DEBUG(SQLERRM,l_proc_name,1);
3414:
3415: IF c_all_mmtt_cursor%ISOPEN THEN
3420:
3421:
3422: WHEN fnd_api.g_exc_unexpected_error THEN
3423: x_return_status := fnd_api.g_ret_sts_unexp_error;
3424: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
3425:
3426: DEBUG(' Exception occured at l_progress = ' || l_progress || ' during ' || to_char(SYSDATE, 'YYYY-MM-DD HH:DD:SS'),l_proc_name,1);
3427: DEBUG(SQLERRM,l_proc_name,1);
3428:
3434:
3435:
3436: WHEN OTHERS THEN
3437: x_return_status := fnd_api.g_ret_sts_unexp_error;
3438: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
3439: DEBUG(' Exception occured at l_progress = ' || l_progress || ' during ' || to_char(SYSDATE, 'YYYY-MM-DD HH:DD:SS'),l_proc_name,1);
3440: DEBUG(SQLERRM,l_proc_name,1);
3441:
3442: IF c_all_mmtt_cursor%ISOPEN THEN
3566:
3567: EXCEPTION
3568: WHEN fnd_api.g_exc_error THEN
3569: x_return_status := fnd_api.g_ret_sts_error;
3570: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
3571: DEBUG(' Exception occured at l_progress = ' || l_progress || ' during ' || to_char(SYSDATE, 'YYYY-MM-DD HH:DD:SS'),l_proc_name,1);
3572: DEBUG(SQLERRM,l_proc_name,1);
3573:
3574: WHEN fnd_api.g_exc_unexpected_error THEN
3572: DEBUG(SQLERRM,l_proc_name,1);
3573:
3574: WHEN fnd_api.g_exc_unexpected_error THEN
3575: x_return_status := fnd_api.g_ret_sts_unexp_error;
3576: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
3577: DEBUG(' Exception occured at l_progress = ' || l_progress || ' during ' || to_char(SYSDATE, 'YYYY-MM-DD HH:DD:SS'),l_proc_name,1);
3578: DEBUG(SQLERRM,l_proc_name,1);
3579:
3580: WHEN OTHERS THEN
3578: DEBUG(SQLERRM,l_proc_name,1);
3579:
3580: WHEN OTHERS THEN
3581: x_return_status := fnd_api.g_ret_sts_unexp_error;
3582: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
3583: DEBUG(' Exception occured at l_progress = ' || l_progress || ' during ' || to_char(SYSDATE, 'YYYY-MM-DD HH:DD:SS'),l_proc_name,1);
3584: DEBUG(SQLERRM,l_proc_name,1);
3585:
3586: END Complete_ATF_Load;
3848:
3849: EXCEPTION
3850: WHEN fnd_api.g_exc_error THEN
3851: x_return_status := fnd_api.g_ret_sts_error;
3852: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
3853: DEBUG(' Exception occured at l_progress = ' || l_progress || ' during ' || to_char(SYSDATE, 'YYYY-MM-DD HH:DD:SS'),l_proc_name,1);
3854: DEBUG(SQLERRM,l_proc_name,1);
3855:
3856: IF c_all_tasks_cursor%ISOPEN THEN
3865:
3866:
3867: WHEN fnd_api.g_exc_unexpected_error THEN
3868: x_return_status := fnd_api.g_ret_sts_unexp_error;
3869: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
3870:
3871: DEBUG(' Exception occured at l_progress = ' || l_progress || ' during ' || to_char(SYSDATE, 'YYYY-MM-DD HH:DD:SS'),l_proc_name,1);
3872: DEBUG(SQLERRM,l_proc_name,1);
3873:
3883:
3884:
3885: WHEN OTHERS THEN
3886: x_return_status := fnd_api.g_ret_sts_unexp_error;
3887: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
3888: DEBUG(' Exception occured at l_progress = ' || l_progress || ' during ' || to_char(SYSDATE, 'YYYY-MM-DD HH:DD:SS'),l_proc_name,1);
3889: DEBUG(SQLERRM,l_proc_name,1);
3890:
3891: IF c_all_tasks_cursor%ISOPEN THEN
3972: debug(' LPN Already locked by someone else', l_proc_name,1);
3973: x_return_status := fnd_api.g_ret_sts_error;
3974:
3975: fnd_message.set_name('WMS', 'WMS_LPN_UNAVAIL');
3976: fnd_msg_pub.ADD;
3977: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
3978:
3979: WHEN OTHERS THEN
3980: debug(' Exception while trying to lock LPN(s) ' || SQLERRM, l_proc_name,1);
3973: x_return_status := fnd_api.g_ret_sts_error;
3974:
3975: fnd_message.set_name('WMS', 'WMS_LPN_UNAVAIL');
3976: fnd_msg_pub.ADD;
3977: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
3978:
3979: WHEN OTHERS THEN
3980: debug(' Exception while trying to lock LPN(s) ' || SQLERRM, l_proc_name,1);
3981: x_return_status := fnd_api.g_ret_sts_unexp_error;
3978:
3979: WHEN OTHERS THEN
3980: debug(' Exception while trying to lock LPN(s) ' || SQLERRM, l_proc_name,1);
3981: x_return_status := fnd_api.g_ret_sts_unexp_error;
3982: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
3983:
3984: END Lock_LPNs;
3985:
3986:
4217: l_progress := '225';
4218: -- No Tasks found for the data passed
4219: -- Set error message and raise error handle it in exception block.
4220: FND_MESSAGE.SET_NAME('WMS','WMS_NO_TASKS');
4221: fnd_msg_pub.ADD;
4222: -- Instead of raising an error, return with success
4223: RETURN;
4224: END IF;
4225:
4505:
4506: EXCEPTION
4507: WHEN fnd_api.g_exc_error THEN
4508: x_return_status := fnd_api.g_ret_sts_error;
4509: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
4510: DEBUG(' Exception occured at l_progress = ' || l_progress || ' during ' || to_char(SYSDATE, 'YYYY-MM-DD HH:DD:SS'),l_proc_name,1);
4511: DEBUG(SQLERRM,l_proc_name,1);
4512:
4513: IF c_lpn_cursor%isopen THEN
4515: END IF;
4516:
4517: WHEN fnd_api.g_exc_unexpected_error THEN
4518: x_return_status := fnd_api.g_ret_sts_unexp_error;
4519: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
4520: DEBUG(' Exception occured at l_progress = ' || l_progress || ' during ' || to_char(SYSDATE, 'YYYY-MM-DD HH:DD:SS'),l_proc_name,1);
4521: DEBUG(SQLERRM,l_proc_name,1);
4522:
4523: IF c_lpn_cursor%isopen THEN
4526:
4527:
4528: WHEN OTHERS THEN
4529: x_return_status := fnd_api.g_ret_sts_unexp_error;
4530: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
4531: DEBUG(' Exception occured at l_progress = ' || l_progress || ' during ' || to_char(SYSDATE, 'YYYY-MM-DD HH:DD:SS'),l_proc_name,1);
4532: DEBUG(SQLERRM,l_proc_name,1);
4533:
4534: IF c_lpn_cursor%isopen THEN
4755: EXCEPTION
4756:
4757: WHEN fnd_api.g_exc_error THEN
4758: x_return_status := fnd_api.g_ret_sts_error;
4759: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
4760: DEBUG(' Exception occured at l_progress = ' || l_progress || ' during ' || to_char(SYSDATE, 'YYYY-MM-DD HH:DD:SS'),l_proc_name,1);
4761: DEBUG(SQLERRM,l_proc_name,1);
4762:
4763: IF c_all_mmtt_cursor%isopen THEN
4765: END IF;
4766:
4767: WHEN fnd_api.g_exc_unexpected_error THEN
4768: x_return_status := fnd_api.g_ret_sts_unexp_error;
4769: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
4770: DEBUG(' Exception occured at l_progress = ' || l_progress || ' during ' || to_char(SYSDATE, 'YYYY-MM-DD HH:DD:SS'),l_proc_name,1);
4771: DEBUG(SQLERRM,l_proc_name,1);
4772:
4773: IF c_all_mmtt_cursor%isopen THEN
4776:
4777:
4778: WHEN OTHERS THEN
4779: x_return_status := fnd_api.g_ret_sts_unexp_error;
4780: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
4781: DEBUG(' Exception occured at l_progress = ' || l_progress || ' during ' || to_char(SYSDATE, 'YYYY-MM-DD HH:DD:SS'),l_proc_name,1);
4782: DEBUG(SQLERRM,l_proc_name,1);
4783:
4784: IF c_all_mmtt_cursor%isopen THEN
4959:
4960: EXCEPTION
4961: WHEN fnd_api.g_exc_error THEN
4962: x_return_status := fnd_api.g_ret_sts_error;
4963: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
4964: DEBUG(' Exception occured at l_progress = ' || l_progress || ' during ' || to_char(SYSDATE, 'YYYY-MM-DD HH:DD:SS'),l_proc_name,1);
4965: DEBUG(SQLERRM,l_proc_name,1);
4966:
4967: IF c_mol_mmtt_cursor%ISOPEN THEN
4972:
4973:
4974: WHEN fnd_api.g_exc_unexpected_error THEN
4975: x_return_status := fnd_api.g_ret_sts_unexp_error;
4976: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
4977:
4978: DEBUG(' Exception occured at l_progress = ' || l_progress || ' during ' || to_char(SYSDATE, 'YYYY-MM-DD HH:DD:SS'),l_proc_name,1);
4979: DEBUG(SQLERRM,l_proc_name,1);
4980:
4986:
4987:
4988: WHEN OTHERS THEN
4989: x_return_status := fnd_api.g_ret_sts_unexp_error;
4990: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
4991: DEBUG(' Exception occured at l_progress = ' || l_progress || ' during ' || to_char(SYSDATE, 'YYYY-MM-DD HH:DD:SS'),l_proc_name,1);
4992: DEBUG(SQLERRM,l_proc_name,1);
4993:
4994: IF c_mol_mmtt_cursor%ISOPEN THEN
5632:
5633: EXCEPTION
5634: WHEN fnd_api.g_exc_error THEN
5635: x_return_status := fnd_api.g_ret_sts_error;
5636: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
5637: DEBUG(' Exception occured at l_progress = ' || l_progress || ' during ' || to_char(SYSDATE, 'YYYY-MM-DD HH:DD:SS'),l_proc_name,1);
5638: DEBUG(SQLERRM,l_proc_name,1);
5639:
5640: IF c_mol_mmtt_cursor%ISOPEN THEN
5650: END IF;
5651:
5652: WHEN fnd_api.g_exc_unexpected_error THEN
5653: x_return_status := fnd_api.g_ret_sts_unexp_error;
5654: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
5655:
5656: DEBUG(' Exception occured at l_progress = ' || l_progress || ' during ' || to_char(SYSDATE, 'YYYY-MM-DD HH:DD:SS'),l_proc_name,1);
5657: DEBUG(SQLERRM,l_proc_name,1);
5658:
5668: CLOSE c_all_mmtt_cursor;
5669: END IF;
5670: WHEN OTHERS THEN
5671: x_return_status := fnd_api.g_ret_sts_unexp_error;
5672: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
5673: DEBUG(' Exception occured at l_progress = ' || l_progress || ' during ' || to_char(SYSDATE, 'YYYY-MM-DD HH:DD:SS'),l_proc_name,1);
5674: DEBUG(SQLERRM,l_proc_name,1);
5675:
5676: IF c_mol_mmtt_cursor%ISOPEN THEN
5875:
5876: IF (l_username IS NOT NULL) THEN
5877: fnd_message.set_name('WMS','WMS_PUTAWAY_LPN_LOCKED');
5878: fnd_message.set_token('USER',l_username);
5879: fnd_msg_pub.ADD;
5880: fnd_message.set_name('WMS','WMS_CONT_INVALID_LPN');
5881: fnd_msg_pub.ADD;
5882: END IF;
5883:
5877: fnd_message.set_name('WMS','WMS_PUTAWAY_LPN_LOCKED');
5878: fnd_message.set_token('USER',l_username);
5879: fnd_msg_pub.ADD;
5880: fnd_message.set_name('WMS','WMS_CONT_INVALID_LPN');
5881: fnd_msg_pub.ADD;
5882: END IF;
5883:
5884: END IF;
5885: x_ret := 3; --return error
6283:
6284: IF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
6285: -- IF x_msg_count = 0 THEN
6286: -- FND_MESSAGE.SET_NAME('WMS','WMS_LOG_EXCEPTION_FAIL');
6287: -- FND_MSG_PUB.ADD;
6288: -- END IF;
6289: RAISE FND_API.g_exc_unexpected_error;
6290:
6291: ELSIF x_return_status = FND_API.G_RET_STS_ERROR THEN
6290:
6291: ELSIF x_return_status = FND_API.G_RET_STS_ERROR THEN
6292: -- IF x_msg_count = 0 THEN
6293: -- FND_MESSAGE.SET_NAME('WMS','WMS_LOG_EXCEPTION_FAIL');
6294: -- FND_MSG_PUB.ADD;
6295: -- END IF;
6296: RAISE FND_API.G_EXC_ERROR;
6297: END IF;
6298:
6309:
6310:
6311:
6312: IF x_number_of_rows = 0 THEN
6313: fnd_msg_pub.count_and_get(p_count => l_msg_count, p_data =>
6314: l_msg_data);
6315: IF l_debug = 1 THEN
6316: debug('l_msg_count: ' || l_msg_count);
6317: debug('l_msg_data: ' || l_msg_data);
6319:
6320: IF (l_msg_count IS NULL OR l_msg_count = 0) THEN
6321: -- use default message if there are no message on stack
6322: -- first reset message stack
6323: fnd_msg_pub.initialize();
6324: FND_MESSAGE.SET_NAME('WMS','WMS_ALLOCATE_FAIL');
6325: FND_MSG_PUB.ADD;
6326: ELSIF l_msg_count > 1 THEN
6327: FOR i IN 2 .. l_msg_count LOOP
6321: -- use default message if there are no message on stack
6322: -- first reset message stack
6323: fnd_msg_pub.initialize();
6324: FND_MESSAGE.SET_NAME('WMS','WMS_ALLOCATE_FAIL');
6325: FND_MSG_PUB.ADD;
6326: ELSIF l_msg_count > 1 THEN
6327: FOR i IN 2 .. l_msg_count LOOP
6328: fnd_msg_pub.delete_msg(i);
6329: END LOOP;
6324: FND_MESSAGE.SET_NAME('WMS','WMS_ALLOCATE_FAIL');
6325: FND_MSG_PUB.ADD;
6326: ELSIF l_msg_count > 1 THEN
6327: FOR i IN 2 .. l_msg_count LOOP
6328: fnd_msg_pub.delete_msg(i);
6329: END LOOP;
6330: END IF;
6331: RAISE fnd_api.g_exc_error;
6332: END IF;
6855:
6856: IF l_x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
6857: -- IF (x_msg_count = 0) THEN
6858: -- FND_MESSAGE.SET_NAME('WMS','WMS_LOG_EXCEPTION_FAIL');
6859: -- FND_MSG_PUB.ADD;
6860: -- END IF;
6861: RAISE FND_API.g_exc_unexpected_error;
6862: ELSIF l_x_return_status = FND_API.G_RET_STS_ERROR THEN
6863: -- IF (x_msg_count = 0 ) THEN
6861: RAISE FND_API.g_exc_unexpected_error;
6862: ELSIF l_x_return_status = FND_API.G_RET_STS_ERROR THEN
6863: -- IF (x_msg_count = 0 ) THEN
6864: -- FND_MESSAGE.SET_NAME('WMS','WMS_LOG_EXCEPTION_FAIL');
6865: -- FND_MSG_PUB.ADD;
6866: -- END IF;
6867: RAISE FND_API.G_EXC_ERROR;
6868: END IF;
6869:
6894: debug('l_discrepancy = ' || l_discrepancy, 'load_lpn', 9);
6895: END IF;
6896:
6897: IF l_discrepancy = 1 THEN
6898: fnd_msg_pub.count_and_get(p_count => l_msg_count, p_data =>
6899: l_msg_data);
6900: IF l_debug = 1 THEN
6901: debug('l_msg_count: ' || l_msg_count);
6902: debug('l_msg_data: ' || l_msg_data);
6904:
6905: IF (l_msg_count IS NULL OR l_msg_count = 0) THEN
6906: -- use default message if there are no message on stack
6907: -- first reset message stack
6908: fnd_msg_pub.initialize();
6909: FND_MESSAGE.SET_NAME('WMS','WMS_ALLOCATE_FAIL');
6910: FND_MSG_PUB.ADD;
6911: ELSIF l_msg_count > 1 THEN
6912: FOR i IN 2 .. l_msg_count LOOP
6906: -- use default message if there are no message on stack
6907: -- first reset message stack
6908: fnd_msg_pub.initialize();
6909: FND_MESSAGE.SET_NAME('WMS','WMS_ALLOCATE_FAIL');
6910: FND_MSG_PUB.ADD;
6911: ELSIF l_msg_count > 1 THEN
6912: FOR i IN 2 .. l_msg_count LOOP
6913: fnd_msg_pub.delete_msg(i);
6914: END LOOP;
6909: FND_MESSAGE.SET_NAME('WMS','WMS_ALLOCATE_FAIL');
6910: FND_MSG_PUB.ADD;
6911: ELSIF l_msg_count > 1 THEN
6912: FOR i IN 2 .. l_msg_count LOOP
6913: fnd_msg_pub.delete_msg(i);
6914: END LOOP;
6915: END IF;
6916:
6917: -- 6962664
6978: IF (l_debug = 1) THEN
6979: DEBUG('There is no employee id tied to the user','load_lpn',9);
6980: END IF;
6981: fnd_message.set_name('WMS', 'WMS_NO_EMP_FOR_USR');
6982: fnd_msg_pub.ADD;
6983: RAISE fnd_api.g_exc_error;
6984: END;
6985:
6986: -- BEGIN DBI FIX
7074: IF (l_debug = 1) THEN
7075: DEBUG('There is no employee id tied to the user','transfer_contents',9);
7076: END IF;
7077: fnd_message.set_name('WMS', 'WMS_NO_EMP_FOR_USR');
7078: fnd_msg_pub.ADD;
7079: RAISE fnd_api.g_exc_error;
7080: END;
7081: debug('Calling complete_atf_load for:'||p_from_lpn_id);
7082: DEBUG(' p_org_id => '||p_org_id, 'load_lpn',4);
7206: inv_rcv_common_apis.init_startup_values(l_from_org);
7207: EXCEPTION
7208: WHEN NO_DATA_FOUND THEN
7209: fnd_message.set_name('INV', 'INV_RCV_PARAM');
7210: fnd_msg_pub.ADD;
7211: RAISE fnd_api.g_exc_error;
7212: END;
7213:
7214: l_progress := '2';
7982: IF (l_debug = 1) THEN
7983: DEBUG('There is no employee id tied to the user','transfer_contents',9);
7984: END IF;
7985: fnd_message.set_name('WMS', 'WMS_NO_EMP_FOR_USR');
7986: fnd_msg_pub.ADD;
7987: RAISE fnd_api.g_exc_error;
7988: END;
7989:
7990: l_progress := '7';
8010: DEBUG('from LPN not found in WMS_LICENSE_PLATE_NUMBERS',
8011: 'transfer_contents',9);
8012: END IF;
8013: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_LPN');
8014: fnd_msg_pub.ADD;
8015: RAISE fnd_api.g_exc_error;
8016: END;
8017:
8018: l_progress := '9';
8036: DEBUG('INTO LPN not found in WMS_LICENSE_PLATE_NUMBERS',
8037: 'transfer_contents',9);
8038: END IF;
8039: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_LPN');
8040: fnd_msg_pub.ADD;
8041: RAISE fnd_api.g_exc_error;
8042: END;
8043:
8044: -- Set variable if sub/loc of toLPN is different from that of from LPN
8069: DEBUG('Invalid context for from_lpn_id',
8070: 'transfer_contents', 9);
8071: END IF;
8072: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_LPN_CONTEXT');
8073: fnd_msg_pub.ADD;
8074: RAISE fnd_api.g_exc_error;
8075: END IF;
8076:
8077: l_progress := '30';
8135:
8136: l_progress := '50';
8137:
8138: IF (l_count > 0) THEN
8139: fnd_msg_pub.count_and_get(p_count => l_msg_count, p_data =>
8140: l_msg_data);
8141: IF l_debug = 1 THEN
8142: debug('l_msg_count: ' || l_msg_count);
8143: debug('l_msg_data: ' || l_msg_data);
8145:
8146: IF (l_msg_count IS NULL OR l_msg_count = 0) THEN
8147: -- use default message if there are no message on stack
8148: -- first reset message stack
8149: fnd_msg_pub.initialize();
8150: FND_MESSAGE.SET_NAME('WMS','WMS_ALLOCATE_FAIL');
8151: FND_MSG_PUB.ADD;
8152: ELSIF l_msg_count > 1 THEN
8153: FOR i IN 2 .. l_msg_count LOOP
8147: -- use default message if there are no message on stack
8148: -- first reset message stack
8149: fnd_msg_pub.initialize();
8150: FND_MESSAGE.SET_NAME('WMS','WMS_ALLOCATE_FAIL');
8151: FND_MSG_PUB.ADD;
8152: ELSIF l_msg_count > 1 THEN
8153: FOR i IN 2 .. l_msg_count LOOP
8154: fnd_msg_pub.delete_msg(i);
8155: END LOOP;
8150: FND_MESSAGE.SET_NAME('WMS','WMS_ALLOCATE_FAIL');
8151: FND_MSG_PUB.ADD;
8152: ELSIF l_msg_count > 1 THEN
8153: FOR i IN 2 .. l_msg_count LOOP
8154: fnd_msg_pub.delete_msg(i);
8155: END LOOP;
8156: END IF;
8157: RAISE fnd_api.g_exc_error;
8158: END IF;
8211: IF (l_debug = 1) THEN
8212: debug('No MMTT returned!','transfer_contents',9);
8213: END IF;
8214: FND_MESSAGE.SET_NAME('WMS','WMS_ALLOCATE_FAIL');
8215: FND_MSG_PUB.ADD;
8216: RAISE fnd_api.g_exc_error;
8217: END IF;
8218: ELSE
8219: -- For inventory and wip, just query based on move_order_line_id
9198:
9199: EXCEPTION
9200: WHEN OTHERS THEN
9201: fnd_message.set_name('WMS', 'WMS_TASK_ERROR');
9202: fnd_msg_pub.add;
9203: x_return_status := fnd_api.g_ret_sts_unexp_error;
9204: IF (l_debug = 1) THEN
9205: debug('Exception occured after l_progress ='|| l_progress, 'transfer_contents', 9);
9206: END IF;
9805: IF (l_debug = 1) THEN
9806: DEBUG('Error fetching MMTTs for the current group. Cannot drop', l_proc_name, 1);
9807: END IF;
9808: fnd_message.set_name('WMS', 'WMS_TASK_ERROR');
9809: fnd_msg_pub.add;
9810: RAISE FND_API.G_EXC_ERROR;
9811: END;
9812: ELSE
9813: --For other drop types, the user would not be confirming quantity and uom
10411: END IF;
10412:
10413: IF (l_temp_id_tbl.COUNT = 0) THEN
10414: fnd_message.set_name('WMS', 'WMS_TASK_ERROR');
10415: fnd_msg_pub.ADD;
10416: END IF;
10417:
10418: IF (p_drop_type = G_DT_ITEM_DROP) THEN
10419: --First get the total drop quantity in transaction uom
11051: IF (l_debug = 1) THEN
11052: DEBUG('complete_putaway_wrapper: Encountered g_exc_error while calling receiving manager;'|| to_char(sysdate, 'YYYY-MM-DD HH:DD:SS'), 4);
11053: END IF;
11054: fnd_message.set_name('WMS', 'WMS_TD_TXNMGR_ERROR');
11055: fnd_msg_pub.add;
11056: RAISE FND_API.G_EXC_ERROR;
11057: END IF;
11058:
11059: IF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
11060: IF (l_debug = 1) THEN
11061: DEBUG('complete_putaway_wrapper: Encountered g_exc_unexp_error while calling receiving manager;'|| to_char(sysdate, 'YYYY-MM-DD HH:DD:SS'), 4);
11062: END IF;
11063: fnd_message.set_name('WMS', 'WMS_TD_TXNMGR_ERROR');
11064: fnd_msg_pub.add;
11065: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
11066: END IF;
11067:
11068: --If the LPN context is Inventory/WIP
11149: END IF;
11150:
11151: IF (l_txn_ret <> 0) THEN
11152: fnd_message.set_name('WMS', 'WMS_TD_TXNMGR_ERROR');
11153: fnd_msg_pub.ADD;
11154: RAISE fnd_api.g_exc_unexpected_error;
11155: END IF;
11156: END IF; --END IF call the managers based on lpn_context
11157:
11218: DEBUG('complete_putaway_wrapper: G_EXC_ERROR ocurred after l_progress = ' || l_progress, l_proc_name);
11219: END IF;
11220:
11221: --Get message count and data
11222: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
11223:
11224: WHEN fnd_api.g_exc_unexpected_error THEN
11225: x_return_status := fnd_api.g_ret_sts_unexp_error;
11226:
11249: DEBUG('complete_putaway_wrapper: G_EXC_UNEXPECTED_ERROR ocurred after l_progress = ' || l_progress, l_proc_name);
11250: END IF;
11251:
11252: --Get message count and data
11253: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
11254:
11255: WHEN OTHERS THEN
11256: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
11257:
11280: DEBUG('complete_putaway_wrapper: OTHER EXCEPTION ' || SQLERRM || ' ocurred after l_progress = ' || l_progress, l_proc_name);
11281: END IF;
11282:
11283: --Get message count and data
11284: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
11285: IF SQLCODE IS NOT NULL THEN
11286: inv_mobile_helper_functions.sql_error('wms_putaway_utils_pvt.complete_putaway_wrapper',l_progress, SQLCODE);
11287: END IF;
11288:
11447: IF (l_debug = 1) THEN
11448: debug('Failure returned from wms_container_pub.create_lpn API','validate_into_lpn',9);
11449: END IF;
11450: FND_MESSAGE.SET_NAME('WMS', 'WMS_TD_CREATE_LPN_ERROR');
11451: FND_MSG_PUB.ADD;
11452: RAISE fnd_api.g_exc_error;
11453: END IF;
11454: l_progress := '60';
11455:
11592: IF (l_debug = 1) THEN
11593: debug('Into LPN validation failed!','validate_into_lpn',9);
11594: END IF;
11595: FND_MESSAGE.SET_NAME('WMS','WMS_NO_LPN_LOAD_ALLOWED');
11596: FND_MSG_PUB.ADD;
11597: RAISE fnd_api.g_exc_error;
11598: ELSE
11599: x_validation_passed := 'Y';
11600: IF (l_debug = 1) THEN
11692: IF l_allowed = 'N' THEN
11693: x_return_status := fnd_api.g_ret_sts_error;
11694: x_validation_passed := 'N';
11695: fnd_message.set_name('WMS', 'WMS_LOOSE_TO_LPN');
11696: fnd_msg_pub.ADD;
11697: RETURN;
11698: END IF;
11699: END IF;
11700: x_validation_passed := 'Y';
12124: ROLLBACK TO validate_lpn_sp;
12125: x_return_status := fnd_api.g_ret_sts_error;
12126: x_validation_passed := 'N';
12127: x_new_lpn_created := 'N';
12128: fnd_msg_pub.count_and_get(p_count => x_msg_count,
12129: p_data => x_msg_data);
12130: IF (l_debug = 1) THEN
12131: debug('Exiting validate_into_lpn - Execution error: ' ||
12132: l_progress ||' '|| TO_CHAR(SYSDATE, 'YYYY-MM-DD HH:DD:SS'),'validate_into_lpn',9);
12136: ROLLBACK TO validate_lpn_sp;
12137: x_return_status := fnd_api.g_ret_sts_unexp_error;
12138: x_validation_passed := 'N';
12139: x_new_lpn_created := 'N';
12140: fnd_msg_pub.count_and_get(p_count => x_msg_count,
12141: p_data => x_msg_data);
12142: IF (l_debug = 1) THEN
12143: debug('Exiting validate_into_lpn - Unexpected error: ' ||
12144: l_progress ||' '|| TO_CHAR(SYSDATE, 'YYYY-MM-DD HH:DD:SS'),'validate_into_lpn',9);
12148: ROLLBACK TO validate_lpn_sp;
12149: x_return_status := fnd_api.g_ret_sts_unexp_error;
12150: x_validation_passed := 'N';
12151: x_new_lpn_created := 'N';
12152: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
12153: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
12154: END IF;
12155: fnd_msg_pub.count_and_get(p_count => x_msg_count,
12156: p_data => x_msg_data);
12149: x_return_status := fnd_api.g_ret_sts_unexp_error;
12150: x_validation_passed := 'N';
12151: x_new_lpn_created := 'N';
12152: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
12153: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
12154: END IF;
12155: fnd_msg_pub.count_and_get(p_count => x_msg_count,
12156: p_data => x_msg_data);
12157: IF (l_debug = 1) THEN
12151: x_new_lpn_created := 'N';
12152: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
12153: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
12154: END IF;
12155: fnd_msg_pub.count_and_get(p_count => x_msg_count,
12156: p_data => x_msg_data);
12157: IF (l_debug = 1) THEN
12158: debug('Exiting validate_into_lpn - Others exception: ' ||
12159: l_progress ||' '|| TO_CHAR(SYSDATE, 'YYYY-MM-DD HH:DD:SS'),'validate_into_lpn',9);
12375: EXCEPTION
12376: WHEN fnd_api.g_exc_error THEN
12377: ROLLBACK TO update_capacity_sp;
12378: x_return_status := fnd_api.g_ret_sts_error;
12379: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
12380:
12381: IF (l_debug = 1) THEN
12382: debug(
12383: 'Exiting update_loc_suggested_capacity - Execution error: ' || l_progress || ' '
12386: END IF;
12387: WHEN fnd_api.g_exc_unexpected_error THEN
12388: ROLLBACK TO update_capacity_sp;
12389: x_return_status := fnd_api.g_ret_sts_unexp_error;
12390: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
12391:
12392: IF (l_debug = 1) THEN
12393: debug(
12394: 'Exiting update_loc_suggested_capacity - Unexpected error: ' || l_progress || ' '
12398: WHEN OTHERS THEN
12399: ROLLBACK TO update_capacity_sp;
12400: x_return_status := fnd_api.g_ret_sts_unexp_error;
12401:
12402: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
12403: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
12404: END IF;
12405:
12406: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
12399: ROLLBACK TO update_capacity_sp;
12400: x_return_status := fnd_api.g_ret_sts_unexp_error;
12401:
12402: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
12403: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
12404: END IF;
12405:
12406: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
12407:
12402: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
12403: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
12404: END IF;
12405:
12406: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
12407:
12408: IF (l_debug = 1) THEN
12409: debug(
12410: 'Exiting update_loc_suggested_capacity - Others exception: ' || l_progress || ' '