195:
196: x_return_status := fnd_api.g_ret_sts_success;
197: EXCEPTION
198: WHEN OTHERS THEN
199: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
200: fnd_msg_pub.add_exc_msg(g_pkg_name, 'Update_Row');
201: END IF;
202:
203: x_return_status := fnd_api.g_ret_sts_unexp_error;
196: x_return_status := fnd_api.g_ret_sts_success;
197: EXCEPTION
198: WHEN OTHERS THEN
199: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
200: fnd_msg_pub.add_exc_msg(g_pkg_name, 'Update_Row');
201: END IF;
202:
203: x_return_status := fnd_api.g_ret_sts_unexp_error;
204: RAISE fnd_api.g_exc_unexpected_error;
609:
610: x_return_status := fnd_api.g_ret_sts_success;
611: EXCEPTION
612: WHEN OTHERS THEN
613: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
614: fnd_msg_pub.add_exc_msg(g_pkg_name, 'Delete_Row');
615: END IF;
616:
617: x_return_status := fnd_api.g_ret_sts_unexp_error;
610: x_return_status := fnd_api.g_ret_sts_success;
611: EXCEPTION
612: WHEN OTHERS THEN
613: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
614: fnd_msg_pub.add_exc_msg(g_pkg_name, 'Delete_Row');
615: END IF;
616:
617: x_return_status := fnd_api.g_ret_sts_unexp_error;
618: RAISE fnd_api.g_exc_unexpected_error;
1218: -- Row has changed by another user.
1219:
1220: x_return_status := fnd_api.g_ret_sts_error;
1221:
1222: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_error) THEN
1223: fnd_message.set_name('INV', 'OE_LOCK_ROW_CHANGED');
1224: fnd_msg_pub.ADD;
1225: END IF;
1226: END IF;
1220: x_return_status := fnd_api.g_ret_sts_error;
1221:
1222: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_error) THEN
1223: fnd_message.set_name('INV', 'OE_LOCK_ROW_CHANGED');
1224: fnd_msg_pub.ADD;
1225: END IF;
1226: END IF;
1227:
1228: x_return_status := fnd_api.g_ret_sts_success;
1229: EXCEPTION
1230: WHEN NO_DATA_FOUND THEN
1231: x_return_status := fnd_api.g_ret_sts_error;
1232:
1233: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_error) THEN
1234: fnd_message.set_name('INV', 'OE_LOCK_ROW_DELETED');
1235: fnd_msg_pub.ADD;
1236: END IF;
1237: WHEN app_exceptions.record_lock_exception THEN
1231: x_return_status := fnd_api.g_ret_sts_error;
1232:
1233: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_error) THEN
1234: fnd_message.set_name('INV', 'OE_LOCK_ROW_DELETED');
1235: fnd_msg_pub.ADD;
1236: END IF;
1237: WHEN app_exceptions.record_lock_exception THEN
1238: x_return_status := fnd_api.g_ret_sts_error;
1239:
1236: END IF;
1237: WHEN app_exceptions.record_lock_exception THEN
1238: x_return_status := fnd_api.g_ret_sts_error;
1239:
1240: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_error) THEN
1241: fnd_message.set_name('INV', 'OE_LOCK_ROW_ALREADY_LOCKED');
1242: fnd_msg_pub.ADD;
1243: END IF;
1244: WHEN OTHERS THEN
1238: x_return_status := fnd_api.g_ret_sts_error;
1239:
1240: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_error) THEN
1241: fnd_message.set_name('INV', 'OE_LOCK_ROW_ALREADY_LOCKED');
1242: fnd_msg_pub.ADD;
1243: END IF;
1244: WHEN OTHERS THEN
1245: x_return_status := fnd_api.g_ret_sts_unexp_error;
1246:
1243: END IF;
1244: WHEN OTHERS THEN
1245: x_return_status := fnd_api.g_ret_sts_unexp_error;
1246:
1247: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
1248: fnd_msg_pub.add_exc_msg(g_pkg_name, 'Lock_Row');
1249: END IF;
1250: END lock_row;
1251:
1244: WHEN OTHERS THEN
1245: x_return_status := fnd_api.g_ret_sts_unexp_error;
1246:
1247: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
1248: fnd_msg_pub.add_exc_msg(g_pkg_name, 'Lock_Row');
1249: END IF;
1250: END lock_row;
1251:
1252: -- Function Query_Row
1657: l_debug NUMBER := NVL(fnd_profile.VALUE('INV_DEBUG_TRACE'), 0);
1658: BEGIN
1659: IF (p_line_id IS NOT NULL AND p_line_id <> fnd_api.g_miss_num)
1660: AND(p_line_detail_id IS NOT NULL AND p_line_detail_id <> fnd_api.g_miss_num) THEN
1661: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
1662: fnd_msg_pub.add_exc_msg(
1663: g_pkg_name
1664: , 'Query Rows'
1665: , 'Keys are mutually exclusive: line_id = ' || p_line_id || ', line_detail_id = ' || p_line_detail_id
1658: BEGIN
1659: IF (p_line_id IS NOT NULL AND p_line_id <> fnd_api.g_miss_num)
1660: AND(p_line_detail_id IS NOT NULL AND p_line_detail_id <> fnd_api.g_miss_num) THEN
1661: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
1662: fnd_msg_pub.add_exc_msg(
1663: g_pkg_name
1664: , 'Query Rows'
1665: , 'Keys are mutually exclusive: line_id = ' || p_line_id || ', line_detail_id = ' || p_line_detail_id
1666: );
2074: EXCEPTION
2075: WHEN fnd_api.g_exc_unexpected_error THEN
2076: RAISE fnd_api.g_exc_unexpected_error;
2077: WHEN OTHERS THEN
2078: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
2079: fnd_msg_pub.add_exc_msg(g_pkg_name, 'Query_Rows');
2080: END IF;
2081:
2082: RAISE fnd_api.g_exc_unexpected_error;
2075: WHEN fnd_api.g_exc_unexpected_error THEN
2076: RAISE fnd_api.g_exc_unexpected_error;
2077: WHEN OTHERS THEN
2078: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
2079: fnd_msg_pub.add_exc_msg(g_pkg_name, 'Query_Rows');
2080: END IF;
2081:
2082: RAISE fnd_api.g_exc_unexpected_error;
2083: END query_rows;
2145: x_return_status := fnd_api.g_ret_sts_success;
2146:
2147: IF p_move_order_line_id IS NULL THEN
2148: fnd_message.set_name('INV', 'INV_MISSING_REQUIRED_PARAMETER');
2149: fnd_msg_pub.ADD;
2150: RAISE fnd_api.g_exc_unexpected_error;
2151: END IF;
2152:
2153: i := p_mold_table.FIRST;
2153: i := p_mold_table.FIRST;
2154:
2155: IF i IS NULL THEN
2156: fnd_message.set_name('INV', 'INV_MISSING_REQUIRED_PARAMETER');
2157: fnd_msg_pub.ADD;
2158: RAISE fnd_api.g_exc_unexpected_error;
2159: END IF;
2160:
2161: WHILE i IS NOT NULL LOOP
2161: WHILE i IS NOT NULL LOOP
2162: IF p_mold_table(i).organization_id IS NULL
2163: OR p_mold_table(i).organization_id = fnd_api.g_miss_num THEN
2164: fnd_message.set_name('INV', 'INV_MISSING_REQUIRED_PARAMETER');
2165: fnd_msg_pub.ADD;
2166: RAISE fnd_api.g_exc_unexpected_error;
2167: END IF;
2168:
2169: IF p_mold_table(i).subinventory_code IS NULL
2168:
2169: IF p_mold_table(i).subinventory_code IS NULL
2170: OR p_mold_table(i).subinventory_code = fnd_api.g_miss_char THEN
2171: fnd_message.set_name('INV', 'INV_MISSING_REQUIRED_PARAMETER');
2172: fnd_msg_pub.ADD;
2173: RAISE fnd_api.g_exc_unexpected_error;
2174: END IF;
2175:
2176: IF p_mold_table(i).locator_id = fnd_api.g_miss_num THEN
2174: END IF;
2175:
2176: IF p_mold_table(i).locator_id = fnd_api.g_miss_num THEN
2177: fnd_message.set_name('INV', 'INV_MISSING_REQUIRED_PARAMETER');
2178: fnd_msg_pub.ADD;
2179: RAISE fnd_api.g_exc_unexpected_error;
2180: END IF;
2181:
2182: IF p_mold_table(i).inventory_item_id IS NULL
2181:
2182: IF p_mold_table(i).inventory_item_id IS NULL
2183: OR p_mold_table(i).locator_id = fnd_api.g_miss_num THEN
2184: fnd_message.set_name('INV', 'INV_MISSING_REQUIRED_PARAMETER');
2185: fnd_msg_pub.ADD;
2186: RAISE fnd_api.g_exc_unexpected_error;
2187: END IF;
2188:
2189: IF p_mold_table(i).revision = fnd_api.g_miss_char THEN
2187: END IF;
2188:
2189: IF p_mold_table(i).revision = fnd_api.g_miss_char THEN
2190: fnd_message.set_name('INV', 'INV_MISSING_REQUIRED_PARAMETER');
2191: fnd_msg_pub.ADD;
2192: RAISE fnd_api.g_exc_unexpected_error;
2193: END IF;
2194:
2195: IF p_mold_table(i).lot_number = fnd_api.g_miss_char THEN
2193: END IF;
2194:
2195: IF p_mold_table(i).lot_number = fnd_api.g_miss_char THEN
2196: fnd_message.set_name('INV', 'INV_MISSING_REQUIRED_PARAMETER');
2197: fnd_msg_pub.ADD;
2198: RAISE fnd_api.g_exc_unexpected_error;
2199: END IF;
2200:
2201: IF p_mold_table(i).serial_number = fnd_api.g_miss_char THEN
2199: END IF;
2200:
2201: IF p_mold_table(i).serial_number = fnd_api.g_miss_char THEN
2202: fnd_message.set_name('INV', 'INV_MISSING_REQUIRED_PARAMETER');
2203: fnd_msg_pub.ADD;
2204: RAISE fnd_api.g_exc_unexpected_error;
2205: END IF;
2206:
2207: IF p_mold_table(i).transaction_uom = fnd_api.g_miss_char THEN
2205: END IF;
2206:
2207: IF p_mold_table(i).transaction_uom = fnd_api.g_miss_char THEN
2208: fnd_message.set_name('INV', 'INV_MISSING_REQUIRED_PARAMETER');
2209: fnd_msg_pub.ADD;
2210: RAISE fnd_api.g_exc_unexpected_error;
2211: END IF;
2212:
2213: IF p_mold_table(i).transaction_quantity IS NULL
2213: IF p_mold_table(i).transaction_quantity IS NULL
2214: OR p_mold_table(i).transaction_quantity = 0
2215: OR p_mold_table(i).locator_id = fnd_api.g_miss_num THEN
2216: fnd_message.set_name('INV', 'INV_MISSING_REQUIRED_PARAMETER');
2217: fnd_msg_pub.ADD;
2218: RAISE fnd_api.g_exc_unexpected_error;
2219: END IF;
2220:
2221: BEGIN
2232: AND organization_id = p_mold_table(i).organization_id;
2233: EXCEPTION
2234: WHEN NO_DATA_FOUND THEN
2235: fnd_message.set_name('INV', 'INV-NO ITEM RECORD');
2236: fnd_msg_pub.ADD;
2237: RAISE fnd_api.g_exc_error;
2238: WHEN OTHERS THEN
2239: RAISE;
2240: END;
2242: -- API does not handle serial controlled items
2243: IF l_serial_control_code IN(2, 5) THEN
2244: fnd_message.set_name('INV', 'INV_FIELD_INVALID');
2245: fnd_message.set_token('ENTITY1', 'SERIAL_CONTROL', TRUE);
2246: fnd_msg_pub.ADD;
2247: RAISE fnd_api.g_exc_error;
2248: END IF;
2249:
2250: -- Get the primary quantity
2262: IF l_primary_quantity = -99999 THEN
2263: fnd_message.set_name('INV', 'INV-CANNOT CONVERT');
2264: fnd_message.set_token('UOM', p_mold_table(i).transaction_uom);
2265: fnd_message.set_token('ROUTINE', 'inv_mo_line_detail_util.update_quantity_allocations');
2266: fnd_msg_pub.ADD;
2267: RAISE fnd_api.g_exc_error;
2268: END IF;
2269:
2270: IF l_lot_control_code = 1
2314: , primary_quantity = l_primary_quantity
2315: WHERE ROWID = l_mmtt_rowid;
2316: ELSIF l_mmtt_transaction_quantity < p_mold_table(i).transaction_quantity THEN
2317: fnd_message.set_name('INV', 'INV_QUANTITY_TOO_BIG');
2318: fnd_msg_pub.ADD;
2319: RAISE fnd_api.g_exc_error;
2320: END IF;
2321: ELSIF l_lot_control_code = 2
2322: AND l_serial_control_code IN(1, 6) THEN
2393: , primary_quantity = l_primary_quantity
2394: WHERE ROWID = l_mtlt_rowid;
2395: ELSIF l_mtlt_transaction_quantity < p_mold_table(i).transaction_quantity THEN
2396: fnd_message.set_name('INV', 'INV_QUANTITY_TOO_BIG');
2397: fnd_msg_pub.ADD;
2398: RAISE fnd_api.g_exc_error;
2399: END IF;
2400: END IF; -- Type of item control
2401:
2448:
2449: -- Requery the MMTT rows and pass them back as the output parameter
2450: x_mold_table := inv_mo_line_detail_util.query_rows(p_move_order_line_id);
2451: -- Get message count and data
2452: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2453: EXCEPTION
2454: WHEN TOO_MANY_ROWS THEN
2455: x_return_status := fnd_api.g_ret_sts_error;
2456: fnd_message.set_name('INV', 'INV_MGD_MVT_TOO_MANY_TRANS');
2453: EXCEPTION
2454: WHEN TOO_MANY_ROWS THEN
2455: x_return_status := fnd_api.g_ret_sts_error;
2456: fnd_message.set_name('INV', 'INV_MGD_MVT_TOO_MANY_TRANS');
2457: fnd_msg_pub.ADD;
2458: ROLLBACK TO update_qty;
2459: WHEN NO_DATA_FOUND THEN
2460: x_return_status := fnd_api.g_ret_sts_error;
2461: fnd_message.set_name('INV', 'INV_NO_RECORDS');
2459: WHEN NO_DATA_FOUND THEN
2460: x_return_status := fnd_api.g_ret_sts_error;
2461: fnd_message.set_name('INV', 'INV_NO_RECORDS');
2462: fnd_message.set_token('ENTITY', l_current_table);
2463: fnd_msg_pub.ADD;
2464: -- Get message count and data
2465: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2466: ROLLBACK TO update_qty;
2467: WHEN fnd_api.g_exc_error THEN
2461: fnd_message.set_name('INV', 'INV_NO_RECORDS');
2462: fnd_message.set_token('ENTITY', l_current_table);
2463: fnd_msg_pub.ADD;
2464: -- Get message count and data
2465: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2466: ROLLBACK TO update_qty;
2467: WHEN fnd_api.g_exc_error THEN
2468: x_return_status := fnd_api.g_ret_sts_error;
2469: -- Get message count and data
2466: ROLLBACK TO update_qty;
2467: WHEN fnd_api.g_exc_error THEN
2468: x_return_status := fnd_api.g_ret_sts_error;
2469: -- Get message count and data
2470: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2471: ROLLBACK TO update_qty;
2472: WHEN fnd_api.g_exc_unexpected_error THEN
2473: x_return_status := fnd_api.g_ret_sts_unexp_error;
2474: -- Get message count and data
2471: ROLLBACK TO update_qty;
2472: WHEN fnd_api.g_exc_unexpected_error THEN
2473: x_return_status := fnd_api.g_ret_sts_unexp_error;
2474: -- Get message count and data
2475: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2476: ROLLBACK TO update_qty;
2477: WHEN OTHERS THEN
2478: x_return_status := fnd_api.g_ret_sts_unexp_error;
2479: -- Get message count and data
2476: ROLLBACK TO update_qty;
2477: WHEN OTHERS THEN
2478: x_return_status := fnd_api.g_ret_sts_unexp_error;
2479: -- Get message count and data
2480: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2481: ROLLBACK TO update_qty;
2482: END;
2483:
2484: PROCEDURE delete_allocations(
2501: x_return_status := fnd_api.g_ret_sts_success;
2502: IF p_mo_line_id IS NULL AND p_transaction_temp_id IS NULL THEN
2503: debug('Either Move Order Line ID or Transaction Temp ID has to be passed','DELETE_ALLOCATIONS');
2504: fnd_message.set_name('INV','INV_MISSING_REQUIRED_PARAMETER');
2505: fnd_msg_pub.ADD;
2506: RAISE fnd_api.g_exc_error;
2507: END IF;
2508:
2509: FOR l_mmtt IN c_mmtt_info LOOP
2516: END LOOP;
2517: EXCEPTION
2518: WHEN fnd_api.g_exc_error THEN
2519: x_return_status := fnd_api.g_ret_sts_error;
2520: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2521: WHEN fnd_api.g_exc_unexpected_error THEN
2522: x_return_status := fnd_api.g_ret_sts_unexp_error;
2523: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2524: WHEN OTHERS THEN
2519: x_return_status := fnd_api.g_ret_sts_error;
2520: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2521: WHEN fnd_api.g_exc_unexpected_error THEN
2522: x_return_status := fnd_api.g_ret_sts_unexp_error;
2523: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2524: WHEN OTHERS THEN
2525: x_return_status := fnd_api.g_ret_sts_unexp_error;
2526: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2527: END delete_allocations;
2522: x_return_status := fnd_api.g_ret_sts_unexp_error;
2523: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2524: WHEN OTHERS THEN
2525: x_return_status := fnd_api.g_ret_sts_unexp_error;
2526: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2527: END delete_allocations;
2528:
2529: PROCEDURE reduce_allocation_quantity(
2530: x_return_status OUT NOCOPY VARCHAR2
2770: OPEN lot_records;
2771: FETCH lot_records INTO l_lot_quantity;
2772: CLOSE lot_records;
2773: x_lot_quantity := l_lot_quantity;
2774: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2775: x_return_status := fnd_api.g_ret_sts_success;
2776: EXCEPTION
2777: WHEN fnd_api.g_exc_error THEN
2778: x_lot_quantity := 0;
2776: EXCEPTION
2777: WHEN fnd_api.g_exc_error THEN
2778: x_lot_quantity := 0;
2779: x_return_status := fnd_api.g_ret_sts_error;
2780: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2781: WHEN fnd_api.g_exc_unexpected_error THEN
2782: x_lot_quantity := 0;
2783: x_return_status := fnd_api.g_ret_sts_unexp_error;
2784: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2780: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2781: WHEN fnd_api.g_exc_unexpected_error THEN
2782: x_lot_quantity := 0;
2783: x_return_status := fnd_api.g_ret_sts_unexp_error;
2784: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2785: WHEN OTHERS THEN
2786: x_lot_quantity := 0;
2787: x_return_status := fnd_api.g_ret_sts_unexp_error;
2788:
2785: WHEN OTHERS THEN
2786: x_lot_quantity := 0;
2787: x_return_status := fnd_api.g_ret_sts_unexp_error;
2788:
2789: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
2790: fnd_msg_pub.add_exc_msg(g_pkg_name, l_procedure_name);
2791: END IF;
2792:
2793: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2786: x_lot_quantity := 0;
2787: x_return_status := fnd_api.g_ret_sts_unexp_error;
2788:
2789: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
2790: fnd_msg_pub.add_exc_msg(g_pkg_name, l_procedure_name);
2791: END IF;
2792:
2793: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2794: END get_lot_quantity;
2789: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
2790: fnd_msg_pub.add_exc_msg(g_pkg_name, l_procedure_name);
2791: END IF;
2792:
2793: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2794: END get_lot_quantity;
2795:
2796: /* Bug 2427514: To get the Serial Qty for a Given Transaction Temp ID */
2797: PROCEDURE get_serial_quantity(
2814: OPEN serial_records;
2815: FETCH serial_records INTO l_serial_quantity;
2816: CLOSE serial_records;
2817: x_serial_quantity := l_serial_quantity;
2818: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2819: x_return_status := fnd_api.g_ret_sts_success;
2820: EXCEPTION
2821: WHEN fnd_api.g_exc_error THEN
2822: x_serial_quantity := 0;
2820: EXCEPTION
2821: WHEN fnd_api.g_exc_error THEN
2822: x_serial_quantity := 0;
2823: x_return_status := fnd_api.g_ret_sts_error;
2824: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2825: WHEN fnd_api.g_exc_unexpected_error THEN
2826: x_serial_quantity := 0;
2827: x_return_status := fnd_api.g_ret_sts_unexp_error;
2828: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2824: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2825: WHEN fnd_api.g_exc_unexpected_error THEN
2826: x_serial_quantity := 0;
2827: x_return_status := fnd_api.g_ret_sts_unexp_error;
2828: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2829: WHEN OTHERS THEN
2830: x_serial_quantity := 0;
2831: x_return_status := fnd_api.g_ret_sts_unexp_error;
2832:
2829: WHEN OTHERS THEN
2830: x_serial_quantity := 0;
2831: x_return_status := fnd_api.g_ret_sts_unexp_error;
2832:
2833: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
2834: fnd_msg_pub.add_exc_msg(g_pkg_name, l_procedure_name);
2835: END IF;
2836:
2837: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2830: x_serial_quantity := 0;
2831: x_return_status := fnd_api.g_ret_sts_unexp_error;
2832:
2833: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
2834: fnd_msg_pub.add_exc_msg(g_pkg_name, l_procedure_name);
2835: END IF;
2836:
2837: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2838: END get_serial_quantity;
2833: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
2834: fnd_msg_pub.add_exc_msg(g_pkg_name, l_procedure_name);
2835: END IF;
2836:
2837: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2838: END get_serial_quantity;
2839:
2840: /* Bug 2427514: To check the whether records exists in MTLT and MSNT for a
2841: given Transaction Temp ID */
2990: RAISE fnd_api.g_exc_error;
2991: END IF;
2992:
2993: <
2994: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
2995: x_return_status := fnd_api.g_ret_sts_success;
2996: EXCEPTION
2997: WHEN fnd_api.g_exc_error THEN
2998: x_return_status := fnd_api.g_ret_sts_error;
2995: x_return_status := fnd_api.g_ret_sts_success;
2996: EXCEPTION
2997: WHEN fnd_api.g_exc_error THEN
2998: x_return_status := fnd_api.g_ret_sts_error;
2999: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
3000: WHEN fnd_api.g_exc_unexpected_error THEN
3001: x_return_status := fnd_api.g_ret_sts_unexp_error;
3002: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
3003: WHEN OTHERS THEN
2998: x_return_status := fnd_api.g_ret_sts_error;
2999: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
3000: WHEN fnd_api.g_exc_unexpected_error THEN
3001: x_return_status := fnd_api.g_ret_sts_unexp_error;
3002: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
3003: WHEN OTHERS THEN
3004: x_return_status := fnd_api.g_ret_sts_unexp_error;
3005:
3006: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
3002: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
3003: WHEN OTHERS THEN
3004: x_return_status := fnd_api.g_ret_sts_unexp_error;
3005:
3006: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
3007: fnd_msg_pub.add_exc_msg(g_pkg_name, l_procedure_name);
3008: END IF;
3009:
3010: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
3003: WHEN OTHERS THEN
3004: x_return_status := fnd_api.g_ret_sts_unexp_error;
3005:
3006: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
3007: fnd_msg_pub.add_exc_msg(g_pkg_name, l_procedure_name);
3008: END IF;
3009:
3010: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
3011: END are_allocations_complete;
3006: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
3007: fnd_msg_pub.add_exc_msg(g_pkg_name, l_procedure_name);
3008: END IF;
3009:
3010: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
3011: END are_allocations_complete;
3012:
3013: /* Bug 2427514: To find out whether a MO Line is correctly allocated */
3014: PROCEDURE is_line_detailed(
3051: IF NOT l_detail_records_exist THEN
3052: RAISE fnd_api.g_exc_unexpected_error;
3053: END IF;
3054:
3055: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
3056: x_return_status := fnd_api.g_ret_sts_success;
3057: EXCEPTION
3058: WHEN fnd_api.g_exc_error THEN
3059: x_return_status := fnd_api.g_ret_sts_error;
3056: x_return_status := fnd_api.g_ret_sts_success;
3057: EXCEPTION
3058: WHEN fnd_api.g_exc_error THEN
3059: x_return_status := fnd_api.g_ret_sts_error;
3060: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
3061: WHEN fnd_api.g_exc_unexpected_error THEN
3062: x_return_status := fnd_api.g_ret_sts_unexp_error;
3063: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
3064: WHEN OTHERS THEN
3059: x_return_status := fnd_api.g_ret_sts_error;
3060: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
3061: WHEN fnd_api.g_exc_unexpected_error THEN
3062: x_return_status := fnd_api.g_ret_sts_unexp_error;
3063: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
3064: WHEN OTHERS THEN
3065: x_return_status := fnd_api.g_ret_sts_unexp_error;
3066:
3067: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
3063: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
3064: WHEN OTHERS THEN
3065: x_return_status := fnd_api.g_ret_sts_unexp_error;
3066:
3067: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
3068: fnd_msg_pub.add_exc_msg(g_pkg_name, l_procedure_name);
3069: END IF;
3070:
3071: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
3064: WHEN OTHERS THEN
3065: x_return_status := fnd_api.g_ret_sts_unexp_error;
3066:
3067: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
3068: fnd_msg_pub.add_exc_msg(g_pkg_name, l_procedure_name);
3069: END IF;
3070:
3071: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
3072: END is_line_detailed;
3067: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
3068: fnd_msg_pub.add_exc_msg(g_pkg_name, l_procedure_name);
3069: END IF;
3070:
3071: fnd_msg_pub.count_and_get(p_count => x_msg_count, p_data => x_msg_data);
3072: END is_line_detailed;
3073: END inv_mo_line_detail_util;