415: END IF;
416:
417: IF p_lot_controlled <> 'Y' AND p_serial_controlled <> 'Y' THEN -- No Lot or serial control
418: fnd_message.set_token('ROUTINE', '- proc_insert_update_task' );
419: fnd_msg_pub.ADD;
420: l_primary_quantity := Round(p_transaction_quantity/l_conversion_factor, l_g_decimal_precision);
421: l_secondary_quantity := p_secondary_quantity;
422: ELSE
423: proc_parse_lot_serial_catchwt
444: -- Internal Error $ROUTINE
445: fnd_message.set_token('ROUTINE', ' - proc_parse_lot_serial_catchwt API ' );
446: mydebug('Error parsing lot/serial/catch weight string' );
447: -- "Error reserving Serial Number/s"
448: fnd_msg_pub.ADD;
449: RAISE fnd_api.g_exc_error;
450: END IF;
451:
452: IF p_lot_controlled = 'Y' AND p_serial_controlled <> 'Y' THEN -- Lot Controlled only
1091:
1092: EXCEPTION
1093: WHEN fnd_api.g_exc_error THEN
1094: x_return_status := l_g_ret_sts_error;
1095: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1096:
1097: IF (l_debug = 1) THEN
1098: mydebug('Error', 'WMS_TASK_LOAD.UPDATE_LOADED_PART');
1099: END IF;
1100: ROLLBACK;
1101:
1102: WHEN OTHERS THEN
1103: x_return_status := l_g_ret_sts_unexp_error;
1104: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1105: IF (l_debug = 1) THEN
1106: mydebug('Error: ' || Sqlerrm, 'WMS_TASK_LOAD.UPDATE_LOADED_PART');
1107: END IF;
1108: ROLLBACK ;
1285: IF x_cms_check = 'FAIL'
1286: THEN
1287: --fnd_message.set_name('WMS', 'WMS_CANCELLED_SOURCE');
1288: -- Source of the task is cancelled by source.. F2 to rollback
1289: --fnd_msg_pub.ADD;
1290: RAISE fnd_api.g_exc_error;
1291: END IF;
1292: END IF;
1293:
1320: IF SQL%NOTFOUND THEN
1321: mydebug ('Cannot find LPNs to update the context' );
1322: fnd_message.set_name('WMS', 'WMS_WRONG_FROM_LPN_CONTEXT');
1323: -- FROM LPN Context is not valid '
1324: fnd_msg_pub.ADD;
1325: RAISE fnd_api.g_exc_error;
1326:
1327: END IF;
1328: EXCEPTION
1356: IF SQL%NOTFOUND THEN
1357: mydebug ('Cannot find LPNs to update the context' );
1358: fnd_message.set_name('WMS', 'WMS_WRONG_TO_LPN_CONTEXT');
1359: -- To LPN Context is not valid
1360: fnd_msg_pub.ADD;
1361:
1362: RAISE fnd_api.g_exc_error;
1363: END IF;
1364: EXCEPTION
1497: mydebug('End .. ' || l_proc_name);
1498: EXCEPTION
1499: WHEN fnd_api.g_exc_error THEN
1500: x_return_status := l_g_ret_sts_error;
1501: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1502: mydebug('ROLLBACK ' );
1503: ROLLBACK ;
1504: mydebug('l_progress = ' || l_proc_name || ':'|| l_progress);
1505: mydebug('RAISE fnd_api.g_exc_error: ' || SQLERRM);
1505: mydebug('RAISE fnd_api.g_exc_error: ' || SQLERRM);
1506: mydebug('x_msg_count/Data = ' || x_msg_count || '/'|| x_msg_data);
1507: WHEN fnd_api.g_exc_unexpected_error THEN
1508: x_return_status := fnd_api.g_ret_sts_unexp_error;
1509: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1510: mydebug('ROLLBACK ' );
1511: ROLLBACK ;
1512: mydebug('l_progress = ' || l_proc_name || ':'|| l_progress);
1513: mydebug('RAISE fnd_api.g_exc_unexpected_error: ' || SQLERRM);
1513: mydebug('RAISE fnd_api.g_exc_unexpected_error: ' || SQLERRM);
1514: mydebug('x_msg_count/Data = ' || x_msg_count || '/'|| x_msg_data);
1515: WHEN OTHERS THEN
1516: x_return_status := l_g_ret_sts_unexp_error;
1517: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1518: mydebug('ROLLBACK ' );
1519: ROLLBACK ;
1520: mydebug('l_progress = ' || l_proc_name || ':'|| l_progress);
1521: mydebug('RAISE fnd_api.g_exc_error: ' || SQLERRM);
1655: myDebug('Error inserting a new task using WDT record for : '|| p_temp_id);
1656: fnd_message.set_name('WMS', 'WMS_INTERNAL_ERROR'); --NEWMSG
1657: -- Internal Error $ROUTINE
1658: fnd_message.set_token('ROUTINE', '- proc_insert_update_task' );
1659: fnd_msg_pub.ADD;
1660: RAISE fnd_api.G_EXC_ERROR;
1661: END IF;
1662: ELSE
1663: l_progress := '200';
1681: myDebug('Error updating task for : '|| l_transaction_temp_id);
1682: fnd_message.set_name('WMS', 'WMS_INTERNAL_ERROR'); --NEWMSG
1683: -- Internal Error $ROUTINE
1684: fnd_message.set_token('ROUTINE', '- proc_insert_update_task' );
1685: fnd_msg_pub.ADD;
1686: RAISE fnd_api.G_EXC_ERROR;
1687: END IF;
1688: IF p_update = 'Y2' AND p_action = l_g_action_load_multiple THEN
1689: fnd_message.set_token('ROUTINE', '- proc_insert_update_task' );
1686: RAISE fnd_api.G_EXC_ERROR;
1687: END IF;
1688: IF p_update = 'Y2' AND p_action = l_g_action_load_multiple THEN
1689: fnd_message.set_token('ROUTINE', '- proc_insert_update_task' );
1690: fnd_msg_pub.ADD;
1691: l_progress := '300';
1692: mydebug('l_progress: ' || l_progress );
1693: -- delete the original one with p_transaction_temp_id
1694: DELETE wms_dispatched_tasks
1697: myDebug('Error deleting task for : '|| l_transaction_temp_id);
1698: fnd_message.set_name('WMS', 'WMS_INTERNAL_ERROR'); --NEWMSG
1699: -- Internal Error $ROUTINE
1700: fnd_message.set_token('ROUTINE', '- proc_insert_update_task' );
1701: fnd_msg_pub.ADD;
1702: RAISE fnd_api.G_EXC_ERROR;
1703: END IF;
1704: END IF;
1705:
1708: mydebug('End .. ' || l_proc_name);
1709: EXCEPTION
1710: WHEN fnd_api.g_exc_error THEN
1711: x_return_status := l_g_ret_sts_error;
1712: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1713: mydebug('ROLLBACK ' );
1714: ROLLBACK ;
1715: mydebug('l_progress = ' || l_proc_name || ':'|| l_progress);
1716: mydebug('RAISE fnd_api.g_exc_error: ' || SQLERRM);
1715: mydebug('l_progress = ' || l_proc_name || ':'|| l_progress);
1716: mydebug('RAISE fnd_api.g_exc_error: ' || SQLERRM);
1717: WHEN fnd_api.g_exc_unexpected_error THEN
1718: x_return_status := fnd_api.g_ret_sts_unexp_error;
1719: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1720: mydebug('ROLLBACK ' );
1721: ROLLBACK ;
1722: mydebug('l_progress = ' || l_proc_name || ':'|| l_progress);
1723: mydebug('RAISE fnd_api.g_exc_unexpected_error: ' || SQLERRM);
1723: mydebug('RAISE fnd_api.g_exc_unexpected_error: ' || SQLERRM);
1724: mydebug('x_msg_count/Data = ' || x_msg_count || '/'|| x_msg_data);
1725: WHEN OTHERS THEN
1726: x_return_status := l_g_ret_sts_unexp_error;
1727: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
1728: mydebug('ROLLBACK ' );
1729: ROLLBACK ;
1730: mydebug('l_progress = ' || l_proc_name || ':'|| l_progress);
1731: mydebug('RAISE fnd_api.g_exc_error: ' || SQLERRM);
2360: IF SQL%NOTFOUND THEN
2361: mydebug (' p_transaction_temp_id: NOT found : ' || p_transaction_temp_id);
2362: fnd_message.set_name('WMS', 'WMS_INSERT_ALLOCATION'); -- NEWMSG
2363: -- "Error Inserting Allocation ."
2364: fnd_msg_pub.ADD;
2365: RAISE fnd_api.G_EXC_ERROR;
2366: END IF;
2367: l_progress := '120';
2368: mydebug ('l_progress: ' || l_progress );
2438: mydebug('proc_process_confirmed_lots.x_return_status : ' || x_return_status);
2439: fnd_message.set_name('WMS', 'WMS_INTERNAL_ERROR'); --NEWMSG
2440: -- Internal Error $ROUTINE
2441: fnd_message.set_token('ROUTINE', '- proc_process_confirmed_lots API' );
2442: fnd_msg_pub.ADD;
2443: RAISE fnd_api.g_exc_error;
2444: END IF;
2445: mydebug ('Return from proc_process_confirmed_lots ' );
2446: END IF;
2482: mydebug('proc_process_confirmed_serials.x_return_status : ' || x_return_status);
2483: fnd_message.set_name('WMS', 'WMS_INTERNAL_ERROR'); --NEWMSG
2484: -- Internal Error $ROUTINE
2485: fnd_message.set_token('ROUTINE', '- proc_process_confirmed_serials API' );
2486: fnd_msg_pub.ADD;
2487: RAISE fnd_api.g_exc_error;
2488: END IF;
2489: l_progress := '330';
2490: mydebug ('l_progress: ' || l_progress );
2606:
2607: EXCEPTION
2608: WHEN fnd_api.g_exc_error THEN
2609: x_return_status := l_g_ret_sts_error;
2610: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2611: mydebug('l_progress = ' || l_proc_name || ':'|| l_progress);
2612: mydebug('RAISE fnd_api.g_exc_error: ' || SQLERRM);
2613: mydebug('ROLLBACK ' );
2614: ROLLBACK ;
2613: mydebug('ROLLBACK ' );
2614: ROLLBACK ;
2615: WHEN fnd_api.g_exc_unexpected_error THEN
2616: x_return_status := fnd_api.g_ret_sts_unexp_error;
2617: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2618: mydebug('ROLLBACK ' );
2619: ROLLBACK ;
2620: mydebug('l_progress = ' || l_proc_name || ':'|| l_progress);
2621: mydebug('RAISE fnd_api.g_exc_unexpected_error: ' || SQLERRM);
2621: mydebug('RAISE fnd_api.g_exc_unexpected_error: ' || SQLERRM);
2622: mydebug('x_msg_count/Data = ' || x_msg_count || '/'|| x_msg_data);
2623: WHEN OTHERS THEN
2624: x_return_status := l_g_ret_sts_unexp_error;
2625: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2626: mydebug('l_progress = ' || l_proc_name || ':'|| l_progress);
2627: mydebug('RAISE fnd_api.g_exc_error: ' || SQLERRM);
2628: mydebug('ROLLBACK ' );
2629: ROLLBACK ;
3097: mydebug('End .. ' || l_proc_name);
3098: EXCEPTION
3099: WHEN fnd_api.g_exc_error THEN
3100: x_return_status := l_g_ret_sts_error;
3101: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
3102: mydebug('l_progress = ' || l_proc_name || ':'|| l_progress);
3103: mydebug('fnd_api.g_exc_error: ' || SQLERRM);
3104: mydebug('ROLLBACK ' );
3105: ROLLBACK ;
3104: mydebug('ROLLBACK ' );
3105: ROLLBACK ;
3106: WHEN fnd_api.g_exc_unexpected_error THEN
3107: x_return_status := fnd_api.g_ret_sts_unexp_error;
3108: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
3109: mydebug('ROLLBACK ' );
3110: mydebug('l_progress = ' || l_proc_name || ':'|| l_progress);
3111: mydebug('RAISE fnd_api.g_exc_unexpected_error: ' || SQLERRM);
3112: mydebug('x_msg_count/Data = ' || x_msg_count || '/'|| x_msg_data);
3112: mydebug('x_msg_count/Data = ' || x_msg_count || '/'|| x_msg_data);
3113: ROLLBACK ;
3114: WHEN OTHERS THEN
3115: x_return_status := l_g_ret_sts_unexp_error;
3116: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
3117: mydebug('l_progress = ' || l_proc_name || ':'|| l_progress);
3118: mydebug('fnd_api.g_exc_error: ' || SQLERRM);
3119: mydebug('ROLLBACK ' );
3120: ROLLBACK ;
3376: mydebug('End .. ' || l_proc_name);
3377: EXCEPTION
3378: WHEN fnd_api.g_exc_error THEN
3379: x_return_status := l_g_ret_sts_error;
3380: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
3381: mydebug('l_progress = ' || l_proc_name || ':'|| l_progress);
3382: mydebug('fnd_api.g_exc_error: ' || SQLERRM);
3383: mydebug('ROLLBACK ' );
3384: ROLLBACK ;
3383: mydebug('ROLLBACK ' );
3384: ROLLBACK ;
3385: WHEN fnd_api.g_exc_unexpected_error THEN
3386: x_return_status := fnd_api.g_ret_sts_unexp_error;
3387: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
3388: mydebug('ROLLBACK ' );
3389: ROLLBACK ;
3390: mydebug('l_progress = ' || l_proc_name || ':'|| l_progress);
3391: mydebug('RAISE fnd_api.g_exc_unexpected_error: ' || SQLERRM);
3391: mydebug('RAISE fnd_api.g_exc_unexpected_error: ' || SQLERRM);
3392: mydebug('x_msg_count/Data = ' || x_msg_count || '/'|| x_msg_data);
3393: WHEN OTHERS THEN
3394: x_return_status := l_g_ret_sts_unexp_error;
3395: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
3396: mydebug('l_progress = ' || l_proc_name || ':'|| l_progress);
3397: mydebug('fnd_api.g_exc_error: ' || SQLERRM);
3398: mydebug('ROLLBACK ' );
3399: ROLLBACK ;
3638: mydebug('End.. ' || l_proc_name);
3639: EXCEPTION
3640: WHEN fnd_api.g_exc_error THEN
3641: x_return_status := l_g_ret_sts_error;
3642: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
3643: mydebug('l_progress = ' || l_proc_name || ':'|| l_progress);
3644: mydebug('RAISE fnd_api.g_exc_error: ' || SQLERRM);
3645: mydebug('ROLLBACK ' );
3646: ROLLBACK ;
3645: mydebug('ROLLBACK ' );
3646: ROLLBACK ;
3647: WHEN fnd_api.g_exc_unexpected_error THEN
3648: x_return_status := fnd_api.g_ret_sts_unexp_error;
3649: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
3650: mydebug('ROLLBACK ' );
3651: mydebug('l_progress = ' || l_proc_name || ':'|| l_progress);
3652: mydebug('RAISE fnd_api.g_exc_unexpected_error: ' || SQLERRM);
3653: mydebug('x_msg_count/Data = ' || x_msg_count || '/'|| x_msg_data);
3653: mydebug('x_msg_count/Data = ' || x_msg_count || '/'|| x_msg_data);
3654: ROLLBACK ;
3655: WHEN OTHERS THEN
3656: x_return_status := l_g_ret_sts_unexp_error;
3657: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
3658: mydebug('l_progress = ' || l_proc_name || ':'|| l_progress);
3659: mydebug('RAISE fnd_api.g_exc_error: ' || SQLERRM);
3660: mydebug('ROLLBACK ' );
3661: ROLLBACK ;
4088: mydebug('End .. ' || l_proc_name);
4089: EXCEPTION
4090: WHEN fnd_api.g_exc_error THEN
4091: x_return_status := l_g_ret_sts_error;
4092: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
4093: mydebug('ROLLBACK ' );
4094: ROLLBACK ;
4095: mydebug('l_progress = ' || l_proc_name || ':'|| l_progress);
4096: mydebug('RAISE fnd_api.g_exc_error: ' || SQLERRM);
4095: mydebug('l_progress = ' || l_proc_name || ':'|| l_progress);
4096: mydebug('RAISE fnd_api.g_exc_error: ' || SQLERRM);
4097: WHEN fnd_api.g_exc_unexpected_error THEN
4098: x_return_status := fnd_api.g_ret_sts_unexp_error;
4099: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
4100: mydebug('ROLLBACK ' );
4101: mydebug('l_progress = ' || l_proc_name || ':'|| l_progress);
4102: mydebug('RAISE fnd_api.g_exc_unexpected_error: ' || SQLERRM);
4103: mydebug('x_msg_count/Data = ' || x_msg_count || '/'|| x_msg_data);
4103: mydebug('x_msg_count/Data = ' || x_msg_count || '/'|| x_msg_data);
4104: ROLLBACK ;
4105: WHEN OTHERS THEN
4106: x_return_status := l_g_ret_sts_unexp_error;
4107: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
4108: mydebug('ROLLBACK ' );
4109: ROLLBACK ;
4110: mydebug('l_progress = ' || l_proc_name || ':'|| l_progress);
4111: mydebug('RAISE fnd_api.g_exc_error: ' || SQLERRM);
4155:
4156: IF SQL%NOTFOUND THEN
4157: fnd_message.set_name('WMS', 'WMS_ERROR_MARKING_SERIAL'); --NEWMSG
4158: -- "Error reserving Serial Number/s"
4159: fnd_msg_pub.ADD;
4160: RAISE fnd_api.G_EXC_ERROR;
4161: END IF;
4162: ELSE
4163: l_progress := '300';
4177:
4178: IF SQL%NOTFOUND THEN
4179: fnd_message.set_name('WMS', 'WMS_ERROR_MARKING_SERIAL'); --NEWMSG
4180: -- "Error reserving Serial Number/s"
4181: fnd_msg_pub.ADD;
4182: RAISE fnd_api.G_EXC_ERROR;
4183: END IF;
4184: END IF;
4185:
4186: mydebug('End .. ' || l_proc_name);
4187: EXCEPTION
4188: WHEN fnd_api.g_exc_error THEN
4189: x_return_status := l_g_ret_sts_error;
4190: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
4191: mydebug('ROLLBACK ' );
4192: ROLLBACK ;
4193: mydebug('l_progress = ' || l_proc_name || ':'|| l_progress);
4194: mydebug('RAISE fnd_api.g_exc_error: ' || SQLERRM);
4193: mydebug('l_progress = ' || l_proc_name || ':'|| l_progress);
4194: mydebug('RAISE fnd_api.g_exc_error: ' || SQLERRM);
4195: WHEN fnd_api.g_exc_unexpected_error THEN
4196: x_return_status := fnd_api.g_ret_sts_unexp_error;
4197: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
4198: mydebug('ROLLBACK ' );
4199: mydebug('l_progress = ' || l_proc_name || ':'|| l_progress);
4200: mydebug('RAISE fnd_api.g_exc_unexpected_error: ' || SQLERRM);
4201: mydebug('x_msg_count/Data = ' || x_msg_count || '/'|| x_msg_data);
4201: mydebug('x_msg_count/Data = ' || x_msg_count || '/'|| x_msg_data);
4202: ROLLBACK ;
4203: WHEN OTHERS THEN
4204: x_return_status := l_g_ret_sts_unexp_error;
4205: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
4206: mydebug('ROLLBACK ' );
4207: ROLLBACK ;
4208: mydebug('l_progress = ' || l_proc_name || ':'|| l_progress);
4209: mydebug('RAISE fnd_api.g_exc_error: ' || SQLERRM);
4252: mydebug('End .. ' || l_proc_name);
4253: EXCEPTION
4254: WHEN fnd_api.g_exc_error THEN
4255: x_return_status := l_g_ret_sts_error;
4256: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
4257: mydebug('ROLLBACK ' );
4258: ROLLBACK ;
4259: mydebug('l_progress = ' || l_proc_name || ':'|| l_progress);
4260: mydebug('RAISE fnd_api.g_exc_error: ' || SQLERRM);
4259: mydebug('l_progress = ' || l_proc_name || ':'|| l_progress);
4260: mydebug('RAISE fnd_api.g_exc_error: ' || SQLERRM);
4261: WHEN fnd_api.g_exc_unexpected_error THEN
4262: x_return_status := fnd_api.g_ret_sts_unexp_error;
4263: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
4264: mydebug('ROLLBACK ' );
4265: mydebug('l_progress = ' || l_proc_name || ':'|| l_progress);
4266: mydebug('RAISE fnd_api.g_exc_unexpected_error: ' || SQLERRM);
4267: mydebug('x_msg_count/Data = ' || x_msg_count || '/'|| x_msg_data);
4267: mydebug('x_msg_count/Data = ' || x_msg_count || '/'|| x_msg_data);
4268: ROLLBACK ;
4269: WHEN OTHERS THEN
4270: x_return_status := l_g_ret_sts_unexp_error;
4271: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
4272: mydebug('ROLLBACK ' );
4273: ROLLBACK ;
4274: mydebug('l_progress = ' || l_proc_name || ':'|| l_progress);
4275: mydebug('RAISE fnd_api.g_exc_error: ' || SQLERRM);
4526:
4527: IF rec_mmtt1.item_primary_uom_code IS NULL THEN
4528: fnd_message.set_name('WMS', 'WMS_NULL_PRIM_UOM');
4529: -- Item primary UOM is null for this task
4530: fnd_msg_pub.ADD;
4531: RAISE fnd_api.g_exc_unexpected_error;
4532: END IF;
4533: -- this global temp table will have a list of transaction_temp_ids of MMTTs that
4534: -- are confirmed to stay back in MMTT. Later we will use this list to decide on which
5166: x_return_status := l_g_ret_sts_error;
5167: fnd_message.set_name('WMS', 'WMS_INTERNAL_ERROR'); --NEWMSG
5168: -- Internal Error $ROUTINE
5169: fnd_message.set_token('ROUTINE', '- Process_f2 API' );
5170: fnd_msg_pub.ADD;
5171: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
5172: mydebug('ROLLBACK ' );
5173: ROLLBACK ;
5174: mydebug('l_progress = ' || l_proc_name || ':'|| l_progress);
5167: fnd_message.set_name('WMS', 'WMS_INTERNAL_ERROR'); --NEWMSG
5168: -- Internal Error $ROUTINE
5169: fnd_message.set_token('ROUTINE', '- Process_f2 API' );
5170: fnd_msg_pub.ADD;
5171: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
5172: mydebug('ROLLBACK ' );
5173: ROLLBACK ;
5174: mydebug('l_progress = ' || l_proc_name || ':'|| l_progress);
5175: mydebug('fnd_api.g_exc_error: ' || SQLERRM);
5177: x_return_status := fnd_api.g_ret_sts_unexp_error;
5178: fnd_message.set_name('WMS', 'WMS_INTERNAL_ERROR'); --NEWMSG
5179: -- Internal Error $ROUTINE
5180: fnd_message.set_token('ROUTINE', '- Process_f2 API' );
5181: fnd_msg_pub.ADD;
5182: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
5183: mydebug('ROLLBACK ' );
5184: mydebug('l_progress = ' || l_proc_name || ':'|| l_progress);
5185: mydebug('RAISE fnd_api.g_exc_unexpected_error: ' || SQLERRM);
5178: fnd_message.set_name('WMS', 'WMS_INTERNAL_ERROR'); --NEWMSG
5179: -- Internal Error $ROUTINE
5180: fnd_message.set_token('ROUTINE', '- Process_f2 API' );
5181: fnd_msg_pub.ADD;
5182: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
5183: mydebug('ROLLBACK ' );
5184: mydebug('l_progress = ' || l_proc_name || ':'|| l_progress);
5185: mydebug('RAISE fnd_api.g_exc_unexpected_error: ' || SQLERRM);
5186: mydebug('x_msg_count/Data = ' || x_msg_count || '/'|| x_msg_data);
5189: x_return_status := l_g_ret_sts_unexp_error;
5190: fnd_message.set_name('WMS', 'WMS_INTERNAL_ERROR'); --NEWMSG
5191: -- Internal Error $ROUTINE
5192: fnd_message.set_token('ROUTINE', '- Process_f2 API' );
5193: fnd_msg_pub.ADD;
5194: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
5195: mydebug('ROLLBACK ' );
5196: ROLLBACK ;
5197: mydebug('l_progress = ' || l_proc_name || ':'|| l_progress);
5190: fnd_message.set_name('WMS', 'WMS_INTERNAL_ERROR'); --NEWMSG
5191: -- Internal Error $ROUTINE
5192: fnd_message.set_token('ROUTINE', '- Process_f2 API' );
5193: fnd_msg_pub.ADD;
5194: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
5195: mydebug('ROLLBACK ' );
5196: ROLLBACK ;
5197: mydebug('l_progress = ' || l_proc_name || ':'|| l_progress);
5198: mydebug('fnd_api.g_exc_error: ' || SQLERRM);
5291: mydebug ('END : ' || l_proc_name);
5292: EXCEPTION
5293: WHEN fnd_api.g_exc_error THEN
5294: x_return_status := l_g_ret_sts_error;
5295: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
5296: mydebug('ROLLBACK ' );
5297: ROLLBACK ;
5298: mydebug('l_progress = ' || l_proc_name || ':'|| l_progress);
5299: mydebug('RAISE fnd_api.g_exc_error: ' || SQLERRM);
5298: mydebug('l_progress = ' || l_proc_name || ':'|| l_progress);
5299: mydebug('RAISE fnd_api.g_exc_error: ' || SQLERRM);
5300: WHEN fnd_api.g_exc_unexpected_error THEN
5301: x_return_status := fnd_api.g_ret_sts_unexp_error;
5302: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
5303: mydebug('ROLLBACK ' );
5304: mydebug('l_progress = ' || l_proc_name || ':'|| l_progress);
5305: mydebug('RAISE fnd_api.g_exc_unexpected_error: ' || SQLERRM);
5306: mydebug('x_msg_count/Data = ' || x_msg_count || '/'|| x_msg_data);
5306: mydebug('x_msg_count/Data = ' || x_msg_count || '/'|| x_msg_data);
5307: ROLLBACK ;
5308: WHEN OTHERS THEN
5309: x_return_status := l_g_ret_sts_unexp_error;
5310: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
5311: mydebug('ROLLBACK ' );
5312: ROLLBACK ;
5313: mydebug('l_progress = ' || l_proc_name || ':'|| l_progress);
5314: mydebug('RAISE fnd_api.g_exc_error: ' || SQLERRM);
5426: fnd_message.set_name('WMS', 'WMS_INTERNAL_ERROR'); --NEWMSG
5427: -- Internal Error $ROUTINE
5428: fnd_message.set_token('ROUTINE', '-proc_process_cancelled_MOLs' );
5429: myDebug('Error updating MTRL in proc_process_cancelled_MOLs for line: ' || rec_cancelled_mols.line_id);
5430: fnd_msg_pub.ADD;
5431: END IF;
5432: END LOOP;
5433: mydebug('END = ' || l_proc_name );
5434: EXCEPTION
5433: mydebug('END = ' || l_proc_name );
5434: EXCEPTION
5435: WHEN fnd_api.g_exc_error THEN
5436: x_return_status := l_g_ret_sts_error;
5437: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
5438: mydebug('ROLLBACK ' );
5439: ROLLBACK ;
5440: mydebug('l_progress = ' || l_proc_name || ':'|| l_progress);
5441: mydebug('RAISE fnd_api.g_exc_error: ' || SQLERRM);
5440: mydebug('l_progress = ' || l_proc_name || ':'|| l_progress);
5441: mydebug('RAISE fnd_api.g_exc_error: ' || SQLERRM);
5442: WHEN fnd_api.g_exc_unexpected_error THEN
5443: x_return_status := fnd_api.g_ret_sts_unexp_error;
5444: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
5445: mydebug('ROLLBACK ' );
5446: mydebug('l_progress = ' || l_proc_name || ':'|| l_progress);
5447: mydebug('RAISE fnd_api.g_exc_unexpected_error: ' || SQLERRM);
5448: mydebug('x_msg_count/Data = ' || x_msg_count || '/'|| x_msg_data);
5448: mydebug('x_msg_count/Data = ' || x_msg_count || '/'|| x_msg_data);
5449: ROLLBACK ;
5450: WHEN OTHERS THEN
5451: x_return_status := l_g_ret_sts_unexp_error;
5452: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
5453: mydebug('ROLLBACK ' );
5454: ROLLBACK ;
5455: mydebug('l_progress = ' || l_proc_name || ':'|| l_progress);
5456: mydebug('RAISE fnd_api.g_exc_error: ' || SQLERRM);
5597: mydebug('END = ' || l_proc_name );
5598: EXCEPTION
5599: WHEN fnd_api.g_exc_error THEN
5600: x_return_status := l_g_ret_sts_error;
5601: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
5602: mydebug('ROLLBACK ' );
5603: ROLLBACK ;
5604: mydebug('l_progress = ' || l_proc_name || ':'|| l_progress);
5605: mydebug('RAISE fnd_api.g_exc_error: ' || SQLERRM);
5604: mydebug('l_progress = ' || l_proc_name || ':'|| l_progress);
5605: mydebug('RAISE fnd_api.g_exc_error: ' || SQLERRM);
5606: WHEN fnd_api.g_exc_unexpected_error THEN
5607: x_return_status := fnd_api.g_ret_sts_unexp_error;
5608: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
5609: mydebug('ROLLBACK ' );
5610: mydebug('l_progress = ' || l_proc_name || ':'|| l_progress);
5611: mydebug('RAISE fnd_api.g_exc_unexpected_error: ' || SQLERRM);
5612: mydebug('x_msg_count/Data = ' || x_msg_count || '/'|| x_msg_data);
5612: mydebug('x_msg_count/Data = ' || x_msg_count || '/'|| x_msg_data);
5613: ROLLBACK ;
5614: WHEN OTHERS THEN
5615: x_return_status := l_g_ret_sts_unexp_error;
5616: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
5617: mydebug('ROLLBACK ' );
5618: ROLLBACK ;
5619: mydebug('l_progress = ' || l_proc_name || ':'|| l_progress);
5620: mydebug('RAISE fnd_api.g_exc_error: ' || SQLERRM);
5763: mydebug('END = ' || l_proc_name );
5764: EXCEPTION
5765: WHEN fnd_api.g_exc_error THEN
5766: x_return_status := l_g_ret_sts_error;
5767: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
5768: mydebug('ROLLBACK ' );
5769: ROLLBACK ;
5770: mydebug('l_progress = ' || l_proc_name || ':'|| l_progress);
5771: mydebug('RAISE fnd_api.g_exc_error: ' || SQLERRM);
5770: mydebug('l_progress = ' || l_proc_name || ':'|| l_progress);
5771: mydebug('RAISE fnd_api.g_exc_error: ' || SQLERRM);
5772: WHEN fnd_api.g_exc_unexpected_error THEN
5773: x_return_status := fnd_api.g_ret_sts_unexp_error;
5774: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
5775: mydebug('ROLLBACK ' );
5776: mydebug('l_progress = ' || l_proc_name || ':'|| l_progress);
5777: mydebug('RAISE fnd_api.g_exc_unexpected_error: ' || SQLERRM);
5778: mydebug('x_msg_count/Data = ' || x_msg_count || '/'|| x_msg_data);
5778: mydebug('x_msg_count/Data = ' || x_msg_count || '/'|| x_msg_data);
5779: ROLLBACK ;
5780: WHEN OTHERS THEN
5781: x_return_status := l_g_ret_sts_unexp_error;
5782: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
5783: mydebug('ROLLBACK ' );
5784: ROLLBACK ;
5785: mydebug('l_progress = ' || l_proc_name || ':'|| l_progress);
5786: mydebug('RAISE fnd_api.g_exc_error: ' || SQLERRM);
5918: mydebug('END = ' || l_proc_name );
5919: EXCEPTION
5920: WHEN fnd_api.g_exc_error THEN
5921: x_return_status := l_g_ret_sts_error;
5922: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
5923: mydebug('ROLLBACK ' );
5924: ROLLBACK ;
5925: mydebug('l_progress = ' || l_proc_name || ':'|| l_progress);
5926: mydebug('RAISE fnd_api.g_exc_error: ' || SQLERRM);
5925: mydebug('l_progress = ' || l_proc_name || ':'|| l_progress);
5926: mydebug('RAISE fnd_api.g_exc_error: ' || SQLERRM);
5927: WHEN fnd_api.g_exc_unexpected_error THEN
5928: x_return_status := fnd_api.g_ret_sts_unexp_error;
5929: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
5930: mydebug('ROLLBACK ' );
5931: mydebug('l_progress = ' || l_proc_name || ':'|| l_progress);
5932: mydebug('RAISE fnd_api.g_exc_unexpected_error: ' || SQLERRM);
5933: mydebug('x_msg_count/Data = ' || x_msg_count || '/'|| x_msg_data);
5933: mydebug('x_msg_count/Data = ' || x_msg_count || '/'|| x_msg_data);
5934: ROLLBACK ;
5935: WHEN OTHERS THEN
5936: x_return_status := l_g_ret_sts_unexp_error;
5937: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
5938: mydebug('ROLLBACK ' );
5939: ROLLBACK ;
5940: mydebug('l_progress = ' || l_proc_name || ':'|| l_progress);
5941: mydebug('RAISE fnd_api.g_exc_error: ' || SQLERRM);
6170: mydebug('END = ' || l_proc_name );
6171: EXCEPTION
6172: WHEN OTHERS THEN
6173: x_return_status := l_g_ret_sts_unexp_error;
6174: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
6175: mydebug('ROLLBACK ' );
6176: ROLLBACK ;
6177: mydebug('l_progress = ' || l_proc_name || ':'|| l_progress);
6178: mydebug('RAISE fnd_api.g_exc_error: ' || SQLERRM);
6349: IF p_confirmed_qty = 0 AND p_exception <> l_g_exception_short
6350: THEN
6351: fnd_message.set_name('WMS', 'WMS_PICK_ZERO_QTY');
6352: -- Confirmed qty for this task is zero
6353: fnd_msg_pub.ADD;
6354: RAISE fnd_api.g_exc_unexpected_error;
6355: END IF;
6356: BEGIN
6357: wms_picking_pkg.g_previous_task_status.delete(p_temp_id);
6418: THEN
6419: fnd_message.set_name('WMS', 'WMS_INTERNAL_ERROR');
6420: -- Internal Error $ROUTINE
6421: fnd_message.set_token('ROUTINE', '-INSERT_SERIAL API - ' || p_action);
6422: fnd_msg_pub.ADD;
6423: RAISE fnd_api.g_exc_unexpected_error;
6424: ELSE
6425: IF (l_debug = 1) THEN
6426: mydebug ('the serial number is: '|| serial_rec.serial_number);
6451: THEN
6452: fnd_message.set_name('WMS', 'WMS_INTERNAL_ERROR');
6453: -- Internal Error $ROUTINE
6454: fnd_message.set_token('ROUTINE', '- INSERT_SERIAL API - ');
6455: fnd_msg_pub.ADD;
6456: RAISE fnd_api.g_exc_unexpected_error;
6457: ELSE
6458: IF (l_debug = 1) THEN
6459: mydebug ('the serial number is: '|| serial_rec.serial_number);
6510: THEN
6511: fnd_message.set_name('WMS', 'WMS_INTERNAL_ERROR');
6512: -- Internal Error $ROUTINE
6513: fnd_message.set_token('ROUTINE', '-Task_Merge_Split API - ' || p_action);
6514: fnd_msg_pub.ADD;
6515: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6516: RAISE fnd_api.g_exc_unexpected_error;
6517: ELSE
6518: RAISE fnd_api.g_exc_error;
6669: mydebug ('x_return_status: ' || x_return_status );
6670: END IF;
6671: IF x_return_status = fnd_api.g_ret_sts_unexp_error THEN
6672: --fnd_message.set_name('WMS', 'WMS_MULT_LPN_ERROR');
6673: --fnd_msg_pub.ADD;
6674: RAISE fnd_api.g_exc_unexpected_error;
6675: ELSIF x_return_status = fnd_api.g_ret_sts_error THEN
6676: --fnd_message.set_name('WMS', 'WMS_MULT_LPN_ERROR');
6677: --fnd_msg_pub.ADD;
6673: --fnd_msg_pub.ADD;
6674: RAISE fnd_api.g_exc_unexpected_error;
6675: ELSIF x_return_status = fnd_api.g_ret_sts_error THEN
6676: --fnd_message.set_name('WMS', 'WMS_MULT_LPN_ERROR');
6677: --fnd_msg_pub.ADD;
6678: RAISE fnd_api.g_exc_error;
6679: END IF;
6680:
6681: /* -- Bug #: 6908598 Commenting else part as we are calling the label printing irrespective of whether it is a bulk task or not */
6789:
6790: EXCEPTION
6791: WHEN fnd_api.g_exc_error THEN
6792: x_return_status := l_g_ret_sts_error;
6793: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
6794: mydebug('ROLLBACK ' );
6795: ROLLBACK ;
6796: mydebug('l_progress = ' || l_proc_name || ':'|| l_progress);
6797: mydebug('RAISE fnd_api.g_exc_error: ' || SQLERRM);
6797: mydebug('RAISE fnd_api.g_exc_error: ' || SQLERRM);
6798: mydebug('x_msg_count/Data = ' || x_msg_count || '/'|| x_msg_data);
6799: WHEN fnd_api.g_exc_unexpected_error THEN
6800: x_return_status := fnd_api.g_ret_sts_unexp_error;
6801: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
6802: mydebug('ROLLBACK ' );
6803: mydebug('l_progress = ' || l_proc_name || ':'|| l_progress);
6804: mydebug('RAISE fnd_api.g_exc_unexpected_error: ' || SQLERRM);
6805: mydebug('x_msg_count/Data = ' || x_msg_count || '/'|| x_msg_data);
6805: mydebug('x_msg_count/Data = ' || x_msg_count || '/'|| x_msg_data);
6806: ROLLBACK ;
6807: WHEN OTHERS THEN
6808: x_return_status := l_g_ret_sts_unexp_error;
6809: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
6810: mydebug('ROLLBACK ' );
6811: ROLLBACK ;
6812: mydebug('l_progress = ' || l_proc_name || ':'|| l_progress);
6813: mydebug('RAISE fnd_api.g_exc_error: ' || SQLERRM);
7134: mydebug('lpn does not exist in org');
7135: END IF;
7136:
7137: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_LPN');
7138: fnd_msg_pub.ADD;
7139: RAISE fnd_api.g_exc_error;
7140: END;
7141:
7142: IF l_lpn_exists = 0
7146: mydebug('lpn does not exist in org');
7147: END IF;
7148:
7149: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_LPN');
7150: fnd_msg_pub.ADD;
7151: RAISE fnd_api.g_exc_error;
7152: END IF;
7153:
7154: IF (l_debug = 1) THEN
7176:
7177: IF l_loaded > 0 THEN
7178: x_match := 7;
7179: fnd_message.set_name('WMS', 'WMS_LOADED_ERROR');
7180: fnd_msg_pub.ADD;
7181: RAISE fnd_api.g_exc_error;
7182: END IF;
7183:
7184: -- Check if locator is valid
7206: -- The calling java code treats this condition as an error
7207:
7208: x_match := 10;
7209: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_SUB');
7210: fnd_msg_pub.ADD;
7211: RAISE fnd_api.g_exc_error;
7212: END IF;
7213:
7214: -- bug 2398247
7222:
7223: IF l_sub_active = 0 THEN
7224: x_match := 10;
7225: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_SUB');
7226: fnd_msg_pub.ADD;
7227: RAISE fnd_api.g_exc_error;
7228: END IF;
7229:
7230: -- verify if locator is active
7238:
7239: IF l_loc_active = 0 THEN
7240: x_match := 10;
7241: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_LOC');
7242: fnd_msg_pub.ADD;
7243: RAISE fnd_api.g_exc_error;
7244: END IF;
7245: -- Begin fix for 2774506
7246:
7275:
7276: if ((l_mil_proj_id <> l_mmtt_proj_id ) or ( l_mil_task_id <> l_mmtt_task_id )) then
7277: mydebug('lpn : the project/tak information does not match');
7278: FND_MESSAGE.SET_NAME('WMS','WMS_CONT_INVALID_LPN');
7279: FND_MSG_PUB.ADD;
7280: RAISE FND_API.G_EXC_ERROR;
7281: end if ;
7282:
7283: -- End fix for 2774506
7289: EXCEPTION
7290: WHEN NO_DATA_FOUND THEN
7291: x_match := 6;
7292: fnd_message.set_name('WMS', 'WMS_TD_LPN_LOC_NOT_FOUND');
7293: fnd_msg_pub.ADD;
7294: RAISE fnd_api.g_exc_error;
7295: END;
7296:
7297: IF (l_debug = 1) THEN
7320:
7321: IF l_so_cnt > 0 THEN
7322: x_match := 12;
7323: fnd_message.set_name('WMS', 'WMS_LPN_STAGED');
7324: fnd_msg_pub.ADD;
7325: RAISE fnd_api.g_exc_error;
7326: END IF;
7327:
7328: -- SELECT primary_uom_code
7376: END IF;
7377:
7378: x_match := 13;
7379: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_LPN');
7380: fnd_msg_pub.ADD;
7381: RAISE fnd_api.g_exc_error;
7382: END;
7383:
7384: IF l_item_cnt > 0
7407: END IF;
7408:
7409: x_match := 5;
7410: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_LOT_LPN');
7411: fnd_msg_pub.ADD;
7412: RAISE fnd_api.g_exc_error;
7413: END;
7414: END IF;
7415:
7460: mydebug('transaction does not exist in mmtt');
7461: END IF;
7462:
7463: fnd_message.set_name('INV', 'INV_INVALID_TRANSACTION');
7464: fnd_msg_pub.ADD;
7465: RAISE fnd_api.g_exc_error;
7466: END;
7467:
7468: -- clear quantity cache before we create qty tree.
7548:
7549: -- Serial numbers missing for the transaction
7550: x_match := 9;
7551: fnd_message.set_name('INV', 'INV_INT_SERMISEXP');
7552: fnd_msg_pub.ADD;
7553: RAISE fnd_api.g_exc_error;
7554: END IF;
7555: END IF;
7556:
7618: END IF;
7619:
7620: fnd_message.set_name('INV', 'INV_INVALID_QUANTITY_TYPE');
7621: fnd_message.set_token('ROUTINE', 'INV_QUANTITY_TREE_PUB.QUERY_QUANTITIES');
7622: fnd_msg_pub.ADD;
7623: RAISE fnd_api.g_exc_error;
7624: END IF;
7625: --Bug#5649056: only update if subinventory and locator match
7626: ELSIF ( l_lpn_sub = l_mmtt_sub AND l_lpn_loc = l_mmtt_loc ) THEN
7670: END IF;
7671:
7672: fnd_message.set_name('INV', 'INV_INVALID_QUANTITY_TYPE');
7673: fnd_message.set_token('ROUTINE', 'INV_QUANTITY_TREE_PUB.QUERY_QUANTITIES');
7674: fnd_msg_pub.ADD;
7675: RAISE fnd_api.g_exc_error;
7676: END IF;
7677: END IF;
7678:
7753: END IF;
7754:
7755: fnd_message.set_name('INV', 'INV_INVALID_QUANTITY_TYPE');
7756: fnd_message.set_token('ROUTINE', 'INV_QUANTITY_TREE_PUB.QUERY_QUANTITIES');
7757: fnd_msg_pub.ADD;
7758: RAISE fnd_api.g_exc_error;
7759: END IF;
7760:
7761: IF NVL(l_allocated_lpn_id, 0) = p_fromlpn_id THEN
7807: END IF;
7808:
7809: fnd_message.set_name('INV', 'INV_INVALID_QUANTITY_TYPE');
7810: fnd_message.set_token('ROUTINE', 'INV_QUANTITY_TREE_PUB.QUERY_QUANTITIES');
7811: fnd_msg_pub.ADD;
7812: RAISE fnd_api.g_exc_error;
7813: END IF;
7814: --Bug#5649056: only update if subinventory and locator match
7815: ELSIF ( l_lpn_sub = l_mmtt_sub AND l_lpn_loc = l_mmtt_loc ) THEN
7859: END IF;
7860:
7861: fnd_message.set_name('INV', 'INV_INVALID_QUANTITY_TYPE');
7862: fnd_message.set_token('ROUTINE', 'INV_QUANTITY_TREE_PUB.QUERY_QUANTITIES');
7863: fnd_msg_pub.ADD;
7864: RAISE fnd_api.g_exc_error;
7865: END IF;
7866: END IF;
7867: END LOOP;
7905:
7906: -- Serial numbers missing for the transaction
7907: x_match := 9;
7908: fnd_message.set_name('INV', 'INV_INT_SERMISEXP');
7909: fnd_msg_pub.ADD;
7910: RAISE fnd_api.g_exc_error;
7911: END IF;
7912:
7913: SELECT COUNT(fm_serial_number)
7975:
7976: -- Serial numbers missing for the transaction
7977: x_match := 9;
7978: fnd_message.set_name('INV', 'INV_INT_SERMISEXP');
7979: fnd_msg_pub.ADD;
7980: RAISE fnd_api.g_exc_error;
7981: END IF;
7982: END IF;
7983: -- end of bug 4277869
8035: END IF;
8036:
8037: fnd_message.set_name('INV', 'INV_INVALID_QUANTITY_TYPE');
8038: fnd_message.set_token('ROUTINE', 'INV_QUANTITY_TREE_PUB.QUERY_QUANTITIES');
8039: fnd_msg_pub.ADD;
8040: RAISE fnd_api.g_exc_error;
8041: END IF;
8042: --Bug#5649056: only update if subinventory and locator match
8043: ELSIF ( l_lpn_sub = l_mmtt_sub AND l_lpn_loc = l_mmtt_loc ) THEN
8087: END IF;
8088:
8089: fnd_message.set_name('INV', 'INV_INVALID_QUANTITY_TYPE');
8090: fnd_message.set_token('ROUTINE', 'INV_QUANTITY_TREE_PUB.QUERY_QUANTITIES');
8091: fnd_msg_pub.ADD;
8092: RAISE fnd_api.g_exc_error;
8093: END IF;
8094: END IF;
8095:
8148: END IF;
8149:
8150: fnd_message.set_name('INV', 'INV_INVALID_QUANTITY_TYPE');
8151: fnd_message.set_token('ROUTINE', 'INV_QUANTITY_TREE_PUB.QUERY_QUANTITIES');
8152: fnd_msg_pub.ADD;
8153: RAISE fnd_api.g_exc_error;
8154: END IF;
8155:
8156: IF NVL(l_allocated_lpn_id, 0) = p_fromlpn_id THEN
8202: END IF;
8203:
8204: fnd_message.set_name('INV', 'INV_INVALID_QUANTITY_TYPE');
8205: fnd_message.set_token('ROUTINE', 'INV_QUANTITY_TREE_PUB.QUERY_QUANTITIES');
8206: fnd_msg_pub.ADD;
8207: RAISE fnd_api.g_exc_error;
8208: END IF;
8209: --Bug#5649056: only update if subinventory and locator match
8210: ELSIF ( l_lpn_sub = l_mmtt_sub AND l_lpn_loc = l_mmtt_loc ) THEN
8254: END IF;
8255:
8256: fnd_message.set_name('INV', 'INV_INVALID_QUANTITY_TYPE');
8257: fnd_message.set_token('ROUTINE', 'INV_QUANTITY_TREE_PUB.QUERY_QUANTITIES');
8258: fnd_msg_pub.ADD;
8259: RAISE fnd_api.g_exc_error;
8260: END IF;
8261: END IF;
8262: END IF;
8318:
8319: -- Serial numbers missing for the transaction
8320: x_match := 9;
8321: fnd_message.set_name('INV', 'INV_INT_SERMISEXP');
8322: fnd_msg_pub.ADD;
8323: RAISE fnd_api.g_exc_error;
8324: END IF;
8325: END IF;
8326:
8399: END IF;
8400:
8401: fnd_message.set_name('INV', 'INV_INVALID_QUANTITY_TYPE');
8402: fnd_message.set_token('ROUTINE', 'INV_QUANTITY_TREE_PUB.QUERY_QUANTITIES');
8403: fnd_msg_pub.ADD;
8404: RAISE fnd_api.g_exc_error;
8405: END IF;
8406: --Bug#5649056: only update if subinventory and locator match
8407: ELSIF ( l_lpn_sub = l_mmtt_sub AND l_lpn_loc = l_mmtt_loc ) THEN
8451: END IF;
8452:
8453: fnd_message.set_name('INV', 'INV_INVALID_QUANTITY_TYPE');
8454: fnd_message.set_token('ROUTINE', 'INV_QUANTITY_TREE_PUB.QUERY_QUANTITIES');
8455: fnd_msg_pub.ADD;
8456: RAISE fnd_api.g_exc_error;
8457: END IF;
8458: END IF;
8459:
8551: END IF;
8552:
8553: fnd_message.set_name('INV', 'INV_INVALID_QUANTITY_TYPE');
8554: fnd_message.set_token('ROUTINE', 'INV_QUANTITY_TREE_PUB.QUERY_QUANTITIES');
8555: fnd_msg_pub.ADD;
8556: RAISE fnd_api.g_exc_error;
8557: END IF;
8558:
8559: IF (l_lot_match <> 0)
8723: END IF;
8724:
8725: fnd_message.set_name('INV', 'INV_INVALID_QUANTITY_TYPE');
8726: fnd_message.set_token('ROUTINE', 'INV_QUANTITY_TREE_PUB.QUERY_QUANTITIES');
8727: fnd_msg_pub.ADD;
8728: RAISE fnd_api.g_exc_error;
8729: END IF;
8730: --Bug#5649056: only update if subinventory and locator match
8731: ELSIF ( l_lpn_sub = l_mmtt_sub AND l_lpn_loc = l_mmtt_loc ) THEN
8775: END IF;
8776:
8777: fnd_message.set_name('INV', 'INV_INVALID_QUANTITY_TYPE');
8778: fnd_message.set_token('ROUTINE', 'INV_QUANTITY_TREE_PUB.QUERY_QUANTITIES');
8779: fnd_msg_pub.ADD;
8780: RAISE fnd_api.g_exc_error;
8781: END IF;
8782: END IF;
8783: END LOOP;
8887:
8888: -- Serial numbers missing for the transaction
8889: x_match := 9;
8890: fnd_message.set_name('INV', 'INV_INT_SERMISEXP');
8891: fnd_msg_pub.ADD;
8892: RAISE fnd_api.g_exc_error;
8893: END IF;
8894: END IF;
8895:
8947: END IF;
8948:
8949: fnd_message.set_name('INV', 'INV_INVALID_QUANTITY_TYPE');
8950: fnd_message.set_token('ROUTINE', 'INV_QUANTITY_TREE_PUB.QUERY_QUANTITIES');
8951: fnd_msg_pub.ADD;
8952: RAISE fnd_api.g_exc_error;
8953: END IF;
8954: --Bug#5649056: only update if subinventory and locator match
8955: ELSIF ( l_lpn_sub = l_mmtt_sub AND l_lpn_loc = l_mmtt_loc ) THEN
9000: END IF;
9001:
9002: fnd_message.set_name('INV', 'INV_INVALID_QUANTITY_TYPE');
9003: fnd_message.set_token('ROUTINE', 'INV_QUANTITY_TREE_PUB.QUERY_QUANTITIES');
9004: fnd_msg_pub.ADD;
9005: RAISE fnd_api.g_exc_error;
9006: END IF;
9007: END IF;
9008:
9107: END IF;
9108:
9109: fnd_message.set_name('INV', 'INV_INVALID_QUANTITY_TYPE');
9110: fnd_message.set_token('ROUTINE', 'INV_QUANTITY_TREE_PUB.QUERY_QUANTITIES');
9111: fnd_msg_pub.ADD;
9112: RAISE fnd_api.g_exc_error;
9113: END IF;
9114:
9115: IF NVL(l_allocated_lpn_id, 0) = p_fromlpn_id THEN
9161: END IF;
9162:
9163: fnd_message.set_name('INV', 'INV_INVALID_QUANTITY_TYPE');
9164: fnd_message.set_token('ROUTINE', 'INV_QUANTITY_TREE_PUB.QUERY_QUANTITIES');
9165: fnd_msg_pub.ADD;
9166: RAISE fnd_api.g_exc_error;
9167: END IF;
9168: --Bug#5649056: only update if subinventory and locator match
9169: ELSIF ( l_lpn_sub = l_mmtt_sub AND l_lpn_loc = l_mmtt_loc ) THEN
9213: END IF;
9214:
9215: fnd_message.set_name('INV', 'INV_INVALID_QUANTITY_TYPE');
9216: fnd_message.set_token('ROUTINE', 'INV_QUANTITY_TREE_PUB.QUERY_QUANTITIES');
9217: fnd_msg_pub.ADD;
9218: RAISE fnd_api.g_exc_error;
9219: END IF;
9220: END IF;
9221:
9365: x_match := 11;
9366: CLOSE ser_csr;
9367: fnd_message.set_name('INV', 'INV_SER_STATUS_NA');
9368: fnd_message.set_token('TOKEN', l_serial_number);
9369: fnd_msg_pub.ADD;
9370: RAISE fnd_api.g_exc_error;
9371: END IF;
9372: END LOOP;
9373:
9394: -- LPN status is invalid for this operation
9395:
9396: fnd_message.set_name('INV', 'INV_INVALID_LPN_STATUS');
9397: fnd_message.set_token('TOKEN1', TO_CHAR(p_fromlpn_id));
9398: fnd_msg_pub.ADD;
9399: RAISE fnd_api.g_exc_error;
9400: END IF;
9401: END IF;
9402: END IF;
9759: IF SQLCODE = -54 THEN -- ORA-0054: resource busy and acquire with NOWAIT specified
9760: mydebug('LPN record is locked by another user... cannot pick this LPN' );
9761: fnd_message.set_name('WMS', 'WMS_LPN_LOCKED_ERROR');
9762: -- LPN is in use by another user
9763: fnd_msg_pub.ADD;
9764: RAISE fnd_api.g_exc_error;
9765: ELSE
9766: RAISE fnd_api.g_exc_unexpected_error;
9767: END IF;
9833: IF (l_debug = 1) THEN
9834: mydebug(' Expected Exception raised');
9835: END IF;
9836: x_return_status := fnd_api.g_ret_sts_error;
9837: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
9838: WHEN fnd_api.g_exc_unexpected_error THEN
9839: IF (l_debug = 1) THEN
9840: mydebug(' Unexpected Exception raised');
9841: END IF;
9839: IF (l_debug = 1) THEN
9840: mydebug(' Unexpected Exception raised');
9841: END IF;
9842: x_return_status := fnd_api.g_ret_sts_unexp_error;
9843: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
9844: WHEN OTHERS THEN
9845: IF (l_debug = 1) THEN
9846: mydebug('Other exception raised : ' || SQLERRM);
9847: END IF;
9846: mydebug('Other exception raised : ' || SQLERRM);
9847: END IF;
9848:
9849: x_return_status := fnd_api.g_ret_sts_unexp_error;
9850: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
9851: END lpn_match;
9852:
9853:
9854: -- during the picking process. If the user does not specifies
10193: mydebug('calling qty tree 1st time failed ');
10194: END IF;
10195: fnd_message.set_name('INV', 'INV_INVALID_QUANTITY_TYPE');
10196: fnd_message.set_token('ROUTINE','INV_QUANTITY_TREE_PUB.QUERY_QUANTITIES');
10197: fnd_msg_pub.ADD;
10198: RAISE fnd_api.g_exc_error;
10199: END IF;
10200:
10201: EXIT WHEN p_is_lot_control ='false';
10295: mydebug('Exception raised');
10296: END IF;
10297:
10298: x_return_status := fnd_api.g_ret_sts_error;
10299: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
10300: WHEN OTHERS THEN
10301: IF (l_debug = 1) THEN
10302: mydebug('Other exception raised : ' || SQLERRM);
10303: END IF;
10302: mydebug('Other exception raised : ' || SQLERRM);
10303: END IF;
10304:
10305: x_return_status := fnd_api.g_ret_sts_unexp_error;
10306: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
10307: END LOOSE_MATCH;
10308:
10309:
10310: FUNCTION can_pickdrop(p_transaction_temp_id IN NUMBER) RETURN VARCHAR2 IS
10402: ) THEN
10403: IF (l_debug = 1) THEN
10404: mydebug('check_pack_lpn: LPN already exists but with different context or Org');
10405: fnd_message.set_name('WMS', 'WMS_INVLD_PICKTO_LPN_ORG');
10406: fnd_msg_pub.ADD;
10407: END IF;
10408:
10409: x_return_status := fnd_api.g_ret_sts_error;
10410: RETURN;
10445:
10446: IF (l_debug = 1) THEN
10447: mydebug('check_pack_lpn: LPN already exists but with different context or Org');
10448: fnd_message.set_name('WMS', 'WMS_INVLD_PICKTO_LPN_CONTEXT');
10449: fnd_msg_pub.ADD;
10450: END IF;
10451:
10452: x_return_status := fnd_api.g_ret_sts_error;
10453: RETURN;
10468:
10469: IF (l_debug = 1) THEN
10470: mydebug('check_pack_lpn: LPN already exists but with different context or Org');
10471: fnd_message.set_name('WMS', 'WMS_INVLD_PICKTO_LPN_CONTEXT');
10472: fnd_msg_pub.ADD;
10473: END IF;
10474:
10475: x_return_status := fnd_api.g_ret_sts_error;
10476: RETURN;
10509: mydebug('check_pack_lpn: Not Successful2');
10510: END IF;
10511:
10512: FOR i IN 1 .. l_msg_count LOOP
10513: x_msg_data := fnd_msg_pub.get(i, 'F');
10514:
10515: IF (l_debug = 1) THEN
10516: mydebug(REPLACE(x_msg_data, fnd_global.local_chr(0), ' '));
10517: END IF;
10520:
10521: IF l_return_status = fnd_api.g_ret_sts_unexp_error
10522: OR l_return_status = fnd_api.g_ret_sts_error THEN
10523: fnd_message.set_name('WMS', 'WMS_TD_CREATE_LPN_ERROR');
10524: fnd_msg_pub.ADD;
10525: RAISE fnd_api.g_exc_unexpected_error;
10526: END IF;
10527:
10528: END IF;
10534: END IF;
10535: EXCEPTION
10536: WHEN fnd_api.g_exc_error THEN
10537: x_return_status := fnd_api.g_ret_sts_error;
10538: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
10539: IF DBMS_SQL.IS_Open(l_cursorID) THEN
10540: DBMS_SQL.Close_Cursor(l_cursorID);
10541: END IF;
10542: WHEN OTHERS THEN
10540: DBMS_SQL.Close_Cursor(l_cursorID);
10541: END IF;
10542: WHEN OTHERS THEN
10543: x_return_status := fnd_api.g_ret_sts_unexp_error;
10544: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
10545: IF DBMS_SQL.IS_Open(l_cursorID) THEN
10546: DBMS_SQL.Close_Cursor(l_cursorID);
10547: END IF;
10548: END check_pack_lpn;
10767: -- Standard call to check for call compatibility
10768: --
10769: IF NOT fnd_api.compatible_api_call(l_api_version_number, p_api_version_number, l_api_name, g_pkg_name) THEN
10770: fnd_message.set_name('WMS', 'WMS_CONT_INCOMPATIBLE_API_CALL');
10771: fnd_msg_pub.ADD;
10772: RAISE fnd_api.g_exc_error;
10773: END IF;
10774:
10775: --
10775: --
10776: -- Initialize message list.
10777: --
10778: IF fnd_api.to_boolean(p_init_msg_lst) THEN
10779: fnd_msg_pub.initialize;
10780: END IF;
10781:
10782: --
10783: -- Initialize API return status to success
10888: RAISE fnd_api.g_exc_error;
10889: END IF;
10890: ELSE
10891: fnd_message.set_name('WMS','WMS_INVALID_PACK_DELIVERY');
10892: fnd_msg_pub.ADD;
10893: RAISE fnd_api.g_exc_error;
10894: END IF;
10895: END;
10896: CLOSE c_wdd_exists;
10927: WHEN no_data_found THEN
10928: -- error out and assuming it should exist
10929: -- tolpn doesn't existing or if existing, but has wrong context
10930: fnd_message.set_name('WMS', 'WMS_LPN_NOT_FOUND');
10931: fnd_msg_pub.ADD;
10932: RAISE fnd_api.g_exc_error;
10933: END;
10934: IF (l_debug = 1) THEN
10935: mydebug('l_container_item_id:'||l_container_item_id);
10939: mydebug('LPN does not use any container');
10940: END IF;
10941: fnd_message.set_name('WMS', 'WMS_LPN_NOT_LINKTO_CONT');
10942: fnd_message.set_token('LPN', p_pick_to_lpn );
10943: fnd_msg_pub.ADD;
10944: RAISE fnd_api.g_exc_error;
10945: ELSIF (l_container_item_id <> p_container_item_id) THEN
10946: IF (l_debug = 1) THEN
10947: mydebug('The container, with which LPN associated, is different from confirmed container');
10958: END;
10959: fnd_message.set_name('WMS', 'WMS_LPN_ASSOC_WITH_CONT');
10960: fnd_message.set_token('LPN', p_pick_to_lpn );
10961: fnd_message.set_token('CONTAINER', l_concatenated_segments);
10962: fnd_msg_pub.ADD;
10963: RAISE fnd_api.g_exc_error;
10964: END IF;
10965: ELSE
10966: IF (l_debug = 1) THEN
10976: END IF;
10977: fnd_message.set_name('WMS', 'WMS_LPN_ASSOC_WITH_CONT');
10978: fnd_message.set_token('LPN', p_pick_to_lpn );
10979: fnd_message.set_token('CONTAINER', p_suggested_container_item );
10980: fnd_msg_pub.ADD;
10981: RAISE fnd_api.g_exc_error;
10982: END IF;
10983: END IF;
10984: END IF;
11043: IF (l_debug = 1) THEN
11044: mydebug('Cost group commigle exist.');
11045: END IF;
11046: fnd_message.set_name('WMS', 'WMS_CG_COMMINGLE');
11047: fnd_msg_pub.ADD;
11048: RAISE fnd_api.g_exc_error;
11049: ELSE
11050: IF (l_debug = 1) THEN
11051: mydebug('passed cost group commigle check.');
11120: where transfer_lpn_id = pick_to_lpn_rec.lpn_id
11121: and transaction_header_id <>l_transaction_header_id);
11122:
11123: fnd_message.set_name('WMS', 'WMS_INVLD_PICKTO_LPN_NOT_NEW'); -- new message
11124: fnd_msg_pub.ADD;
11125: RAISE fnd_api.g_exc_error;
11126: EXCEPTION
11127: WHEN NO_DATA_FOUND THEN RETURN; -- this lpn is fine and no need to do all
11128: -- the following checks
11137: where transfer_lpn_id = pick_to_lpn_rec.lpn_id
11138: and transaction_temp_id = parent_line_id -- bulk task
11139: );
11140: fnd_message.set_name('WMS', 'WMS_INVLD_PICKTO_LPN_BULK');
11141: fnd_msg_pub.ADD;
11142: RAISE fnd_api.g_exc_error;
11143: EXCEPTION
11144: WHEN NO_DATA_FOUND THEN null;
11145: END;
11196: mydebug(' l_mmtt_mo_type => ' || l_mmtt_mo_type);
11197: mydebug(' l_mo_type_in_lpn => ' || l_mo_type_in_lpn);
11198: END IF;
11199: fnd_message.set_name('WMS', 'WMS_INVLD_PICKTO_LPN_MO_TYPE');
11200: fnd_msg_pub.ADD;
11201: RAISE fnd_api.g_exc_error;
11202: ELSIF l_mmtt_txn_type_id = 35
11203: OR l_mmtt_txn_type_id = 51 THEN -- Mfg pick
11204: IF l_mmtt_wip_entity_type <> l_wip_entity_type_in_lpn THEN
11206: mydebug('validate_pick_to_lpn: This is a manufacturing component pick.');
11207: mydebug('WIP entity type IS NOT the same AS that OF the old mmtt RECORD');
11208: END IF;
11209: fnd_message.set_name('WMS', 'WMS_INVLD_PICKTO_LPN_MFG_MODE');
11210: fnd_msg_pub.ADD;
11211: RAISE fnd_api.g_exc_error;
11212: END IF;
11213: END IF;
11214: END IF;
11277: mydebug('validate_pick_to_lpn: Cannot add picks not going to the same sub');
11278: END IF;
11279:
11280: fnd_message.set_name('WMS', 'WMS_INVLD_PICKTO_LPN_SUBINV');
11281: fnd_msg_pub.ADD;
11282: RAISE fnd_api.g_exc_error;
11283: END IF;
11284: ELSE
11285: --
11318: mydebug('validate_pick_to_lpn: Drop LPN has pick(s) for an LPN-controlled sub');
11319: END IF;
11320:
11321: fnd_message.set_name('WMS', 'WMS_INVLD_PICKTO_LPN_SUBINV');
11322: fnd_msg_pub.ADD;
11323: RAISE fnd_api.g_exc_error;
11324: END IF;
11325: END IF;
11326:
11348: mydebug('validate_pick_to_lpn: Drop LPN is associated with material FOR a different operation plan');
11349: END IF;
11350:
11351: fnd_message.set_name('WMS', 'WMS_INVLD_PICKTO_LPN_OPER_PLAN');
11352: fnd_msg_pub.ADD;
11353: RAISE fnd_api.g_exc_error;
11354: END IF;
11355:
11356:
11398: mydebug('validate_pick_to_lpn: can NOT find move order line for current task');
11399: END IF;
11400:
11401: fnd_message.set_name('WMS', 'WMS_NO_MOL');
11402: fnd_msg_pub.ADD;
11403: RAISE fnd_api.g_exc_error;
11404: END IF;
11405:
11406: IF l_current_carton_grouping_id IS NOT NULL THEN -- found carton_grouping_id
11443: mydebug('validate_pick_to_lpn: can NOT find either wdd or wda for tasks in the lpn');
11444: END IF;
11445:
11446: fnd_message.set_name('WMS', 'WMS_NO_WDD_WDA');
11447: fnd_msg_pub.ADD;
11448: RAISE fnd_api.g_exc_error;
11449: END IF;
11450:
11451: IF l_pick_to_lpn_delivery_id IS NULL THEN
11460: mydebug('validate_pick_to_lpn: other tasks in lpn have different deliveries');
11461: END IF;
11462:
11463: fnd_message.set_name('WMS', 'WMS_PICK_TO_LPN_DIFF_DELIV');
11464: fnd_msg_pub.ADD;
11465: RAISE fnd_api.g_exc_error;
11466: END IF;
11467: ELSE -- they have different carton_grouping_id
11468: --{
11524: END;
11525: --
11526: IF (l_same_carton_grouping = FALSE) then */
11527: fnd_message.set_name('WMS', 'WMS_DIFF_CARTON_GROUP');
11528: fnd_msg_pub.ADD;
11529: RAISE fnd_api.g_exc_error;
11530: /*END IF;
11531: --
11532: -- End : R12 bug 4454837.
11536: IF (l_debug = 1) THEN
11537: mydebug('validate_pick_to_lpn: some of tasks in lpn have NULL carton_grouping_id');
11538: END IF;
11539: fnd_message.set_name('WMS', 'WMS_CARTON_GROUP_NULL');
11540: fnd_msg_pub.ADD;
11541: RAISE fnd_api.g_exc_error;
11542: END IF;
11543: ELSE --carton_grouping_id is null
11544: IF (l_debug = 1) THEN
11546: END IF;
11547: --bug3481923 only fail if it is not requisition on repl mo
11548: if (l_mmtt_mo_type not in(1,2)) then
11549: fnd_message.set_name('WMS', 'WMS_CARTON_GROUP_NULL');
11550: fnd_msg_pub.ADD;
11551: RAISE fnd_api.g_exc_error;
11552: end if;
11553: END IF;
11554: END IF;
11579: mydebug('validate_pick_to_lpn: Picked LPN and current MMTT go to different deliveries.');
11580: END IF;
11581:
11582: fnd_message.set_name('WMS', 'WMS_PICK_TO_LPN_DIFF_DELIV');
11583: fnd_msg_pub.ADD;
11584: RAISE fnd_api.g_exc_error;
11585: END IF;
11586: ELSIF l_pick_to_lpn_delivery_id2 IS NULL THEN
11587: IF (l_debug = 1) THEN
11594: mydebug('validate_pick_to_lpn: Picked LPN does not have delivery and current task has delivery.');
11595: END IF;
11596:
11597: fnd_message.set_name('WMS', 'WMS_PICK_TO_LPN_DIFF_DELIV');
11598: fnd_msg_pub.ADD;
11599: RAISE fnd_api.g_exc_error;
11600: END IF;
11601: ELSIF l_pick_to_lpn_delivery_id2 = -999 THEN
11602: IF (l_debug = 1) THEN
11628: mydebug('validate_pick_to_lpn: Picked LPN and current MMTT go to different deliveries.');
11629: END IF;
11630:
11631: fnd_message.set_name('WMS', 'WMS_PICK_TO_LPN_DIFF_DELIV');
11632: fnd_msg_pub.ADD;
11633: RAISE fnd_api.g_exc_error;
11634: NULL;
11635: ELSE
11636: --
11676: mydebug('validate_pick_to_lpn: LPNs are on diff deliveries.');
11677: END IF;
11678:
11679: fnd_message.set_name('WMS', 'WMS_PICK_TO_LPN_DIFF_DELIV');
11680: fnd_msg_pub.ADD;
11681: RAISE fnd_api.g_exc_error;
11682: ELSE
11683: --
11684: -- Child LPN has the delivery as the current MMTT, return success
11738: EXCEPTION
11739: WHEN fnd_api.g_exc_error THEN
11740: x_return_status := fnd_api.g_ret_sts_error;
11741: -- Get message count and data
11742: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
11743:
11744: IF (l_debug = 1) THEN
11745: mydebug('validate_pick_to_lpn: @' || x_msg_data || '@');
11746: END IF;
11778: END IF;
11779: WHEN OTHERS THEN
11780: x_return_status := fnd_api.g_ret_sts_unexp_error;
11781:
11782: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
11783: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
11784: END IF;
11785:
11786: -- Get message count and data
11779: WHEN OTHERS THEN
11780: x_return_status := fnd_api.g_ret_sts_unexp_error;
11781:
11782: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
11783: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
11784: END IF;
11785:
11786: -- Get message count and data
11787: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
11783: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
11784: END IF;
11785:
11786: -- Get message count and data
11787: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
11788:
11789: IF others_in_mmtt_delivery_cursor%ISOPEN THEN
11790: CLOSE others_in_mmtt_delivery_cursor;
11791: END IF;
11905: IF (l_debug = 1) THEN
11906: mydebug('validate_sub_loc_status: Error - ' || SQLERRM);
11907: END IF;
11908:
11909: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
11910: WHEN OTHERS THEN
11911: x_return_status := fnd_api.g_ret_sts_unexp_error;
11912:
11913: IF (l_debug = 1) THEN
11913: IF (l_debug = 1) THEN
11914: mydebug('validate_sub_loc_status: Unexpected Error - ' || SQLERRM);
11915: END IF;
11916:
11917: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
11918: END validate_sub_loc_status;
11919:
11920: PROCEDURE insert_serial(
11921: p_serial_transaction_temp_id IN OUT NOCOPY NUMBER,
11972: END;
11973:
11974: IF l_count <> 0 THEN
11975: fnd_message.set_name('INV', 'INVALID_SERIAL_NUMBER');
11976: fnd_msg_pub.ADD;
11977: RAISE fnd_api.g_exc_error;
11978: END IF;
11979:
11980: l_progress := '30';
12054: IF (l_debug = 1) THEN
12055: mydebug('Exitting insert_serial - execution error:'|| l_progress || ' ' || TO_CHAR(SYSDATE, 'YYYY-MM-DD HH:DD:SS'), 1);
12056: END IF;
12057: -- Get message count and data
12058: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => l_msg_count, p_data => x_msg_data);
12059: WHEN OTHERS THEN
12060: x_return_status := fnd_api.g_ret_sts_unexp_error;
12061:
12062: IF SQLCODE IS NOT NULL THEN
12067: mydebug('Exitting insert_serial - other exception:'|| l_progress || ' ' || TO_CHAR(SYSDATE, 'YYYY-MM-DD HH:DD:SS'), 1);
12068: END IF;
12069:
12070: --
12071: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
12072: fnd_msg_pub.add_exc_msg(g_pkg_name, 'insert_serial');
12073: END IF;
12074:
12075: END insert_serial;
12068: END IF;
12069:
12070: --
12071: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
12072: fnd_msg_pub.add_exc_msg(g_pkg_name, 'insert_serial');
12073: END IF;
12074:
12075: END insert_serial;
12076: