DBA Data[Home] [Help]

APPS.INV_LOT_API_PUB dependencies on FND_API

Line 219: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,

215: END;
216:
217: PROCEDURE insertlot (
218: p_api_version IN NUMBER,
219: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
220: p_commit IN VARCHAR2 := fnd_api.g_false,
221: p_validation_level IN NUMBER
222: := fnd_api.g_valid_level_full,
223: p_inventory_item_id IN NUMBER,

Line 220: p_commit IN VARCHAR2 := fnd_api.g_false,

216:
217: PROCEDURE insertlot (
218: p_api_version IN NUMBER,
219: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
220: p_commit IN VARCHAR2 := fnd_api.g_false,
221: p_validation_level IN NUMBER
222: := fnd_api.g_valid_level_full,
223: p_inventory_item_id IN NUMBER,
224: p_organization_id IN NUMBER,

Line 222: := fnd_api.g_valid_level_full,

218: p_api_version IN NUMBER,
219: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
220: p_commit IN VARCHAR2 := fnd_api.g_false,
221: p_validation_level IN NUMBER
222: := fnd_api.g_valid_level_full,
223: p_inventory_item_id IN NUMBER,
224: p_organization_id IN NUMBER,
225: p_lot_number IN VARCHAR2,
226: p_expiration_date IN OUT NOCOPY DATE,

Line 350: IF NOT fnd_api.compatible_api_call ( l_api_version, p_api_version, l_api_name, g_pkg_name) THEN

346: -- Standard Start of API savepoint
347: SAVEPOINT apiinsertlot_apipub;
348:
349: -- Standard call to check for call compatibility.
350: IF NOT fnd_api.compatible_api_call ( l_api_version, p_api_version, l_api_name, g_pkg_name) THEN
351: RAISE fnd_api.g_exc_unexpected_error;
352: END IF;
353:
354: -- Initialize message list if p_init_msg_list is set to TRUE.

Line 351: RAISE fnd_api.g_exc_unexpected_error;

347: SAVEPOINT apiinsertlot_apipub;
348:
349: -- Standard call to check for call compatibility.
350: IF NOT fnd_api.compatible_api_call ( l_api_version, p_api_version, l_api_name, g_pkg_name) THEN
351: RAISE fnd_api.g_exc_unexpected_error;
352: END IF;
353:
354: -- Initialize message list if p_init_msg_list is set to TRUE.
355: IF fnd_api.to_boolean ( p_init_msg_list ) THEN

Line 355: IF fnd_api.to_boolean ( p_init_msg_list ) THEN

351: RAISE fnd_api.g_exc_unexpected_error;
352: END IF;
353:
354: -- Initialize message list if p_init_msg_list is set to TRUE.
355: IF fnd_api.to_boolean ( p_init_msg_list ) THEN
356: fnd_msg_pub.initialize;
357: END IF;
358:
359: -- Initialize API return status to success

Line 360: x_return_status := fnd_api.g_ret_sts_success;

356: fnd_msg_pub.initialize;
357: END IF;
358:
359: -- Initialize API return status to success
360: x_return_status := fnd_api.g_ret_sts_success;
361:
362: -- API body
363: IF ( g_firstscan = TRUE AND p_transaction_action_id = 3) THEN
364: x_return_status := fnd_api.g_ret_sts_success;

Line 364: x_return_status := fnd_api.g_ret_sts_success;

360: x_return_status := fnd_api.g_ret_sts_success;
361:
362: -- API body
363: IF ( g_firstscan = TRUE AND p_transaction_action_id = 3) THEN
364: x_return_status := fnd_api.g_ret_sts_success;
365: ELSE
366: BEGIN
367: SELECT lot_control_code
368: INTO l_lot_control_code

Line 377: x_return_status := fnd_api.g_ret_sts_error;

373: IF ( l_lot_control_code = 1 )
374: THEN
375: fnd_message.set_name ('INV' , 'INV_NO_LOT_CONTROL' );
376: fnd_msg_pub.ADD;
377: x_return_status := fnd_api.g_ret_sts_error;
378: RAISE fnd_api.g_exc_unexpected_error;
379: END IF;
380: EXCEPTION
381: WHEN NO_DATA_FOUND

Line 378: RAISE fnd_api.g_exc_unexpected_error;

374: THEN
375: fnd_message.set_name ('INV' , 'INV_NO_LOT_CONTROL' );
376: fnd_msg_pub.ADD;
377: x_return_status := fnd_api.g_ret_sts_error;
378: RAISE fnd_api.g_exc_unexpected_error;
379: END IF;
380: EXCEPTION
381: WHEN NO_DATA_FOUND
382: THEN

Line 388: x_return_status := fnd_api.g_ret_sts_error;

384: inv_pick_wave_pick_confirm_pub.tracelog ( 'Exception in LOT_CONTROL_CODE' , 'INV_LOT_API_PUB');
385: END IF;
386: fnd_message.set_name ('INV' , 'INV_INVALID_ITEM' );
387: fnd_msg_pub.ADD;
388: x_return_status := fnd_api.g_ret_sts_error;
389: RAISE fnd_api.g_exc_unexpected_error;
390: END;
391:
392: SELECT lot_number_uniqueness

Line 389: RAISE fnd_api.g_exc_unexpected_error;

385: END IF;
386: fnd_message.set_name ('INV' , 'INV_INVALID_ITEM' );
387: fnd_msg_pub.ADD;
388: x_return_status := fnd_api.g_ret_sts_error;
389: RAISE fnd_api.g_exc_unexpected_error;
390: END;
391:
392: SELECT lot_number_uniqueness
393: INTO l_lotunique

Line 419: x_return_status := fnd_api.g_ret_sts_error;

415:
416: IF ( l_lotcount > 0 ) THEN
417: fnd_message.set_name ('INV' , 'INV_INT_LOTUNIQEXP' );
418: fnd_msg_pub.ADD;
419: x_return_status := fnd_api.g_ret_sts_error;
420: RAISE fnd_api.g_exc_unexpected_error;
421: IF (l_debug = 1) THEN
422: inv_pick_wave_pick_confirm_pub.tracelog ( 'Exception in MTL_LOT_NUMBER' , 'INV_LOT_API_PUB');
423: END IF;

Line 420: RAISE fnd_api.g_exc_unexpected_error;

416: IF ( l_lotcount > 0 ) THEN
417: fnd_message.set_name ('INV' , 'INV_INT_LOTUNIQEXP' );
418: fnd_msg_pub.ADD;
419: x_return_status := fnd_api.g_ret_sts_error;
420: RAISE fnd_api.g_exc_unexpected_error;
421: IF (l_debug = 1) THEN
422: inv_pick_wave_pick_confirm_pub.tracelog ( 'Exception in MTL_LOT_NUMBER' , 'INV_LOT_API_PUB');
423: END IF;
424: END IF;

Line 456: x_return_status := fnd_api.g_ret_sts_error;

452: FROM DUAL;
453: ELSIF ( l_shelf_life_code = 4 ) THEN
454: fnd_message.set_name ('INV' , 'INV_LOT_EXPREQD' );
455: fnd_msg_pub.ADD;
456: x_return_status := fnd_api.g_ret_sts_error;
457: RAISE fnd_api.g_exc_unexpected_error;
458: END IF;
459: END IF;
460:

Line 457: RAISE fnd_api.g_exc_unexpected_error;

453: ELSIF ( l_shelf_life_code = 4 ) THEN
454: fnd_message.set_name ('INV' , 'INV_LOT_EXPREQD' );
455: fnd_msg_pub.ADD;
456: x_return_status := fnd_api.g_ret_sts_error;
457: RAISE fnd_api.g_exc_unexpected_error;
458: END IF;
459: END IF;
460:
461: IF (l_debug = 1) THEN

Line 971: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

967:
968: end if;
969: EXCEPTION
970: when no_data_found THEN
971: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
972: IF (l_debug = 1) THEN
973: inv_log_util.trace('SQL : ' || substr(sqlerrm, 1, 200), 'INV_LOT_API_PUB','9');
974: inv_log_util.trace('Error in insertLot : ', 'INV_LOT_API_PUB','9');
975: END IF;

Line 976: raise FND_API.G_EXC_UNEXPECTED_ERROR;

972: IF (l_debug = 1) THEN
973: inv_log_util.trace('SQL : ' || substr(sqlerrm, 1, 200), 'INV_LOT_API_PUB','9');
974: inv_log_util.trace('Error in insertLot : ', 'INV_LOT_API_PUB','9');
975: END IF;
976: raise FND_API.G_EXC_UNEXPECTED_ERROR;
977: when others then
978: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
979: IF (l_debug = 1) THEN
980: inv_log_util.trace('SQL : ' || substr(sqlerrm, 1, 200), 'INV_LOT_API_PUB','9');

Line 978: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

974: inv_log_util.trace('Error in insertLot : ', 'INV_LOT_API_PUB','9');
975: END IF;
976: raise FND_API.G_EXC_UNEXPECTED_ERROR;
977: when others then
978: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
979: IF (l_debug = 1) THEN
980: inv_log_util.trace('SQL : ' || substr(sqlerrm, 1, 200), 'INV_LOT_API_PUB','9');
981: inv_log_util.trace('Error in insertLot : ', 'INV_LOT_API_PUB','9');
982: END IF;

Line 983: raise FND_API.G_EXC_UNEXPECTED_ERROR;

979: IF (l_debug = 1) THEN
980: inv_log_util.trace('SQL : ' || substr(sqlerrm, 1, 200), 'INV_LOT_API_PUB','9');
981: inv_log_util.trace('Error in insertLot : ', 'INV_LOT_API_PUB','9');
982: END IF;
983: raise FND_API.G_EXC_UNEXPECTED_ERROR;
984:
985: end;
986:
987: -- to prepare to insert the status to status history table for the initial status

Line 1026: IF ( l_return_status <> fnd_api.g_ret_sts_success ) THEN

1022: IF (l_debug = 1) THEN
1023: inv_pick_wave_pick_confirm_pub.tracelog ( 'After get_default' , 'INV_LOT_API_PUB');
1024: END IF;
1025:
1026: IF ( l_return_status <> fnd_api.g_ret_sts_success ) THEN
1027: IF (l_debug = 1) THEN
1028: inv_pick_wave_pick_confirm_pub.tracelog ( 'exception of get_default' , 'INV_LOT_API_PUB');
1029: END IF;
1030: x_return_status := l_return_status;

Line 1031: RAISE fnd_api.g_exc_unexpected_error;

1027: IF (l_debug = 1) THEN
1028: inv_pick_wave_pick_confirm_pub.tracelog ( 'exception of get_default' , 'INV_LOT_API_PUB');
1029: END IF;
1030: x_return_status := l_return_status;
1031: RAISE fnd_api.g_exc_unexpected_error;
1032: END IF;
1033:
1034: /********************************************************************
1035: Bug 2181558 - Code Starts

Line 1076: IF ( l_return_status <> fnd_api.g_ret_sts_success ) THEN

1072: p_count => l_attributes_default_count,
1073: p_source_wms_lot_att_tbl => l_attributes_default
1074: );
1075:
1076: IF ( l_return_status <> fnd_api.g_ret_sts_success ) THEN
1077: x_return_status := l_return_status;
1078: RAISE fnd_api.g_exc_unexpected_error;
1079: END IF;
1080:

Line 1078: RAISE fnd_api.g_exc_unexpected_error;

1074: );
1075:
1076: IF ( l_return_status <> fnd_api.g_ret_sts_success ) THEN
1077: x_return_status := l_return_status;
1078: RAISE fnd_api.g_exc_unexpected_error;
1079: END IF;
1080:
1081: l_attributes_default := l_att_after_source_copy;
1082: l_attributes_default_count := l_num_wms_lot_att_copied;

Line 1139: IF ( l_return_status <> fnd_api.g_ret_sts_success ) THEN

1135: IF (l_debug = 1) THEN
1136: inv_pick_wave_pick_confirm_pub.tracelog ( 'After get_lot_Serial_status_control' , 'INV_LOT_API_PUB');
1137: END IF;
1138:
1139: IF ( l_return_status <> fnd_api.g_ret_sts_success ) THEN
1140: x_return_status := l_return_status;
1141: RAISE fnd_api.g_exc_unexpected_error;
1142: END IF;
1143:

Line 1141: RAISE fnd_api.g_exc_unexpected_error;

1137: END IF;
1138:
1139: IF ( l_return_status <> fnd_api.g_ret_sts_success ) THEN
1140: x_return_status := l_return_status;
1141: RAISE fnd_api.g_exc_unexpected_error;
1142: END IF;
1143:
1144: IF ( NVL ( l_lot_status_enabled, 'Y' ) = 'Y' ) THEN
1145: -- For consistency, fill after converting to 'char'

Line 1389: x_return_status := fnd_api.g_ret_sts_success;

1385: inv_pick_wave_pick_confirm_pub.tracelog ( 'after calling insert_status_history' , 'INV_LOT_API_PUB');
1386: END IF;
1387: END IF;
1388:
1389: x_return_status := fnd_api.g_ret_sts_success;
1390: ELSE
1391: IF (l_debug = 1) THEN
1392: inv_pick_wave_pick_confirm_pub.tracelog ( 'INV_LOT_EXISTS' , 'INV_LOT_API_PUB');
1393: END IF;

Line 1396: --l_return_status := FND_API.G_RET_STS_SUCCESS;

1392: inv_pick_wave_pick_confirm_pub.tracelog ( 'INV_LOT_EXISTS' , 'INV_LOT_API_PUB');
1393: END IF;
1394: fnd_message.set_name ('INV' , 'INV_LOT_EXISTS' );
1395: fnd_msg_pub.ADD;
1396: --l_return_status := FND_API.G_RET_STS_SUCCESS;
1397: x_return_status := fnd_api.g_ret_sts_success;
1398: END IF;
1399:
1400: IF (l_lotcount > 0 AND p_expiration_date IS NOT NULL) THEN

Line 1397: x_return_status := fnd_api.g_ret_sts_success;

1393: END IF;
1394: fnd_message.set_name ('INV' , 'INV_LOT_EXISTS' );
1395: fnd_msg_pub.ADD;
1396: --l_return_status := FND_API.G_RET_STS_SUCCESS;
1397: x_return_status := fnd_api.g_ret_sts_success;
1398: END IF;
1399:
1400: IF (l_lotcount > 0 AND p_expiration_date IS NOT NULL) THEN
1401:

Line 1427: IF fnd_api.to_boolean ( p_commit ) THEN

1423: IF (l_debug = 1) THEN
1424: inv_pick_wave_pick_confirm_pub.tracelog ( 'Inserted the Lot ' || p_lot_number, 'INV_LOT_API_PUB');
1425: END IF;
1426:
1427: IF fnd_api.to_boolean ( p_commit ) THEN
1428: COMMIT WORK;
1429: END IF;
1430:
1431: -- Standard call to get message count and if count is 1, get message info.

Line 1432: fnd_msg_pub.count_and_get ( p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);

1428: COMMIT WORK;
1429: END IF;
1430:
1431: -- Standard call to get message count and if count is 1, get message info.
1432: fnd_msg_pub.count_and_get ( p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
1433: --x_return_status := l_return_status;
1434:
1435: --print_debug('end insertlot', 4);
1436:

Line 1450: x_return_status := fnd_api.g_ret_sts_unexp_error;

1446: IF fnd_msg_pub.check_msg_level ( fnd_msg_pub.g_msg_lvl_unexp_error) THEN
1447: fnd_msg_pub.add_exc_msg ('INV_LOT_API_PUB' , 'insertLot' );
1448: END IF;
1449:
1450: x_return_status := fnd_api.g_ret_sts_unexp_error;
1451: END insertlot;
1452:
1453: PROCEDURE inserttrxlot (
1454: p_api_version IN NUMBER,

Line 1455: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,

1451: END insertlot;
1452:
1453: PROCEDURE inserttrxlot (
1454: p_api_version IN NUMBER,
1455: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
1456: p_commit IN VARCHAR2 := fnd_api.g_false,
1457: p_validation_level IN NUMBER
1458: := fnd_api.g_valid_level_full,
1459: p_primary_quantity IN NUMBER DEFAULT NULL,

Line 1456: p_commit IN VARCHAR2 := fnd_api.g_false,

1452:
1453: PROCEDURE inserttrxlot (
1454: p_api_version IN NUMBER,
1455: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
1456: p_commit IN VARCHAR2 := fnd_api.g_false,
1457: p_validation_level IN NUMBER
1458: := fnd_api.g_valid_level_full,
1459: p_primary_quantity IN NUMBER DEFAULT NULL,
1460: p_transaction_id IN NUMBER,

Line 1458: := fnd_api.g_valid_level_full,

1454: p_api_version IN NUMBER,
1455: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
1456: p_commit IN VARCHAR2 := fnd_api.g_false,
1457: p_validation_level IN NUMBER
1458: := fnd_api.g_valid_level_full,
1459: p_primary_quantity IN NUMBER DEFAULT NULL,
1460: p_transaction_id IN NUMBER,
1461: p_inventory_item_id IN NUMBER,
1462: p_organization_id IN NUMBER,

Line 1570: IF NOT fnd_api.compatible_api_call (

1566: -- Standard Start of API savepoint
1567: SAVEPOINT apiinsertlot_apipub;
1568:
1569: -- Standard call to check for call compatibility.
1570: IF NOT fnd_api.compatible_api_call (
1571: l_api_version,
1572: p_api_version,
1573: l_api_name,
1574: g_pkg_name

Line 1577: RAISE fnd_api.g_exc_unexpected_error;

1573: l_api_name,
1574: g_pkg_name
1575: )
1576: THEN
1577: RAISE fnd_api.g_exc_unexpected_error;
1578: END IF;
1579:
1580: -- Initialize message list if p_init_msg_list is set to TRUE.
1581: IF fnd_api.to_boolean ( p_init_msg_list )

Line 1581: IF fnd_api.to_boolean ( p_init_msg_list )

1577: RAISE fnd_api.g_exc_unexpected_error;
1578: END IF;
1579:
1580: -- Initialize message list if p_init_msg_list is set to TRUE.
1581: IF fnd_api.to_boolean ( p_init_msg_list )
1582: THEN
1583: fnd_msg_pub.initialize;
1584: END IF;
1585:

Line 1587: x_return_status := fnd_api.g_ret_sts_success;

1583: fnd_msg_pub.initialize;
1584: END IF;
1585:
1586: -- Initialize API return status to success
1587: x_return_status := fnd_api.g_ret_sts_success;
1588: -- API body
1589:
1590: if( l_debug = 1 ) then
1591: print_debug('Calling populateattributescolumn()', 10);

Line 1953: IF ( l_return_status <> fnd_api.g_ret_sts_success )

1949: p_lot_serial_number => p_lot_number,
1950: p_attributes => l_attributes_in
1951: );
1952:
1953: IF ( l_return_status <> fnd_api.g_ret_sts_success )
1954: THEN
1955: x_return_status := l_return_status;
1956: RAISE fnd_api.g_exc_unexpected_error;
1957: END IF;

Line 1956: RAISE fnd_api.g_exc_unexpected_error;

1952:
1953: IF ( l_return_status <> fnd_api.g_ret_sts_success )
1954: THEN
1955: x_return_status := l_return_status;
1956: RAISE fnd_api.g_exc_unexpected_error;
1957: END IF;
1958:
1959: IF ( l_attributes_default_count > 0 )
1960: THEN

Line 2265: x_return_status := fnd_api.g_ret_sts_success;

2261: )
2262: AND mtln.transaction_id = p_transaction_id );
2263:
2264: -- Hack for bug 2130268
2265: x_return_status := fnd_api.g_ret_sts_success;
2266: END IF;
2267:
2268: IF ( fnd_api.to_boolean ( p_commit ) )
2269: THEN

Line 2268: IF ( fnd_api.to_boolean ( p_commit ) )

2264: -- Hack for bug 2130268
2265: x_return_status := fnd_api.g_ret_sts_success;
2266: END IF;
2267:
2268: IF ( fnd_api.to_boolean ( p_commit ) )
2269: THEN
2270: COMMIT;
2271: END IF;
2272:

Line 2275: p_encoded => fnd_api.g_false,

2271: END IF;
2272:
2273: -- Standard call to get message count and if count is 1, get message info.
2274: fnd_msg_pub.count_and_get (
2275: p_encoded => fnd_api.g_false,
2276: p_count => x_msg_count,
2277: p_data => x_msg_data
2278: );
2279: EXCEPTION

Line 2291: x_return_status := fnd_api.g_ret_sts_unexp_error;

2287: THEN
2288: fnd_msg_pub.add_exc_msg ('INV_LOT_API_PUB' , 'insertLot' );
2289: END IF;
2290:
2291: x_return_status := fnd_api.g_ret_sts_unexp_error;
2292: END inserttrxlot;
2293:
2294: FUNCTION validate_unique_lot (
2295: p_org_id IN NUMBER,

Line 2349: RAISE fnd_api.g_exc_error;

2345: WHERE organization_id = p_org_id;
2346: EXCEPTION
2347: WHEN NO_DATA_FOUND
2348: THEN
2349: RAISE fnd_api.g_exc_error;
2350: END;
2351: END IF;
2352:
2353: IF ( l_lot_uniqueness = 1 ) -- Item level control

Line 2436: x_return_status := fnd_api.g_ret_sts_success;

2432: PRAGMA AUTONOMOUS_TRANSACTION;
2433: l_debug number := NVL(FND_PROFILE.VALUE('INV_DEBUG_TRACE'),0);
2434: l_update_count number := 0; -- Bug# 7298723
2435: BEGIN
2436: x_return_status := fnd_api.g_ret_sts_success;
2437: IF (l_debug =1 ) THEN
2438: print_debug('before updating msi '||p_lot_prefix,9);
2439: END IF;
2440:

Line 2480: x_return_status := fnd_api.g_ret_sts_error;

2476: END IF;
2477: fnd_message.set_name ('INV' , 'INV_LOT_AUTOGEN_FAILED' ); -- Bug# 7298723
2478: -- fnd_message.set_token ('ENTITY1' , 'Item with last lot number' ); -- Bug# 7298723
2479: fnd_msg_pub.ADD;
2480: x_return_status := fnd_api.g_ret_sts_error;
2481: --AND inventory_item_id = p_inventory_item_id;
2482: END IF;
2483: END;
2484:

Line 2580: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,

2576: p_transaction_action_id IN NUMBER := NULL,
2577: p_transaction_source_type_id IN NUMBER := NULL,
2578: p_lot_number IN VARCHAR2 := NULL,
2579: p_api_version IN NUMBER,
2580: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
2581: p_commit IN VARCHAR2 := fnd_api.g_false,
2582: p_validation_level IN NUMBER
2583: := fnd_api.g_valid_level_full,
2584: p_parent_lot_number IN VARCHAR2,

Line 2581: p_commit IN VARCHAR2 := fnd_api.g_false,

2577: p_transaction_source_type_id IN NUMBER := NULL,
2578: p_lot_number IN VARCHAR2 := NULL,
2579: p_api_version IN NUMBER,
2580: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
2581: p_commit IN VARCHAR2 := fnd_api.g_false,
2582: p_validation_level IN NUMBER
2583: := fnd_api.g_valid_level_full,
2584: p_parent_lot_number IN VARCHAR2,
2585: x_return_status OUT NOCOPY VARCHAR2,

Line 2583: := fnd_api.g_valid_level_full,

2579: p_api_version IN NUMBER,
2580: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
2581: p_commit IN VARCHAR2 := fnd_api.g_false,
2582: p_validation_level IN NUMBER
2583: := fnd_api.g_valid_level_full,
2584: p_parent_lot_number IN VARCHAR2,
2585: x_return_status OUT NOCOPY VARCHAR2,
2586: x_msg_count OUT NOCOPY NUMBER,
2587: x_msg_data OUT NOCOPY VARCHAR2

Line 2775: IF NOT fnd_api.compatible_api_call (

2771: print_debug('in auto_gen_lot',9);
2772: END IF;
2773: -- Standard call to check for call compatibility.
2774:
2775: IF NOT fnd_api.compatible_api_call (
2776: l_api_version,
2777: p_api_version,
2778: l_api_name,
2779: g_pkg_name

Line 2782: RAISE fnd_api.g_exc_unexpected_error;

2778: l_api_name,
2779: g_pkg_name
2780: )
2781: THEN
2782: RAISE fnd_api.g_exc_unexpected_error;
2783: END IF;
2784:
2785: -- Initialize message list if p_init_msg_list is set to TRUE.
2786: IF fnd_api.to_boolean ( p_init_msg_list )

Line 2786: IF fnd_api.to_boolean ( p_init_msg_list )

2782: RAISE fnd_api.g_exc_unexpected_error;
2783: END IF;
2784:
2785: -- Initialize message list if p_init_msg_list is set to TRUE.
2786: IF fnd_api.to_boolean ( p_init_msg_list )
2787: THEN
2788: fnd_msg_pub.initialize;
2789: END IF;
2790:

Line 2792: x_return_status := fnd_api.g_ret_sts_success;

2788: fnd_msg_pub.initialize;
2789: END IF;
2790:
2791: -- Initialize API return status to success
2792: x_return_status := fnd_api.g_ret_sts_success;
2793:
2794: -- API body
2795:
2796: /*================================================

Line 2816: RAISE fnd_api.g_exc_error;

2812: IF (get_item_data%NOTFOUND) THEN
2813: CLOSE get_item_data;
2814: fnd_message.set_name ('INV' , 'INV_CL_GET_ITEM_ERR' );
2815: fnd_msg_pub.ADD;
2816: RAISE fnd_api.g_exc_error;
2817: END IF;
2818: CLOSE get_item_data;
2819: /*===========================================
2820: Is child_lot split allowed?

Line 2825: RAISE fnd_api.g_exc_error;

2821: ===========================================*/
2822: IF (nvl(x_child_lot_flag,'N') = 'N') THEN
2823: fnd_message.set_name ('INV' , 'INV_CL_CHILD_LOT_DISABLED');
2824: fnd_msg_pub.ADD;
2825: RAISE fnd_api.g_exc_error;
2826: END IF;
2827: /*===========================================
2828: Get the Child lot generation parameters.
2829: ===========================================*/

Line 2840: RAISE fnd_api.g_exc_error;

2836: IF (get_child_parms%NOTFOUND) THEN
2837: CLOSE get_child_parms;
2838: fnd_message.set_name ('INV' , 'INV_CL_GET_PARM_ERR');
2839: fnd_msg_pub.ADD;
2840: RAISE fnd_api.g_exc_error;
2841: END IF;
2842: CLOSE get_child_parms;
2843:
2844:

Line 2871: IF ( x_return_status = fnd_api.g_ret_sts_error )

2867: p_parent_lot_number,
2868: x_return_status
2869: );
2870:
2871: IF ( x_return_status = fnd_api.g_ret_sts_error )
2872: THEN
2873: RAISE fnd_api.g_exc_error;
2874: END IF;
2875:

Line 2873: RAISE fnd_api.g_exc_error;

2869: );
2870:
2871: IF ( x_return_status = fnd_api.g_ret_sts_error )
2872: THEN
2873: RAISE fnd_api.g_exc_error;
2874: END IF;
2875:
2876: IF ( x_return_status = fnd_api.g_ret_sts_unexp_error )
2877: THEN

Line 2876: IF ( x_return_status = fnd_api.g_ret_sts_unexp_error )

2872: THEN
2873: RAISE fnd_api.g_exc_error;
2874: END IF;
2875:
2876: IF ( x_return_status = fnd_api.g_ret_sts_unexp_error )
2877: THEN
2878: RAISE fnd_api.g_exc_unexpected_error;
2879: END IF;
2880: /*===========================================

Line 2878: RAISE fnd_api.g_exc_unexpected_error;

2874: END IF;
2875:
2876: IF ( x_return_status = fnd_api.g_ret_sts_unexp_error )
2877: THEN
2878: RAISE fnd_api.g_exc_unexpected_error;
2879: END IF;
2880: /*===========================================
2881: If child lot generated by user routine then
2882: return it, Otherwise if null then return

Line 2887: RAISE fnd_api.g_exc_error;

2883: ===========================================*/
2884: IF (interim_child_lot_number IS NULL) THEN
2885: fnd_message.set_name ('INV' , 'INV_CL_USER_PGM_ERR');
2886: fnd_msg_pub.ADD;
2887: RAISE fnd_api.g_exc_error;
2888: END IF;
2889: /*=================================
2890: BUG#4145437
2891: =================================*/

Line 2895: RAISE fnd_api.g_exc_error;

2891: =================================*/
2892: IF (lengthb(interim_child_lot_number) > 80) THEN
2893: fnd_message.set_name ('INV' , 'INV_CL_MAX_FLD_LENGTH' );
2894: fnd_msg_pub.ADD;
2895: RAISE fnd_api.g_exc_error;
2896: END IF;
2897:
2898: ELSIF (x_lot_number_generation = 1) THEN
2899: /*====================================

Line 2918: RAISE fnd_api.g_exc_error;

2914: x_last_child_seq);
2915: IF (l_ret <> 0 ) THEN
2916: fnd_message.set_name ('INV','INV_CL_INS_CHILD_ERR');
2917: fnd_msg_pub.ADD;
2918: RAISE fnd_api.g_exc_error;
2919: END IF;
2920: ELSE
2921: CLOSE get_next_child;
2922: x_last_child_seq := x_last_child_seq + 1;

Line 2933: RAISE fnd_api.g_exc_error;

2929: x_last_child_seq);
2930: IF (l_ret <> 0 ) THEN
2931: fnd_message.set_name ('INV','INV_CL_UPD_CHILD_ERR');
2932: fnd_msg_pub.ADD;
2933: RAISE fnd_api.g_exc_error;
2934: END IF;
2935: END IF;
2936: /*===============================
2937: Append Parent to alpha prefix.

Line 2947: RAISE fnd_api.g_exc_error;

2943: IF ( (lengthb(x_interim_child_prefix)
2944: + lengthb(x_last_child_seq)) > 80 ) THEN
2945: fnd_message.set_name ('INV' , 'INV_CL_MAX_FLD_LENGTH' );
2946: fnd_msg_pub.ADD;
2947: RAISE fnd_api.g_exc_error;
2948: END IF;
2949: IF ( (lengthb(x_interim_child_prefix)
2950: + lengthb(x_last_child_seq)) >
2951: x_child_lot_number_length ) THEN

Line 2954: RAISE fnd_api.g_exc_error;

2950: + lengthb(x_last_child_seq)) >
2951: x_child_lot_number_length ) THEN
2952: fnd_message.set_name ('INV' , 'INV_CL_MAX_CHLD_ERR' );
2953: fnd_msg_pub.ADD;
2954: RAISE fnd_api.g_exc_error;
2955: END IF;
2956:
2957: IF (x_child_lot_zero_padding_flag = 'Y') THEN
2958: x_pad_value :=

Line 3023: RAISE fnd_api.g_exc_error;

3019: x_last_child_seq);
3020: IF (l_ret <> 0 ) THEN
3021: fnd_message.set_name ('INV','INV_CL_INS_CHILD_ERR');
3022: fnd_msg_pub.ADD;
3023: RAISE fnd_api.g_exc_error;
3024: END IF;
3025: ELSE
3026: CLOSE get_next_child;
3027: x_last_child_seq := x_last_child_seq + 1;

Line 3038: RAISE fnd_api.g_exc_error;

3034: x_last_child_seq);
3035: IF (l_ret <> 0 ) THEN
3036: fnd_message.set_name ('INV','INV_CL_UPD_CHILD_ERR');
3037: fnd_msg_pub.ADD;
3038: RAISE fnd_api.g_exc_error;
3039: END IF;
3040: END IF;
3041: /*===============================
3042: Append Parent to alpha prefix.

Line 3050: RAISE fnd_api.g_exc_error;

3046: IF ( (lengthb(x_interim_child_prefix)
3047: + lengthb(x_last_child_seq)) > 80 ) THEN
3048: fnd_message.set_name ('INV' , 'INV_CL_MAX_FLD_ERR' );
3049: fnd_msg_pub.ADD;
3050: RAISE fnd_api.g_exc_error;
3051: END IF;
3052: --temp joe what is length for item child?
3053: interim_child_lot_number :=
3054: x_interim_child_prefix||x_last_child_seq;

Line 3112: FND_API.G_RET_STS_SUCCESS */

3108: /* call the procedure (USER_GENERATE_LOT_NUMBER) to allow the users to
3109: have custom defined lot numbers instead of using the lot numbers
3110: generated by Inventory) . If this procedure is not coded by the users
3111: then it will return a NULL lot number, x_return_status =
3112: FND_API.G_RET_STS_SUCCESS */
3113: /* Fixed bug 2075044 -- added the while loop to generate the lot number.
3114: Check if the generated lot is existed in the mtl_lot_number, then generate
3115: a new lot again. */
3116:

Line 3137: RAISE fnd_api.g_exc_error;

3133: IF (get_child_parms%NOTFOUND) THEN
3134: CLOSE get_child_parms;
3135: fnd_message.set_name ('INV' , 'INV_CL_GET_PARM_ERR');
3136: fnd_msg_pub.ADD;
3137: RAISE fnd_api.g_exc_error;
3138: END IF;
3139: CLOSE get_child_parms;
3140: IF (x_lot_number_generation = 3) THEN
3141: auto_lot_number :=

Line 3157: IF ( x_return_status = fnd_api.g_ret_sts_error ) THEN

3153: p_parent_lot_number,
3154: x_return_status
3155: );
3156:
3157: IF ( x_return_status = fnd_api.g_ret_sts_error ) THEN
3158: RAISE fnd_api.g_exc_error;
3159: END IF;
3160:
3161: IF ( x_return_status = fnd_api.g_ret_sts_unexp_error ) THEN

Line 3158: RAISE fnd_api.g_exc_error;

3154: x_return_status
3155: );
3156:
3157: IF ( x_return_status = fnd_api.g_ret_sts_error ) THEN
3158: RAISE fnd_api.g_exc_error;
3159: END IF;
3160:
3161: IF ( x_return_status = fnd_api.g_ret_sts_unexp_error ) THEN
3162: RAISE fnd_api.g_exc_unexpected_error;

Line 3161: IF ( x_return_status = fnd_api.g_ret_sts_unexp_error ) THEN

3157: IF ( x_return_status = fnd_api.g_ret_sts_error ) THEN
3158: RAISE fnd_api.g_exc_error;
3159: END IF;
3160:
3161: IF ( x_return_status = fnd_api.g_ret_sts_unexp_error ) THEN
3162: RAISE fnd_api.g_exc_unexpected_error;
3163: END IF;
3164:
3165: END IF; -- gen is 3

Line 3162: RAISE fnd_api.g_exc_unexpected_error;

3158: RAISE fnd_api.g_exc_error;
3159: END IF;
3160:
3161: IF ( x_return_status = fnd_api.g_ret_sts_unexp_error ) THEN
3162: RAISE fnd_api.g_exc_unexpected_error;
3163: END IF;
3164:
3165: END IF; -- gen is 3
3166: /* If i/p parameter p_lot_generation or p_lot_uniqueness are null that means we do

Line 3192: RAISE fnd_api.g_exc_error;

3188: WHEN NO_DATA_FOUND THEN
3189: fnd_message.set_name ('INV' , 'INV_FIELD_INVALID' );
3190: fnd_message.set_token ('ENTITY1' , 'p_org_id' );
3191: fnd_msg_pub.ADD;
3192: RAISE fnd_api.g_exc_error;
3193: END;
3194: END IF;
3195:
3196: /* If the lot number (auto_lot_number) returned by user_defined_procedure is null

Line 3216: RAISE fnd_api.g_exc_error;

3212:
3213: IF ( l_lot_control_code = 1 ) THEN
3214: fnd_message.set_name ( 'INV' , 'INV_NO_LOT_CONTROL');
3215: fnd_msg_pub.ADD;
3216: RAISE fnd_api.g_exc_error;
3217: END IF;
3218: EXCEPTION
3219: WHEN NO_DATA_FOUND THEN
3220: fnd_message.set_name ('INV' , 'INV_INVALID_ITEM' );

Line 3222: RAISE fnd_api.g_exc_error;

3218: EXCEPTION
3219: WHEN NO_DATA_FOUND THEN
3220: fnd_message.set_name ('INV' , 'INV_INVALID_ITEM' );
3221: fnd_msg_pub.ADD;
3222: RAISE fnd_api.g_exc_error;
3223: END;
3224:
3225: BEGIN
3226: -- get prefix and default lot number

Line 3282: IF x_return_status = fnd_api.g_ret_sts_error THEN

3278: lot_generation,
3279: x_return_status,
3280: l_lot_prefix -- Bug# 7298723
3281: );
3282: IF x_return_status = fnd_api.g_ret_sts_error THEN
3283: IF (l_debug = 1) THEN
3284: print_debug('it is an error ',9);
3285: END IF;
3286: RAISE fnd_api.g_exc_error;

Line 3286: RAISE fnd_api.g_exc_error;

3282: IF x_return_status = fnd_api.g_ret_sts_error THEN
3283: IF (l_debug = 1) THEN
3284: print_debug('it is an error ',9);
3285: END IF;
3286: RAISE fnd_api.g_exc_error;
3287: END IF;
3288: END IF;
3289: ELSE -- lot length exceeds 80
3290: fnd_message.set_name ( 'INV' , 'INV_SERIAL_LOT_TOO_LONG');

Line 3293: RAISE fnd_api.g_exc_error;

3289: ELSE -- lot length exceeds 80
3290: fnd_message.set_name ( 'INV' , 'INV_SERIAL_LOT_TOO_LONG');
3291: fnd_message.set_token( 'LENGTH', nvl(lot_length, 80)); -- INVCONV
3292: fnd_msg_pub.ADD;
3293: RAISE fnd_api.g_exc_error;
3294: END IF;
3295: ELSE -- l_lot_suffix is NULL
3296: fnd_message.set_name ( 'INV' , 'INV_FIELD_INVALID');
3297:

Line 3308: RAISE fnd_api.g_exc_error;

3304: AND ITEM.ORGANIZATION_ID = p_org_id;
3305:
3306: fnd_message.set_token ( 'ENTITY1' , 'Lot Suffix for Org: ' || v_org_code || ' and Item: ' || v_item_name);
3307: fnd_msg_pub.ADD;
3308: RAISE fnd_api.g_exc_error;
3309: END IF;
3310: EXCEPTION
3311: WHEN NO_DATA_FOUND THEN
3312: IF (l_debug=1) THEN

Line 3318: RAISE fnd_api.g_exc_error;

3314: END IF;
3315: fnd_message.set_name ('INV' , 'INV_INVALID_ITEM' );
3316: fnd_message.set_token ( 'ENTITY1' , 'p_org_id, p_inventory_item_id');
3317: fnd_msg_pub.ADD;
3318: RAISE fnd_api.g_exc_error;
3319: END;
3320: ELSIF ( lot_generation = 1 ) THEN -- org-level
3321: BEGIN
3322: IF (l_debug =1 ) THEN

Line 3355: RAISE fnd_api.g_exc_error;

3351: ELSE -- lot length exceeds 80
3352: fnd_message.set_name ( 'INV' , 'INV_SERIAL_LOT_TOO_LONG');
3353: fnd_message.set_token( 'LENGTH', nvl(lot_length, 80)); -- INVCONV
3354: fnd_msg_pub.ADD;
3355: RAISE fnd_api.g_exc_error;
3356: END IF;
3357: END;
3358: END IF;
3359: END IF;

Line 3374: RAISE fnd_api.g_exc_error ;

3370: RETURN (auto_lot_number);
3371: ELSE
3372: fnd_message.set_name('INV', 'INV_LOT_NUMBER_EXISTS');
3373: fnd_msg_pub.add;
3374: RAISE fnd_api.g_exc_error ;
3375: END IF;
3376: */
3377:
3378: /* Check if the generated lot is already existed in the mtl_lot_number,

Line 3411: WHEN fnd_api.g_exc_error THEN

3407: print_debug('returning lot number ' || auto_lot_number,9);
3408: END IF;
3409: RETURN ( auto_lot_number );
3410: EXCEPTION
3411: WHEN fnd_api.g_exc_error THEN
3412: ROLLBACK TO apiauto_gen_lot_apipub;
3413: x_return_status := fnd_api.g_ret_sts_error;
3414: fnd_msg_pub.count_and_get (
3415: p_encoded => fnd_api.g_false,

Line 3413: x_return_status := fnd_api.g_ret_sts_error;

3409: RETURN ( auto_lot_number );
3410: EXCEPTION
3411: WHEN fnd_api.g_exc_error THEN
3412: ROLLBACK TO apiauto_gen_lot_apipub;
3413: x_return_status := fnd_api.g_ret_sts_error;
3414: fnd_msg_pub.count_and_get (
3415: p_encoded => fnd_api.g_false,
3416: p_count => x_msg_count,
3417: p_data => x_msg_data

Line 3415: p_encoded => fnd_api.g_false,

3411: WHEN fnd_api.g_exc_error THEN
3412: ROLLBACK TO apiauto_gen_lot_apipub;
3413: x_return_status := fnd_api.g_ret_sts_error;
3414: fnd_msg_pub.count_and_get (
3415: p_encoded => fnd_api.g_false,
3416: p_count => x_msg_count,
3417: p_data => x_msg_data
3418: );
3419: --Bugfix 3940851 {

Line 3421: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);

3417: p_data => x_msg_data
3418: );
3419: --Bugfix 3940851 {
3420: if( x_msg_count > 1 ) then
3421: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);
3422: end if;
3423: --Bugfix 3940851 }
3424: RETURN ( NULL );
3425: WHEN fnd_api.g_exc_unexpected_error THEN

Line 3425: WHEN fnd_api.g_exc_unexpected_error THEN

3421: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);
3422: end if;
3423: --Bugfix 3940851 }
3424: RETURN ( NULL );
3425: WHEN fnd_api.g_exc_unexpected_error THEN
3426: ROLLBACK TO apiauto_gen_lot_apipub;
3427: x_return_status := fnd_api.g_ret_sts_unexp_error;
3428: fnd_msg_pub.count_and_get (
3429: p_encoded => fnd_api.g_false,

Line 3427: x_return_status := fnd_api.g_ret_sts_unexp_error;

3423: --Bugfix 3940851 }
3424: RETURN ( NULL );
3425: WHEN fnd_api.g_exc_unexpected_error THEN
3426: ROLLBACK TO apiauto_gen_lot_apipub;
3427: x_return_status := fnd_api.g_ret_sts_unexp_error;
3428: fnd_msg_pub.count_and_get (
3429: p_encoded => fnd_api.g_false,
3430: p_count => x_msg_count,
3431: p_data => x_msg_data

Line 3429: p_encoded => fnd_api.g_false,

3425: WHEN fnd_api.g_exc_unexpected_error THEN
3426: ROLLBACK TO apiauto_gen_lot_apipub;
3427: x_return_status := fnd_api.g_ret_sts_unexp_error;
3428: fnd_msg_pub.count_and_get (
3429: p_encoded => fnd_api.g_false,
3430: p_count => x_msg_count,
3431: p_data => x_msg_data
3432: );
3433: --Bugfix 3940851 {

Line 3435: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);

3431: p_data => x_msg_data
3432: );
3433: --Bugfix 3940851 {
3434: if( x_msg_count > 1 ) then
3435: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);
3436: end if;
3437: --Bugfix 3940851 }
3438: RETURN ( NULL );
3439: WHEN OTHERS THEN

Line 3441: x_return_status := fnd_api.g_ret_sts_unexp_error;

3437: --Bugfix 3940851 }
3438: RETURN ( NULL );
3439: WHEN OTHERS THEN
3440: ROLLBACK TO apiauto_gen_lot_apipub;
3441: x_return_status := fnd_api.g_ret_sts_unexp_error;
3442:
3443: IF fnd_msg_pub.check_msg_level ( fnd_msg_pub.g_msg_lvl_unexp_error) THEN
3444: fnd_msg_pub.add_exc_msg ( g_pkg_name, l_api_name );
3445: END IF;

Line 3448: p_encoded => fnd_api.g_false,

3444: fnd_msg_pub.add_exc_msg ( g_pkg_name, l_api_name );
3445: END IF;
3446:
3447: fnd_msg_pub.count_and_get (
3448: p_encoded => fnd_api.g_false,
3449: p_count => x_msg_count,
3450: p_data => x_msg_data
3451: );
3452: --Bugfix 3940851 {

Line 3454: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);

3450: p_data => x_msg_data
3451: );
3452: --Bugfix 3940851 {
3453: if( x_msg_count > 1 ) then
3454: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);
3455: end if;
3456: --Bugfix 3940851 }
3457: RETURN ( NULL );
3458: END auto_gen_lot;

Line 3518: RAISE fnd_api.g_exc_error;

3514: WHERE organization_id = p_org_id;
3515: EXCEPTION
3516: WHEN NO_DATA_FOUND
3517: THEN
3518: RAISE fnd_api.g_exc_error;
3519: END;
3520: END IF;
3521:
3522: IF ( l_lot_uniqueness = 1 ) -- Item level control

Line 3832: x_return_status := fnd_api.g_ret_sts_unexp_error;

3828: x_count := p_count;
3829: x_source_wms_lot_att_tbl := p_source_wms_lot_att_tbl;
3830: WHEN OTHERS
3831: THEN
3832: x_return_status := fnd_api.g_ret_sts_unexp_error;
3833: IF (l_debug = 1) THEN
3834: print_debug ('Exitting populatelotattributes - other exception:' || TO_CHAR ( SYSDATE, 'YYYY-MM-DD HH:DD:SS' ),1);
3835: END IF;
3836: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_unexp_error) THEN

Line 4203: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);

4199: e := e + 200;
4200: END LOOP;
4201:
4202: ROLLBACK TO get_lot_attr_information;
4203: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
4204: WHEN g_exc_error THEN
4205: x_return_status := g_ret_sts_error;
4206: ROLLBACK TO get_lot_attr_information;
4207: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);

Line 4207: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);

4203: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
4204: WHEN g_exc_error THEN
4205: x_return_status := g_ret_sts_error;
4206: ROLLBACK TO get_lot_attr_information;
4207: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
4208: WHEN g_exc_unexpected_error THEN
4209: x_return_status := g_ret_sts_unexp_error;
4210: ROLLBACK TO get_lot_attr_information;
4211: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);

Line 4211: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);

4207: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
4208: WHEN g_exc_unexpected_error THEN
4209: x_return_status := g_ret_sts_unexp_error;
4210: ROLLBACK TO get_lot_attr_information;
4211: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
4212: WHEN OTHERS THEN
4213: x_return_status := g_ret_sts_unexp_error;
4214: ROLLBACK TO get_lot_attr_information;
4215: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);

Line 4215: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);

4211: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
4212: WHEN OTHERS THEN
4213: x_return_status := g_ret_sts_unexp_error;
4214: ROLLBACK TO get_lot_attr_information;
4215: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
4216: print_debug('Error ' || SQLERRM, 9);
4217: END validate_lot_attr_info;
4218:
4219:

Line 4288: x_return_status := fnd_api.g_ret_sts_error;

4284: END IF;
4285:
4286: fnd_message.set_name('INV', 'INV_NO_LOT_CONTROL');
4287: fnd_msg_pub.ADD;
4288: x_return_status := fnd_api.g_ret_sts_error;
4289: RAISE g_exc_error;
4290: END IF;
4291: EXCEPTION
4292: WHEN NO_DATA_FOUND THEN

Line 4445: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);

4441: EXCEPTION
4442: WHEN NO_DATA_FOUND THEN
4443: x_return_status := g_ret_sts_error;
4444: ROLLBACK TO val_lot_attr;
4445: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
4446: print_debug('In No data found -val_lot_attr ' || SQLERRM, 9);
4447: WHEN g_exc_error THEN
4448: x_return_status := g_ret_sts_error;
4449: ROLLBACK TO val_lot_attr;

Line 4450: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);

4446: print_debug('In No data found -val_lot_attr ' || SQLERRM, 9);
4447: WHEN g_exc_error THEN
4448: x_return_status := g_ret_sts_error;
4449: ROLLBACK TO val_lot_attr;
4450: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
4451: print_debug('In g_exc_error -val_lot_attr' || SQLERRM, 9);
4452: WHEN g_exc_unexpected_error THEN
4453: x_return_status := g_ret_sts_unexp_error;
4454: ROLLBACK TO val_lot_attr;

Line 4455: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);

4451: print_debug('In g_exc_error -val_lot_attr' || SQLERRM, 9);
4452: WHEN g_exc_unexpected_error THEN
4453: x_return_status := g_ret_sts_unexp_error;
4454: ROLLBACK TO val_lot_attr;
4455: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
4456: print_debug('In g_exc_unexpected_error val_lot_attr' || SQLERRM, 9);
4457: WHEN OTHERS THEN
4458: x_return_status := g_ret_sts_unexp_error;
4459: ROLLBACK TO val_lot_attr;

Line 4460: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);

4456: print_debug('In g_exc_unexpected_error val_lot_attr' || SQLERRM, 9);
4457: WHEN OTHERS THEN
4458: x_return_status := g_ret_sts_unexp_error;
4459: ROLLBACK TO val_lot_attr;
4460: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
4461: print_debug('In others val_lot_attr' || SQLERRM, 9);
4462: END validate_lot_attr_in_param;
4463:
4464: -- nsinghi 5209065 START. Created new overloaded procedure.

Line 4473: , p_init_msg_list IN VARCHAR2 := fnd_api.g_false

4469: , x_lot_rec OUT NOCOPY MTL_LOT_NUMBERS%ROWTYPE
4470: , p_lot_rec IN MTL_LOT_NUMBERS%ROWTYPE
4471: , p_source IN NUMBER
4472: , p_api_version IN NUMBER
4473: , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
4474: , p_commit IN VARCHAR2 := fnd_api.g_false
4475: )
4476: IS
4477: CURSOR inv_attributes_cur IS

Line 4474: , p_commit IN VARCHAR2 := fnd_api.g_false

4470: , p_lot_rec IN MTL_LOT_NUMBERS%ROWTYPE
4471: , p_source IN NUMBER
4472: , p_api_version IN NUMBER
4473: , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
4474: , p_commit IN VARCHAR2 := fnd_api.g_false
4475: )
4476: IS
4477: CURSOR inv_attributes_cur IS
4478: SELECT attribute1

Line 6716: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);

6712: EXCEPTION
6713: WHEN NO_DATA_FOUND THEN
6714: x_return_status := g_ret_sts_error;
6715: ROLLBACK TO upd_lot_attr;
6716: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
6717: if( x_msg_count > 1 ) then
6718: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);
6719: end if;
6720: print_debug('Upd Lort Attr: In No data found ' || SQLERRM, 9);

Line 6718: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);

6714: x_return_status := g_ret_sts_error;
6715: ROLLBACK TO upd_lot_attr;
6716: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
6717: if( x_msg_count > 1 ) then
6718: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);
6719: end if;
6720: print_debug('Upd Lort Attr: In No data found ' || SQLERRM, 9);
6721: WHEN g_exc_error THEN
6722: x_return_status := g_ret_sts_error;

Line 6724: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);

6720: print_debug('Upd Lort Attr: In No data found ' || SQLERRM, 9);
6721: WHEN g_exc_error THEN
6722: x_return_status := g_ret_sts_error;
6723: ROLLBACK TO upd_lot_attr;
6724: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
6725: if( x_msg_count > 1 ) then
6726: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);
6727: end if;
6728: print_debug('Upd Lot Attr: In g_exc_error ' || SQLERRM, 9);

Line 6726: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);

6722: x_return_status := g_ret_sts_error;
6723: ROLLBACK TO upd_lot_attr;
6724: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
6725: if( x_msg_count > 1 ) then
6726: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);
6727: end if;
6728: print_debug('Upd Lot Attr: In g_exc_error ' || SQLERRM, 9);
6729: WHEN g_exc_unexpected_error THEN
6730: x_return_status := g_ret_sts_unexp_error;

Line 6732: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);

6728: print_debug('Upd Lot Attr: In g_exc_error ' || SQLERRM, 9);
6729: WHEN g_exc_unexpected_error THEN
6730: x_return_status := g_ret_sts_unexp_error;
6731: ROLLBACK TO upd_lot_attr;
6732: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
6733: if ( x_msg_count > 1 ) then
6734: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);
6735: end if;
6736: print_debug('In g_exc_unexpected_error ' || SQLERRM, 9);

Line 6734: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);

6730: x_return_status := g_ret_sts_unexp_error;
6731: ROLLBACK TO upd_lot_attr;
6732: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
6733: if ( x_msg_count > 1 ) then
6734: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);
6735: end if;
6736: print_debug('In g_exc_unexpected_error ' || SQLERRM, 9);
6737: WHEN OTHERS THEN
6738: x_return_status := g_ret_sts_unexp_error;

Line 6740: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);

6736: print_debug('In g_exc_unexpected_error ' || SQLERRM, 9);
6737: WHEN OTHERS THEN
6738: x_return_status := g_ret_sts_unexp_error;
6739: ROLLBACK TO upd_lot_attr;
6740: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
6741: if( x_msg_count > 1 ) then
6742: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);
6743: end if;
6744: print_debug('Upd Lot Attr: In others ' || SQLERRM, 9);

Line 6742: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);

6738: x_return_status := g_ret_sts_unexp_error;
6739: ROLLBACK TO upd_lot_attr;
6740: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
6741: if( x_msg_count > 1 ) then
6742: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);
6743: end if;
6744: print_debug('Upd Lot Attr: In others ' || SQLERRM, 9);
6745: END update_inv_lot;
6746:

Line 6801: x_return_status := fnd_api.g_ret_sts_success;

6797: l_msg_count NUMBER ;
6798:
6799: BEGIN
6800: SAVEPOINT upd_lot_attr;
6801: x_return_status := fnd_api.g_ret_sts_success;
6802:
6803: /* Populating the variables and calling the new overloaded API */
6804:
6805: l_in_lot_rec.inventory_item_id := p_inventory_item_id;

Line 7009: l_init_msg_list := fnd_api.g_false;

7005: l_in_lot_rec.d_attribute10 := p_d_attributes_tbl(10);
7006: END IF;
7007: --END BUG 4748451
7008: l_api_version := 1.0;
7009: l_init_msg_list := fnd_api.g_false;
7010: l_commit := fnd_api.g_false;
7011: l_origin_txn_id := NULL;
7012:
7013: /* Calling the overloaded procedure */

Line 7010: l_commit := fnd_api.g_false;

7006: END IF;
7007: --END BUG 4748451
7008: l_api_version := 1.0;
7009: l_init_msg_list := fnd_api.g_false;
7010: l_commit := fnd_api.g_false;
7011: l_origin_txn_id := NULL;
7012:
7013: /* Calling the overloaded procedure */
7014: Update_Inv_lot(

Line 7029: IF l_return_status = fnd_api.g_ret_sts_error THEN

7025:
7026: IF g_debug = 1 THEN
7027: print_debug('Program Update_Inv_lot return ' || l_return_status, 9);
7028: END IF;
7029: IF l_return_status = fnd_api.g_ret_sts_error THEN
7030: IF g_debug = 1 THEN
7031: print_debug('Program Update_Inv_lot has failed with a user defined exception', 9);
7032: END IF;
7033: RAISE g_exc_error;

Line 7034: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

7030: IF g_debug = 1 THEN
7031: print_debug('Program Update_Inv_lot has failed with a user defined exception', 9);
7032: END IF;
7033: RAISE g_exc_error;
7034: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
7035: IF g_debug = 1 THEN
7036: print_debug('Program Update_Inv_lot has failed with a Unexpected exception', 9);
7037: END IF;
7038: FND_MESSAGE.SET_NAME('INV','INV_PROGRAM_ERROR');

Line 7049: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);

7045: EXCEPTION
7046: WHEN NO_DATA_FOUND THEN
7047: x_return_status := g_ret_sts_error;
7048: ROLLBACK TO upd_lot_attr;
7049: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
7050: if( x_msg_count > 1 ) then
7051: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);
7052: end if;
7053: print_debug('Upd Lot Attr: In No data found ' || SQLERRM, 9);

Line 7051: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);

7047: x_return_status := g_ret_sts_error;
7048: ROLLBACK TO upd_lot_attr;
7049: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
7050: if( x_msg_count > 1 ) then
7051: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);
7052: end if;
7053: print_debug('Upd Lot Attr: In No data found ' || SQLERRM, 9);
7054: WHEN g_exc_error THEN
7055: x_return_status := g_ret_sts_error;

Line 7057: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);

7053: print_debug('Upd Lot Attr: In No data found ' || SQLERRM, 9);
7054: WHEN g_exc_error THEN
7055: x_return_status := g_ret_sts_error;
7056: ROLLBACK TO upd_lot_attr;
7057: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
7058: if( x_msg_count > 1 ) then
7059: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);
7060: end if;
7061: print_debug('Upd Lot Attr: In g_exc_error ' || SQLERRM, 9);

Line 7059: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);

7055: x_return_status := g_ret_sts_error;
7056: ROLLBACK TO upd_lot_attr;
7057: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
7058: if( x_msg_count > 1 ) then
7059: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);
7060: end if;
7061: print_debug('Upd Lot Attr: In g_exc_error ' || SQLERRM, 9);
7062: WHEN g_exc_unexpected_error THEN
7063: x_return_status := g_ret_sts_unexp_error;

Line 7065: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);

7061: print_debug('Upd Lot Attr: In g_exc_error ' || SQLERRM, 9);
7062: WHEN g_exc_unexpected_error THEN
7063: x_return_status := g_ret_sts_unexp_error;
7064: ROLLBACK TO upd_lot_attr;
7065: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
7066: if ( x_msg_count > 1 ) then
7067: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);
7068: end if;
7069: print_debug('In g_exc_unexpected_error ' || SQLERRM, 9);

Line 7067: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);

7063: x_return_status := g_ret_sts_unexp_error;
7064: ROLLBACK TO upd_lot_attr;
7065: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
7066: if ( x_msg_count > 1 ) then
7067: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);
7068: end if;
7069: print_debug('In g_exc_unexpected_error ' || SQLERRM, 9);
7070: WHEN OTHERS THEN
7071: x_return_status := g_ret_sts_unexp_error;

Line 7073: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);

7069: print_debug('In g_exc_unexpected_error ' || SQLERRM, 9);
7070: WHEN OTHERS THEN
7071: x_return_status := g_ret_sts_unexp_error;
7072: ROLLBACK TO upd_lot_attr;
7073: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
7074: if( x_msg_count > 1 ) then
7075: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);
7076: end if;
7077: print_debug('Upd Lot Attr: In others ' || SQLERRM, 9);

Line 7075: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);

7071: x_return_status := g_ret_sts_unexp_error;
7072: ROLLBACK TO upd_lot_attr;
7073: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
7074: if( x_msg_count > 1 ) then
7075: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);
7076: end if;
7077: print_debug('Upd Lot Attr: In others ' || SQLERRM, 9);
7078:
7079: END update_inv_lot;

Line 7556: IF ( l_return_status <> fnd_api.g_ret_sts_success ) THEN

7552: p_lot_serial_number => null,
7553: p_attributes => lot_dff
7554: );
7555:
7556: IF ( l_return_status <> fnd_api.g_ret_sts_success ) THEN
7557: x_return_status := l_return_status;
7558: RAISE fnd_api.g_exc_unexpected_error;
7559: END IF;
7560:

Line 7558: RAISE fnd_api.g_exc_unexpected_error;

7554: );
7555:
7556: IF ( l_return_status <> fnd_api.g_ret_sts_success ) THEN
7557: x_return_status := l_return_status;
7558: RAISE fnd_api.g_exc_unexpected_error;
7559: END IF;
7560:
7561: IF ( l_attributes_default_count > 0 ) THEN
7562: FOR i IN 1 .. l_attributes_default_count LOOP

Line 7774: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);

7770: IF g_debug = 1 THEN
7771: print_debug('Program LOT_DFF_VALIDATE has completed with validation errors', 9);
7772: END IF;
7773:
7774: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
7775: WHEN errors_received THEN
7776: x_return_status := inv_lot_api_pub.g_ret_sts_error;
7777:
7778: IF g_debug = 1 THEN

Line 7801: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);

7797: ROLLBACK TO wms_lot_dff_validate;
7798: WHEN OTHERS THEN
7799: x_return_status := inv_lot_api_pub.g_ret_sts_unexp_error;
7800: ROLLBACK TO wms_lot_dff_validate;
7801: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
7802:
7803: IF g_debug = 1 THEN
7804: print_debug('Program LOT_DFF_VALIDATE has completed with errors. In when others ', 9);
7805: print_debug('Error ' || SQLERRM, 9);

Line 7835: , p_init_msg_list IN VARCHAR2 DEFAULT FND_API.G_FALSE

7831:
7832:
7833: PROCEDURE validate_child_lot
7834: ( p_api_version IN NUMBER
7835: , p_init_msg_list IN VARCHAR2 DEFAULT FND_API.G_FALSE
7836: , p_commit IN VARCHAR2 DEFAULT FND_API.G_FALSE
7837: , p_validation_level IN NUMBER DEFAULT FND_API.G_VALID_LEVEL_FULL
7838: , p_organization_id IN NUMBER
7839: , p_inventory_item_id IN NUMBER

Line 7836: , p_commit IN VARCHAR2 DEFAULT FND_API.G_FALSE

7832:
7833: PROCEDURE validate_child_lot
7834: ( p_api_version IN NUMBER
7835: , p_init_msg_list IN VARCHAR2 DEFAULT FND_API.G_FALSE
7836: , p_commit IN VARCHAR2 DEFAULT FND_API.G_FALSE
7837: , p_validation_level IN NUMBER DEFAULT FND_API.G_VALID_LEVEL_FULL
7838: , p_organization_id IN NUMBER
7839: , p_inventory_item_id IN NUMBER
7840: , p_parent_lot_number IN VARCHAR2

Line 7837: , p_validation_level IN NUMBER DEFAULT FND_API.G_VALID_LEVEL_FULL

7833: PROCEDURE validate_child_lot
7834: ( p_api_version IN NUMBER
7835: , p_init_msg_list IN VARCHAR2 DEFAULT FND_API.G_FALSE
7836: , p_commit IN VARCHAR2 DEFAULT FND_API.G_FALSE
7837: , p_validation_level IN NUMBER DEFAULT FND_API.G_VALID_LEVEL_FULL
7838: , p_organization_id IN NUMBER
7839: , p_inventory_item_id IN NUMBER
7840: , p_parent_lot_number IN VARCHAR2
7841: , p_child_lot_number IN VARCHAR2

Line 7915: IF FND_API.to_boolean(p_init_msg_list) THEN

7911:
7912:
7913:
7914: BEGIN
7915: IF FND_API.to_boolean(p_init_msg_list) THEN
7916: FND_MSG_PUB.Initialize;
7917: END IF;
7918:
7919: -- Standard call to check for call compatibility.

Line 7920: IF NOT FND_API.Compatible_API_Call ( l_api_version ,

7916: FND_MSG_PUB.Initialize;
7917: END IF;
7918:
7919: -- Standard call to check for call compatibility.
7920: IF NOT FND_API.Compatible_API_Call ( l_api_version ,
7921: p_api_version ,
7922: l_api_name ,
7923: G_PKG_NAME ) THEN
7924: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

Line 7924: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

7920: IF NOT FND_API.Compatible_API_Call ( l_api_version ,
7921: p_api_version ,
7922: l_api_name ,
7923: G_PKG_NAME ) THEN
7924: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
7925: END IF;
7926: x_return_status := FND_API.G_RET_STS_SUCCESS;
7927:
7928:

Line 7926: x_return_status := FND_API.G_RET_STS_SUCCESS;

7922: l_api_name ,
7923: G_PKG_NAME ) THEN
7924: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
7925: END IF;
7926: x_return_status := FND_API.G_RET_STS_SUCCESS;
7927:
7928:
7929: /*==========================================
7930: Get Item Information

Line 7941: RAISE fnd_api.g_exc_error;

7937: IF (get_item_data%NOTFOUND) THEN
7938: CLOSE get_item_data;
7939: fnd_message.set_name ('INV' , 'INV_CL_ITEM_ERR');
7940: fnd_msg_pub.ADD;
7941: RAISE fnd_api.g_exc_error;
7942: END IF;
7943: CLOSE get_item_data;
7944:
7945: /*==========================================

Line 7951: RAISE fnd_api.g_exc_error;

7947: ========================================*/
7948: IF (nvl(l_item_child_lot_flag,'N') = 'N') THEN
7949: fnd_message.set_name ('INV' , 'INV_CL_CHILD_LOT_DISABLED');
7950: fnd_msg_pub.ADD;
7951: RAISE fnd_api.g_exc_error;
7952: END IF;
7953:
7954: /*==========================================
7955: Get mtl_parameters information.

Line 7968: RAISE fnd_api.g_exc_error;

7964: IF (get_child_parms%NOTFOUND) THEN
7965: CLOSE get_child_parms;
7966: fnd_message.set_name ('INV' , 'INV_CL_GET_PARM_ERR');
7967: fnd_msg_pub.ADD;
7968: RAISE fnd_api.g_exc_error;
7969: END IF;
7970: CLOSE get_child_parms;
7971:
7972: /*==========================================

Line 7978: x_return_status := FND_API.G_RET_STS_SUCCESS;

7974: required. Just return.
7975: ========================================*/
7976:
7977: IF (l_prm_lot_number_generation = 3) THEN
7978: x_return_status := FND_API.G_RET_STS_SUCCESS;
7979: RETURN;
7980: END IF;
7981:
7982: /*==========================================

Line 8039: RAISE fnd_api.g_exc_error;

8035: NULL;
8036: ELSE
8037: fnd_message.set_name ('INV' , 'INV_CL_SUFFIX_MISMATCH');
8038: fnd_msg_pub.ADD;
8039: RAISE fnd_api.g_exc_error;
8040: END IF;
8041: ELSE
8042: fnd_message.set_name ('INV' , 'INV_CL_PREFIX_MISMATCH');
8043: fnd_msg_pub.ADD;

Line 8044: RAISE fnd_api.g_exc_error;

8040: END IF;
8041: ELSE
8042: fnd_message.set_name ('INV' , 'INV_CL_PREFIX_MISMATCH');
8043: fnd_msg_pub.ADD;
8044: RAISE fnd_api.g_exc_error;
8045: END IF;
8046: ELSE
8047: /*=======================================
8048: For Lot/Lot validation just return.

Line 8067: RAISE fnd_api.g_exc_error;

8063:
8064: IF (l_final_suffix IS NULL) THEN
8065: fnd_message.set_name ('INV' , 'INV_CL_SUFFIX_NONUMERIC');
8066: fnd_msg_pub.ADD;
8067: RAISE fnd_api.g_exc_error;
8068: END IF;
8069:
8070: /*============================================
8071: Exception will trap the following command

Line 8092: RAISE fnd_api.g_exc_error;

8088: IF (l_prm_zero_padding_flag = 'Y') THEN
8089: IF (l_overall_length <> l_child_lot_length) THEN
8090: fnd_message.set_name ('INV' , 'INV_CL_PAD_ERROR');
8091: fnd_msg_pub.ADD;
8092: RAISE fnd_api.g_exc_error;
8093: END IF;
8094: END IF;
8095: ELSE -- Item
8096: IF (NVL(l_item_child_lot_startno,0) > l_final_suffix_numeric) THEN

Line 8099: RAISE fnd_api.g_exc_error;

8095: ELSE -- Item
8096: IF (NVL(l_item_child_lot_startno,0) > l_final_suffix_numeric) THEN
8097: fnd_message.set_name ('INV' , 'INV_CL_STARTING_SUFFIX_ERR');
8098: fnd_msg_pub.ADD;
8099: RAISE fnd_api.g_exc_error;
8100: END IF;
8101: END IF;
8102:
8103: /*============================================

Line 8113: RAISE fnd_api.g_exc_error;

8109:
8110: IF (l_child_lot_length > l_overall_length ) THEN
8111: fnd_message.set_name ('INV' , 'INV_CL_OVERALL_LENGTH');
8112: fnd_msg_pub.ADD;
8113: RAISE fnd_api.g_exc_error;
8114: END IF;
8115: RETURN;
8116:
8117: EXCEPTION

Line 8122: x_return_status := FND_API.G_RET_STS_ERROR;

8118:
8119: WHEN l_num_error THEN
8120: fnd_message.set_name ('INV' , 'INV_CL_SUFFIX_NONUMERIC');
8121: fnd_msg_pub.ADD;
8122: x_return_status := FND_API.G_RET_STS_ERROR;
8123: FND_MSG_PUB.Count_AND_GET
8124: (p_count => x_msg_count, p_data => x_msg_data);
8125: WHEN FND_API.G_EXC_ERROR THEN
8126: x_return_status := FND_API.G_RET_STS_ERROR;

Line 8125: WHEN FND_API.G_EXC_ERROR THEN

8121: fnd_msg_pub.ADD;
8122: x_return_status := FND_API.G_RET_STS_ERROR;
8123: FND_MSG_PUB.Count_AND_GET
8124: (p_count => x_msg_count, p_data => x_msg_data);
8125: WHEN FND_API.G_EXC_ERROR THEN
8126: x_return_status := FND_API.G_RET_STS_ERROR;
8127: FND_MSG_PUB.Count_AND_GET
8128: (p_count => x_msg_count, p_data => x_msg_data);
8129:

Line 8126: x_return_status := FND_API.G_RET_STS_ERROR;

8122: x_return_status := FND_API.G_RET_STS_ERROR;
8123: FND_MSG_PUB.Count_AND_GET
8124: (p_count => x_msg_count, p_data => x_msg_data);
8125: WHEN FND_API.G_EXC_ERROR THEN
8126: x_return_status := FND_API.G_RET_STS_ERROR;
8127: FND_MSG_PUB.Count_AND_GET
8128: (p_count => x_msg_count, p_data => x_msg_data);
8129:
8130: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

Line 8130: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

8126: x_return_status := FND_API.G_RET_STS_ERROR;
8127: FND_MSG_PUB.Count_AND_GET
8128: (p_count => x_msg_count, p_data => x_msg_data);
8129:
8130: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
8131: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
8132: FND_MSG_PUB.Count_AND_GET
8133: (p_count => x_msg_count, p_data => x_msg_data);
8134:

Line 8131: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

8127: FND_MSG_PUB.Count_AND_GET
8128: (p_count => x_msg_count, p_data => x_msg_data);
8129:
8130: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
8131: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
8132: FND_MSG_PUB.Count_AND_GET
8133: (p_count => x_msg_count, p_data => x_msg_data);
8134:
8135: WHEN OTHERS THEN

Line 8136: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

8132: FND_MSG_PUB.Count_AND_GET
8133: (p_count => x_msg_count, p_data => x_msg_data);
8134:
8135: WHEN OTHERS THEN
8136: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
8137: FND_MSG_PUB.Count_AND_GET
8138: (p_count => x_msg_count, p_data => x_msg_data);
8139:
8140: END validate_child_lot;

Line 8145: , p_init_msg_list IN VARCHAR2 DEFAULT FND_API.G_FALSE

8141:
8142:
8143: FUNCTION validate_lot_indivisible
8144: ( p_api_version IN NUMBER
8145: , p_init_msg_list IN VARCHAR2 DEFAULT FND_API.G_FALSE
8146: , p_commit IN VARCHAR2 DEFAULT FND_API.G_FALSE
8147: , p_validation_level IN NUMBER DEFAULT FND_API.G_VALID_LEVEL_FULL
8148: , p_transaction_type_id IN NUMBER
8149: , p_organization_id IN NUMBER

Line 8146: , p_commit IN VARCHAR2 DEFAULT FND_API.G_FALSE

8142:
8143: FUNCTION validate_lot_indivisible
8144: ( p_api_version IN NUMBER
8145: , p_init_msg_list IN VARCHAR2 DEFAULT FND_API.G_FALSE
8146: , p_commit IN VARCHAR2 DEFAULT FND_API.G_FALSE
8147: , p_validation_level IN NUMBER DEFAULT FND_API.G_VALID_LEVEL_FULL
8148: , p_transaction_type_id IN NUMBER
8149: , p_organization_id IN NUMBER
8150: , p_inventory_item_id IN NUMBER

Line 8147: , p_validation_level IN NUMBER DEFAULT FND_API.G_VALID_LEVEL_FULL

8143: FUNCTION validate_lot_indivisible
8144: ( p_api_version IN NUMBER
8145: , p_init_msg_list IN VARCHAR2 DEFAULT FND_API.G_FALSE
8146: , p_commit IN VARCHAR2 DEFAULT FND_API.G_FALSE
8147: , p_validation_level IN NUMBER DEFAULT FND_API.G_VALID_LEVEL_FULL
8148: , p_transaction_type_id IN NUMBER
8149: , p_organization_id IN NUMBER
8150: , p_inventory_item_id IN NUMBER
8151: , p_revision IN VARCHAR2

Line 8194: x_return_status := FND_API.G_RET_STS_ERROR;

8190: EXCEPTION
8191:
8192: WHEN CREATE_TREE_ERROR THEN
8193: print_debug(' CREATE_TREE error...');
8194: x_return_status := FND_API.G_RET_STS_ERROR;
8195: FND_MSG_PUB.Count_AND_GET
8196: (p_count => x_msg_count, p_data => x_msg_data);
8197: RETURN FALSE;
8198:

Line 8201: x_return_status := FND_API.G_RET_STS_ERROR;

8197: RETURN FALSE;
8198:
8199: WHEN QUERY_TREE_ERROR THEN
8200: print_debug(' QUERY_TREE error...');
8201: x_return_status := FND_API.G_RET_STS_ERROR;
8202: FND_MSG_PUB.Count_AND_GET
8203: (p_count => x_msg_count, p_data => x_msg_data);
8204: RETURN FALSE;
8205:

Line 8206: WHEN FND_API.G_EXC_ERROR THEN

8202: FND_MSG_PUB.Count_AND_GET
8203: (p_count => x_msg_count, p_data => x_msg_data);
8204: RETURN FALSE;
8205:
8206: WHEN FND_API.G_EXC_ERROR THEN
8207: print_debug(' EXCP error...');
8208: x_return_status := FND_API.G_RET_STS_ERROR;
8209: FND_MSG_PUB.Count_AND_GET
8210: (p_count => x_msg_count, p_data => x_msg_data);

Line 8208: x_return_status := FND_API.G_RET_STS_ERROR;

8204: RETURN FALSE;
8205:
8206: WHEN FND_API.G_EXC_ERROR THEN
8207: print_debug(' EXCP error...');
8208: x_return_status := FND_API.G_RET_STS_ERROR;
8209: FND_MSG_PUB.Count_AND_GET
8210: (p_count => x_msg_count, p_data => x_msg_data);
8211: RETURN FALSE;
8212:

Line 8213: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

8209: FND_MSG_PUB.Count_AND_GET
8210: (p_count => x_msg_count, p_data => x_msg_data);
8211: RETURN FALSE;
8212:
8213: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
8214: print_debug(' UNEXCP error...');
8215: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
8216: FND_MSG_PUB.Count_AND_GET
8217: (p_count => x_msg_count, p_data => x_msg_data);

Line 8215: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

8211: RETURN FALSE;
8212:
8213: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
8214: print_debug(' UNEXCP error...');
8215: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
8216: FND_MSG_PUB.Count_AND_GET
8217: (p_count => x_msg_count, p_data => x_msg_data);
8218: RETURN FALSE;
8219:

Line 8222: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

8218: RETURN FALSE;
8219:
8220: WHEN OTHERS THEN
8221: print_debug(' OTHERS error...'||SQLERRM);
8222: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
8223: FND_MSG_PUB.Count_AND_GET
8224: (p_count => x_msg_count, p_data => x_msg_data);
8225: RETURN FALSE;
8226:

Line 8255: , p_init_msg_list IN VARCHAR2 DEFAULT FND_API.G_FALSE

8251: | |
8252: +==========================================================================+ */
8253: FUNCTION validate_lot_indivisible
8254: ( p_api_version IN NUMBER
8255: , p_init_msg_list IN VARCHAR2 DEFAULT FND_API.G_FALSE
8256: , p_commit IN VARCHAR2 DEFAULT FND_API.G_FALSE
8257: , p_validation_level IN NUMBER DEFAULT FND_API.G_VALID_LEVEL_FULL
8258: , p_transaction_type_id IN NUMBER
8259: , p_organization_id IN NUMBER

Line 8256: , p_commit IN VARCHAR2 DEFAULT FND_API.G_FALSE

8252: +==========================================================================+ */
8253: FUNCTION validate_lot_indivisible
8254: ( p_api_version IN NUMBER
8255: , p_init_msg_list IN VARCHAR2 DEFAULT FND_API.G_FALSE
8256: , p_commit IN VARCHAR2 DEFAULT FND_API.G_FALSE
8257: , p_validation_level IN NUMBER DEFAULT FND_API.G_VALID_LEVEL_FULL
8258: , p_transaction_type_id IN NUMBER
8259: , p_organization_id IN NUMBER
8260: , p_inventory_item_id IN NUMBER

Line 8257: , p_validation_level IN NUMBER DEFAULT FND_API.G_VALID_LEVEL_FULL

8253: FUNCTION validate_lot_indivisible
8254: ( p_api_version IN NUMBER
8255: , p_init_msg_list IN VARCHAR2 DEFAULT FND_API.G_FALSE
8256: , p_commit IN VARCHAR2 DEFAULT FND_API.G_FALSE
8257: , p_validation_level IN NUMBER DEFAULT FND_API.G_VALID_LEVEL_FULL
8258: , p_transaction_type_id IN NUMBER
8259: , p_organization_id IN NUMBER
8260: , p_inventory_item_id IN NUMBER
8261: , p_revision IN VARCHAR2

Line 8371: IF FND_API.to_boolean(p_init_msg_list) THEN

8367: print_debug('Entering validate_lot_indivisible. transaction_type_id='||p_transaction_type_id||', prim_qty='||p_primary_quantity||'.');
8368: print_debug(' ... org='||p_organization_id||', item='||p_inventory_item_id||', rev='||p_revision||', sub='||p_subinventory_code||', loct='||p_locator_id);
8369: print_debug(' ... lot='||p_lot_number||', p_qoh='||p_qoh||', p_atr='||p_atr);
8370:
8371: IF FND_API.to_boolean(p_init_msg_list) THEN
8372: FND_MSG_PUB.Initialize;
8373: END IF;
8374:
8375: -- Standard call to check for call compatibility.

Line 8376: IF NOT FND_API.Compatible_API_Call( l_api_version

8372: FND_MSG_PUB.Initialize;
8373: END IF;
8374:
8375: -- Standard call to check for call compatibility.
8376: IF NOT FND_API.Compatible_API_Call( l_api_version
8377: , p_api_version
8378: , l_api_name
8379: , G_PKG_NAME)
8380: THEN

Line 8381: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

8377: , p_api_version
8378: , l_api_name
8379: , G_PKG_NAME)
8380: THEN
8381: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
8382: END IF;
8383: x_return_status := FND_API.G_RET_STS_SUCCESS;
8384:
8385: /*==========================================

Line 8383: x_return_status := FND_API.G_RET_STS_SUCCESS;

8379: , G_PKG_NAME)
8380: THEN
8381: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
8382: END IF;
8383: x_return_status := FND_API.G_RET_STS_SUCCESS;
8384:
8385: /*==========================================
8386: Get item details:
8387: ========================================*/

Line 8398: RAISE FND_API.G_EXC_ERROR;

8394: FND_MESSAGE.SET_NAME('INV','ITEM_NOT_FOUND');
8395: FND_MESSAGE.SET_TOKEN('ORGANIZATION_ID', p_organization_id);
8396: FND_MESSAGE.SET_TOKEN('INVENTORY_ITEM_ID', p_inventory_item_id);
8397: FND_MSG_PUB.ADD;
8398: RAISE FND_API.G_EXC_ERROR;
8399: END IF;
8400: CLOSE get_item_details;
8401:
8402: /* Jalaj Srivastava Bug 4634410

Line 8443: RAISE FND_API.G_EXC_ERROR;

8439: CLOSE get_transaction_details;
8440: FND_MESSAGE.SET_NAME('INV','TRX_TYPE_NOT_FOUND');
8441: FND_MESSAGE.SET_TOKEN('TRANSACTION_TYPE_ID', p_transaction_type_id);
8442: FND_MSG_PUB.ADD;
8443: RAISE FND_API.G_EXC_ERROR;
8444: END IF;
8445: CLOSE get_transaction_details;
8446:
8447: print_debug('... transaction_type_id='||p_transaction_type_id||', trx_action='||l_transaction_action_id||', trx_source_type='||l_transaction_source_type_id);

Line 8521: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS)

8517: , x_tree_id => l_tree_id);
8518:
8519: print_debug('return status INV_QUANTITY_TREE_GRP.CREATE_TREE api'||l_return_status);
8520: -- NSRIVAST, using <> as per GSCC compliance
8521: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS)
8522: THEN
8523: print_debug('Returning error from INV_QUANTITY_TREE_GRP.CREATE_TREE');
8524: RAISE CREATE_TREE_ERROR;
8525: END IF;

Line 8565: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS)

8561: --Returning quantity to calling procedure
8562: x_primary_quantity := l_qoh;
8563:
8564: -- NSRIVAST, using <> as per GSCC compliance
8565: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS)
8566: THEN
8567: print_debug('Returning error from INV_QUANTITY_TREE_PUB.QUERY_QUANTITIES');
8568: RAISE QUERY_TREE_ERROR;
8569: END IF;

Line 8608: RAISE FND_API.G_EXC_ERROR;

8604: FND_MSG_PUB.ADD;
8605: --l_error_code := FND_MESSAGE.GET;
8606: /* Update MTI table with error code/explanation */
8607: --errupdate(p_rowid);
8608: RAISE FND_API.G_EXC_ERROR;
8609: END IF;
8610: END IF;
8611:
8612: -- IF ( p_transaction_type_id = 32 )

Line 8624: -- RAISE FND_API.G_EXC_ERROR;

8620: -- FND_MSG_PUB.ADD;
8621: -- --l_error_code := FND_MESSAGE.GET;
8622: -- /* Update MTI table with error code/explanation */
8623: -- --errupdate(p_rowid);
8624: -- RAISE FND_API.G_EXC_ERROR;
8625: -- END IF;
8626: -- END IF;
8627:
8628: -- action 27 = Receipt into store

Line 8678: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS)

8674: -- returning primary quantity to calling procedure
8675: x_primary_quantity := l_qoh;
8676:
8677: -- NSRIVAST, using <> as per GSCC compliance
8678: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS)
8679: THEN
8680: print_debug('Returning error from INV_QUANTITY_TREE_GRP.QUERY_TREE');
8681: RAISE QUERY_TREE_ERROR;
8682: END IF;

Line 8700: RAISE FND_API.G_EXC_ERROR;

8696: FND_MSG_PUB.ADD;
8697: --l_error_expp := FND_MESSAGE.GET;
8698: /* Update MTI table with error code/explanation */
8699: --errupdate(p_rowid);
8700: RAISE FND_API.G_EXC_ERROR;
8701: END IF; -- ( ll_atr = 0 )
8702: -- bug 4042255 : added forgotten ELSE clause :
8703: -- Bug 4146697 - Removed ELSE condition below.
8704: -- ELSE

Line 8709: -- RAISE FND_API.G_EXC_ERROR;

8705: -- print_debug('within case 3 Some Qty already available to reserve. prim_qty='||p_primary_quantity||', atr='||l_atr);
8706: -- FND_MESSAGE.SET_NAME('INV','INV_LOT_INDIV_QTY_RCPT_CASE_3');
8707: -- FND_MSG_PUB.ADD;
8708:
8709: -- RAISE FND_API.G_EXC_ERROR;
8710: END IF; -- ( l_atr = 0 )
8711:
8712: IF ( l_qr > 0 )
8713: THEN

Line 8723: RAISE FND_API.G_EXC_ERROR;

8719: FND_MSG_PUB.ADD;
8720: --l_error_expp := FND_MESSAGE.GET;
8721: /* Update MTI table with error code/explanation */
8722: --errupdate(p_rowid);
8723: RAISE FND_API.G_EXC_ERROR;
8724: END IF; -- ( l_qr > 0 )
8725: END IF; -- l_transaction_action_id IN (27)
8726: l_return := TRUE;
8727:

Line 8752: RAISE FND_API.G_EXC_ERROR;

8748: FND_MSG_PUB.ADD;
8749: --l_error_expp := FND_MESSAGE.GET;
8750: /* Update MTI table with error code/explanation */
8751: --errupdate(p_rowid);
8752: RAISE FND_API.G_EXC_ERROR;
8753: END IF;
8754: END IF;
8755: l_return := TRUE;
8756: ELSE

Line 8767: x_return_status := FND_API.G_RET_STS_ERROR;

8763: EXCEPTION
8764:
8765: WHEN CREATE_TREE_ERROR THEN
8766: print_debug(' CREATE_TREE error...');
8767: x_return_status := FND_API.G_RET_STS_ERROR;
8768: FND_MSG_PUB.Count_AND_GET
8769: (p_count => x_msg_count, p_data => x_msg_data);
8770: RETURN FALSE;
8771:

Line 8774: x_return_status := FND_API.G_RET_STS_ERROR;

8770: RETURN FALSE;
8771:
8772: WHEN QUERY_TREE_ERROR THEN
8773: print_debug(' QUERY_TREE error...');
8774: x_return_status := FND_API.G_RET_STS_ERROR;
8775: FND_MSG_PUB.Count_AND_GET
8776: (p_count => x_msg_count, p_data => x_msg_data);
8777: RETURN FALSE;
8778:

Line 8779: WHEN FND_API.G_EXC_ERROR THEN

8775: FND_MSG_PUB.Count_AND_GET
8776: (p_count => x_msg_count, p_data => x_msg_data);
8777: RETURN FALSE;
8778:
8779: WHEN FND_API.G_EXC_ERROR THEN
8780: print_debug(' EXCP error...');
8781: x_return_status := FND_API.G_RET_STS_ERROR;
8782: FND_MSG_PUB.Count_AND_GET
8783: (p_count => x_msg_count, p_data => x_msg_data);

Line 8781: x_return_status := FND_API.G_RET_STS_ERROR;

8777: RETURN FALSE;
8778:
8779: WHEN FND_API.G_EXC_ERROR THEN
8780: print_debug(' EXCP error...');
8781: x_return_status := FND_API.G_RET_STS_ERROR;
8782: FND_MSG_PUB.Count_AND_GET
8783: (p_count => x_msg_count, p_data => x_msg_data);
8784: RETURN FALSE;
8785:

Line 8786: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

8782: FND_MSG_PUB.Count_AND_GET
8783: (p_count => x_msg_count, p_data => x_msg_data);
8784: RETURN FALSE;
8785:
8786: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
8787: print_debug(' UNEXCP error...');
8788: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
8789: FND_MSG_PUB.Count_AND_GET
8790: (p_count => x_msg_count, p_data => x_msg_data);

Line 8788: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

8784: RETURN FALSE;
8785:
8786: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
8787: print_debug(' UNEXCP error...');
8788: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
8789: FND_MSG_PUB.Count_AND_GET
8790: (p_count => x_msg_count, p_data => x_msg_data);
8791: RETURN FALSE;
8792:

Line 8795: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

8791: RETURN FALSE;
8792:
8793: WHEN OTHERS THEN
8794: print_debug(' OTHERS error...'||SQLERRM);
8795: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
8796: FND_MSG_PUB.Count_AND_GET
8797: (p_count => x_msg_count, p_data => x_msg_data);
8798: RETURN FALSE;
8799:

Line 8844: , p_init_msg_list IN VARCHAR2 DEFAULT fnd_api.g_false --bug 7513308

8840: , p_territory_code IN VARCHAR2
8841: , p_supplier_lot_number IN VARCHAR2
8842: , p_vendor_name IN VARCHAR2
8843: , p_source IN NUMBER
8844: , p_init_msg_list IN VARCHAR2 DEFAULT fnd_api.g_false --bug 7513308
8845: ) IS
8846:
8847:
8848: /* Defined new variables for overloaded API call */

Line 8865: x_return_status := fnd_api.g_ret_sts_success;

8861: l_msg_count NUMBER ;
8862: l_row_id ROWID ;
8863: BEGIN
8864: SAVEPOINT inv_lot;
8865: x_return_status := fnd_api.g_ret_sts_success;
8866:
8867: /* Populating the variables and calling the new overloaded API */
8868:
8869: l_in_lot_rec.inventory_item_id := p_inventory_item_id;

Line 9077: IF fnd_api.to_boolean(p_init_msg_list) THEN

9073: --END BUG 4748451
9074:
9075: -- Bug 7513308
9076: -- Initialize message list if p_init_msg_list is set to TRUE.
9077: IF fnd_api.to_boolean(p_init_msg_list) THEN
9078: fnd_msg_pub.initialize;
9079: END IF;
9080:
9081: l_source := p_source;

Line 9083: l_init_msg_list := p_init_msg_list; --fnd_api.g_false; bug 7513308

9079: END IF;
9080:
9081: l_source := p_source;
9082: l_api_version := 1.0;
9083: l_init_msg_list := p_init_msg_list; --fnd_api.g_false; bug 7513308
9084: l_commit := fnd_api.g_false;
9085: l_validation_level := fnd_api.g_valid_level_full;
9086: l_origin_txn_id := NULL;
9087:

Line 9084: l_commit := fnd_api.g_false;

9080:
9081: l_source := p_source;
9082: l_api_version := 1.0;
9083: l_init_msg_list := p_init_msg_list; --fnd_api.g_false; bug 7513308
9084: l_commit := fnd_api.g_false;
9085: l_validation_level := fnd_api.g_valid_level_full;
9086: l_origin_txn_id := NULL;
9087:
9088:

Line 9085: l_validation_level := fnd_api.g_valid_level_full;

9081: l_source := p_source;
9082: l_api_version := 1.0;
9083: l_init_msg_list := p_init_msg_list; --fnd_api.g_false; bug 7513308
9084: l_commit := fnd_api.g_false;
9085: l_validation_level := fnd_api.g_valid_level_full;
9086: l_origin_txn_id := NULL;
9087:
9088:
9089:

Line 9109: IF l_return_status = fnd_api.g_ret_sts_error THEN

9105:
9106: IF g_debug = 1 THEN
9107: print_debug('Program Create_Inv_lot return ' || l_return_status, 9);
9108: END IF;
9109: IF l_return_status = fnd_api.g_ret_sts_error THEN
9110: IF g_debug = 1 THEN
9111: print_debug('Program Create_Inv_lot has failed with a user defined exception', 9);
9112: END IF;
9113: RAISE g_exc_error;

Line 9114: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

9110: IF g_debug = 1 THEN
9111: print_debug('Program Create_Inv_lot has failed with a user defined exception', 9);
9112: END IF;
9113: RAISE g_exc_error;
9114: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
9115: IF g_debug = 1 THEN
9116: print_debug('Program Create_Inv_lot has failed with a Unexpected exception', 9);
9117: END IF;
9118: FND_MESSAGE.SET_NAME('INV','INV_PROGRAM_ERROR');

Line 9127: x_return_status := fnd_api.g_ret_sts_error;

9123:
9124: print_debug('End of the program create_inv_lot. Program has completed successfully ', 9);
9125: EXCEPTION
9126: WHEN NO_DATA_FOUND THEN
9127: x_return_status := fnd_api.g_ret_sts_error;
9128: ROLLBACK TO inv_lot;
9129: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
9130: if( x_msg_count > 1 ) then
9131: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);

Line 9129: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);

9125: EXCEPTION
9126: WHEN NO_DATA_FOUND THEN
9127: x_return_status := fnd_api.g_ret_sts_error;
9128: ROLLBACK TO inv_lot;
9129: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
9130: if( x_msg_count > 1 ) then
9131: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);
9132: end if;
9133: print_debug('In No data found ' || SQLERRM, 9);

Line 9131: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);

9127: x_return_status := fnd_api.g_ret_sts_error;
9128: ROLLBACK TO inv_lot;
9129: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
9130: if( x_msg_count > 1 ) then
9131: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);
9132: end if;
9133: print_debug('In No data found ' || SQLERRM, 9);
9134: WHEN g_exc_error THEN
9135: x_return_status := fnd_api.g_ret_sts_error;

Line 9135: x_return_status := fnd_api.g_ret_sts_error;

9131: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);
9132: end if;
9133: print_debug('In No data found ' || SQLERRM, 9);
9134: WHEN g_exc_error THEN
9135: x_return_status := fnd_api.g_ret_sts_error;
9136: ROLLBACK TO inv_lot;
9137: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
9138: if( x_msg_count > 1 ) then
9139: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);

Line 9137: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);

9133: print_debug('In No data found ' || SQLERRM, 9);
9134: WHEN g_exc_error THEN
9135: x_return_status := fnd_api.g_ret_sts_error;
9136: ROLLBACK TO inv_lot;
9137: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
9138: if( x_msg_count > 1 ) then
9139: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);
9140: end if;
9141: print_debug('In g_exc_error ' || SQLERRM, 9);

Line 9139: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);

9135: x_return_status := fnd_api.g_ret_sts_error;
9136: ROLLBACK TO inv_lot;
9137: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
9138: if( x_msg_count > 1 ) then
9139: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);
9140: end if;
9141: print_debug('In g_exc_error ' || SQLERRM, 9);
9142: WHEN g_exc_unexpected_error THEN
9143: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 9143: x_return_status := fnd_api.g_ret_sts_unexp_error;

9139: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);
9140: end if;
9141: print_debug('In g_exc_error ' || SQLERRM, 9);
9142: WHEN g_exc_unexpected_error THEN
9143: x_return_status := fnd_api.g_ret_sts_unexp_error;
9144: ROLLBACK TO inv_lot;
9145: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
9146: if( x_msg_count > 1 ) then
9147: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);

Line 9145: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);

9141: print_debug('In g_exc_error ' || SQLERRM, 9);
9142: WHEN g_exc_unexpected_error THEN
9143: x_return_status := fnd_api.g_ret_sts_unexp_error;
9144: ROLLBACK TO inv_lot;
9145: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
9146: if( x_msg_count > 1 ) then
9147: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);
9148: end if;
9149: print_debug('In g_exc_unexpected_error ' || SQLERRM, 9);

Line 9147: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);

9143: x_return_status := fnd_api.g_ret_sts_unexp_error;
9144: ROLLBACK TO inv_lot;
9145: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
9146: if( x_msg_count > 1 ) then
9147: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);
9148: end if;
9149: print_debug('In g_exc_unexpected_error ' || SQLERRM, 9);
9150: WHEN OTHERS THEN
9151: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 9151: x_return_status := fnd_api.g_ret_sts_unexp_error;

9147: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);
9148: end if;
9149: print_debug('In g_exc_unexpected_error ' || SQLERRM, 9);
9150: WHEN OTHERS THEN
9151: x_return_status := fnd_api.g_ret_sts_unexp_error;
9152: ROLLBACK TO inv_lot;
9153: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
9154: if( x_msg_count > 1 ) then
9155: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);

Line 9153: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);

9149: print_debug('In g_exc_unexpected_error ' || SQLERRM, 9);
9150: WHEN OTHERS THEN
9151: x_return_status := fnd_api.g_ret_sts_unexp_error;
9152: ROLLBACK TO inv_lot;
9153: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
9154: if( x_msg_count > 1 ) then
9155: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);
9156: end if;
9157: print_debug('In others ' || SQLERRM, 9);

Line 9155: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);

9151: x_return_status := fnd_api.g_ret_sts_unexp_error;
9152: ROLLBACK TO inv_lot;
9153: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
9154: if( x_msg_count > 1 ) then
9155: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);
9156: end if;
9157: print_debug('In others ' || SQLERRM, 9);
9158: END create_inv_lot;
9159:

Line 9172: , p_init_msg_list IN VARCHAR2 := fnd_api.g_false

9168: , x_lot_rec OUT NOCOPY MTL_LOT_NUMBERS%ROWTYPE
9169: , p_lot_rec IN MTL_LOT_NUMBERS%ROWTYPE
9170: , p_source IN NUMBER
9171: , p_api_version IN NUMBER
9172: , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
9173: , p_commit IN VARCHAR2 := fnd_api.g_false
9174: , p_validation_level IN NUMBER := fnd_api.g_valid_level_full
9175: , p_origin_txn_id IN NUMBER
9176: )

Line 9173: , p_commit IN VARCHAR2 := fnd_api.g_false

9169: , p_lot_rec IN MTL_LOT_NUMBERS%ROWTYPE
9170: , p_source IN NUMBER
9171: , p_api_version IN NUMBER
9172: , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
9173: , p_commit IN VARCHAR2 := fnd_api.g_false
9174: , p_validation_level IN NUMBER := fnd_api.g_valid_level_full
9175: , p_origin_txn_id IN NUMBER
9176: )
9177: IS

Line 9174: , p_validation_level IN NUMBER := fnd_api.g_valid_level_full

9170: , p_source IN NUMBER
9171: , p_api_version IN NUMBER
9172: , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
9173: , p_commit IN VARCHAR2 := fnd_api.g_false
9174: , p_validation_level IN NUMBER := fnd_api.g_valid_level_full
9175: , p_origin_txn_id IN NUMBER
9176: )
9177: IS
9178:

Line 9252: RAISE fnd_api.g_exc_error;

9248: print_debug('Value for mandatory field organization id cannot be null.', 9);
9249: END IF;
9250: fnd_message.set_name('INV', 'INV_NULL_ORG_EXP') ;
9251: fnd_msg_pub.ADD;
9252: RAISE fnd_api.g_exc_error;
9253: END IF ;
9254:
9255:
9256: /* Check item existence in Mtl_system_items Table */

Line 9282: x_return_status := fnd_api.g_ret_sts_error;

9278: END IF;
9279:
9280: fnd_message.set_name('INV', 'INV_NO_LOT_CONTROL');
9281: fnd_msg_pub.ADD;
9282: x_return_status := fnd_api.g_ret_sts_error;
9283: RAISE g_exc_error;
9284: END IF; /* l_chk_msi_attr_rec.lot_control_code = 1 */
9285:
9286: /* If not child lot enabled and p_lot_rec.parent_lot_number IS NOT NULL then error out */

Line 9294: x_return_status := fnd_api.g_ret_sts_error;

9290: END IF;
9291:
9292: fnd_message.set_name('INV', 'INV_ITEM_CLOT_DISABLE_EXP');
9293: fnd_msg_pub.ADD;
9294: x_return_status := fnd_api.g_ret_sts_error;
9295: RAISE g_exc_error;
9296: END IF; /* l_chk_msi_attr_rec.child_lot_flag = 'N' */
9297:
9298: /* Check for User-defined expiration date */

Line 9307: RAISE fnd_api.g_exc_error;

9303: END IF;
9304:
9305: fnd_message.set_name('INV', 'INV_NULL_EXPIRATION_DATE_EXP') ;
9306: fnd_msg_pub.ADD;
9307: RAISE fnd_api.g_exc_error;
9308: END IF;
9309:
9310: /* Check whether item is grade controlled */
9311: IF p_lot_rec.grade_code IS NOT NULL AND

Line 9319: RAISE fnd_api.g_exc_error;

9315: END IF;
9316:
9317: fnd_message.set_name('INV', 'INV_ITEM_NOT_GRADE_CTRL_EXP');
9318: fnd_msg_pub.ADD;
9319: RAISE fnd_api.g_exc_error;
9320: END IF;
9321:
9322: END IF; /* c_chk_msi_attr*/
9323:

Line 9332: RAISE fnd_api.g_exc_error;

9328: END IF;
9329:
9330: fnd_message.set_name('INV', 'INV_NULL_CLOT_EXP');
9331: fnd_msg_pub.ADD;
9332: RAISE fnd_api.g_exc_error;
9333: ELSE
9334: /* Check child lot existence in Mtl_Lot_Numbers Table */
9335: OPEN c_chk_lot_exists(p_lot_rec.lot_number,p_lot_rec.inventory_item_id,p_lot_rec.organization_id);
9336: FETCH c_chk_lot_exists INTO l_chk_lot_rec;

Line 9348: RAISE fnd_api.g_exc_error;

9344: -- Child lot already exists in the system: LOT_NUMBER
9345: fnd_message.set_name('INV', 'INV_CLOT_EXISTS_EXP');
9346: fnd_message.set_token('LOT_NUMBER', to_char(p_lot_rec.lot_number));
9347: fnd_msg_pub.ADD;
9348: RAISE fnd_api.g_exc_error;
9349: END IF;
9350: /* Child lot DOES NOT exist in Mtl_Lot_Numbers Table. */
9351: CLOSE c_chk_lot_exists;
9352: END IF;

Line 9363: RAISE fnd_api.g_exc_error;

9359: print_debug('Parent lot number and child lot number can not be same.', 9);
9360: END IF;
9361: fnd_message.set_name('INV', 'INV_SAME_LOT_NAMES_EXP');
9362: fnd_msg_pub.ADD;
9363: RAISE fnd_api.g_exc_error;
9364: END IF ;
9365: END IF ;
9366:
9367: /* Check for existence of Parent Lot in Mtl_Lot_Numbers Table */

Line 9385: IF p_validation_level = FND_API.G_VALID_LEVEL_FULL THEN

9381: CLOSE c_chk_lot_exists;
9382:
9383: /* BASIC CHECKS , End */
9384:
9385: IF p_validation_level = FND_API.G_VALID_LEVEL_FULL THEN
9386:
9387: -- Call Populate_Lot_Records API.
9388: -- Populate_Lot_Records API returns following OUT parameters:
9389: -- x_parent_lot_rec,

Line 9393: l_init_msg_list := fnd_api.g_false;

9389: -- x_parent_lot_rec,
9390: -- x_lot_rec
9391: l_source := p_source ;
9392: l_api_version := 1.0;
9393: l_init_msg_list := fnd_api.g_false;
9394: l_commit := fnd_api.g_false;
9395:
9396: Inv_Lot_Api_Pkg.Populate_Lot_Records (
9397: p_lot_rec => p_lot_rec

Line 9394: l_commit := fnd_api.g_false;

9390: -- x_lot_rec
9391: l_source := p_source ;
9392: l_api_version := 1.0;
9393: l_init_msg_list := fnd_api.g_false;
9394: l_commit := fnd_api.g_false;
9395:
9396: Inv_Lot_Api_Pkg.Populate_Lot_Records (
9397: p_lot_rec => p_lot_rec
9398: , p_copy_lot_attribute_flag => l_copy_lot_attribute_flag

Line 9433: IF p_validation_level = FND_API.G_VALID_LEVEL_NONE THEN

9429:
9430: END IF; /* p_validation_level = G_VALID_LEVEL_FULL */
9431:
9432:
9433: IF p_validation_level = FND_API.G_VALID_LEVEL_NONE THEN
9434: -- Populate local variable l_child_lot_rec with proper attribute's values that are passed as input parameter to this API.
9435: l_child_lot_rec := p_lot_rec ;
9436:
9437: END IF; /* p_validation_level = G_VALID_LEVEL_NONE */

Line 9635: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);

9631: EXCEPTION
9632: WHEN NO_DATA_FOUND THEN
9633: x_return_status := g_ret_sts_error;
9634: ROLLBACK TO inv_lot_1;
9635: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
9636: if( x_msg_count > 1 ) then
9637: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);
9638: end if;
9639: print_debug('In No data found Create_Inv_Lot ' || SQLERRM, 9);

Line 9637: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);

9633: x_return_status := g_ret_sts_error;
9634: ROLLBACK TO inv_lot_1;
9635: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
9636: if( x_msg_count > 1 ) then
9637: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);
9638: end if;
9639: print_debug('In No data found Create_Inv_Lot ' || SQLERRM, 9);
9640: WHEN g_exc_error THEN
9641: x_return_status := g_ret_sts_error;

Line 9643: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);

9639: print_debug('In No data found Create_Inv_Lot ' || SQLERRM, 9);
9640: WHEN g_exc_error THEN
9641: x_return_status := g_ret_sts_error;
9642: ROLLBACK TO inv_lot_1;
9643: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
9644: if( x_msg_count > 1 ) then
9645: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);
9646: end if;
9647: print_debug('In g_exc_error Create_Inv_Lot ' || SQLERRM, 9);

Line 9645: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);

9641: x_return_status := g_ret_sts_error;
9642: ROLLBACK TO inv_lot_1;
9643: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
9644: if( x_msg_count > 1 ) then
9645: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);
9646: end if;
9647: print_debug('In g_exc_error Create_Inv_Lot ' || SQLERRM, 9);
9648: WHEN g_exc_unexpected_error THEN
9649: x_return_status := g_ret_sts_unexp_error;

Line 9651: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);

9647: print_debug('In g_exc_error Create_Inv_Lot ' || SQLERRM, 9);
9648: WHEN g_exc_unexpected_error THEN
9649: x_return_status := g_ret_sts_unexp_error;
9650: ROLLBACK TO inv_lot_1;
9651: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
9652: if( x_msg_count > 1 ) then
9653: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);
9654: end if;
9655: print_debug('In g_exc_unexpected_error Create_Inv_Lot ' || SQLERRM, 9);

Line 9653: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);

9649: x_return_status := g_ret_sts_unexp_error;
9650: ROLLBACK TO inv_lot_1;
9651: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
9652: if( x_msg_count > 1 ) then
9653: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);
9654: end if;
9655: print_debug('In g_exc_unexpected_error Create_Inv_Lot ' || SQLERRM, 9);
9656: WHEN OTHERS THEN
9657: x_return_status := g_ret_sts_unexp_error;

Line 9659: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);

9655: print_debug('In g_exc_unexpected_error Create_Inv_Lot ' || SQLERRM, 9);
9656: WHEN OTHERS THEN
9657: x_return_status := g_ret_sts_unexp_error;
9658: ROLLBACK TO inv_lot_1;
9659: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
9660: if( x_msg_count > 1 ) then
9661: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);
9662: end if;
9663: print_debug('In others Create_Inv_Lot ' || SQLERRM, 9);

Line 9661: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);

9657: x_return_status := g_ret_sts_unexp_error;
9658: ROLLBACK TO inv_lot_1;
9659: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
9660: if( x_msg_count > 1 ) then
9661: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);
9662: end if;
9663: print_debug('In others Create_Inv_Lot ' || SQLERRM, 9);
9664:
9665: END Create_Inv_lot;

Line 9686: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,

9682: p_transaction_action_id IN NUMBER := NULL,
9683: p_transaction_source_type_id IN NUMBER := NULL,
9684: p_lot_number IN VARCHAR2 := NULL,
9685: p_api_version IN NUMBER,
9686: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
9687: p_commit IN VARCHAR2 := fnd_api.g_false,
9688: p_validation_level IN NUMBER
9689: := fnd_api.g_valid_level_full,
9690: x_return_status OUT NOCOPY VARCHAR2,

Line 9687: p_commit IN VARCHAR2 := fnd_api.g_false,

9683: p_transaction_source_type_id IN NUMBER := NULL,
9684: p_lot_number IN VARCHAR2 := NULL,
9685: p_api_version IN NUMBER,
9686: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
9687: p_commit IN VARCHAR2 := fnd_api.g_false,
9688: p_validation_level IN NUMBER
9689: := fnd_api.g_valid_level_full,
9690: x_return_status OUT NOCOPY VARCHAR2,
9691: x_msg_count OUT NOCOPY NUMBER,

Line 9689: := fnd_api.g_valid_level_full,

9685: p_api_version IN NUMBER,
9686: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
9687: p_commit IN VARCHAR2 := fnd_api.g_false,
9688: p_validation_level IN NUMBER
9689: := fnd_api.g_valid_level_full,
9690: x_return_status OUT NOCOPY VARCHAR2,
9691: x_msg_count OUT NOCOPY NUMBER,
9692: x_msg_data OUT NOCOPY VARCHAR2
9693: )

Line 9736: WHEN fnd_api.g_exc_error THEN

9732: RETURN x_parent_call;
9733:
9734:
9735: EXCEPTION
9736: WHEN fnd_api.g_exc_error THEN
9737: ROLLBACK TO apiauto_gen_lot_apipub;
9738: x_return_status := fnd_api.g_ret_sts_error;
9739: fnd_msg_pub.count_and_get (
9740: p_encoded => fnd_api.g_false,

Line 9738: x_return_status := fnd_api.g_ret_sts_error;

9734:
9735: EXCEPTION
9736: WHEN fnd_api.g_exc_error THEN
9737: ROLLBACK TO apiauto_gen_lot_apipub;
9738: x_return_status := fnd_api.g_ret_sts_error;
9739: fnd_msg_pub.count_and_get (
9740: p_encoded => fnd_api.g_false,
9741: p_count => x_msg_count,
9742: p_data => x_msg_data

Line 9740: p_encoded => fnd_api.g_false,

9736: WHEN fnd_api.g_exc_error THEN
9737: ROLLBACK TO apiauto_gen_lot_apipub;
9738: x_return_status := fnd_api.g_ret_sts_error;
9739: fnd_msg_pub.count_and_get (
9740: p_encoded => fnd_api.g_false,
9741: p_count => x_msg_count,
9742: p_data => x_msg_data
9743: );
9744: RETURN ( NULL );

Line 9745: WHEN fnd_api.g_exc_unexpected_error THEN

9741: p_count => x_msg_count,
9742: p_data => x_msg_data
9743: );
9744: RETURN ( NULL );
9745: WHEN fnd_api.g_exc_unexpected_error THEN
9746: ROLLBACK TO apiauto_gen_lot_apipub;
9747: x_return_status := fnd_api.g_ret_sts_unexp_error;
9748: fnd_msg_pub.count_and_get (
9749: p_encoded => fnd_api.g_false,

Line 9747: x_return_status := fnd_api.g_ret_sts_unexp_error;

9743: );
9744: RETURN ( NULL );
9745: WHEN fnd_api.g_exc_unexpected_error THEN
9746: ROLLBACK TO apiauto_gen_lot_apipub;
9747: x_return_status := fnd_api.g_ret_sts_unexp_error;
9748: fnd_msg_pub.count_and_get (
9749: p_encoded => fnd_api.g_false,
9750: p_count => x_msg_count,
9751: p_data => x_msg_data

Line 9749: p_encoded => fnd_api.g_false,

9745: WHEN fnd_api.g_exc_unexpected_error THEN
9746: ROLLBACK TO apiauto_gen_lot_apipub;
9747: x_return_status := fnd_api.g_ret_sts_unexp_error;
9748: fnd_msg_pub.count_and_get (
9749: p_encoded => fnd_api.g_false,
9750: p_count => x_msg_count,
9751: p_data => x_msg_data
9752: );
9753: RETURN ( NULL );

Line 9756: x_return_status := fnd_api.g_ret_sts_unexp_error;

9752: );
9753: RETURN ( NULL );
9754: WHEN OTHERS THEN
9755: ROLLBACK TO apiauto_gen_lot_apipub;
9756: x_return_status := fnd_api.g_ret_sts_unexp_error;
9757:
9758: IF fnd_msg_pub.check_msg_level ( fnd_msg_pub.g_msg_lvl_unexp_error) THEN
9759: fnd_msg_pub.add_exc_msg ( g_pkg_name, l_api_name );
9760: END IF;

Line 9763: p_encoded => fnd_api.g_false,

9759: fnd_msg_pub.add_exc_msg ( g_pkg_name, l_api_name );
9760: END IF;
9761:
9762: fnd_msg_pub.count_and_get (
9763: p_encoded => fnd_api.g_false,
9764: p_count => x_msg_count,
9765: p_data => x_msg_data
9766: );
9767: RETURN ( NULL );

Line 9794: ,p_init_msg_list IN VARCHAR2 DEFAULT FND_API.G_FALSE

9790: #
9791: ######################################################################################*/
9792:
9793: PROCEDURE CHECK_LOT_INDIVISIBILITY ( p_api_version IN NUMBER DEFAULT 1.0
9794: ,p_init_msg_list IN VARCHAR2 DEFAULT FND_API.G_FALSE
9795: ,p_commit IN VARCHAR2 DEFAULT FND_API.G_FALSE
9796: ,p_validation_level IN NUMBER DEFAULT FND_API.G_VALID_LEVEL_FULL
9797: ,p_rti_id IN NUMBER
9798: ,p_transaction_type_id IN NUMBER

Line 9795: ,p_commit IN VARCHAR2 DEFAULT FND_API.G_FALSE

9791: ######################################################################################*/
9792:
9793: PROCEDURE CHECK_LOT_INDIVISIBILITY ( p_api_version IN NUMBER DEFAULT 1.0
9794: ,p_init_msg_list IN VARCHAR2 DEFAULT FND_API.G_FALSE
9795: ,p_commit IN VARCHAR2 DEFAULT FND_API.G_FALSE
9796: ,p_validation_level IN NUMBER DEFAULT FND_API.G_VALID_LEVEL_FULL
9797: ,p_rti_id IN NUMBER
9798: ,p_transaction_type_id IN NUMBER
9799: ,p_lot_number IN VARCHAR2

Line 9796: ,p_validation_level IN NUMBER DEFAULT FND_API.G_VALID_LEVEL_FULL

9792:
9793: PROCEDURE CHECK_LOT_INDIVISIBILITY ( p_api_version IN NUMBER DEFAULT 1.0
9794: ,p_init_msg_list IN VARCHAR2 DEFAULT FND_API.G_FALSE
9795: ,p_commit IN VARCHAR2 DEFAULT FND_API.G_FALSE
9796: ,p_validation_level IN NUMBER DEFAULT FND_API.G_VALID_LEVEL_FULL
9797: ,p_rti_id IN NUMBER
9798: ,p_transaction_type_id IN NUMBER
9799: ,p_lot_number IN VARCHAR2
9800: ,p_lot_quantity IN NUMBER

Line 9850: IF NOT fnd_api.compatible_api_call(

9846:
9847: BEGIN
9848:
9849: -- Standard call to check for call compatibility.
9850: IF NOT fnd_api.compatible_api_call(
9851: l_api_version,
9852: p_api_version,
9853: l_api_name,
9854: 'inv_lot_api_pub'

Line 9857: print_debug('FND_API not compatible INV_LOT_API_PUB.CHECK_LOT_INDIVISIBILITY: '||l_progress, 1);

9853: l_api_name,
9854: 'inv_lot_api_pub'
9855: ) THEN
9856: IF (g_debug = 1) THEN
9857: print_debug('FND_API not compatible INV_LOT_API_PUB.CHECK_LOT_INDIVISIBILITY: '||l_progress, 1);
9858: END IF;
9859: RAISE fnd_api.g_exc_unexpected_error;
9860: END IF;
9861:

Line 9859: RAISE fnd_api.g_exc_unexpected_error;

9855: ) THEN
9856: IF (g_debug = 1) THEN
9857: print_debug('FND_API not compatible INV_LOT_API_PUB.CHECK_LOT_INDIVISIBILITY: '||l_progress, 1);
9858: END IF;
9859: RAISE fnd_api.g_exc_unexpected_error;
9860: END IF;
9861:
9862: l_progress := '001';
9863:

Line 9865: IF fnd_api.to_boolean(p_init_msg_list) THEN

9861:
9862: l_progress := '001';
9863:
9864: -- Initialize message list if p_init_msg_list is set to TRUE.
9865: IF fnd_api.to_boolean(p_init_msg_list) THEN
9866: fnd_msg_pub.initialize;
9867: END IF;
9868:
9869: --Initialize the return status

Line 9870: x_return_status := FND_API.G_RET_STS_SUCCESS;

9866: fnd_msg_pub.initialize;
9867: END IF;
9868:
9869: --Initialize the return status
9870: x_return_status := FND_API.G_RET_STS_SUCCESS;
9871:
9872: l_progress := '002';
9873:
9874: /*Calling the lot indivisible function only for the following

Line 9915: ,p_init_msg_list =>FND_API.G_FALSE

9911:
9912: ---call the indiv function
9913: IF NOT (INV_LOT_API_PUB.validate_lot_indivisible(
9914: p_api_version =>1.0
9915: ,p_init_msg_list =>FND_API.G_FALSE
9916: ,p_commit =>FND_API.G_FALSE
9917: ,p_validation_level =>FND_API.G_VALID_LEVEL_FULL
9918: ,p_transaction_type_id =>p_transaction_type_id
9919: ,p_organization_id =>l_to_organization_id

Line 9916: ,p_commit =>FND_API.G_FALSE

9912: ---call the indiv function
9913: IF NOT (INV_LOT_API_PUB.validate_lot_indivisible(
9914: p_api_version =>1.0
9915: ,p_init_msg_list =>FND_API.G_FALSE
9916: ,p_commit =>FND_API.G_FALSE
9917: ,p_validation_level =>FND_API.G_VALID_LEVEL_FULL
9918: ,p_transaction_type_id =>p_transaction_type_id
9919: ,p_organization_id =>l_to_organization_id
9920: ,p_inventory_item_id =>l_item_id

Line 9917: ,p_validation_level =>FND_API.G_VALID_LEVEL_FULL

9913: IF NOT (INV_LOT_API_PUB.validate_lot_indivisible(
9914: p_api_version =>1.0
9915: ,p_init_msg_list =>FND_API.G_FALSE
9916: ,p_commit =>FND_API.G_FALSE
9917: ,p_validation_level =>FND_API.G_VALID_LEVEL_FULL
9918: ,p_transaction_type_id =>p_transaction_type_id
9919: ,p_organization_id =>l_to_organization_id
9920: ,p_inventory_item_id =>l_item_id
9921: ,p_revision =>p_revision

Line 9940: IF ((l_return_status <> FND_API.G_RET_STS_SUCCESS) AND p_transaction_type_id IN (36,37)) THEN

9936:
9937: l_progress := '005';
9938:
9939: ---If lot indiv fails fro a Return trx...
9940: IF ((l_return_status <> FND_API.G_RET_STS_SUCCESS) AND p_transaction_type_id IN (36,37)) THEN
9941:
9942: /*---logic to explain the values of p_transaction_type_id
9943: IF (transaction_type IN ('RETURN TO RECEIVING','RETURN TO VENDOR','RETURN TO CUSTOMER')) THEN
9944: IF (source_document_code = 'PO') THEN

Line 10015: l_return_status := FND_API.G_RET_STS_SUCCESS ;

10011:
10012: l_progress := '010';
10013:
10014: --overriding the false return status of lot indiv api
10015: l_return_status := FND_API.G_RET_STS_SUCCESS ;
10016:
10017: IF g_debug = 1 THEN
10018: print_debug('l_return_status'|| l_return_status, 9);
10019: print_debug('set return status of validate_lot_indivisible to true'|| l_progress, 9);

Line 10027: IF l_return_status = fnd_api.g_ret_sts_error THEN

10023: END IF; -------- IF ((l_return_status <>...... AND p_transaction_type_id IN.......
10024:
10025: l_progress := '011';
10026:
10027: IF l_return_status = fnd_api.g_ret_sts_error THEN
10028: IF g_debug = 1 THEN
10029: print_debug('Program INV_LOT_API_PUB.validate_lot_indivisible has failed with a user defined exception '|| l_progress, 9);
10030: END IF;
10031:

Line 10037: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

10033: FND_MESSAGE.SET_TOKEN('PGM_NAME','INV_LOT_API_PUB.validate_lot_indivisible');
10034: fnd_msg_pub.ADD;
10035: RAISE g_exc_error;
10036:
10037: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
10038: l_progress := '012' ;
10039:
10040: IF g_debug = 1 THEN
10041: print_debug('Program INV_LOT_API_PUB.validate_lot_indivisible has failed with a Unexpected exception' || l_progress, 9);

Line 10048: END IF;------------IF l_return_status = fnd_api.g_ret_sts_error THEN

10044: FND_MESSAGE.SET_NAME('INV','INV_PROGRAM_ERROR');
10045: FND_MESSAGE.SET_TOKEN('PGM_NAME','INV_LOT_API_PUB.validate_lot_indivisible');
10046: fnd_msg_pub.ADD;
10047: RAISE g_exc_unexpected_error;
10048: END IF;------------IF l_return_status = fnd_api.g_ret_sts_error THEN
10049:
10050:
10051: END IF;--------IF NOT (INV_LOT_API_PUB.validate_lot_indivisible(
10052:

Line 10074: x_return_status := fnd_api.g_ret_sts_error;

10070:
10071: EXCEPTION
10072:
10073: WHEN NO_DATA_FOUND THEN
10074: x_return_status := fnd_api.g_ret_sts_error;
10075:
10076: fnd_msg_pub.count_and_get(
10077: p_encoded => fnd_api.g_false ,
10078: p_count => x_msg_count ,

Line 10077: p_encoded => fnd_api.g_false ,

10073: WHEN NO_DATA_FOUND THEN
10074: x_return_status := fnd_api.g_ret_sts_error;
10075:
10076: fnd_msg_pub.count_and_get(
10077: p_encoded => fnd_api.g_false ,
10078: p_count => x_msg_count ,
10079: p_data => x_msg_data
10080: );
10081: IF( x_msg_count > 1 ) THEN

Line 10084: FND_API.G_FALSE

10080: );
10081: IF( x_msg_count > 1 ) THEN
10082: x_msg_data := fnd_msg_pub.get(
10083: x_msg_count ,
10084: FND_API.G_FALSE
10085: );
10086: END IF ;
10087:
10088:

Line 10096: x_return_status := fnd_api.g_ret_sts_error;

10092: END IF;
10093:
10094: WHEN g_exc_error THEN
10095:
10096: x_return_status := fnd_api.g_ret_sts_error;
10097:
10098: fnd_msg_pub.count_and_get(
10099: p_encoded => fnd_api.g_false ,
10100: p_count => x_msg_count ,

Line 10099: p_encoded => fnd_api.g_false ,

10095:
10096: x_return_status := fnd_api.g_ret_sts_error;
10097:
10098: fnd_msg_pub.count_and_get(
10099: p_encoded => fnd_api.g_false ,
10100: p_count => x_msg_count ,
10101: p_data => x_msg_data
10102: );
10103:

Line 10107: FND_API.G_FALSE

10103:
10104: IF( x_msg_count > 1 ) THEN
10105: x_msg_data := fnd_msg_pub.get(
10106: x_msg_count ,
10107: FND_API.G_FALSE
10108: );
10109: END IF;
10110:
10111: IF g_debug = 1 THEN

Line 10118: x_return_status := fnd_api.g_ret_sts_unexp_error;

10114: END IF;
10115:
10116:
10117: WHEN g_exc_unexpected_error THEN
10118: x_return_status := fnd_api.g_ret_sts_unexp_error;
10119:
10120: fnd_msg_pub.count_and_get(
10121: p_encoded => fnd_api.g_false ,
10122: p_count => x_msg_count ,

Line 10121: p_encoded => fnd_api.g_false ,

10117: WHEN g_exc_unexpected_error THEN
10118: x_return_status := fnd_api.g_ret_sts_unexp_error;
10119:
10120: fnd_msg_pub.count_and_get(
10121: p_encoded => fnd_api.g_false ,
10122: p_count => x_msg_count ,
10123: p_data => x_msg_data
10124: );
10125: IF( x_msg_count > 1 ) THEN

Line 10128: FND_API.G_FALSE

10124: );
10125: IF( x_msg_count > 1 ) THEN
10126: x_msg_data := fnd_msg_pub.get(
10127: x_msg_count ,
10128: FND_API.G_FALSE
10129: );
10130: END IF ;
10131:
10132: IF g_debug = 1 THEN

Line 10138: x_return_status := fnd_api.g_ret_sts_unexp_error;

10134: --------print_stacked_messages;
10135: END IF;
10136:
10137: WHEN OTHERS THEN
10138: x_return_status := fnd_api.g_ret_sts_unexp_error;
10139: fnd_msg_pub.count_and_get(
10140: p_encoded => fnd_api.g_false ,
10141: p_count => x_msg_count ,
10142: p_data => x_msg_data

Line 10140: p_encoded => fnd_api.g_false ,

10136:
10137: WHEN OTHERS THEN
10138: x_return_status := fnd_api.g_ret_sts_unexp_error;
10139: fnd_msg_pub.count_and_get(
10140: p_encoded => fnd_api.g_false ,
10141: p_count => x_msg_count ,
10142: p_data => x_msg_data
10143: );
10144: IF( x_msg_count > 1 ) THEN

Line 10147: FND_API.G_FALSE);

10143: );
10144: IF( x_msg_count > 1 ) THEN
10145: x_msg_data := fnd_msg_pub.get(
10146: x_msg_count ,
10147: FND_API.G_FALSE);
10148: END IF;
10149:
10150: IF g_debug = 1 THEN
10151: print_debug('Exitting CHECK_LOT_INDIVISIBILITY - In others error:'||TO_CHAR(SYSDATE, 'YYYY-MM-DD HH:DD:SS')||':'||l_progress, 1);

Line 10183: , p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE

10179: --
10180: -----------------------------------------------------------------------
10181: FUNCTION validate_quantities(
10182: p_api_version IN NUMBER
10183: , p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE
10184: , p_transaction_type_id IN NUMBER
10185: , p_organization_id IN NUMBER
10186: , p_inventory_item_id IN NUMBER
10187: , p_revision IN VARCHAR2

Line 10239: IF FND_API.TO_BOOLEAN(p_init_msg_list) THEN

10235: IF (l_debug = 1) THEN
10236: inv_log_util.trace('validate_quantities: Start ', g_pkg_name, 9);
10237: END IF;
10238:
10239: IF FND_API.TO_BOOLEAN(p_init_msg_list) THEN
10240: FND_MSG_PUB.Initialize;
10241: END IF;
10242:
10243: -- Standard call to check for call compatibility.

Line 10244: IF NOT FND_API.COMPATIBLE_API_CALL( l_api_version

10240: FND_MSG_PUB.Initialize;
10241: END IF;
10242:
10243: -- Standard call to check for call compatibility.
10244: IF NOT FND_API.COMPATIBLE_API_CALL( l_api_version
10245: , p_api_version
10246: , l_api_name
10247: , G_PKG_NAME)
10248: THEN

Line 10249: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

10245: , p_api_version
10246: , l_api_name
10247: , G_PKG_NAME)
10248: THEN
10249: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
10250: END IF;
10251:
10252: /* =======================================================================
10253: Init variables

Line 10255: x_return_status := FND_API.G_RET_STS_SUCCESS;

10251:
10252: /* =======================================================================
10253: Init variables
10254: ======================================================================= */
10255: x_return_status := FND_API.G_RET_STS_SUCCESS;
10256:
10257: OPEN get_item_details( p_organization_id
10258: , p_inventory_item_id);
10259: FETCH get_item_details

Line 10273: RAISE FND_API.G_EXC_ERROR;

10269: FND_MESSAGE.SET_NAME('INV','ITEM_NOT_FOUND');
10270: FND_MESSAGE.SET_TOKEN('ORGANIZATION_ID', p_organization_id);
10271: FND_MESSAGE.SET_TOKEN('INVENTORY_ITEM_ID', p_inventory_item_id);
10272: FND_MSG_PUB.ADD;
10273: RAISE FND_API.G_EXC_ERROR;
10274: END IF;
10275: CLOSE get_item_details;
10276:
10277: --{

Line 10282: RAISE FND_API.G_EXC_ERROR;

10278: IF (l_tracking_quantity_ind = 'P') THEN
10279: IF (p_secondary_quantity IS NOT NULL) THEN
10280: FND_MESSAGE.SET_NAME('INV','INV_SECONDARY_QTY_NOT_REQUIRED');
10281: FND_MSG_PUB.ADD;
10282: RAISE FND_API.G_EXC_ERROR;
10283: END IF;
10284:
10285: IF (p_secondary_uom_code IS NOT NULL) THEN
10286: FND_MESSAGE.SET_NAME('INV','INV_SECONDARY_UOM_NOT_REQUIRED');

Line 10288: RAISE FND_API.G_EXC_ERROR;

10284:
10285: IF (p_secondary_uom_code IS NOT NULL) THEN
10286: FND_MESSAGE.SET_NAME('INV','INV_SECONDARY_UOM_NOT_REQUIRED');
10287: FND_MSG_PUB.ADD;
10288: RAISE FND_API.G_EXC_ERROR;
10289: END IF;
10290:
10291: ELSIF (l_tracking_quantity_ind = 'PS') THEN
10292: -- the item is DUOM controlled

Line 10298: RAISE FND_API.G_EXC_ERROR;

10294: /** UOM Validation **/
10295: IF (p_secondary_uom_code <> l_secondary_uom_code) THEN
10296: FND_MESSAGE.SET_NAME('INV','INV_INCORRECT_SECONDARY_UOM');
10297: FND_MSG_PUB.ADD;
10298: RAISE FND_API.G_EXC_ERROR;
10299: END IF;
10300:
10301: -- Set the default UOM2 if missing or incorrect:
10302: IF (p_secondary_uom_code IS NULL) THEN

Line 10315: RAISE FND_API.G_EXC_ERROR;

10311: inv_log_util.trace('validate_quantities: Missing both quantities or one qty for no default item ..', g_pkg_name, 9);
10312: END IF;
10313: FND_MESSAGE.SET_NAME('INV','INV_INT_QTYCODE');
10314: FND_MSG_PUB.ADD;
10315: RAISE FND_API.G_EXC_ERROR;
10316: END IF;
10317: --{
10318: IF (p_secondary_quantity IS NULL) THEN
10319: -- Set the Qty2 from Qty1 if missing:

Line 10337: RAISE FND_API.G_EXC_ERROR;

10333: inv_log_util.trace('validate_quantities: INV_CONVERT.INV_UM_CONVERT error ', g_pkg_name, 9);
10334: END IF;
10335: FND_MESSAGE.SET_NAME('INV','INV_NO_CONVERSION_ERR');
10336: FND_MSG_PUB.ADD;
10337: RAISE FND_API.G_EXC_ERROR;
10338: END IF;
10339: p_secondary_quantity := l_secondary_qty;
10340: IF (l_debug = 1) THEN
10341: inv_log_util.trace('validate_quantities: new secondary qty is: '|| l_secondary_qty , g_pkg_name, 9);

Line 10362: RAISE FND_API.G_EXC_ERROR;

10358: inv_log_util.trace('validate_quantities: INV_CONVERT.INV_UM_CONVERT ERROR ', g_pkg_name, 9);
10359: END IF;
10360: FND_MESSAGE.SET_NAME('INV','INV_NO_CONVERSION_ERR');
10361: FND_MSG_PUB.ADD;
10362: RAISE FND_API.G_EXC_ERROR;
10363: END IF;
10364: p_transaction_quantity := l_transaction_quantity;
10365: IF (l_debug = 1) THEN
10366: inv_log_util.trace('validate_quantities: new transaction qty is: '|| l_transaction_quantity , g_pkg_name, 9);

Line 10393: RAISE FND_API.G_EXC_ERROR;

10389: ' p_secondary_uom_code: ' || p_secondary_uom_code, g_pkg_name, 9);
10390: inv_log_util.trace(' p_lot_number: ' || p_lot_number || ' p_inventory_item_id: '||
10391: p_inventory_item_id || ' p_organization_id: ' || p_organization_id, g_pkg_name, 9);
10392: END IF;
10393: RAISE FND_API.G_EXC_ERROR;
10394: END IF;
10395: IF (l_debug = 1) THEN
10396: inv_log_util.trace('validate_quantities: INV_CONVERT.within_deviation (PASS)' , g_pkg_name, 9);
10397: END IF;

Line 10420: RAISE FND_API.G_EXC_ERROR;

10416: inv_log_util.trace('validate_quantities: INV_CONVERT.INV_UM_CONVERT error ', g_pkg_name, 9);
10417: END IF;
10418: FND_MESSAGE.SET_NAME('INV','INV_NO_CONVERSION_ERR');
10419: FND_MSG_PUB.ADD;
10420: RAISE FND_API.G_EXC_ERROR;
10421: END IF;
10422: p_primary_quantity := l_primary_quantity;
10423: IF (l_debug = 1) THEN
10424: inv_log_util.trace('validate_quantities: new primary qty is: '|| l_primary_quantity , g_pkg_name, 9);

Line 10454: RAISE FND_API.G_EXC_ERROR;

10450: -- the transaction is not valid regarding lot indivisible:
10451: IF (l_debug = 1) THEN
10452: inv_log_util.trace('validate_quantities: INV_LOT_API_PUB.VALIDATE_LOT_INDIVISIBLE (ERROR)', g_pkg_name, 9);
10453: END IF;
10454: RAISE FND_API.G_EXC_ERROR;
10455: END IF;
10456: IF (l_debug = 1) THEN
10457: inv_log_util.trace('validate_quantities: INV_LOT_API_PUB.VALIDATE_LOT_INDIVISIBLE (PASS) ', g_pkg_name, 9);
10458: END IF;

Line 10469: WHEN FND_API.G_EXC_ERROR THEN

10465:
10466: RETURN TRUE;
10467:
10468: EXCEPTION
10469: WHEN FND_API.G_EXC_ERROR THEN
10470: x_return_status := FND_API.G_RET_STS_ERROR;
10471: IF (l_debug = 1) THEN
10472: inv_log_util.trace('validate_quantities: FND_API.G_EXC_ERROR ', g_pkg_name, 9);
10473: END IF;

Line 10470: x_return_status := FND_API.G_RET_STS_ERROR;

10466: RETURN TRUE;
10467:
10468: EXCEPTION
10469: WHEN FND_API.G_EXC_ERROR THEN
10470: x_return_status := FND_API.G_RET_STS_ERROR;
10471: IF (l_debug = 1) THEN
10472: inv_log_util.trace('validate_quantities: FND_API.G_EXC_ERROR ', g_pkg_name, 9);
10473: END IF;
10474: FND_MSG_PUB.Count_AND_GET (p_count => x_msg_count, p_data => x_msg_data);

Line 10472: inv_log_util.trace('validate_quantities: FND_API.G_EXC_ERROR ', g_pkg_name, 9);

10468: EXCEPTION
10469: WHEN FND_API.G_EXC_ERROR THEN
10470: x_return_status := FND_API.G_RET_STS_ERROR;
10471: IF (l_debug = 1) THEN
10472: inv_log_util.trace('validate_quantities: FND_API.G_EXC_ERROR ', g_pkg_name, 9);
10473: END IF;
10474: FND_MSG_PUB.Count_AND_GET (p_count => x_msg_count, p_data => x_msg_data);
10475: RETURN FALSE;
10476:

Line 10477: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

10473: END IF;
10474: FND_MSG_PUB.Count_AND_GET (p_count => x_msg_count, p_data => x_msg_data);
10475: RETURN FALSE;
10476:
10477: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
10478: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
10479: IF (l_debug = 1) THEN
10480: inv_log_util.trace('validate_quantities:when unexp sqlcode= '||sqlcode||' sqlerrm= '||substr(sqlerrm,1,240), g_pkg_name, 9);
10481: END IF;

Line 10478: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

10474: FND_MSG_PUB.Count_AND_GET (p_count => x_msg_count, p_data => x_msg_data);
10475: RETURN FALSE;
10476:
10477: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
10478: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
10479: IF (l_debug = 1) THEN
10480: inv_log_util.trace('validate_quantities:when unexp sqlcode= '||sqlcode||' sqlerrm= '||substr(sqlerrm,1,240), g_pkg_name, 9);
10481: END IF;
10482: FND_MSG_PUB.Count_AND_GET (p_count => x_msg_count, p_data => x_msg_data);

Line 10486: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

10482: FND_MSG_PUB.Count_AND_GET (p_count => x_msg_count, p_data => x_msg_data);
10483: RETURN FALSE;
10484:
10485: WHEN OTHERS THEN
10486: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
10487: IF (l_debug = 1) THEN
10488: inv_log_util.trace('validate_quantities:when others sqlcode= '||sqlcode||' sqlerrm= '||substr(sqlerrm,1,240), g_pkg_name, 9);
10489: END IF;
10490: FND_MSG_PUB.Count_AND_GET (p_count => x_msg_count, p_data => x_msg_data);