DBA Data[Home] [Help]

APPS.INV_LOT_API_PUB dependencies on FND_API

Line 133: x_return_status := fnd_api.g_ret_sts_error;

129: if (l_ret_status) then
130: print_debug('validate_lot_status: Returned true from validate_mtstatus ', 9);
131: else
132: print_debug('validate_lot_status: Returned false from validate_mtstatus ', 9);
133: x_return_status := fnd_api.g_ret_sts_error;
134: x_msg_data := fnd_message.GET_STRING('INV', 'INV_STATUS_UPD_RESV_FAIL');
135: x_msg_count := 1;
136: return;
137: end if;

Line 166: x_return_status := fnd_api.g_ret_sts_success;

162:
163: print_debug('validate_lot_status: Return status from inv_material_status_grp.update_status: '||x_return_status, 9);
164: END IF;
165: ELSIF (l_lot_status_enabled = 'N' ) then
166: x_return_status := fnd_api.g_ret_sts_success;
167: x_msg_data := fnd_message.GET_STRING('INV', 'INV_NOT_VALID');
168: x_msg_count := 1;
169: END IF;
170: /* End of Fix for Bug8647949 */

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

171:
172: EXCEPTION
173: WHEN OTHERS THEN
174: x_return_status := g_ret_sts_unexp_error;
175: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
176: if( x_msg_count > 1 ) then
177: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);
178: end if;
179: print_debug('validate_lot_status: In others ' || SQLERRM, 9);

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

173: WHEN OTHERS THEN
174: x_return_status := g_ret_sts_unexp_error;
175: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
176: if( x_msg_count > 1 ) then
177: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);
178: end if;
179: print_debug('validate_lot_status: In others ' || SQLERRM, 9);
180: END validate_lot_status;
181:

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

324: END;
325:
326: PROCEDURE insertlot (
327: p_api_version IN NUMBER,
328: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
329: p_commit IN VARCHAR2 := fnd_api.g_false,
330: p_validation_level IN NUMBER
331: := fnd_api.g_valid_level_full,
332: p_inventory_item_id IN NUMBER,

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

325:
326: PROCEDURE insertlot (
327: p_api_version IN NUMBER,
328: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
329: p_commit IN VARCHAR2 := fnd_api.g_false,
330: p_validation_level IN NUMBER
331: := fnd_api.g_valid_level_full,
332: p_inventory_item_id IN NUMBER,
333: p_organization_id IN NUMBER,

Line 331: := fnd_api.g_valid_level_full,

327: p_api_version IN NUMBER,
328: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
329: p_commit IN VARCHAR2 := fnd_api.g_false,
330: p_validation_level IN NUMBER
331: := fnd_api.g_valid_level_full,
332: p_inventory_item_id IN NUMBER,
333: p_organization_id IN NUMBER,
334: p_lot_number IN VARCHAR2,
335: p_expiration_date IN OUT NOCOPY DATE,

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

457: -- Standard Start of API savepoint
458: SAVEPOINT apiinsertlot_apipub;
459:
460: -- Standard call to check for call compatibility.
461: IF NOT fnd_api.compatible_api_call ( l_api_version, p_api_version, l_api_name, g_pkg_name) THEN
462: RAISE fnd_api.g_exc_unexpected_error;
463: END IF;
464:
465: -- Initialize message list if p_init_msg_list is set to TRUE.

Line 462: RAISE fnd_api.g_exc_unexpected_error;

458: SAVEPOINT apiinsertlot_apipub;
459:
460: -- Standard call to check for call compatibility.
461: IF NOT fnd_api.compatible_api_call ( l_api_version, p_api_version, l_api_name, g_pkg_name) THEN
462: RAISE fnd_api.g_exc_unexpected_error;
463: END IF;
464:
465: -- Initialize message list if p_init_msg_list is set to TRUE.
466: IF fnd_api.to_boolean ( p_init_msg_list ) THEN

Line 466: IF fnd_api.to_boolean ( p_init_msg_list ) THEN

462: RAISE fnd_api.g_exc_unexpected_error;
463: END IF;
464:
465: -- Initialize message list if p_init_msg_list is set to TRUE.
466: IF fnd_api.to_boolean ( p_init_msg_list ) THEN
467: fnd_msg_pub.initialize;
468: END IF;
469:
470: -- Initialize API return status to success

Line 471: x_return_status := fnd_api.g_ret_sts_success;

467: fnd_msg_pub.initialize;
468: END IF;
469:
470: -- Initialize API return status to success
471: x_return_status := fnd_api.g_ret_sts_success;
472:
473: -- API body
474: IF ( g_firstscan = TRUE AND p_transaction_action_id = 3) THEN
475: x_return_status := fnd_api.g_ret_sts_success;

Line 475: x_return_status := fnd_api.g_ret_sts_success;

471: x_return_status := fnd_api.g_ret_sts_success;
472:
473: -- API body
474: IF ( g_firstscan = TRUE AND p_transaction_action_id = 3) THEN
475: x_return_status := fnd_api.g_ret_sts_success;
476: ELSE
477: BEGIN
478: SELECT lot_control_code
479: INTO l_lot_control_code

Line 488: x_return_status := fnd_api.g_ret_sts_error;

484: IF ( l_lot_control_code = 1 )
485: THEN
486: fnd_message.set_name ('INV' , 'INV_NO_LOT_CONTROL' );
487: fnd_msg_pub.ADD;
488: x_return_status := fnd_api.g_ret_sts_error;
489: RAISE fnd_api.g_exc_unexpected_error;
490: END IF;
491: EXCEPTION
492: WHEN NO_DATA_FOUND

Line 489: RAISE fnd_api.g_exc_unexpected_error;

485: THEN
486: fnd_message.set_name ('INV' , 'INV_NO_LOT_CONTROL' );
487: fnd_msg_pub.ADD;
488: x_return_status := fnd_api.g_ret_sts_error;
489: RAISE fnd_api.g_exc_unexpected_error;
490: END IF;
491: EXCEPTION
492: WHEN NO_DATA_FOUND
493: THEN

Line 499: x_return_status := fnd_api.g_ret_sts_error;

495: inv_pick_wave_pick_confirm_pub.tracelog ( 'Exception in LOT_CONTROL_CODE' , 'INV_LOT_API_PUB');
496: END IF;
497: fnd_message.set_name ('INV' , 'INV_INVALID_ITEM' );
498: fnd_msg_pub.ADD;
499: x_return_status := fnd_api.g_ret_sts_error;
500: RAISE fnd_api.g_exc_unexpected_error;
501: END;
502:
503: SELECT lot_number_uniqueness

Line 500: RAISE fnd_api.g_exc_unexpected_error;

496: END IF;
497: fnd_message.set_name ('INV' , 'INV_INVALID_ITEM' );
498: fnd_msg_pub.ADD;
499: x_return_status := fnd_api.g_ret_sts_error;
500: RAISE fnd_api.g_exc_unexpected_error;
501: END;
502:
503: SELECT lot_number_uniqueness
504: INTO l_lotunique

Line 530: x_return_status := fnd_api.g_ret_sts_error;

526:
527: IF ( l_lotcount > 0 ) THEN
528: fnd_message.set_name ('INV' , 'INV_INT_LOTUNIQEXP' );
529: fnd_msg_pub.ADD;
530: x_return_status := fnd_api.g_ret_sts_error;
531: RAISE fnd_api.g_exc_unexpected_error;
532: IF (l_debug = 1) THEN
533: inv_pick_wave_pick_confirm_pub.tracelog ( 'Exception in MTL_LOT_NUMBER' , 'INV_LOT_API_PUB');
534: END IF;

Line 531: RAISE fnd_api.g_exc_unexpected_error;

527: IF ( l_lotcount > 0 ) THEN
528: fnd_message.set_name ('INV' , 'INV_INT_LOTUNIQEXP' );
529: fnd_msg_pub.ADD;
530: x_return_status := fnd_api.g_ret_sts_error;
531: RAISE fnd_api.g_exc_unexpected_error;
532: IF (l_debug = 1) THEN
533: inv_pick_wave_pick_confirm_pub.tracelog ( 'Exception in MTL_LOT_NUMBER' , 'INV_LOT_API_PUB');
534: END IF;
535: END IF;

Line 567: x_return_status := fnd_api.g_ret_sts_error;

563: FROM DUAL;
564: ELSIF ( l_shelf_life_code = 4 ) THEN
565: fnd_message.set_name ('INV' , 'INV_LOT_EXPREQD' );
566: fnd_msg_pub.ADD;
567: x_return_status := fnd_api.g_ret_sts_error;
568: RAISE fnd_api.g_exc_unexpected_error;
569: END IF;
570: END IF;
571:

Line 568: RAISE fnd_api.g_exc_unexpected_error;

564: ELSIF ( l_shelf_life_code = 4 ) THEN
565: fnd_message.set_name ('INV' , 'INV_LOT_EXPREQD' );
566: fnd_msg_pub.ADD;
567: x_return_status := fnd_api.g_ret_sts_error;
568: RAISE fnd_api.g_exc_unexpected_error;
569: END IF;
570: END IF;
571:
572: IF (l_debug = 1) THEN

Line 1086: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

1082:
1083: end if;
1084: EXCEPTION
1085: when no_data_found THEN
1086: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1087: IF (l_debug = 1) THEN
1088: inv_log_util.trace('SQL : ' || substr(sqlerrm, 1, 200), 'INV_LOT_API_PUB','9');
1089: inv_log_util.trace('Error in insertLot : ', 'INV_LOT_API_PUB','9');
1090: END IF;

Line 1091: raise FND_API.G_EXC_UNEXPECTED_ERROR;

1087: IF (l_debug = 1) THEN
1088: inv_log_util.trace('SQL : ' || substr(sqlerrm, 1, 200), 'INV_LOT_API_PUB','9');
1089: inv_log_util.trace('Error in insertLot : ', 'INV_LOT_API_PUB','9');
1090: END IF;
1091: raise FND_API.G_EXC_UNEXPECTED_ERROR;
1092: when others then
1093: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1094: IF (l_debug = 1) THEN
1095: inv_log_util.trace('SQL : ' || substr(sqlerrm, 1, 200), 'INV_LOT_API_PUB','9');

Line 1093: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

1089: inv_log_util.trace('Error in insertLot : ', 'INV_LOT_API_PUB','9');
1090: END IF;
1091: raise FND_API.G_EXC_UNEXPECTED_ERROR;
1092: when others then
1093: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1094: IF (l_debug = 1) THEN
1095: inv_log_util.trace('SQL : ' || substr(sqlerrm, 1, 200), 'INV_LOT_API_PUB','9');
1096: inv_log_util.trace('Error in insertLot : ', 'INV_LOT_API_PUB','9');
1097: END IF;

Line 1098: raise FND_API.G_EXC_UNEXPECTED_ERROR;

1094: IF (l_debug = 1) THEN
1095: inv_log_util.trace('SQL : ' || substr(sqlerrm, 1, 200), 'INV_LOT_API_PUB','9');
1096: inv_log_util.trace('Error in insertLot : ', 'INV_LOT_API_PUB','9');
1097: END IF;
1098: raise FND_API.G_EXC_UNEXPECTED_ERROR;
1099:
1100: end;
1101:
1102: -- to prepare to insert the status to status history table for the initial status

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

1137: IF (l_debug = 1) THEN
1138: inv_pick_wave_pick_confirm_pub.tracelog ( 'After get_default' , 'INV_LOT_API_PUB');
1139: END IF;
1140:
1141: IF ( l_return_status <> fnd_api.g_ret_sts_success ) THEN
1142: IF (l_debug = 1) THEN
1143: inv_pick_wave_pick_confirm_pub.tracelog ( 'exception of get_default' , 'INV_LOT_API_PUB');
1144: END IF;
1145: x_return_status := l_return_status;

Line 1146: RAISE fnd_api.g_exc_unexpected_error;

1142: IF (l_debug = 1) THEN
1143: inv_pick_wave_pick_confirm_pub.tracelog ( 'exception of get_default' , 'INV_LOT_API_PUB');
1144: END IF;
1145: x_return_status := l_return_status;
1146: RAISE fnd_api.g_exc_unexpected_error;
1147: END IF;
1148:
1149: /********************************************************************
1150: Bug 2181558 - Code Starts

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

1187: p_count => l_attributes_default_count,
1188: p_source_wms_lot_att_tbl => l_attributes_default
1189: );
1190:
1191: IF ( l_return_status <> fnd_api.g_ret_sts_success ) THEN
1192: x_return_status := l_return_status;
1193: RAISE fnd_api.g_exc_unexpected_error;
1194: END IF;
1195:

Line 1193: RAISE fnd_api.g_exc_unexpected_error;

1189: );
1190:
1191: IF ( l_return_status <> fnd_api.g_ret_sts_success ) THEN
1192: x_return_status := l_return_status;
1193: RAISE fnd_api.g_exc_unexpected_error;
1194: END IF;
1195:
1196: l_attributes_default := l_att_after_source_copy;
1197: l_attributes_default_count := l_num_wms_lot_att_copied;

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

1250: IF (l_debug = 1) THEN
1251: inv_pick_wave_pick_confirm_pub.tracelog ( 'After get_lot_Serial_status_control' , 'INV_LOT_API_PUB');
1252: END IF;
1253:
1254: IF ( l_return_status <> fnd_api.g_ret_sts_success ) THEN
1255: x_return_status := l_return_status;
1256: RAISE fnd_api.g_exc_unexpected_error;
1257: END IF;
1258:

Line 1256: RAISE fnd_api.g_exc_unexpected_error;

1252: END IF;
1253:
1254: IF ( l_return_status <> fnd_api.g_ret_sts_success ) THEN
1255: x_return_status := l_return_status;
1256: RAISE fnd_api.g_exc_unexpected_error;
1257: END IF;
1258:
1259: IF ( NVL ( l_lot_status_enabled, 'Y' ) = 'Y' ) THEN
1260: -- For consistency, fill after converting to 'char'

Line 1508: x_return_status := fnd_api.g_ret_sts_success;

1504: inv_pick_wave_pick_confirm_pub.tracelog ( 'after calling insert_status_history' , 'INV_LOT_API_PUB');
1505: END IF;
1506: END IF;
1507:
1508: x_return_status := fnd_api.g_ret_sts_success;
1509: ELSE
1510: IF (l_debug = 1) THEN
1511: inv_pick_wave_pick_confirm_pub.tracelog ( 'INV_LOT_EXISTS' , 'INV_LOT_API_PUB');
1512: END IF;

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

1511: inv_pick_wave_pick_confirm_pub.tracelog ( 'INV_LOT_EXISTS' , 'INV_LOT_API_PUB');
1512: END IF;
1513: fnd_message.set_name ('INV' , 'INV_LOT_EXISTS' );
1514: fnd_msg_pub.ADD;
1515: --l_return_status := FND_API.G_RET_STS_SUCCESS;
1516: x_return_status := fnd_api.g_ret_sts_success;
1517: END IF;
1518:
1519: IF (l_lotcount > 0 AND p_expiration_date IS NOT NULL) THEN

Line 1516: x_return_status := fnd_api.g_ret_sts_success;

1512: END IF;
1513: fnd_message.set_name ('INV' , 'INV_LOT_EXISTS' );
1514: fnd_msg_pub.ADD;
1515: --l_return_status := FND_API.G_RET_STS_SUCCESS;
1516: x_return_status := fnd_api.g_ret_sts_success;
1517: END IF;
1518:
1519: IF (l_lotcount > 0 AND p_expiration_date IS NOT NULL) THEN
1520:

Line 1546: IF fnd_api.to_boolean ( p_commit ) THEN

1542: IF (l_debug = 1) THEN
1543: inv_pick_wave_pick_confirm_pub.tracelog ( 'Inserted the Lot ' || p_lot_number, 'INV_LOT_API_PUB');
1544: END IF;
1545:
1546: IF fnd_api.to_boolean ( p_commit ) THEN
1547: COMMIT WORK;
1548: END IF;
1549:
1550: -- Standard call to get message count and if count is 1, get message info.

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

1547: COMMIT WORK;
1548: END IF;
1549:
1550: -- Standard call to get message count and if count is 1, get message info.
1551: fnd_msg_pub.count_and_get ( p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
1552: --x_return_status := l_return_status;
1553:
1554: --print_debug('end insertlot', 4);
1555:

Line 1569: x_return_status := fnd_api.g_ret_sts_unexp_error;

1565: IF fnd_msg_pub.check_msg_level ( fnd_msg_pub.g_msg_lvl_unexp_error) THEN
1566: fnd_msg_pub.add_exc_msg ('INV_LOT_API_PUB' , 'insertLot' );
1567: END IF;
1568:
1569: x_return_status := fnd_api.g_ret_sts_unexp_error;
1570: END insertlot;
1571:
1572: PROCEDURE inserttrxlot (
1573: p_api_version IN NUMBER,

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

1570: END insertlot;
1571:
1572: PROCEDURE inserttrxlot (
1573: p_api_version IN NUMBER,
1574: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
1575: p_commit IN VARCHAR2 := fnd_api.g_false,
1576: p_validation_level IN NUMBER
1577: := fnd_api.g_valid_level_full,
1578: p_primary_quantity IN NUMBER DEFAULT NULL,

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

1571:
1572: PROCEDURE inserttrxlot (
1573: p_api_version IN NUMBER,
1574: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
1575: p_commit IN VARCHAR2 := fnd_api.g_false,
1576: p_validation_level IN NUMBER
1577: := fnd_api.g_valid_level_full,
1578: p_primary_quantity IN NUMBER DEFAULT NULL,
1579: p_transaction_id IN NUMBER,

Line 1577: := fnd_api.g_valid_level_full,

1573: p_api_version IN NUMBER,
1574: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
1575: p_commit IN VARCHAR2 := fnd_api.g_false,
1576: p_validation_level IN NUMBER
1577: := fnd_api.g_valid_level_full,
1578: p_primary_quantity IN NUMBER DEFAULT NULL,
1579: p_transaction_id IN NUMBER,
1580: p_inventory_item_id IN NUMBER,
1581: p_organization_id IN NUMBER,

Line 1689: IF NOT fnd_api.compatible_api_call (

1685: -- Standard Start of API savepoint
1686: SAVEPOINT apiinsertlot_apipub;
1687:
1688: -- Standard call to check for call compatibility.
1689: IF NOT fnd_api.compatible_api_call (
1690: l_api_version,
1691: p_api_version,
1692: l_api_name,
1693: g_pkg_name

Line 1696: RAISE fnd_api.g_exc_unexpected_error;

1692: l_api_name,
1693: g_pkg_name
1694: )
1695: THEN
1696: RAISE fnd_api.g_exc_unexpected_error;
1697: END IF;
1698:
1699: -- Initialize message list if p_init_msg_list is set to TRUE.
1700: IF fnd_api.to_boolean ( p_init_msg_list )

Line 1700: IF fnd_api.to_boolean ( p_init_msg_list )

1696: RAISE fnd_api.g_exc_unexpected_error;
1697: END IF;
1698:
1699: -- Initialize message list if p_init_msg_list is set to TRUE.
1700: IF fnd_api.to_boolean ( p_init_msg_list )
1701: THEN
1702: fnd_msg_pub.initialize;
1703: END IF;
1704:

Line 1706: x_return_status := fnd_api.g_ret_sts_success;

1702: fnd_msg_pub.initialize;
1703: END IF;
1704:
1705: -- Initialize API return status to success
1706: x_return_status := fnd_api.g_ret_sts_success;
1707: -- API body
1708:
1709: if( l_debug = 1 ) then
1710: print_debug('Calling populateattributescolumn()', 10);

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

2068: p_lot_serial_number => p_lot_number,
2069: p_attributes => l_attributes_in
2070: );
2071:
2072: IF ( l_return_status <> fnd_api.g_ret_sts_success )
2073: THEN
2074: x_return_status := l_return_status;
2075: RAISE fnd_api.g_exc_unexpected_error;
2076: END IF;

Line 2075: RAISE fnd_api.g_exc_unexpected_error;

2071:
2072: IF ( l_return_status <> fnd_api.g_ret_sts_success )
2073: THEN
2074: x_return_status := l_return_status;
2075: RAISE fnd_api.g_exc_unexpected_error;
2076: END IF;
2077:
2078: IF ( l_attributes_default_count > 0 )
2079: THEN

Line 2384: x_return_status := fnd_api.g_ret_sts_success;

2380: )
2381: AND mtln.transaction_id = p_transaction_id );
2382:
2383: -- Hack for bug 2130268
2384: x_return_status := fnd_api.g_ret_sts_success;
2385: END IF;
2386:
2387: IF ( fnd_api.to_boolean ( p_commit ) )
2388: THEN

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

2383: -- Hack for bug 2130268
2384: x_return_status := fnd_api.g_ret_sts_success;
2385: END IF;
2386:
2387: IF ( fnd_api.to_boolean ( p_commit ) )
2388: THEN
2389: COMMIT;
2390: END IF;
2391:

Line 2394: p_encoded => fnd_api.g_false,

2390: END IF;
2391:
2392: -- Standard call to get message count and if count is 1, get message info.
2393: fnd_msg_pub.count_and_get (
2394: p_encoded => fnd_api.g_false,
2395: p_count => x_msg_count,
2396: p_data => x_msg_data
2397: );
2398: EXCEPTION

Line 2410: x_return_status := fnd_api.g_ret_sts_unexp_error;

2406: THEN
2407: fnd_msg_pub.add_exc_msg ('INV_LOT_API_PUB' , 'insertLot' );
2408: END IF;
2409:
2410: x_return_status := fnd_api.g_ret_sts_unexp_error;
2411: END inserttrxlot;
2412:
2413: FUNCTION validate_unique_lot (
2414: p_org_id IN NUMBER,

Line 2468: RAISE fnd_api.g_exc_error;

2464: WHERE organization_id = p_org_id;
2465: EXCEPTION
2466: WHEN NO_DATA_FOUND
2467: THEN
2468: RAISE fnd_api.g_exc_error;
2469: END;
2470: END IF;
2471:
2472: IF ( l_lot_uniqueness = 1 ) -- Item level control

Line 2561: x_return_status := fnd_api.g_ret_sts_success;

2557: l_got_lock BOOLEAN := FALSE;
2558: /* End of changes for bug 8428348 */
2559:
2560: BEGIN
2561: x_return_status := fnd_api.g_ret_sts_success;
2562: IF (l_debug =1 ) THEN
2563: print_debug('before updating msi '||p_lot_prefix,9);
2564: END IF;
2565:

Line 2576: x_return_status := fnd_api.g_ret_sts_error;

2572: , l_return_status);
2573:
2574: IF NOT (l_got_lock) THEN
2575: IF l_return_status <> 'S' THEN
2576: x_return_status := fnd_api.g_ret_sts_error;
2577: END IF;
2578: ROLLBACK;
2579: ELSE /* not (l_got_lock) */
2580: print_debug('Got lock on lot items ', 9);

Line 2621: x_return_status := fnd_api.g_ret_sts_error;

2617: END IF;
2618: fnd_message.set_name ('INV' , 'INV_LOT_AUTOGEN_FAILED' ); -- Bug# 7298723
2619: -- fnd_message.set_token ('ENTITY1' , 'Item with last lot number' ); -- Bug# 7298723
2620: fnd_msg_pub.ADD;
2621: x_return_status := fnd_api.g_ret_sts_error;
2622: --AND inventory_item_id = p_inventory_item_id;
2623: END IF;
2624: END IF; /* if not (l_got_lock) */
2625: END;

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

2721: p_transaction_action_id IN NUMBER := NULL,
2722: p_transaction_source_type_id IN NUMBER := NULL,
2723: p_lot_number IN VARCHAR2 := NULL,
2724: p_api_version IN NUMBER,
2725: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
2726: p_commit IN VARCHAR2 := fnd_api.g_false,
2727: p_validation_level IN NUMBER
2728: := fnd_api.g_valid_level_full,
2729: p_parent_lot_number IN VARCHAR2,

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

2722: p_transaction_source_type_id IN NUMBER := NULL,
2723: p_lot_number IN VARCHAR2 := NULL,
2724: p_api_version IN NUMBER,
2725: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
2726: p_commit IN VARCHAR2 := fnd_api.g_false,
2727: p_validation_level IN NUMBER
2728: := fnd_api.g_valid_level_full,
2729: p_parent_lot_number IN VARCHAR2,
2730: x_return_status OUT NOCOPY VARCHAR2,

Line 2728: := fnd_api.g_valid_level_full,

2724: p_api_version IN NUMBER,
2725: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
2726: p_commit IN VARCHAR2 := fnd_api.g_false,
2727: p_validation_level IN NUMBER
2728: := fnd_api.g_valid_level_full,
2729: p_parent_lot_number IN VARCHAR2,
2730: x_return_status OUT NOCOPY VARCHAR2,
2731: x_msg_count OUT NOCOPY NUMBER,
2732: x_msg_data OUT NOCOPY VARCHAR2,

Line 2922: IF NOT fnd_api.compatible_api_call (

2918: print_debug('in auto_gen_lot',9);
2919: END IF;
2920: -- Standard call to check for call compatibility.
2921:
2922: IF NOT fnd_api.compatible_api_call (
2923: l_api_version,
2924: p_api_version,
2925: l_api_name,
2926: g_pkg_name

Line 2929: RAISE fnd_api.g_exc_unexpected_error;

2925: l_api_name,
2926: g_pkg_name
2927: )
2928: THEN
2929: RAISE fnd_api.g_exc_unexpected_error;
2930: END IF;
2931:
2932: -- Initialize message list if p_init_msg_list is set to TRUE.
2933: IF fnd_api.to_boolean ( p_init_msg_list )

Line 2933: IF fnd_api.to_boolean ( p_init_msg_list )

2929: RAISE fnd_api.g_exc_unexpected_error;
2930: END IF;
2931:
2932: -- Initialize message list if p_init_msg_list is set to TRUE.
2933: IF fnd_api.to_boolean ( p_init_msg_list )
2934: THEN
2935: fnd_msg_pub.initialize;
2936: END IF;
2937:

Line 2939: x_return_status := fnd_api.g_ret_sts_success;

2935: fnd_msg_pub.initialize;
2936: END IF;
2937:
2938: -- Initialize API return status to success
2939: x_return_status := fnd_api.g_ret_sts_success;
2940:
2941: -- API body
2942:
2943: /*================================================

Line 2963: RAISE fnd_api.g_exc_error;

2959: IF (get_item_data%NOTFOUND) THEN
2960: CLOSE get_item_data;
2961: fnd_message.set_name ('INV' , 'INV_CL_GET_ITEM_ERR' );
2962: fnd_msg_pub.ADD;
2963: RAISE fnd_api.g_exc_error;
2964: END IF;
2965: CLOSE get_item_data;
2966: /*===========================================
2967: Is child_lot split allowed?

Line 2972: RAISE fnd_api.g_exc_error;

2968: ===========================================*/
2969: IF (nvl(x_child_lot_flag,'N') = 'N') THEN
2970: fnd_message.set_name ('INV' , 'INV_CL_CHILD_LOT_DISABLED');
2971: fnd_msg_pub.ADD;
2972: RAISE fnd_api.g_exc_error;
2973: END IF;
2974: /*===========================================
2975: Get the Child lot generation parameters.
2976: ===========================================*/

Line 2987: RAISE fnd_api.g_exc_error;

2983: IF (get_child_parms%NOTFOUND) THEN
2984: CLOSE get_child_parms;
2985: fnd_message.set_name ('INV' , 'INV_CL_GET_PARM_ERR');
2986: fnd_msg_pub.ADD;
2987: RAISE fnd_api.g_exc_error;
2988: END IF;
2989: CLOSE get_child_parms;
2990:
2991:

Line 3020: IF ( x_return_status = fnd_api.g_ret_sts_error )

3016: p_parent_lot_number,
3017: x_return_status
3018: );
3019:
3020: IF ( x_return_status = fnd_api.g_ret_sts_error )
3021: THEN
3022: RAISE fnd_api.g_exc_error;
3023: END IF;
3024:

Line 3022: RAISE fnd_api.g_exc_error;

3018: );
3019:
3020: IF ( x_return_status = fnd_api.g_ret_sts_error )
3021: THEN
3022: RAISE fnd_api.g_exc_error;
3023: END IF;
3024:
3025: IF ( x_return_status = fnd_api.g_ret_sts_unexp_error )
3026: THEN

Line 3025: IF ( x_return_status = fnd_api.g_ret_sts_unexp_error )

3021: THEN
3022: RAISE fnd_api.g_exc_error;
3023: END IF;
3024:
3025: IF ( x_return_status = fnd_api.g_ret_sts_unexp_error )
3026: THEN
3027: RAISE fnd_api.g_exc_unexpected_error;
3028: END IF;
3029: /*===========================================

Line 3027: RAISE fnd_api.g_exc_unexpected_error;

3023: END IF;
3024:
3025: IF ( x_return_status = fnd_api.g_ret_sts_unexp_error )
3026: THEN
3027: RAISE fnd_api.g_exc_unexpected_error;
3028: END IF;
3029: /*===========================================
3030: If child lot generated by user routine then
3031: return it, Otherwise if null then return

Line 3036: RAISE fnd_api.g_exc_error;

3032: ===========================================*/
3033: IF (interim_child_lot_number IS NULL) THEN
3034: fnd_message.set_name ('INV' , 'INV_CL_USER_PGM_ERR');
3035: fnd_msg_pub.ADD;
3036: RAISE fnd_api.g_exc_error;
3037: END IF;
3038: /*=================================
3039: BUG#4145437
3040: =================================*/

Line 3044: RAISE fnd_api.g_exc_error;

3040: =================================*/
3041: IF (lengthb(interim_child_lot_number) > 80) THEN
3042: fnd_message.set_name ('INV' , 'INV_CL_MAX_FLD_LENGTH' );
3043: fnd_msg_pub.ADD;
3044: RAISE fnd_api.g_exc_error;
3045: END IF;
3046:
3047: ELSIF (x_lot_number_generation = 1) THEN
3048: /*====================================

Line 3067: RAISE fnd_api.g_exc_error;

3063: x_last_child_seq);
3064: IF (l_ret <> 0 ) THEN
3065: fnd_message.set_name ('INV','INV_CL_INS_CHILD_ERR');
3066: fnd_msg_pub.ADD;
3067: RAISE fnd_api.g_exc_error;
3068: END IF;
3069: ELSE
3070: CLOSE get_next_child;
3071: x_last_child_seq := x_last_child_seq + 1;

Line 3082: RAISE fnd_api.g_exc_error;

3078: x_last_child_seq);
3079: IF (l_ret <> 0 ) THEN
3080: fnd_message.set_name ('INV','INV_CL_UPD_CHILD_ERR');
3081: fnd_msg_pub.ADD;
3082: RAISE fnd_api.g_exc_error;
3083: END IF;
3084: END IF;
3085: /*===============================
3086: Append Parent to alpha prefix.

Line 3096: RAISE fnd_api.g_exc_error;

3092: IF ( (lengthb(x_interim_child_prefix)
3093: + lengthb(x_last_child_seq)) > 80 ) THEN
3094: fnd_message.set_name ('INV' , 'INV_CL_MAX_FLD_LENGTH' );
3095: fnd_msg_pub.ADD;
3096: RAISE fnd_api.g_exc_error;
3097: END IF;
3098: IF ( (lengthb(x_interim_child_prefix)
3099: + lengthb(x_last_child_seq)) >
3100: x_child_lot_number_length ) THEN

Line 3103: RAISE fnd_api.g_exc_error;

3099: + lengthb(x_last_child_seq)) >
3100: x_child_lot_number_length ) THEN
3101: fnd_message.set_name ('INV' , 'INV_CL_MAX_CHLD_ERR' );
3102: fnd_msg_pub.ADD;
3103: RAISE fnd_api.g_exc_error;
3104: END IF;
3105:
3106: IF (x_child_lot_zero_padding_flag = 'Y') THEN
3107: x_pad_value :=

Line 3174: RAISE fnd_api.g_exc_error;

3170: x_last_child_seq);
3171: IF (l_ret <> 0 ) THEN
3172: fnd_message.set_name ('INV','INV_CL_INS_CHILD_ERR');
3173: fnd_msg_pub.ADD;
3174: RAISE fnd_api.g_exc_error;
3175: END IF;
3176: ELSE
3177: CLOSE get_next_child;
3178: x_last_child_seq := x_last_child_seq + 1;

Line 3189: RAISE fnd_api.g_exc_error;

3185: x_last_child_seq);
3186: IF (l_ret <> 0 ) THEN
3187: fnd_message.set_name ('INV','INV_CL_UPD_CHILD_ERR');
3188: fnd_msg_pub.ADD;
3189: RAISE fnd_api.g_exc_error;
3190: END IF;
3191: END IF;
3192: /*===============================
3193: Append Parent to alpha prefix.

Line 3201: RAISE fnd_api.g_exc_error;

3197: IF ( (lengthb(x_interim_child_prefix)
3198: + lengthb(x_last_child_seq)) > 80 ) THEN
3199: fnd_message.set_name ('INV' , 'INV_CL_MAX_FLD_ERR' );
3200: fnd_msg_pub.ADD;
3201: RAISE fnd_api.g_exc_error;
3202: END IF;
3203: --temp joe what is length for item child?
3204: interim_child_lot_number :=
3205: x_interim_child_prefix||x_last_child_seq;

Line 3265: FND_API.G_RET_STS_SUCCESS */

3261: /* call the procedure (USER_GENERATE_LOT_NUMBER) to allow the users to
3262: have custom defined lot numbers instead of using the lot numbers
3263: generated by Inventory) . If this procedure is not coded by the users
3264: then it will return a NULL lot number, x_return_status =
3265: FND_API.G_RET_STS_SUCCESS */
3266: /* Fixed bug 2075044 -- added the while loop to generate the lot number.
3267: Check if the generated lot is existed in the mtl_lot_number, then generate
3268: a new lot again. */
3269:

Line 3294: RAISE fnd_api.g_exc_error;

3290: IF (get_child_parms%NOTFOUND) THEN
3291: CLOSE get_child_parms;
3292: fnd_message.set_name ('INV' , 'INV_CL_GET_PARM_ERR');
3293: fnd_msg_pub.ADD;
3294: RAISE fnd_api.g_exc_error;
3295: END IF;
3296: CLOSE get_child_parms;
3297: IF (x_lot_number_generation = 3) THEN
3298: auto_lot_number :=

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

3312: p_parent_lot_number,
3313: x_return_status
3314: );
3315:
3316: IF ( x_return_status = fnd_api.g_ret_sts_error ) THEN
3317: RAISE fnd_api.g_exc_error;
3318: END IF;
3319:
3320: IF ( x_return_status = fnd_api.g_ret_sts_unexp_error ) THEN

Line 3317: RAISE fnd_api.g_exc_error;

3313: x_return_status
3314: );
3315:
3316: IF ( x_return_status = fnd_api.g_ret_sts_error ) THEN
3317: RAISE fnd_api.g_exc_error;
3318: END IF;
3319:
3320: IF ( x_return_status = fnd_api.g_ret_sts_unexp_error ) THEN
3321: RAISE fnd_api.g_exc_unexpected_error;

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

3316: IF ( x_return_status = fnd_api.g_ret_sts_error ) THEN
3317: RAISE fnd_api.g_exc_error;
3318: END IF;
3319:
3320: IF ( x_return_status = fnd_api.g_ret_sts_unexp_error ) THEN
3321: RAISE fnd_api.g_exc_unexpected_error;
3322: END IF;
3323:
3324: END IF; -- gen is 3

Line 3321: RAISE fnd_api.g_exc_unexpected_error;

3317: RAISE fnd_api.g_exc_error;
3318: END IF;
3319:
3320: IF ( x_return_status = fnd_api.g_ret_sts_unexp_error ) THEN
3321: RAISE fnd_api.g_exc_unexpected_error;
3322: END IF;
3323:
3324: END IF; -- gen is 3
3325: /* If i/p parameter p_lot_generation or p_lot_uniqueness are null that means we do

Line 3351: RAISE fnd_api.g_exc_error;

3347: WHEN NO_DATA_FOUND THEN
3348: fnd_message.set_name ('INV' , 'INV_FIELD_INVALID' );
3349: fnd_message.set_token ('ENTITY1' , 'p_org_id' );
3350: fnd_msg_pub.ADD;
3351: RAISE fnd_api.g_exc_error;
3352: END;
3353: END IF;
3354:
3355: /* If the lot number (auto_lot_number) returned by user_defined_procedure is null

Line 3375: RAISE fnd_api.g_exc_error;

3371:
3372: IF ( l_lot_control_code = 1 ) THEN
3373: fnd_message.set_name ( 'INV' , 'INV_NO_LOT_CONTROL');
3374: fnd_msg_pub.ADD;
3375: RAISE fnd_api.g_exc_error;
3376: END IF;
3377: EXCEPTION
3378: WHEN NO_DATA_FOUND THEN
3379: fnd_message.set_name ('INV' , 'INV_INVALID_ITEM' );

Line 3381: RAISE fnd_api.g_exc_error;

3377: EXCEPTION
3378: WHEN NO_DATA_FOUND THEN
3379: fnd_message.set_name ('INV' , 'INV_INVALID_ITEM' );
3380: fnd_msg_pub.ADD;
3381: RAISE fnd_api.g_exc_error;
3382: END;
3383:
3384: BEGIN
3385: -- get prefix and default lot number

Line 3441: IF x_return_status = fnd_api.g_ret_sts_error THEN

3437: lot_generation,
3438: x_return_status,
3439: l_lot_prefix -- Bug# 7298723
3440: );
3441: IF x_return_status = fnd_api.g_ret_sts_error THEN
3442: IF (l_debug = 1) THEN
3443: print_debug('it is an error ',9);
3444: END IF;
3445: RAISE fnd_api.g_exc_error;

Line 3445: RAISE fnd_api.g_exc_error;

3441: IF x_return_status = fnd_api.g_ret_sts_error THEN
3442: IF (l_debug = 1) THEN
3443: print_debug('it is an error ',9);
3444: END IF;
3445: RAISE fnd_api.g_exc_error;
3446: END IF;
3447: END IF;
3448: ELSE -- lot length exceeds 80
3449: fnd_message.set_name ( 'INV' , 'INV_SERIAL_LOT_TOO_LONG');

Line 3452: RAISE fnd_api.g_exc_error;

3448: ELSE -- lot length exceeds 80
3449: fnd_message.set_name ( 'INV' , 'INV_SERIAL_LOT_TOO_LONG');
3450: fnd_message.set_token( 'LENGTH', nvl(lot_length, 80)); -- INVCONV
3451: fnd_msg_pub.ADD;
3452: RAISE fnd_api.g_exc_error;
3453: END IF;
3454: ELSE -- l_lot_suffix is NULL
3455: fnd_message.set_name ( 'INV' , 'INV_FIELD_INVALID');
3456:

Line 3467: RAISE fnd_api.g_exc_error;

3463: AND ITEM.ORGANIZATION_ID = p_org_id;
3464:
3465: fnd_message.set_token ( 'ENTITY1' , 'Lot Suffix for Org: ' || v_org_code || ' and Item: ' || v_item_name);
3466: fnd_msg_pub.ADD;
3467: RAISE fnd_api.g_exc_error;
3468: END IF;
3469: EXCEPTION
3470: WHEN NO_DATA_FOUND THEN
3471: IF (l_debug=1) THEN

Line 3477: RAISE fnd_api.g_exc_error;

3473: END IF;
3474: fnd_message.set_name ('INV' , 'INV_INVALID_ITEM' );
3475: fnd_message.set_token ( 'ENTITY1' , 'p_org_id, p_inventory_item_id');
3476: fnd_msg_pub.ADD;
3477: RAISE fnd_api.g_exc_error;
3478: END;
3479: ELSIF ( lot_generation = 1 ) THEN -- org-level
3480: BEGIN
3481: IF (l_debug =1 ) THEN

Line 3514: RAISE fnd_api.g_exc_error;

3510: ELSE -- lot length exceeds 80
3511: fnd_message.set_name ( 'INV' , 'INV_SERIAL_LOT_TOO_LONG');
3512: fnd_message.set_token( 'LENGTH', nvl(lot_length, 80)); -- INVCONV
3513: fnd_msg_pub.ADD;
3514: RAISE fnd_api.g_exc_error;
3515: END IF;
3516: END;
3517: END IF;
3518: END IF;

Line 3533: RAISE fnd_api.g_exc_error ;

3529: RETURN (auto_lot_number);
3530: ELSE
3531: fnd_message.set_name('INV', 'INV_LOT_NUMBER_EXISTS');
3532: fnd_msg_pub.add;
3533: RAISE fnd_api.g_exc_error ;
3534: END IF;
3535: */
3536:
3537: /* Check if the generated lot is already existed in the mtl_lot_number,

Line 3570: WHEN fnd_api.g_exc_error THEN

3566: print_debug('returning lot number ' || auto_lot_number,9);
3567: END IF;
3568: RETURN ( auto_lot_number );
3569: EXCEPTION
3570: WHEN fnd_api.g_exc_error THEN
3571: ROLLBACK TO apiauto_gen_lot_apipub;
3572: x_return_status := fnd_api.g_ret_sts_error;
3573: fnd_msg_pub.count_and_get (
3574: p_encoded => fnd_api.g_false,

Line 3572: x_return_status := fnd_api.g_ret_sts_error;

3568: RETURN ( auto_lot_number );
3569: EXCEPTION
3570: WHEN fnd_api.g_exc_error THEN
3571: ROLLBACK TO apiauto_gen_lot_apipub;
3572: x_return_status := fnd_api.g_ret_sts_error;
3573: fnd_msg_pub.count_and_get (
3574: p_encoded => fnd_api.g_false,
3575: p_count => x_msg_count,
3576: p_data => x_msg_data

Line 3574: p_encoded => fnd_api.g_false,

3570: WHEN fnd_api.g_exc_error THEN
3571: ROLLBACK TO apiauto_gen_lot_apipub;
3572: x_return_status := fnd_api.g_ret_sts_error;
3573: fnd_msg_pub.count_and_get (
3574: p_encoded => fnd_api.g_false,
3575: p_count => x_msg_count,
3576: p_data => x_msg_data
3577: );
3578: --Bugfix 3940851 {

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

3576: p_data => x_msg_data
3577: );
3578: --Bugfix 3940851 {
3579: if( x_msg_count > 1 ) then
3580: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);
3581: end if;
3582: --Bugfix 3940851 }
3583: RETURN ( NULL );
3584: WHEN fnd_api.g_exc_unexpected_error THEN

Line 3584: WHEN fnd_api.g_exc_unexpected_error THEN

3580: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);
3581: end if;
3582: --Bugfix 3940851 }
3583: RETURN ( NULL );
3584: WHEN fnd_api.g_exc_unexpected_error THEN
3585: ROLLBACK TO apiauto_gen_lot_apipub;
3586: x_return_status := fnd_api.g_ret_sts_unexp_error;
3587: fnd_msg_pub.count_and_get (
3588: p_encoded => fnd_api.g_false,

Line 3586: x_return_status := fnd_api.g_ret_sts_unexp_error;

3582: --Bugfix 3940851 }
3583: RETURN ( NULL );
3584: WHEN fnd_api.g_exc_unexpected_error THEN
3585: ROLLBACK TO apiauto_gen_lot_apipub;
3586: x_return_status := fnd_api.g_ret_sts_unexp_error;
3587: fnd_msg_pub.count_and_get (
3588: p_encoded => fnd_api.g_false,
3589: p_count => x_msg_count,
3590: p_data => x_msg_data

Line 3588: p_encoded => fnd_api.g_false,

3584: WHEN fnd_api.g_exc_unexpected_error THEN
3585: ROLLBACK TO apiauto_gen_lot_apipub;
3586: x_return_status := fnd_api.g_ret_sts_unexp_error;
3587: fnd_msg_pub.count_and_get (
3588: p_encoded => fnd_api.g_false,
3589: p_count => x_msg_count,
3590: p_data => x_msg_data
3591: );
3592: --Bugfix 3940851 {

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

3590: p_data => x_msg_data
3591: );
3592: --Bugfix 3940851 {
3593: if( x_msg_count > 1 ) then
3594: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);
3595: end if;
3596: --Bugfix 3940851 }
3597: RETURN ( NULL );
3598: WHEN OTHERS THEN

Line 3600: x_return_status := fnd_api.g_ret_sts_unexp_error;

3596: --Bugfix 3940851 }
3597: RETURN ( NULL );
3598: WHEN OTHERS THEN
3599: ROLLBACK TO apiauto_gen_lot_apipub;
3600: x_return_status := fnd_api.g_ret_sts_unexp_error;
3601:
3602: IF fnd_msg_pub.check_msg_level ( fnd_msg_pub.g_msg_lvl_unexp_error) THEN
3603: fnd_msg_pub.add_exc_msg ( g_pkg_name, l_api_name );
3604: END IF;

Line 3607: p_encoded => fnd_api.g_false,

3603: fnd_msg_pub.add_exc_msg ( g_pkg_name, l_api_name );
3604: END IF;
3605:
3606: fnd_msg_pub.count_and_get (
3607: p_encoded => fnd_api.g_false,
3608: p_count => x_msg_count,
3609: p_data => x_msg_data
3610: );
3611: --Bugfix 3940851 {

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

3609: p_data => x_msg_data
3610: );
3611: --Bugfix 3940851 {
3612: if( x_msg_count > 1 ) then
3613: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);
3614: end if;
3615: --Bugfix 3940851 }
3616: RETURN ( NULL );
3617: END auto_gen_lot;

Line 3677: RAISE fnd_api.g_exc_error;

3673: WHERE organization_id = p_org_id;
3674: EXCEPTION
3675: WHEN NO_DATA_FOUND
3676: THEN
3677: RAISE fnd_api.g_exc_error;
3678: END;
3679: END IF;
3680:
3681: IF ( l_lot_uniqueness = 1 ) -- Item level control

Line 3991: x_return_status := fnd_api.g_ret_sts_unexp_error;

3987: x_count := p_count;
3988: x_source_wms_lot_att_tbl := p_source_wms_lot_att_tbl;
3989: WHEN OTHERS
3990: THEN
3991: x_return_status := fnd_api.g_ret_sts_unexp_error;
3992: IF (l_debug = 1) THEN
3993: print_debug ('Exitting populatelotattributes - other exception:' || TO_CHAR ( SYSDATE, 'YYYY-MM-DD HH:DD:SS' ),1);
3994: END IF;
3995: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_unexp_error) THEN

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

4358: e := e + 200;
4359: END LOOP;
4360:
4361: ROLLBACK TO get_lot_attr_information;
4362: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
4363: WHEN g_exc_error THEN
4364: x_return_status := g_ret_sts_error;
4365: ROLLBACK TO get_lot_attr_information;
4366: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);

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

4362: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
4363: WHEN g_exc_error THEN
4364: x_return_status := g_ret_sts_error;
4365: ROLLBACK TO get_lot_attr_information;
4366: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
4367: WHEN g_exc_unexpected_error THEN
4368: x_return_status := g_ret_sts_unexp_error;
4369: ROLLBACK TO get_lot_attr_information;
4370: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);

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

4366: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
4367: WHEN g_exc_unexpected_error THEN
4368: x_return_status := g_ret_sts_unexp_error;
4369: ROLLBACK TO get_lot_attr_information;
4370: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
4371: WHEN OTHERS THEN
4372: x_return_status := g_ret_sts_unexp_error;
4373: ROLLBACK TO get_lot_attr_information;
4374: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);

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

4370: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
4371: WHEN OTHERS THEN
4372: x_return_status := g_ret_sts_unexp_error;
4373: ROLLBACK TO get_lot_attr_information;
4374: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
4375: print_debug('Error ' || SQLERRM, 9);
4376: END validate_lot_attr_info;
4377:
4378:

Line 4447: x_return_status := fnd_api.g_ret_sts_error;

4443: END IF;
4444:
4445: fnd_message.set_name('INV', 'INV_NO_LOT_CONTROL');
4446: fnd_msg_pub.ADD;
4447: x_return_status := fnd_api.g_ret_sts_error;
4448: RAISE g_exc_error;
4449: END IF;
4450: EXCEPTION
4451: WHEN NO_DATA_FOUND THEN

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

4600: EXCEPTION
4601: WHEN NO_DATA_FOUND THEN
4602: x_return_status := g_ret_sts_error;
4603: ROLLBACK TO val_lot_attr;
4604: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
4605: print_debug('In No data found -val_lot_attr ' || SQLERRM, 9);
4606: WHEN g_exc_error THEN
4607: x_return_status := g_ret_sts_error;
4608: ROLLBACK TO val_lot_attr;

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

4605: print_debug('In No data found -val_lot_attr ' || SQLERRM, 9);
4606: WHEN g_exc_error THEN
4607: x_return_status := g_ret_sts_error;
4608: ROLLBACK TO val_lot_attr;
4609: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
4610: print_debug('In g_exc_error -val_lot_attr' || SQLERRM, 9);
4611: WHEN g_exc_unexpected_error THEN
4612: x_return_status := g_ret_sts_unexp_error;
4613: ROLLBACK TO val_lot_attr;

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

4610: print_debug('In g_exc_error -val_lot_attr' || SQLERRM, 9);
4611: WHEN g_exc_unexpected_error THEN
4612: x_return_status := g_ret_sts_unexp_error;
4613: ROLLBACK TO val_lot_attr;
4614: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
4615: print_debug('In g_exc_unexpected_error val_lot_attr' || SQLERRM, 9);
4616: WHEN OTHERS THEN
4617: x_return_status := g_ret_sts_unexp_error;
4618: ROLLBACK TO val_lot_attr;

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

4615: print_debug('In g_exc_unexpected_error val_lot_attr' || SQLERRM, 9);
4616: WHEN OTHERS THEN
4617: x_return_status := g_ret_sts_unexp_error;
4618: ROLLBACK TO val_lot_attr;
4619: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
4620: print_debug('In others val_lot_attr' || SQLERRM, 9);
4621: END validate_lot_attr_in_param;
4622:
4623: -- nsinghi 5209065 START. Created new overloaded procedure.

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

4628: , x_lot_rec OUT NOCOPY MTL_LOT_NUMBERS%ROWTYPE
4629: , p_lot_rec IN MTL_LOT_NUMBERS%ROWTYPE
4630: , p_source IN NUMBER
4631: , p_api_version IN NUMBER
4632: , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
4633: , p_commit IN VARCHAR2 := fnd_api.g_false
4634: )
4635: IS
4636: CURSOR inv_attributes_cur IS

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

4629: , p_lot_rec IN MTL_LOT_NUMBERS%ROWTYPE
4630: , p_source IN NUMBER
4631: , p_api_version IN NUMBER
4632: , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
4633: , p_commit IN VARCHAR2 := fnd_api.g_false
4634: )
4635: IS
4636: CURSOR inv_attributes_cur IS
4637: SELECT attribute1

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

6929: EXCEPTION
6930: WHEN NO_DATA_FOUND THEN
6931: x_return_status := g_ret_sts_error;
6932: ROLLBACK TO upd_lot_attr;
6933: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
6934: if( x_msg_count > 1 ) then
6935: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);
6936: end if;
6937: print_debug('Upd Lort Attr: In No data found ' || SQLERRM, 9);

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

6931: x_return_status := g_ret_sts_error;
6932: ROLLBACK TO upd_lot_attr;
6933: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
6934: if( x_msg_count > 1 ) then
6935: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);
6936: end if;
6937: print_debug('Upd Lort Attr: In No data found ' || SQLERRM, 9);
6938: WHEN g_exc_error THEN
6939: x_return_status := g_ret_sts_error;

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

6937: print_debug('Upd Lort Attr: In No data found ' || SQLERRM, 9);
6938: WHEN g_exc_error THEN
6939: x_return_status := g_ret_sts_error;
6940: ROLLBACK TO upd_lot_attr;
6941: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
6942: if( x_msg_count > 1 ) then
6943: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);
6944: end if;
6945: print_debug('Upd Lot Attr: In g_exc_error ' || SQLERRM, 9);

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

6939: x_return_status := g_ret_sts_error;
6940: ROLLBACK TO upd_lot_attr;
6941: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
6942: if( x_msg_count > 1 ) then
6943: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);
6944: end if;
6945: print_debug('Upd Lot Attr: In g_exc_error ' || SQLERRM, 9);
6946: WHEN g_exc_unexpected_error THEN
6947: x_return_status := g_ret_sts_unexp_error;

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

6945: print_debug('Upd Lot Attr: In g_exc_error ' || SQLERRM, 9);
6946: WHEN g_exc_unexpected_error THEN
6947: x_return_status := g_ret_sts_unexp_error;
6948: ROLLBACK TO upd_lot_attr;
6949: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
6950: if ( x_msg_count > 1 ) then
6951: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);
6952: end if;
6953: print_debug('In g_exc_unexpected_error ' || SQLERRM, 9);

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

6947: x_return_status := g_ret_sts_unexp_error;
6948: ROLLBACK TO upd_lot_attr;
6949: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
6950: if ( x_msg_count > 1 ) then
6951: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);
6952: end if;
6953: print_debug('In g_exc_unexpected_error ' || SQLERRM, 9);
6954: WHEN OTHERS THEN
6955: x_return_status := g_ret_sts_unexp_error;

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

6953: print_debug('In g_exc_unexpected_error ' || SQLERRM, 9);
6954: WHEN OTHERS THEN
6955: x_return_status := g_ret_sts_unexp_error;
6956: ROLLBACK TO upd_lot_attr;
6957: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
6958: if( x_msg_count > 1 ) then
6959: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);
6960: end if;
6961: print_debug('Upd Lot Attr: In others ' || SQLERRM, 9);

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

6955: x_return_status := g_ret_sts_unexp_error;
6956: ROLLBACK TO upd_lot_attr;
6957: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
6958: if( x_msg_count > 1 ) then
6959: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);
6960: end if;
6961: print_debug('Upd Lot Attr: In others ' || SQLERRM, 9);
6962: END update_inv_lot;
6963:

Line 7018: x_return_status := fnd_api.g_ret_sts_success;

7014: l_msg_count NUMBER ;
7015:
7016: BEGIN
7017: SAVEPOINT upd_lot_attr;
7018: x_return_status := fnd_api.g_ret_sts_success;
7019:
7020: /* Populating the variables and calling the new overloaded API */
7021:
7022: l_in_lot_rec.inventory_item_id := p_inventory_item_id;

Line 7342: l_init_msg_list := fnd_api.g_false;

7338: l_in_lot_rec.d_attribute10 := g_miss_date;
7339: END IF;
7340: --END BUG 4748451
7341: l_api_version := 1.0;
7342: l_init_msg_list := fnd_api.g_false;
7343: l_commit := fnd_api.g_false;
7344: l_origin_txn_id := NULL;
7345:
7346: --Bug 13553990 keeping the value of columns without getting updated to NULL which are not passed.

Line 7343: l_commit := fnd_api.g_false;

7339: END IF;
7340: --END BUG 4748451
7341: l_api_version := 1.0;
7342: l_init_msg_list := fnd_api.g_false;
7343: l_commit := fnd_api.g_false;
7344: l_origin_txn_id := NULL;
7345:
7346: --Bug 13553990 keeping the value of columns without getting updated to NULL which are not passed.
7347: if (p_source <> 2) then

Line 7382: IF l_return_status = fnd_api.g_ret_sts_error THEN

7378:
7379: IF g_debug = 1 THEN
7380: print_debug('Program Update_Inv_lot return ' || l_return_status, 9);
7381: END IF;
7382: IF l_return_status = fnd_api.g_ret_sts_error THEN
7383: IF g_debug = 1 THEN
7384: print_debug('Program Update_Inv_lot has failed with a user defined exception', 9);
7385: END IF;
7386: RAISE g_exc_error;

Line 7387: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

7383: IF g_debug = 1 THEN
7384: print_debug('Program Update_Inv_lot has failed with a user defined exception', 9);
7385: END IF;
7386: RAISE g_exc_error;
7387: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
7388: IF g_debug = 1 THEN
7389: print_debug('Program Update_Inv_lot has failed with a Unexpected exception', 9);
7390: END IF;
7391: FND_MESSAGE.SET_NAME('INV','INV_PROGRAM_ERROR');

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

7398: EXCEPTION
7399: WHEN NO_DATA_FOUND THEN
7400: x_return_status := g_ret_sts_error;
7401: ROLLBACK TO upd_lot_attr;
7402: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
7403: if( x_msg_count > 1 ) then
7404: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);
7405: end if;
7406: print_debug('Upd Lot Attr: In No data found ' || SQLERRM, 9);

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

7400: x_return_status := g_ret_sts_error;
7401: ROLLBACK TO upd_lot_attr;
7402: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
7403: if( x_msg_count > 1 ) then
7404: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);
7405: end if;
7406: print_debug('Upd Lot Attr: In No data found ' || SQLERRM, 9);
7407: WHEN g_exc_error THEN
7408: x_return_status := g_ret_sts_error;

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

7406: print_debug('Upd Lot Attr: In No data found ' || SQLERRM, 9);
7407: WHEN g_exc_error THEN
7408: x_return_status := g_ret_sts_error;
7409: ROLLBACK TO upd_lot_attr;
7410: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
7411: if( x_msg_count > 1 ) then
7412: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);
7413: end if;
7414: print_debug('Upd Lot Attr: In g_exc_error ' || SQLERRM, 9);

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

7408: x_return_status := g_ret_sts_error;
7409: ROLLBACK TO upd_lot_attr;
7410: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
7411: if( x_msg_count > 1 ) then
7412: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);
7413: end if;
7414: print_debug('Upd Lot Attr: In g_exc_error ' || SQLERRM, 9);
7415: WHEN g_exc_unexpected_error THEN
7416: x_return_status := g_ret_sts_unexp_error;

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

7414: print_debug('Upd Lot Attr: In g_exc_error ' || SQLERRM, 9);
7415: WHEN g_exc_unexpected_error THEN
7416: x_return_status := g_ret_sts_unexp_error;
7417: ROLLBACK TO upd_lot_attr;
7418: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
7419: if ( x_msg_count > 1 ) then
7420: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);
7421: end if;
7422: print_debug('In g_exc_unexpected_error ' || SQLERRM, 9);

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

7416: x_return_status := g_ret_sts_unexp_error;
7417: ROLLBACK TO upd_lot_attr;
7418: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
7419: if ( x_msg_count > 1 ) then
7420: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);
7421: end if;
7422: print_debug('In g_exc_unexpected_error ' || SQLERRM, 9);
7423: WHEN OTHERS THEN
7424: x_return_status := g_ret_sts_unexp_error;

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

7422: print_debug('In g_exc_unexpected_error ' || SQLERRM, 9);
7423: WHEN OTHERS THEN
7424: x_return_status := g_ret_sts_unexp_error;
7425: ROLLBACK TO upd_lot_attr;
7426: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
7427: if( x_msg_count > 1 ) then
7428: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);
7429: end if;
7430: print_debug('Upd Lot Attr: In others ' || SQLERRM, 9);

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

7424: x_return_status := g_ret_sts_unexp_error;
7425: ROLLBACK TO upd_lot_attr;
7426: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
7427: if( x_msg_count > 1 ) then
7428: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);
7429: end if;
7430: print_debug('Upd Lot Attr: In others ' || SQLERRM, 9);
7431:
7432: END update_inv_lot;

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

7905: p_lot_serial_number => null,
7906: p_attributes => lot_dff
7907: );
7908:
7909: IF ( l_return_status <> fnd_api.g_ret_sts_success ) THEN
7910: x_return_status := l_return_status;
7911: RAISE fnd_api.g_exc_unexpected_error;
7912: END IF;
7913:

Line 7911: RAISE fnd_api.g_exc_unexpected_error;

7907: );
7908:
7909: IF ( l_return_status <> fnd_api.g_ret_sts_success ) THEN
7910: x_return_status := l_return_status;
7911: RAISE fnd_api.g_exc_unexpected_error;
7912: END IF;
7913:
7914: IF ( l_attributes_default_count > 0 ) THEN
7915: FOR i IN 1 .. l_attributes_default_count LOOP

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

8123: IF g_debug = 1 THEN
8124: print_debug('Program LOT_DFF_VALIDATE has completed with validation errors', 9);
8125: END IF;
8126:
8127: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
8128: WHEN errors_received THEN
8129: x_return_status := inv_lot_api_pub.g_ret_sts_error;
8130:
8131: IF g_debug = 1 THEN

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

8150: ROLLBACK TO wms_lot_dff_validate;
8151: WHEN OTHERS THEN
8152: x_return_status := inv_lot_api_pub.g_ret_sts_unexp_error;
8153: ROLLBACK TO wms_lot_dff_validate;
8154: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
8155:
8156: IF g_debug = 1 THEN
8157: print_debug('Program LOT_DFF_VALIDATE has completed with errors. In when others ', 9);
8158: print_debug('Error ' || SQLERRM, 9);

Line 8188: , p_init_msg_list IN VARCHAR2 DEFAULT FND_API.G_FALSE

8184:
8185:
8186: PROCEDURE validate_child_lot
8187: ( p_api_version IN NUMBER
8188: , p_init_msg_list IN VARCHAR2 DEFAULT FND_API.G_FALSE
8189: , p_commit IN VARCHAR2 DEFAULT FND_API.G_FALSE
8190: , p_validation_level IN NUMBER DEFAULT FND_API.G_VALID_LEVEL_FULL
8191: , p_organization_id IN NUMBER
8192: , p_inventory_item_id IN NUMBER

Line 8189: , p_commit IN VARCHAR2 DEFAULT FND_API.G_FALSE

8185:
8186: PROCEDURE validate_child_lot
8187: ( p_api_version IN NUMBER
8188: , p_init_msg_list IN VARCHAR2 DEFAULT FND_API.G_FALSE
8189: , p_commit IN VARCHAR2 DEFAULT FND_API.G_FALSE
8190: , p_validation_level IN NUMBER DEFAULT FND_API.G_VALID_LEVEL_FULL
8191: , p_organization_id IN NUMBER
8192: , p_inventory_item_id IN NUMBER
8193: , p_parent_lot_number IN VARCHAR2

Line 8190: , p_validation_level IN NUMBER DEFAULT FND_API.G_VALID_LEVEL_FULL

8186: PROCEDURE validate_child_lot
8187: ( p_api_version IN NUMBER
8188: , p_init_msg_list IN VARCHAR2 DEFAULT FND_API.G_FALSE
8189: , p_commit IN VARCHAR2 DEFAULT FND_API.G_FALSE
8190: , p_validation_level IN NUMBER DEFAULT FND_API.G_VALID_LEVEL_FULL
8191: , p_organization_id IN NUMBER
8192: , p_inventory_item_id IN NUMBER
8193: , p_parent_lot_number IN VARCHAR2
8194: , p_child_lot_number IN VARCHAR2

Line 8268: IF FND_API.to_boolean(p_init_msg_list) THEN

8264:
8265:
8266:
8267: BEGIN
8268: IF FND_API.to_boolean(p_init_msg_list) THEN
8269: FND_MSG_PUB.Initialize;
8270: END IF;
8271:
8272: -- Standard call to check for call compatibility.

Line 8273: IF NOT FND_API.Compatible_API_Call ( l_api_version ,

8269: FND_MSG_PUB.Initialize;
8270: END IF;
8271:
8272: -- Standard call to check for call compatibility.
8273: IF NOT FND_API.Compatible_API_Call ( l_api_version ,
8274: p_api_version ,
8275: l_api_name ,
8276: G_PKG_NAME ) THEN
8277: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

Line 8277: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

8273: IF NOT FND_API.Compatible_API_Call ( l_api_version ,
8274: p_api_version ,
8275: l_api_name ,
8276: G_PKG_NAME ) THEN
8277: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
8278: END IF;
8279: x_return_status := FND_API.G_RET_STS_SUCCESS;
8280:
8281:

Line 8279: x_return_status := FND_API.G_RET_STS_SUCCESS;

8275: l_api_name ,
8276: G_PKG_NAME ) THEN
8277: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
8278: END IF;
8279: x_return_status := FND_API.G_RET_STS_SUCCESS;
8280:
8281:
8282: /*==========================================
8283: Get Item Information

Line 8294: RAISE fnd_api.g_exc_error;

8290: IF (get_item_data%NOTFOUND) THEN
8291: CLOSE get_item_data;
8292: fnd_message.set_name ('INV' , 'INV_CL_ITEM_ERR');
8293: fnd_msg_pub.ADD;
8294: RAISE fnd_api.g_exc_error;
8295: END IF;
8296: CLOSE get_item_data;
8297:
8298: /*==========================================

Line 8304: RAISE fnd_api.g_exc_error;

8300: ========================================*/
8301: IF (nvl(l_item_child_lot_flag,'N') = 'N') THEN
8302: fnd_message.set_name ('INV' , 'INV_CL_CHILD_LOT_DISABLED');
8303: fnd_msg_pub.ADD;
8304: RAISE fnd_api.g_exc_error;
8305: END IF;
8306:
8307: /*==========================================
8308: Get mtl_parameters information.

Line 8321: RAISE fnd_api.g_exc_error;

8317: IF (get_child_parms%NOTFOUND) THEN
8318: CLOSE get_child_parms;
8319: fnd_message.set_name ('INV' , 'INV_CL_GET_PARM_ERR');
8320: fnd_msg_pub.ADD;
8321: RAISE fnd_api.g_exc_error;
8322: END IF;
8323: CLOSE get_child_parms;
8324:
8325: /*==========================================

Line 8331: x_return_status := FND_API.G_RET_STS_SUCCESS;

8327: required. Just return.
8328: ========================================*/
8329:
8330: IF (l_prm_lot_number_generation = 3) THEN
8331: x_return_status := FND_API.G_RET_STS_SUCCESS;
8332: RETURN;
8333: END IF;
8334:
8335: /*==========================================

Line 8392: RAISE fnd_api.g_exc_error;

8388: NULL;
8389: ELSE
8390: fnd_message.set_name ('INV' , 'INV_CL_SUFFIX_MISMATCH');
8391: fnd_msg_pub.ADD;
8392: RAISE fnd_api.g_exc_error;
8393: END IF;
8394: ELSE
8395: fnd_message.set_name ('INV' , 'INV_CL_PREFIX_MISMATCH');
8396: fnd_msg_pub.ADD;

Line 8397: RAISE fnd_api.g_exc_error;

8393: END IF;
8394: ELSE
8395: fnd_message.set_name ('INV' , 'INV_CL_PREFIX_MISMATCH');
8396: fnd_msg_pub.ADD;
8397: RAISE fnd_api.g_exc_error;
8398: END IF;
8399: ELSE
8400: /*=======================================
8401: For Lot/Lot validation just return.

Line 8420: RAISE fnd_api.g_exc_error;

8416:
8417: IF (l_final_suffix IS NULL) THEN
8418: fnd_message.set_name ('INV' , 'INV_CL_SUFFIX_NONUMERIC');
8419: fnd_msg_pub.ADD;
8420: RAISE fnd_api.g_exc_error;
8421: END IF;
8422:
8423: /*============================================
8424: Exception will trap the following command

Line 8445: RAISE fnd_api.g_exc_error;

8441: IF (l_prm_zero_padding_flag = 'Y') THEN
8442: IF (l_overall_length <> l_child_lot_length) THEN
8443: fnd_message.set_name ('INV' , 'INV_CL_PAD_ERROR');
8444: fnd_msg_pub.ADD;
8445: RAISE fnd_api.g_exc_error;
8446: END IF;
8447: END IF;
8448: ELSE -- Item
8449: IF (NVL(l_item_child_lot_startno,0) > l_final_suffix_numeric) THEN

Line 8452: RAISE fnd_api.g_exc_error;

8448: ELSE -- Item
8449: IF (NVL(l_item_child_lot_startno,0) > l_final_suffix_numeric) THEN
8450: fnd_message.set_name ('INV' , 'INV_CL_STARTING_SUFFIX_ERR');
8451: fnd_msg_pub.ADD;
8452: RAISE fnd_api.g_exc_error;
8453: END IF;
8454: END IF;
8455:
8456: /*============================================

Line 8466: RAISE fnd_api.g_exc_error;

8462:
8463: IF (l_child_lot_length > l_overall_length ) THEN
8464: fnd_message.set_name ('INV' , 'INV_CL_OVERALL_LENGTH');
8465: fnd_msg_pub.ADD;
8466: RAISE fnd_api.g_exc_error;
8467: END IF;
8468: RETURN;
8469:
8470: EXCEPTION

Line 8475: x_return_status := FND_API.G_RET_STS_ERROR;

8471:
8472: WHEN l_num_error THEN
8473: fnd_message.set_name ('INV' , 'INV_CL_SUFFIX_NONUMERIC');
8474: fnd_msg_pub.ADD;
8475: x_return_status := FND_API.G_RET_STS_ERROR;
8476: FND_MSG_PUB.Count_AND_GET
8477: (p_count => x_msg_count, p_data => x_msg_data);
8478: WHEN FND_API.G_EXC_ERROR THEN
8479: x_return_status := FND_API.G_RET_STS_ERROR;

Line 8478: WHEN FND_API.G_EXC_ERROR THEN

8474: fnd_msg_pub.ADD;
8475: x_return_status := FND_API.G_RET_STS_ERROR;
8476: FND_MSG_PUB.Count_AND_GET
8477: (p_count => x_msg_count, p_data => x_msg_data);
8478: WHEN FND_API.G_EXC_ERROR THEN
8479: x_return_status := FND_API.G_RET_STS_ERROR;
8480: FND_MSG_PUB.Count_AND_GET
8481: (p_count => x_msg_count, p_data => x_msg_data);
8482:

Line 8479: x_return_status := FND_API.G_RET_STS_ERROR;

8475: x_return_status := FND_API.G_RET_STS_ERROR;
8476: FND_MSG_PUB.Count_AND_GET
8477: (p_count => x_msg_count, p_data => x_msg_data);
8478: WHEN FND_API.G_EXC_ERROR THEN
8479: x_return_status := FND_API.G_RET_STS_ERROR;
8480: FND_MSG_PUB.Count_AND_GET
8481: (p_count => x_msg_count, p_data => x_msg_data);
8482:
8483: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

Line 8483: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

8479: x_return_status := FND_API.G_RET_STS_ERROR;
8480: FND_MSG_PUB.Count_AND_GET
8481: (p_count => x_msg_count, p_data => x_msg_data);
8482:
8483: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
8484: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
8485: FND_MSG_PUB.Count_AND_GET
8486: (p_count => x_msg_count, p_data => x_msg_data);
8487:

Line 8484: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

8480: FND_MSG_PUB.Count_AND_GET
8481: (p_count => x_msg_count, p_data => x_msg_data);
8482:
8483: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
8484: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
8485: FND_MSG_PUB.Count_AND_GET
8486: (p_count => x_msg_count, p_data => x_msg_data);
8487:
8488: WHEN OTHERS THEN

Line 8489: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

8485: FND_MSG_PUB.Count_AND_GET
8486: (p_count => x_msg_count, p_data => x_msg_data);
8487:
8488: WHEN OTHERS THEN
8489: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
8490: FND_MSG_PUB.Count_AND_GET
8491: (p_count => x_msg_count, p_data => x_msg_data);
8492:
8493: END validate_child_lot;

Line 8498: , p_init_msg_list IN VARCHAR2 DEFAULT FND_API.G_FALSE

8494:
8495:
8496: FUNCTION validate_lot_indivisible
8497: ( p_api_version IN NUMBER
8498: , p_init_msg_list IN VARCHAR2 DEFAULT FND_API.G_FALSE
8499: , p_commit IN VARCHAR2 DEFAULT FND_API.G_FALSE
8500: , p_validation_level IN NUMBER DEFAULT FND_API.G_VALID_LEVEL_FULL
8501: , p_transaction_type_id IN NUMBER
8502: , p_organization_id IN NUMBER

Line 8499: , p_commit IN VARCHAR2 DEFAULT FND_API.G_FALSE

8495:
8496: FUNCTION validate_lot_indivisible
8497: ( p_api_version IN NUMBER
8498: , p_init_msg_list IN VARCHAR2 DEFAULT FND_API.G_FALSE
8499: , p_commit IN VARCHAR2 DEFAULT FND_API.G_FALSE
8500: , p_validation_level IN NUMBER DEFAULT FND_API.G_VALID_LEVEL_FULL
8501: , p_transaction_type_id IN NUMBER
8502: , p_organization_id IN NUMBER
8503: , p_inventory_item_id IN NUMBER

Line 8500: , p_validation_level IN NUMBER DEFAULT FND_API.G_VALID_LEVEL_FULL

8496: FUNCTION validate_lot_indivisible
8497: ( p_api_version IN NUMBER
8498: , p_init_msg_list IN VARCHAR2 DEFAULT FND_API.G_FALSE
8499: , p_commit IN VARCHAR2 DEFAULT FND_API.G_FALSE
8500: , p_validation_level IN NUMBER DEFAULT FND_API.G_VALID_LEVEL_FULL
8501: , p_transaction_type_id IN NUMBER
8502: , p_organization_id IN NUMBER
8503: , p_inventory_item_id IN NUMBER
8504: , p_revision IN VARCHAR2

Line 8553: x_return_status := FND_API.G_RET_STS_ERROR;

8549: EXCEPTION
8550:
8551: WHEN CREATE_TREE_ERROR THEN
8552: print_debug(' CREATE_TREE error...');
8553: x_return_status := FND_API.G_RET_STS_ERROR;
8554: FND_MSG_PUB.Count_AND_GET
8555: (p_count => x_msg_count, p_data => x_msg_data);
8556: RETURN FALSE;
8557:

Line 8560: x_return_status := FND_API.G_RET_STS_ERROR;

8556: RETURN FALSE;
8557:
8558: WHEN QUERY_TREE_ERROR THEN
8559: print_debug(' QUERY_TREE error...');
8560: x_return_status := FND_API.G_RET_STS_ERROR;
8561: FND_MSG_PUB.Count_AND_GET
8562: (p_count => x_msg_count, p_data => x_msg_data);
8563: RETURN FALSE;
8564:

Line 8565: WHEN FND_API.G_EXC_ERROR THEN

8561: FND_MSG_PUB.Count_AND_GET
8562: (p_count => x_msg_count, p_data => x_msg_data);
8563: RETURN FALSE;
8564:
8565: WHEN FND_API.G_EXC_ERROR THEN
8566: print_debug(' EXCP error...');
8567: x_return_status := FND_API.G_RET_STS_ERROR;
8568: FND_MSG_PUB.Count_AND_GET
8569: (p_count => x_msg_count, p_data => x_msg_data);

Line 8567: x_return_status := FND_API.G_RET_STS_ERROR;

8563: RETURN FALSE;
8564:
8565: WHEN FND_API.G_EXC_ERROR THEN
8566: print_debug(' EXCP error...');
8567: x_return_status := FND_API.G_RET_STS_ERROR;
8568: FND_MSG_PUB.Count_AND_GET
8569: (p_count => x_msg_count, p_data => x_msg_data);
8570: RETURN FALSE;
8571:

Line 8572: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

8568: FND_MSG_PUB.Count_AND_GET
8569: (p_count => x_msg_count, p_data => x_msg_data);
8570: RETURN FALSE;
8571:
8572: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
8573: print_debug(' UNEXCP error...');
8574: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
8575: FND_MSG_PUB.Count_AND_GET
8576: (p_count => x_msg_count, p_data => x_msg_data);

Line 8574: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

8570: RETURN FALSE;
8571:
8572: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
8573: print_debug(' UNEXCP error...');
8574: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
8575: FND_MSG_PUB.Count_AND_GET
8576: (p_count => x_msg_count, p_data => x_msg_data);
8577: RETURN FALSE;
8578:

Line 8581: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

8577: RETURN FALSE;
8578:
8579: WHEN OTHERS THEN
8580: print_debug(' OTHERS error...'||SQLERRM);
8581: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
8582: FND_MSG_PUB.Count_AND_GET
8583: (p_count => x_msg_count, p_data => x_msg_data);
8584: RETURN FALSE;
8585:

Line 8614: , p_init_msg_list IN VARCHAR2 DEFAULT FND_API.G_FALSE

8610: | |
8611: +==========================================================================+ */
8612: FUNCTION validate_lot_indivisible
8613: ( p_api_version IN NUMBER
8614: , p_init_msg_list IN VARCHAR2 DEFAULT FND_API.G_FALSE
8615: , p_commit IN VARCHAR2 DEFAULT FND_API.G_FALSE
8616: , p_validation_level IN NUMBER DEFAULT FND_API.G_VALID_LEVEL_FULL
8617: , p_transaction_type_id IN NUMBER
8618: , p_organization_id IN NUMBER

Line 8615: , p_commit IN VARCHAR2 DEFAULT FND_API.G_FALSE

8611: +==========================================================================+ */
8612: FUNCTION validate_lot_indivisible
8613: ( p_api_version IN NUMBER
8614: , p_init_msg_list IN VARCHAR2 DEFAULT FND_API.G_FALSE
8615: , p_commit IN VARCHAR2 DEFAULT FND_API.G_FALSE
8616: , p_validation_level IN NUMBER DEFAULT FND_API.G_VALID_LEVEL_FULL
8617: , p_transaction_type_id IN NUMBER
8618: , p_organization_id IN NUMBER
8619: , p_inventory_item_id IN NUMBER

Line 8616: , p_validation_level IN NUMBER DEFAULT FND_API.G_VALID_LEVEL_FULL

8612: FUNCTION validate_lot_indivisible
8613: ( p_api_version IN NUMBER
8614: , p_init_msg_list IN VARCHAR2 DEFAULT FND_API.G_FALSE
8615: , p_commit IN VARCHAR2 DEFAULT FND_API.G_FALSE
8616: , p_validation_level IN NUMBER DEFAULT FND_API.G_VALID_LEVEL_FULL
8617: , p_transaction_type_id IN NUMBER
8618: , p_organization_id IN NUMBER
8619: , p_inventory_item_id IN NUMBER
8620: , p_revision IN VARCHAR2

Line 8748: IF FND_API.to_boolean(p_init_msg_list) THEN

8744: print_debug('Entering validate_lot_indivisible. transaction_type_id='||p_transaction_type_id||', prim_qty='||p_primary_quantity||'.');
8745: print_debug(' ... org='||p_organization_id||', item='||p_inventory_item_id||', rev='||p_revision||', sub='||p_subinventory_code||', loct='||p_locator_id);
8746: print_debug(' ... lot='||p_lot_number||', p_qoh='||p_qoh||', p_atr='||p_atr);
8747:
8748: IF FND_API.to_boolean(p_init_msg_list) THEN
8749: FND_MSG_PUB.Initialize;
8750: END IF;
8751:
8752: -- Standard call to check for call compatibility.

Line 8753: IF NOT FND_API.Compatible_API_Call( l_api_version

8749: FND_MSG_PUB.Initialize;
8750: END IF;
8751:
8752: -- Standard call to check for call compatibility.
8753: IF NOT FND_API.Compatible_API_Call( l_api_version
8754: , p_api_version
8755: , l_api_name
8756: , G_PKG_NAME)
8757: THEN

Line 8758: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

8754: , p_api_version
8755: , l_api_name
8756: , G_PKG_NAME)
8757: THEN
8758: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
8759: END IF;
8760: x_return_status := FND_API.G_RET_STS_SUCCESS;
8761:
8762: /*==========================================

Line 8760: x_return_status := FND_API.G_RET_STS_SUCCESS;

8756: , G_PKG_NAME)
8757: THEN
8758: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
8759: END IF;
8760: x_return_status := FND_API.G_RET_STS_SUCCESS;
8761:
8762: /*==========================================
8763: Get item details:
8764: ========================================*/

Line 8775: RAISE FND_API.G_EXC_ERROR;

8771: FND_MESSAGE.SET_NAME('INV','ITEM_NOT_FOUND');
8772: FND_MESSAGE.SET_TOKEN('ORGANIZATION_ID', p_organization_id);
8773: FND_MESSAGE.SET_TOKEN('INVENTORY_ITEM_ID', p_inventory_item_id);
8774: FND_MSG_PUB.ADD;
8775: RAISE FND_API.G_EXC_ERROR;
8776: END IF;
8777: CLOSE get_item_details;
8778:
8779: /* Jalaj Srivastava Bug 4634410

Line 8820: RAISE FND_API.G_EXC_ERROR;

8816: CLOSE get_transaction_details;
8817: FND_MESSAGE.SET_NAME('INV','TRX_TYPE_NOT_FOUND');
8818: FND_MESSAGE.SET_TOKEN('TRANSACTION_TYPE_ID', p_transaction_type_id);
8819: FND_MSG_PUB.ADD;
8820: RAISE FND_API.G_EXC_ERROR;
8821: END IF;
8822: CLOSE get_transaction_details;
8823:
8824: print_debug('... transaction_type_id='||p_transaction_type_id||', trx_action='||l_transaction_action_id||', trx_source_type='||l_transaction_source_type_id);

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

8917: , x_tree_id => l_tree_id);
8918:
8919: print_debug('return status INV_QUANTITY_TREE_GRP.CREATE_TREE api'||l_return_status);
8920: -- NSRIVAST, using <> as per GSCC compliance
8921: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS)
8922: THEN
8923: print_debug('Returning error from INV_QUANTITY_TREE_GRP.CREATE_TREE');
8924: RAISE CREATE_TREE_ERROR;
8925: END IF;

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

8967: x_secondary_quantity := l_sqoh;
8968: END IF;
8969:
8970: -- NSRIVAST, using <> as per GSCC compliance
8971: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS)
8972: THEN
8973: print_debug('Returning error from INV_QUANTITY_TREE_PUB.QUERY_QUANTITIES');
8974: RAISE QUERY_TREE_ERROR;
8975: END IF;

Line 9016: RAISE FND_API.G_EXC_ERROR;

9012: FND_MSG_PUB.ADD;
9013: --l_error_code := FND_MESSAGE.GET;
9014: /* Update MTI table with error code/explanation */
9015: --errupdate(p_rowid);
9016: RAISE FND_API.G_EXC_ERROR;
9017: END IF;
9018: END IF;
9019:
9020: -- IF ( p_transaction_type_id = 32 )

Line 9032: -- RAISE FND_API.G_EXC_ERROR;

9028: -- FND_MSG_PUB.ADD;
9029: -- --l_error_code := FND_MESSAGE.GET;
9030: -- /* Update MTI table with error code/explanation */
9031: -- --errupdate(p_rowid);
9032: -- RAISE FND_API.G_EXC_ERROR;
9033: -- END IF;
9034: -- END IF;
9035:
9036: -- action 27 = Receipt into store

Line 9052: RAISE FND_API.G_EXC_ERROR;

9048:
9049: IF l_exists = 1 THEN
9050: FND_MESSAGE.SET_NAME('INV','INV_LOT_INDIVISIBLE_VIOLATION');
9051: FND_MSG_PUB.ADD;
9052: RAISE FND_API.G_EXC_ERROR;
9053: END IF;
9054: END IF;
9055:
9056: -- test if some inventory exist at lowest level

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

9098: -- returning primary quantity to calling procedure
9099: x_primary_quantity := l_qoh;
9100:
9101: -- NSRIVAST, using <> as per GSCC compliance
9102: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS)
9103: THEN
9104: print_debug('Returning error from INV_QUANTITY_TREE_GRP.QUERY_TREE');
9105: RAISE QUERY_TREE_ERROR;
9106: END IF;

Line 9124: RAISE FND_API.G_EXC_ERROR;

9120: FND_MSG_PUB.ADD;
9121: --l_error_expp := FND_MESSAGE.GET;
9122: /* Update MTI table with error code/explanation */
9123: --errupdate(p_rowid);
9124: RAISE FND_API.G_EXC_ERROR;
9125: END IF; -- ( ll_atr = 0 )
9126: -- bug 4042255 : added forgotten ELSE clause :
9127: -- Bug 4146697 - Removed ELSE condition below.
9128: -- ELSE

Line 9133: -- RAISE FND_API.G_EXC_ERROR;

9129: -- print_debug('within case 3 Some Qty already available to reserve. prim_qty='||p_primary_quantity||', atr='||l_atr);
9130: -- FND_MESSAGE.SET_NAME('INV','INV_LOT_INDIV_QTY_RCPT_CASE_3');
9131: -- FND_MSG_PUB.ADD;
9132:
9133: -- RAISE FND_API.G_EXC_ERROR;
9134: END IF; -- ( l_atr = 0 )
9135:
9136: IF ( l_qr > 0 )
9137: THEN

Line 9147: RAISE FND_API.G_EXC_ERROR;

9143: FND_MSG_PUB.ADD;
9144: --l_error_expp := FND_MESSAGE.GET;
9145: /* Update MTI table with error code/explanation */
9146: --errupdate(p_rowid);
9147: RAISE FND_API.G_EXC_ERROR;
9148: END IF; -- ( l_qr > 0 )
9149: END IF; -- l_transaction_action_id IN (27)
9150: l_return := TRUE;
9151:

Line 9176: RAISE FND_API.G_EXC_ERROR;

9172: FND_MSG_PUB.ADD;
9173: --l_error_expp := FND_MESSAGE.GET;
9174: /* Update MTI table with error code/explanation */
9175: --errupdate(p_rowid);
9176: RAISE FND_API.G_EXC_ERROR;
9177: END IF;
9178: END IF;
9179: l_return := TRUE;
9180: ELSE

Line 9191: x_return_status := FND_API.G_RET_STS_ERROR;

9187: EXCEPTION
9188:
9189: WHEN CREATE_TREE_ERROR THEN
9190: print_debug(' CREATE_TREE error...');
9191: x_return_status := FND_API.G_RET_STS_ERROR;
9192: FND_MSG_PUB.Count_AND_GET
9193: (p_count => x_msg_count, p_data => x_msg_data);
9194: RETURN FALSE;
9195:

Line 9198: x_return_status := FND_API.G_RET_STS_ERROR;

9194: RETURN FALSE;
9195:
9196: WHEN QUERY_TREE_ERROR THEN
9197: print_debug(' QUERY_TREE error...');
9198: x_return_status := FND_API.G_RET_STS_ERROR;
9199: FND_MSG_PUB.Count_AND_GET
9200: (p_count => x_msg_count, p_data => x_msg_data);
9201: RETURN FALSE;
9202:

Line 9203: WHEN FND_API.G_EXC_ERROR THEN

9199: FND_MSG_PUB.Count_AND_GET
9200: (p_count => x_msg_count, p_data => x_msg_data);
9201: RETURN FALSE;
9202:
9203: WHEN FND_API.G_EXC_ERROR THEN
9204: print_debug(' EXCP error...');
9205: x_return_status := FND_API.G_RET_STS_ERROR;
9206: FND_MSG_PUB.Count_AND_GET
9207: (p_count => x_msg_count, p_data => x_msg_data);

Line 9205: x_return_status := FND_API.G_RET_STS_ERROR;

9201: RETURN FALSE;
9202:
9203: WHEN FND_API.G_EXC_ERROR THEN
9204: print_debug(' EXCP error...');
9205: x_return_status := FND_API.G_RET_STS_ERROR;
9206: FND_MSG_PUB.Count_AND_GET
9207: (p_count => x_msg_count, p_data => x_msg_data);
9208: RETURN FALSE;
9209:

Line 9210: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

9206: FND_MSG_PUB.Count_AND_GET
9207: (p_count => x_msg_count, p_data => x_msg_data);
9208: RETURN FALSE;
9209:
9210: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
9211: print_debug(' UNEXCP error...');
9212: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
9213: FND_MSG_PUB.Count_AND_GET
9214: (p_count => x_msg_count, p_data => x_msg_data);

Line 9212: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

9208: RETURN FALSE;
9209:
9210: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
9211: print_debug(' UNEXCP error...');
9212: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
9213: FND_MSG_PUB.Count_AND_GET
9214: (p_count => x_msg_count, p_data => x_msg_data);
9215: RETURN FALSE;
9216:

Line 9219: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

9215: RETURN FALSE;
9216:
9217: WHEN OTHERS THEN
9218: print_debug(' OTHERS error...'||SQLERRM);
9219: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
9220: FND_MSG_PUB.Count_AND_GET
9221: (p_count => x_msg_count, p_data => x_msg_data);
9222: RETURN FALSE;
9223:

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

9264: , p_territory_code IN VARCHAR2
9265: , p_supplier_lot_number IN VARCHAR2
9266: , p_vendor_name IN VARCHAR2
9267: , p_source IN NUMBER
9268: , p_init_msg_list IN VARCHAR2 DEFAULT fnd_api.g_false --bug 7513308
9269: ) IS
9270:
9271:
9272: /* Defined new variables for overloaded API call */

Line 9289: x_return_status := fnd_api.g_ret_sts_success;

9285: l_msg_count NUMBER ;
9286: l_row_id ROWID ;
9287: BEGIN
9288: SAVEPOINT inv_lot;
9289: x_return_status := fnd_api.g_ret_sts_success;
9290:
9291: /* Populating the variables and calling the new overloaded API */
9292:
9293: l_in_lot_rec.inventory_item_id := p_inventory_item_id;

Line 9501: IF fnd_api.to_boolean(p_init_msg_list) THEN

9497: --END BUG 4748451
9498:
9499: -- Bug 7513308
9500: -- Initialize message list if p_init_msg_list is set to TRUE.
9501: IF fnd_api.to_boolean(p_init_msg_list) THEN
9502: fnd_msg_pub.initialize;
9503: END IF;
9504:
9505: l_source := p_source;

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

9503: END IF;
9504:
9505: l_source := p_source;
9506: l_api_version := 1.0;
9507: l_init_msg_list := p_init_msg_list; --fnd_api.g_false; bug 7513308
9508: l_commit := fnd_api.g_false;
9509: l_validation_level := fnd_api.g_valid_level_full;
9510: l_origin_txn_id := NULL;
9511:

Line 9508: l_commit := fnd_api.g_false;

9504:
9505: l_source := p_source;
9506: l_api_version := 1.0;
9507: l_init_msg_list := p_init_msg_list; --fnd_api.g_false; bug 7513308
9508: l_commit := fnd_api.g_false;
9509: l_validation_level := fnd_api.g_valid_level_full;
9510: l_origin_txn_id := NULL;
9511:
9512:

Line 9509: l_validation_level := fnd_api.g_valid_level_full;

9505: l_source := p_source;
9506: l_api_version := 1.0;
9507: l_init_msg_list := p_init_msg_list; --fnd_api.g_false; bug 7513308
9508: l_commit := fnd_api.g_false;
9509: l_validation_level := fnd_api.g_valid_level_full;
9510: l_origin_txn_id := NULL;
9511:
9512:
9513:

Line 9533: IF l_return_status = fnd_api.g_ret_sts_error THEN

9529:
9530: IF g_debug = 1 THEN
9531: print_debug('Program Create_Inv_lot return ' || l_return_status, 9);
9532: END IF;
9533: IF l_return_status = fnd_api.g_ret_sts_error THEN
9534: IF g_debug = 1 THEN
9535: print_debug('Program Create_Inv_lot has failed with a user defined exception', 9);
9536: END IF;
9537: RAISE g_exc_error;

Line 9538: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

9534: IF g_debug = 1 THEN
9535: print_debug('Program Create_Inv_lot has failed with a user defined exception', 9);
9536: END IF;
9537: RAISE g_exc_error;
9538: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
9539: IF g_debug = 1 THEN
9540: print_debug('Program Create_Inv_lot has failed with a Unexpected exception', 9);
9541: END IF;
9542: FND_MESSAGE.SET_NAME('INV','INV_PROGRAM_ERROR');

Line 9551: x_return_status := fnd_api.g_ret_sts_error;

9547:
9548: print_debug('End of the program create_inv_lot. Program has completed successfully ', 9);
9549: EXCEPTION
9550: WHEN NO_DATA_FOUND THEN
9551: x_return_status := fnd_api.g_ret_sts_error;
9552: ROLLBACK TO inv_lot;
9553: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
9554: if( x_msg_count > 1 ) then
9555: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);

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

9549: EXCEPTION
9550: WHEN NO_DATA_FOUND THEN
9551: x_return_status := fnd_api.g_ret_sts_error;
9552: ROLLBACK TO inv_lot;
9553: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
9554: if( x_msg_count > 1 ) then
9555: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);
9556: end if;
9557: print_debug('In No data found ' || SQLERRM, 9);

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

9551: x_return_status := fnd_api.g_ret_sts_error;
9552: ROLLBACK TO inv_lot;
9553: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
9554: if( x_msg_count > 1 ) then
9555: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);
9556: end if;
9557: print_debug('In No data found ' || SQLERRM, 9);
9558: WHEN g_exc_error THEN
9559: x_return_status := fnd_api.g_ret_sts_error;

Line 9559: x_return_status := fnd_api.g_ret_sts_error;

9555: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);
9556: end if;
9557: print_debug('In No data found ' || SQLERRM, 9);
9558: WHEN g_exc_error THEN
9559: x_return_status := fnd_api.g_ret_sts_error;
9560: ROLLBACK TO inv_lot;
9561: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
9562: if( x_msg_count > 1 ) then
9563: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);

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

9557: print_debug('In No data found ' || SQLERRM, 9);
9558: WHEN g_exc_error THEN
9559: x_return_status := fnd_api.g_ret_sts_error;
9560: ROLLBACK TO inv_lot;
9561: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
9562: if( x_msg_count > 1 ) then
9563: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);
9564: end if;
9565: print_debug('In g_exc_error ' || SQLERRM, 9);

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

9559: x_return_status := fnd_api.g_ret_sts_error;
9560: ROLLBACK TO inv_lot;
9561: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
9562: if( x_msg_count > 1 ) then
9563: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);
9564: end if;
9565: print_debug('In g_exc_error ' || SQLERRM, 9);
9566: WHEN g_exc_unexpected_error THEN
9567: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 9567: x_return_status := fnd_api.g_ret_sts_unexp_error;

9563: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);
9564: end if;
9565: print_debug('In g_exc_error ' || SQLERRM, 9);
9566: WHEN g_exc_unexpected_error THEN
9567: x_return_status := fnd_api.g_ret_sts_unexp_error;
9568: ROLLBACK TO inv_lot;
9569: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
9570: if( x_msg_count > 1 ) then
9571: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);

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

9565: print_debug('In g_exc_error ' || SQLERRM, 9);
9566: WHEN g_exc_unexpected_error THEN
9567: x_return_status := fnd_api.g_ret_sts_unexp_error;
9568: ROLLBACK TO inv_lot;
9569: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
9570: if( x_msg_count > 1 ) then
9571: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);
9572: end if;
9573: print_debug('In g_exc_unexpected_error ' || SQLERRM, 9);

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

9567: x_return_status := fnd_api.g_ret_sts_unexp_error;
9568: ROLLBACK TO inv_lot;
9569: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
9570: if( x_msg_count > 1 ) then
9571: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);
9572: end if;
9573: print_debug('In g_exc_unexpected_error ' || SQLERRM, 9);
9574: WHEN OTHERS THEN
9575: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 9575: x_return_status := fnd_api.g_ret_sts_unexp_error;

9571: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);
9572: end if;
9573: print_debug('In g_exc_unexpected_error ' || SQLERRM, 9);
9574: WHEN OTHERS THEN
9575: x_return_status := fnd_api.g_ret_sts_unexp_error;
9576: ROLLBACK TO inv_lot;
9577: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
9578: if( x_msg_count > 1 ) then
9579: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);

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

9573: print_debug('In g_exc_unexpected_error ' || SQLERRM, 9);
9574: WHEN OTHERS THEN
9575: x_return_status := fnd_api.g_ret_sts_unexp_error;
9576: ROLLBACK TO inv_lot;
9577: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
9578: if( x_msg_count > 1 ) then
9579: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);
9580: end if;
9581: print_debug('In others ' || SQLERRM, 9);

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

9575: x_return_status := fnd_api.g_ret_sts_unexp_error;
9576: ROLLBACK TO inv_lot;
9577: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
9578: if( x_msg_count > 1 ) then
9579: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);
9580: end if;
9581: print_debug('In others ' || SQLERRM, 9);
9582: END create_inv_lot;
9583:

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

9591: , x_lot_rec OUT NOCOPY MTL_LOT_NUMBERS%ROWTYPE
9592: , p_lot_rec IN MTL_LOT_NUMBERS%ROWTYPE
9593: , p_source IN NUMBER
9594: , p_api_version IN NUMBER
9595: , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
9596: , p_commit IN VARCHAR2 := fnd_api.g_false
9597: , p_validation_level IN NUMBER := fnd_api.g_valid_level_full
9598: , p_origin_txn_id IN NUMBER
9599: )

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

9592: , p_lot_rec IN MTL_LOT_NUMBERS%ROWTYPE
9593: , p_source IN NUMBER
9594: , p_api_version IN NUMBER
9595: , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
9596: , p_commit IN VARCHAR2 := fnd_api.g_false
9597: , p_validation_level IN NUMBER := fnd_api.g_valid_level_full
9598: , p_origin_txn_id IN NUMBER
9599: )
9600: IS

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

9593: , p_source IN NUMBER
9594: , p_api_version IN NUMBER
9595: , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
9596: , p_commit IN VARCHAR2 := fnd_api.g_false
9597: , p_validation_level IN NUMBER := fnd_api.g_valid_level_full
9598: , p_origin_txn_id IN NUMBER
9599: )
9600: IS
9601: BEGIN

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

9629: , x_lot_rec OUT NOCOPY MTL_LOT_NUMBERS%ROWTYPE
9630: , p_lot_rec IN MTL_LOT_NUMBERS%ROWTYPE
9631: , p_source IN NUMBER
9632: , p_api_version IN NUMBER
9633: , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
9634: , p_commit IN VARCHAR2 := fnd_api.g_false
9635: , p_validation_level IN NUMBER := fnd_api.g_valid_level_full
9636: , p_origin_txn_id IN NUMBER
9637: , p_caculate_flag IN VARCHAR2 --14192172

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

9630: , p_lot_rec IN MTL_LOT_NUMBERS%ROWTYPE
9631: , p_source IN NUMBER
9632: , p_api_version IN NUMBER
9633: , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
9634: , p_commit IN VARCHAR2 := fnd_api.g_false
9635: , p_validation_level IN NUMBER := fnd_api.g_valid_level_full
9636: , p_origin_txn_id IN NUMBER
9637: , p_caculate_flag IN VARCHAR2 --14192172
9638: )

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

9631: , p_source IN NUMBER
9632: , p_api_version IN NUMBER
9633: , p_init_msg_list IN VARCHAR2 := fnd_api.g_false
9634: , p_commit IN VARCHAR2 := fnd_api.g_false
9635: , p_validation_level IN NUMBER := fnd_api.g_valid_level_full
9636: , p_origin_txn_id IN NUMBER
9637: , p_caculate_flag IN VARCHAR2 --14192172
9638: )
9639: IS

Line 9708: IF fnd_api.to_boolean(p_init_msg_list) THEN

9704: SAVEPOINT inv_lot_1;
9705:
9706: -- Bug 7686319
9707: -- Initialize message list if p_init_msg_list is set to TRUE.
9708: IF fnd_api.to_boolean(p_init_msg_list) THEN
9709: fnd_msg_pub.initialize;
9710: END IF;
9711:
9712: x_return_status := g_ret_sts_success;

Line 9721: RAISE fnd_api.g_exc_error;

9717: print_debug('Value for mandatory field organization id cannot be null.', 9);
9718: END IF;
9719: fnd_message.set_name('INV', 'INV_NULL_ORG_EXP') ;
9720: fnd_msg_pub.ADD;
9721: RAISE fnd_api.g_exc_error;
9722: END IF ;
9723:
9724:
9725: /* Check item existence in Mtl_system_items Table */

Line 9751: x_return_status := fnd_api.g_ret_sts_error;

9747: END IF;
9748:
9749: fnd_message.set_name('INV', 'INV_NO_LOT_CONTROL');
9750: fnd_msg_pub.ADD;
9751: x_return_status := fnd_api.g_ret_sts_error;
9752: RAISE g_exc_error;
9753: END IF; /* l_chk_msi_attr_rec.lot_control_code = 1 */
9754:
9755: /* If not child lot enabled and p_lot_rec.parent_lot_number IS NOT NULL then error out */

Line 9763: x_return_status := fnd_api.g_ret_sts_error;

9759: END IF;
9760:
9761: fnd_message.set_name('INV', 'INV_ITEM_CLOT_DISABLE_EXP');
9762: fnd_msg_pub.ADD;
9763: x_return_status := fnd_api.g_ret_sts_error;
9764: RAISE g_exc_error;
9765: END IF; /* l_chk_msi_attr_rec.child_lot_flag = 'N' */
9766:
9767: /* Check for User-defined expiration date */

Line 9776: RAISE fnd_api.g_exc_error;

9772: END IF;
9773:
9774: fnd_message.set_name('INV', 'INV_NULL_EXPIRATION_DATE_EXP') ;
9775: fnd_msg_pub.ADD;
9776: RAISE fnd_api.g_exc_error;
9777: END IF;
9778:
9779: /* Check whether item is grade controlled */
9780: IF p_lot_rec.grade_code IS NOT NULL AND

Line 9788: RAISE fnd_api.g_exc_error;

9784: END IF;
9785:
9786: fnd_message.set_name('INV', 'INV_ITEM_NOT_GRADE_CTRL_EXP');
9787: fnd_msg_pub.ADD;
9788: RAISE fnd_api.g_exc_error;
9789: END IF;
9790:
9791: END IF; /* c_chk_msi_attr*/
9792:

Line 9801: RAISE fnd_api.g_exc_error;

9797: END IF;
9798:
9799: fnd_message.set_name('INV', 'INV_NULL_CLOT_EXP');
9800: fnd_msg_pub.ADD;
9801: RAISE fnd_api.g_exc_error;
9802: ELSE
9803: /* Check child lot existence in Mtl_Lot_Numbers Table */
9804: OPEN c_chk_lot_exists(p_lot_rec.lot_number,p_lot_rec.inventory_item_id,p_lot_rec.organization_id);
9805: FETCH c_chk_lot_exists INTO l_chk_lot_rec;

Line 9817: RAISE fnd_api.g_exc_error;

9813: -- Child lot already exists in the system: LOT_NUMBER
9814: fnd_message.set_name('INV', 'INV_CLOT_EXISTS_EXP');
9815: fnd_message.set_token('LOT_NUMBER', to_char(p_lot_rec.lot_number));
9816: fnd_msg_pub.ADD;
9817: RAISE fnd_api.g_exc_error;
9818: END IF;
9819: /* Child lot DOES NOT exist in Mtl_Lot_Numbers Table. */
9820: CLOSE c_chk_lot_exists;
9821: END IF;

Line 9832: RAISE fnd_api.g_exc_error;

9828: print_debug('Parent lot number and child lot number can not be same.', 9);
9829: END IF;
9830: fnd_message.set_name('INV', 'INV_SAME_LOT_NAMES_EXP');
9831: fnd_msg_pub.ADD;
9832: RAISE fnd_api.g_exc_error;
9833: END IF ;
9834: END IF ;
9835:
9836: /* Check for existence of Parent Lot in Mtl_Lot_Numbers Table */

Line 9854: IF p_validation_level = FND_API.G_VALID_LEVEL_FULL THEN

9850: CLOSE c_chk_lot_exists;
9851:
9852: /* BASIC CHECKS , End */
9853:
9854: IF p_validation_level = FND_API.G_VALID_LEVEL_FULL THEN
9855:
9856: -- Call Populate_Lot_Records API.
9857: -- Populate_Lot_Records API returns following OUT parameters:
9858: -- x_parent_lot_rec,

Line 9862: l_init_msg_list := p_init_msg_list; --fnd_api.g_false; Bug# 7686319

9858: -- x_parent_lot_rec,
9859: -- x_lot_rec
9860: l_source := p_source ;
9861: l_api_version := 1.0;
9862: l_init_msg_list := p_init_msg_list; --fnd_api.g_false; Bug# 7686319
9863: l_commit := fnd_api.g_false;
9864:
9865: Inv_Lot_Api_Pkg.Populate_Lot_Records (
9866: p_lot_rec => p_lot_rec

Line 9863: l_commit := fnd_api.g_false;

9859: -- x_lot_rec
9860: l_source := p_source ;
9861: l_api_version := 1.0;
9862: l_init_msg_list := p_init_msg_list; --fnd_api.g_false; Bug# 7686319
9863: l_commit := fnd_api.g_false;
9864:
9865: Inv_Lot_Api_Pkg.Populate_Lot_Records (
9866: p_lot_rec => p_lot_rec
9867: , p_copy_lot_attribute_flag => l_copy_lot_attribute_flag

Line 9903: IF p_validation_level = FND_API.G_VALID_LEVEL_NONE THEN

9899:
9900: END IF; /* p_validation_level = G_VALID_LEVEL_FULL */
9901:
9902:
9903: IF p_validation_level = FND_API.G_VALID_LEVEL_NONE THEN
9904: -- Populate local variable l_child_lot_rec with proper attribute's values that are passed as input parameter to this API.
9905: l_child_lot_rec := p_lot_rec ;
9906:
9907: END IF; /* p_validation_level = G_VALID_LEVEL_NONE */

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

10101: EXCEPTION
10102: WHEN NO_DATA_FOUND THEN
10103: x_return_status := g_ret_sts_error;
10104: ROLLBACK TO inv_lot_1;
10105: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
10106: if( x_msg_count > 1 ) then
10107: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);
10108: end if;
10109: print_debug('In No data found Create_Inv_Lot ' || SQLERRM, 9);

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

10103: x_return_status := g_ret_sts_error;
10104: ROLLBACK TO inv_lot_1;
10105: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
10106: if( x_msg_count > 1 ) then
10107: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);
10108: end if;
10109: print_debug('In No data found Create_Inv_Lot ' || SQLERRM, 9);
10110: WHEN g_exc_error THEN
10111: x_return_status := g_ret_sts_error;

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

10109: print_debug('In No data found Create_Inv_Lot ' || SQLERRM, 9);
10110: WHEN g_exc_error THEN
10111: x_return_status := g_ret_sts_error;
10112: ROLLBACK TO inv_lot_1;
10113: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
10114: if( x_msg_count > 1 ) then
10115: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);
10116: end if;
10117: print_debug('In g_exc_error Create_Inv_Lot ' || SQLERRM, 9);

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

10111: x_return_status := g_ret_sts_error;
10112: ROLLBACK TO inv_lot_1;
10113: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
10114: if( x_msg_count > 1 ) then
10115: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);
10116: end if;
10117: print_debug('In g_exc_error Create_Inv_Lot ' || SQLERRM, 9);
10118: WHEN g_exc_unexpected_error THEN
10119: x_return_status := g_ret_sts_unexp_error;

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

10117: print_debug('In g_exc_error Create_Inv_Lot ' || SQLERRM, 9);
10118: WHEN g_exc_unexpected_error THEN
10119: x_return_status := g_ret_sts_unexp_error;
10120: ROLLBACK TO inv_lot_1;
10121: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
10122: if( x_msg_count > 1 ) then
10123: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);
10124: end if;
10125: print_debug('In g_exc_unexpected_error Create_Inv_Lot ' || SQLERRM, 9);

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

10119: x_return_status := g_ret_sts_unexp_error;
10120: ROLLBACK TO inv_lot_1;
10121: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
10122: if( x_msg_count > 1 ) then
10123: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);
10124: end if;
10125: print_debug('In g_exc_unexpected_error Create_Inv_Lot ' || SQLERRM, 9);
10126: WHEN OTHERS THEN
10127: x_return_status := g_ret_sts_unexp_error;

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

10125: print_debug('In g_exc_unexpected_error Create_Inv_Lot ' || SQLERRM, 9);
10126: WHEN OTHERS THEN
10127: x_return_status := g_ret_sts_unexp_error;
10128: ROLLBACK TO inv_lot_1;
10129: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
10130: if( x_msg_count > 1 ) then
10131: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);
10132: end if;
10133: print_debug('In others Create_Inv_Lot ' || SQLERRM, 9);

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

10127: x_return_status := g_ret_sts_unexp_error;
10128: ROLLBACK TO inv_lot_1;
10129: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
10130: if( x_msg_count > 1 ) then
10131: x_msg_data := fnd_msg_pub.get(x_msg_count, FND_API.G_FALSE);
10132: end if;
10133: print_debug('In others Create_Inv_Lot ' || SQLERRM, 9);
10134:
10135: END Create_Inv_lot;

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

10155: p_transaction_action_id IN NUMBER := NULL,
10156: p_transaction_source_type_id IN NUMBER := NULL,
10157: p_lot_number IN VARCHAR2 := NULL,
10158: p_api_version IN NUMBER,
10159: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
10160: p_commit IN VARCHAR2 := fnd_api.g_false,
10161: p_validation_level IN NUMBER
10162: := fnd_api.g_valid_level_full,
10163: x_return_status OUT NOCOPY VARCHAR2,

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

10156: p_transaction_source_type_id IN NUMBER := NULL,
10157: p_lot_number IN VARCHAR2 := NULL,
10158: p_api_version IN NUMBER,
10159: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
10160: p_commit IN VARCHAR2 := fnd_api.g_false,
10161: p_validation_level IN NUMBER
10162: := fnd_api.g_valid_level_full,
10163: x_return_status OUT NOCOPY VARCHAR2,
10164: x_msg_count OUT NOCOPY NUMBER,

Line 10162: := fnd_api.g_valid_level_full,

10158: p_api_version IN NUMBER,
10159: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
10160: p_commit IN VARCHAR2 := fnd_api.g_false,
10161: p_validation_level IN NUMBER
10162: := fnd_api.g_valid_level_full,
10163: x_return_status OUT NOCOPY VARCHAR2,
10164: x_msg_count OUT NOCOPY NUMBER,
10165: x_msg_data OUT NOCOPY VARCHAR2,
10166: p_transaction_source_id IN NUMBER := NULL,

Line 10213: WHEN fnd_api.g_exc_error THEN

10209: RETURN x_parent_call;
10210:
10211:
10212: EXCEPTION
10213: WHEN fnd_api.g_exc_error THEN
10214: ROLLBACK TO apiauto_gen_lot_apipub;
10215: x_return_status := fnd_api.g_ret_sts_error;
10216: fnd_msg_pub.count_and_get (
10217: p_encoded => fnd_api.g_false,

Line 10215: x_return_status := fnd_api.g_ret_sts_error;

10211:
10212: EXCEPTION
10213: WHEN fnd_api.g_exc_error THEN
10214: ROLLBACK TO apiauto_gen_lot_apipub;
10215: x_return_status := fnd_api.g_ret_sts_error;
10216: fnd_msg_pub.count_and_get (
10217: p_encoded => fnd_api.g_false,
10218: p_count => x_msg_count,
10219: p_data => x_msg_data

Line 10217: p_encoded => fnd_api.g_false,

10213: WHEN fnd_api.g_exc_error THEN
10214: ROLLBACK TO apiauto_gen_lot_apipub;
10215: x_return_status := fnd_api.g_ret_sts_error;
10216: fnd_msg_pub.count_and_get (
10217: p_encoded => fnd_api.g_false,
10218: p_count => x_msg_count,
10219: p_data => x_msg_data
10220: );
10221: RETURN ( NULL );

Line 10222: WHEN fnd_api.g_exc_unexpected_error THEN

10218: p_count => x_msg_count,
10219: p_data => x_msg_data
10220: );
10221: RETURN ( NULL );
10222: WHEN fnd_api.g_exc_unexpected_error THEN
10223: ROLLBACK TO apiauto_gen_lot_apipub;
10224: x_return_status := fnd_api.g_ret_sts_unexp_error;
10225: fnd_msg_pub.count_and_get (
10226: p_encoded => fnd_api.g_false,

Line 10224: x_return_status := fnd_api.g_ret_sts_unexp_error;

10220: );
10221: RETURN ( NULL );
10222: WHEN fnd_api.g_exc_unexpected_error THEN
10223: ROLLBACK TO apiauto_gen_lot_apipub;
10224: x_return_status := fnd_api.g_ret_sts_unexp_error;
10225: fnd_msg_pub.count_and_get (
10226: p_encoded => fnd_api.g_false,
10227: p_count => x_msg_count,
10228: p_data => x_msg_data

Line 10226: p_encoded => fnd_api.g_false,

10222: WHEN fnd_api.g_exc_unexpected_error THEN
10223: ROLLBACK TO apiauto_gen_lot_apipub;
10224: x_return_status := fnd_api.g_ret_sts_unexp_error;
10225: fnd_msg_pub.count_and_get (
10226: p_encoded => fnd_api.g_false,
10227: p_count => x_msg_count,
10228: p_data => x_msg_data
10229: );
10230: RETURN ( NULL );

Line 10233: x_return_status := fnd_api.g_ret_sts_unexp_error;

10229: );
10230: RETURN ( NULL );
10231: WHEN OTHERS THEN
10232: ROLLBACK TO apiauto_gen_lot_apipub;
10233: x_return_status := fnd_api.g_ret_sts_unexp_error;
10234:
10235: IF fnd_msg_pub.check_msg_level ( fnd_msg_pub.g_msg_lvl_unexp_error) THEN
10236: fnd_msg_pub.add_exc_msg ( g_pkg_name, l_api_name );
10237: END IF;

Line 10240: p_encoded => fnd_api.g_false,

10236: fnd_msg_pub.add_exc_msg ( g_pkg_name, l_api_name );
10237: END IF;
10238:
10239: fnd_msg_pub.count_and_get (
10240: p_encoded => fnd_api.g_false,
10241: p_count => x_msg_count,
10242: p_data => x_msg_data
10243: );
10244: RETURN ( NULL );

Line 10271: ,p_init_msg_list IN VARCHAR2 DEFAULT FND_API.G_FALSE

10267: #
10268: ######################################################################################*/
10269:
10270: PROCEDURE CHECK_LOT_INDIVISIBILITY ( p_api_version IN NUMBER DEFAULT 1.0
10271: ,p_init_msg_list IN VARCHAR2 DEFAULT FND_API.G_FALSE
10272: ,p_commit IN VARCHAR2 DEFAULT FND_API.G_FALSE
10273: ,p_validation_level IN NUMBER DEFAULT FND_API.G_VALID_LEVEL_FULL
10274: ,p_rti_id IN NUMBER
10275: ,p_transaction_type_id IN NUMBER

Line 10272: ,p_commit IN VARCHAR2 DEFAULT FND_API.G_FALSE

10268: ######################################################################################*/
10269:
10270: PROCEDURE CHECK_LOT_INDIVISIBILITY ( p_api_version IN NUMBER DEFAULT 1.0
10271: ,p_init_msg_list IN VARCHAR2 DEFAULT FND_API.G_FALSE
10272: ,p_commit IN VARCHAR2 DEFAULT FND_API.G_FALSE
10273: ,p_validation_level IN NUMBER DEFAULT FND_API.G_VALID_LEVEL_FULL
10274: ,p_rti_id IN NUMBER
10275: ,p_transaction_type_id IN NUMBER
10276: ,p_lot_number IN VARCHAR2

Line 10273: ,p_validation_level IN NUMBER DEFAULT FND_API.G_VALID_LEVEL_FULL

10269:
10270: PROCEDURE CHECK_LOT_INDIVISIBILITY ( p_api_version IN NUMBER DEFAULT 1.0
10271: ,p_init_msg_list IN VARCHAR2 DEFAULT FND_API.G_FALSE
10272: ,p_commit IN VARCHAR2 DEFAULT FND_API.G_FALSE
10273: ,p_validation_level IN NUMBER DEFAULT FND_API.G_VALID_LEVEL_FULL
10274: ,p_rti_id IN NUMBER
10275: ,p_transaction_type_id IN NUMBER
10276: ,p_lot_number IN VARCHAR2
10277: ,p_lot_quantity IN NUMBER

Line 10327: IF NOT fnd_api.compatible_api_call(

10323:
10324: BEGIN
10325:
10326: -- Standard call to check for call compatibility.
10327: IF NOT fnd_api.compatible_api_call(
10328: l_api_version,
10329: p_api_version,
10330: l_api_name,
10331: 'inv_lot_api_pub'

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

10330: l_api_name,
10331: 'inv_lot_api_pub'
10332: ) THEN
10333: IF (g_debug = 1) THEN
10334: print_debug('FND_API not compatible INV_LOT_API_PUB.CHECK_LOT_INDIVISIBILITY: '||l_progress, 1);
10335: END IF;
10336: RAISE fnd_api.g_exc_unexpected_error;
10337: END IF;
10338:

Line 10336: RAISE fnd_api.g_exc_unexpected_error;

10332: ) THEN
10333: IF (g_debug = 1) THEN
10334: print_debug('FND_API not compatible INV_LOT_API_PUB.CHECK_LOT_INDIVISIBILITY: '||l_progress, 1);
10335: END IF;
10336: RAISE fnd_api.g_exc_unexpected_error;
10337: END IF;
10338:
10339: l_progress := '001';
10340:

Line 10342: IF fnd_api.to_boolean(p_init_msg_list) THEN

10338:
10339: l_progress := '001';
10340:
10341: -- Initialize message list if p_init_msg_list is set to TRUE.
10342: IF fnd_api.to_boolean(p_init_msg_list) THEN
10343: fnd_msg_pub.initialize;
10344: END IF;
10345:
10346: --Initialize the return status

Line 10347: x_return_status := FND_API.G_RET_STS_SUCCESS;

10343: fnd_msg_pub.initialize;
10344: END IF;
10345:
10346: --Initialize the return status
10347: x_return_status := FND_API.G_RET_STS_SUCCESS;
10348:
10349: l_progress := '002';
10350:
10351: /*Calling the lot indivisible function only for the following

Line 10392: ,p_init_msg_list =>FND_API.G_FALSE

10388:
10389: ---call the indiv function
10390: IF NOT (INV_LOT_API_PUB.validate_lot_indivisible(
10391: p_api_version =>1.0
10392: ,p_init_msg_list =>FND_API.G_FALSE
10393: ,p_commit =>FND_API.G_FALSE
10394: ,p_validation_level =>FND_API.G_VALID_LEVEL_FULL
10395: ,p_transaction_type_id =>p_transaction_type_id
10396: ,p_organization_id =>l_to_organization_id

Line 10393: ,p_commit =>FND_API.G_FALSE

10389: ---call the indiv function
10390: IF NOT (INV_LOT_API_PUB.validate_lot_indivisible(
10391: p_api_version =>1.0
10392: ,p_init_msg_list =>FND_API.G_FALSE
10393: ,p_commit =>FND_API.G_FALSE
10394: ,p_validation_level =>FND_API.G_VALID_LEVEL_FULL
10395: ,p_transaction_type_id =>p_transaction_type_id
10396: ,p_organization_id =>l_to_organization_id
10397: ,p_inventory_item_id =>l_item_id

Line 10394: ,p_validation_level =>FND_API.G_VALID_LEVEL_FULL

10390: IF NOT (INV_LOT_API_PUB.validate_lot_indivisible(
10391: p_api_version =>1.0
10392: ,p_init_msg_list =>FND_API.G_FALSE
10393: ,p_commit =>FND_API.G_FALSE
10394: ,p_validation_level =>FND_API.G_VALID_LEVEL_FULL
10395: ,p_transaction_type_id =>p_transaction_type_id
10396: ,p_organization_id =>l_to_organization_id
10397: ,p_inventory_item_id =>l_item_id
10398: ,p_revision =>p_revision

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

10413:
10414: l_progress := '005';
10415:
10416: ---If lot indiv fails fro a Return trx...
10417: IF ((l_return_status <> FND_API.G_RET_STS_SUCCESS) AND p_transaction_type_id IN (36,37)) THEN
10418:
10419: /*---logic to explain the values of p_transaction_type_id
10420: IF (transaction_type IN ('RETURN TO RECEIVING','RETURN TO VENDOR','RETURN TO CUSTOMER')) THEN
10421: IF (source_document_code = 'PO') THEN

Line 10492: l_return_status := FND_API.G_RET_STS_SUCCESS ;

10488:
10489: l_progress := '010';
10490:
10491: --overriding the false return status of lot indiv api
10492: l_return_status := FND_API.G_RET_STS_SUCCESS ;
10493:
10494: IF g_debug = 1 THEN
10495: print_debug('l_return_status'|| l_return_status, 9);
10496: print_debug('set return status of validate_lot_indivisible to true'|| l_progress, 9);

Line 10504: IF l_return_status = fnd_api.g_ret_sts_error THEN

10500: END IF; -------- IF ((l_return_status <>...... AND p_transaction_type_id IN.......
10501:
10502: l_progress := '011';
10503:
10504: IF l_return_status = fnd_api.g_ret_sts_error THEN
10505: IF g_debug = 1 THEN
10506: print_debug('Program INV_LOT_API_PUB.validate_lot_indivisible has failed with a user defined exception '|| l_progress, 9);
10507: END IF;
10508:

Line 10514: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN

10510: FND_MESSAGE.SET_TOKEN('PGM_NAME','INV_LOT_API_PUB.validate_lot_indivisible');
10511: fnd_msg_pub.ADD;
10512: RAISE g_exc_error;
10513:
10514: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
10515: l_progress := '012' ;
10516:
10517: IF g_debug = 1 THEN
10518: print_debug('Program INV_LOT_API_PUB.validate_lot_indivisible has failed with a Unexpected exception' || l_progress, 9);

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

10521: FND_MESSAGE.SET_NAME('INV','INV_PROGRAM_ERROR');
10522: FND_MESSAGE.SET_TOKEN('PGM_NAME','INV_LOT_API_PUB.validate_lot_indivisible');
10523: fnd_msg_pub.ADD;
10524: RAISE g_exc_unexpected_error;
10525: END IF;------------IF l_return_status = fnd_api.g_ret_sts_error THEN
10526:
10527:
10528: END IF;--------IF NOT (INV_LOT_API_PUB.validate_lot_indivisible(
10529:

Line 10551: x_return_status := fnd_api.g_ret_sts_error;

10547:
10548: EXCEPTION
10549:
10550: WHEN NO_DATA_FOUND THEN
10551: x_return_status := fnd_api.g_ret_sts_error;
10552:
10553: fnd_msg_pub.count_and_get(
10554: p_encoded => fnd_api.g_false ,
10555: p_count => x_msg_count ,

Line 10554: p_encoded => fnd_api.g_false ,

10550: WHEN NO_DATA_FOUND THEN
10551: x_return_status := fnd_api.g_ret_sts_error;
10552:
10553: fnd_msg_pub.count_and_get(
10554: p_encoded => fnd_api.g_false ,
10555: p_count => x_msg_count ,
10556: p_data => x_msg_data
10557: );
10558: IF( x_msg_count > 1 ) THEN

Line 10561: FND_API.G_FALSE

10557: );
10558: IF( x_msg_count > 1 ) THEN
10559: x_msg_data := fnd_msg_pub.get(
10560: x_msg_count ,
10561: FND_API.G_FALSE
10562: );
10563: END IF ;
10564:
10565:

Line 10573: x_return_status := fnd_api.g_ret_sts_error;

10569: END IF;
10570:
10571: WHEN g_exc_error THEN
10572:
10573: x_return_status := fnd_api.g_ret_sts_error;
10574:
10575: fnd_msg_pub.count_and_get(
10576: p_encoded => fnd_api.g_false ,
10577: p_count => x_msg_count ,

Line 10576: p_encoded => fnd_api.g_false ,

10572:
10573: x_return_status := fnd_api.g_ret_sts_error;
10574:
10575: fnd_msg_pub.count_and_get(
10576: p_encoded => fnd_api.g_false ,
10577: p_count => x_msg_count ,
10578: p_data => x_msg_data
10579: );
10580:

Line 10584: FND_API.G_FALSE

10580:
10581: IF( x_msg_count > 1 ) THEN
10582: x_msg_data := fnd_msg_pub.get(
10583: x_msg_count ,
10584: FND_API.G_FALSE
10585: );
10586: END IF;
10587:
10588: IF g_debug = 1 THEN

Line 10595: x_return_status := fnd_api.g_ret_sts_unexp_error;

10591: END IF;
10592:
10593:
10594: WHEN g_exc_unexpected_error THEN
10595: x_return_status := fnd_api.g_ret_sts_unexp_error;
10596:
10597: fnd_msg_pub.count_and_get(
10598: p_encoded => fnd_api.g_false ,
10599: p_count => x_msg_count ,

Line 10598: p_encoded => fnd_api.g_false ,

10594: WHEN g_exc_unexpected_error THEN
10595: x_return_status := fnd_api.g_ret_sts_unexp_error;
10596:
10597: fnd_msg_pub.count_and_get(
10598: p_encoded => fnd_api.g_false ,
10599: p_count => x_msg_count ,
10600: p_data => x_msg_data
10601: );
10602: IF( x_msg_count > 1 ) THEN

Line 10605: FND_API.G_FALSE

10601: );
10602: IF( x_msg_count > 1 ) THEN
10603: x_msg_data := fnd_msg_pub.get(
10604: x_msg_count ,
10605: FND_API.G_FALSE
10606: );
10607: END IF ;
10608:
10609: IF g_debug = 1 THEN

Line 10615: x_return_status := fnd_api.g_ret_sts_unexp_error;

10611: --------print_stacked_messages;
10612: END IF;
10613:
10614: WHEN OTHERS THEN
10615: x_return_status := fnd_api.g_ret_sts_unexp_error;
10616: fnd_msg_pub.count_and_get(
10617: p_encoded => fnd_api.g_false ,
10618: p_count => x_msg_count ,
10619: p_data => x_msg_data

Line 10617: p_encoded => fnd_api.g_false ,

10613:
10614: WHEN OTHERS THEN
10615: x_return_status := fnd_api.g_ret_sts_unexp_error;
10616: fnd_msg_pub.count_and_get(
10617: p_encoded => fnd_api.g_false ,
10618: p_count => x_msg_count ,
10619: p_data => x_msg_data
10620: );
10621: IF( x_msg_count > 1 ) THEN

Line 10624: FND_API.G_FALSE);

10620: );
10621: IF( x_msg_count > 1 ) THEN
10622: x_msg_data := fnd_msg_pub.get(
10623: x_msg_count ,
10624: FND_API.G_FALSE);
10625: END IF;
10626:
10627: IF g_debug = 1 THEN
10628: print_debug('Exitting CHECK_LOT_INDIVISIBILITY - In others error:'||TO_CHAR(SYSDATE, 'YYYY-MM-DD HH:DD:SS')||':'||l_progress, 1);

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

10656: --
10657: -----------------------------------------------------------------------
10658: FUNCTION validate_quantities(
10659: p_api_version IN NUMBER
10660: , p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE
10661: , p_transaction_type_id IN NUMBER
10662: , p_organization_id IN NUMBER
10663: , p_inventory_item_id IN NUMBER
10664: , p_revision IN VARCHAR2

Line 10716: IF FND_API.TO_BOOLEAN(p_init_msg_list) THEN

10712: IF (l_debug = 1) THEN
10713: inv_log_util.trace('validate_quantities: Start ', g_pkg_name, 9);
10714: END IF;
10715:
10716: IF FND_API.TO_BOOLEAN(p_init_msg_list) THEN
10717: FND_MSG_PUB.Initialize;
10718: END IF;
10719:
10720: -- Standard call to check for call compatibility.

Line 10721: IF NOT FND_API.COMPATIBLE_API_CALL( l_api_version

10717: FND_MSG_PUB.Initialize;
10718: END IF;
10719:
10720: -- Standard call to check for call compatibility.
10721: IF NOT FND_API.COMPATIBLE_API_CALL( l_api_version
10722: , p_api_version
10723: , l_api_name
10724: , G_PKG_NAME)
10725: THEN

Line 10726: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

10722: , p_api_version
10723: , l_api_name
10724: , G_PKG_NAME)
10725: THEN
10726: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
10727: END IF;
10728:
10729: /* =======================================================================
10730: Init variables

Line 10732: x_return_status := FND_API.G_RET_STS_SUCCESS;

10728:
10729: /* =======================================================================
10730: Init variables
10731: ======================================================================= */
10732: x_return_status := FND_API.G_RET_STS_SUCCESS;
10733:
10734: OPEN get_item_details( p_organization_id
10735: , p_inventory_item_id);
10736: FETCH get_item_details

Line 10750: RAISE FND_API.G_EXC_ERROR;

10746: FND_MESSAGE.SET_NAME('INV','ITEM_NOT_FOUND');
10747: FND_MESSAGE.SET_TOKEN('ORGANIZATION_ID', p_organization_id);
10748: FND_MESSAGE.SET_TOKEN('INVENTORY_ITEM_ID', p_inventory_item_id);
10749: FND_MSG_PUB.ADD;
10750: RAISE FND_API.G_EXC_ERROR;
10751: END IF;
10752: CLOSE get_item_details;
10753:
10754: --{

Line 10759: RAISE FND_API.G_EXC_ERROR;

10755: IF (l_tracking_quantity_ind = 'P') THEN
10756: IF (p_secondary_quantity IS NOT NULL) THEN
10757: FND_MESSAGE.SET_NAME('INV','INV_SECONDARY_QTY_NOT_REQUIRED');
10758: FND_MSG_PUB.ADD;
10759: RAISE FND_API.G_EXC_ERROR;
10760: END IF;
10761:
10762: IF (p_secondary_uom_code IS NOT NULL) THEN
10763: FND_MESSAGE.SET_NAME('INV','INV_SECONDARY_UOM_NOT_REQUIRED');

Line 10765: RAISE FND_API.G_EXC_ERROR;

10761:
10762: IF (p_secondary_uom_code IS NOT NULL) THEN
10763: FND_MESSAGE.SET_NAME('INV','INV_SECONDARY_UOM_NOT_REQUIRED');
10764: FND_MSG_PUB.ADD;
10765: RAISE FND_API.G_EXC_ERROR;
10766: END IF;
10767:
10768: ELSIF (l_tracking_quantity_ind = 'PS') THEN
10769: -- the item is DUOM controlled

Line 10775: RAISE FND_API.G_EXC_ERROR;

10771: /** UOM Validation **/
10772: IF (p_secondary_uom_code <> l_secondary_uom_code) THEN
10773: FND_MESSAGE.SET_NAME('INV','INV_INCORRECT_SECONDARY_UOM');
10774: FND_MSG_PUB.ADD;
10775: RAISE FND_API.G_EXC_ERROR;
10776: END IF;
10777:
10778: -- Set the default UOM2 if missing or incorrect:
10779: IF (p_secondary_uom_code IS NULL) THEN

Line 10792: RAISE FND_API.G_EXC_ERROR;

10788: inv_log_util.trace('validate_quantities: Missing both quantities or one qty for no default item ..', g_pkg_name, 9);
10789: END IF;
10790: FND_MESSAGE.SET_NAME('INV','INV_INT_QTYCODE');
10791: FND_MSG_PUB.ADD;
10792: RAISE FND_API.G_EXC_ERROR;
10793: END IF;
10794: --{
10795: IF (p_secondary_quantity IS NULL) THEN
10796: -- Set the Qty2 from Qty1 if missing:

Line 10814: RAISE FND_API.G_EXC_ERROR;

10810: inv_log_util.trace('validate_quantities: INV_CONVERT.INV_UM_CONVERT error ', g_pkg_name, 9);
10811: END IF;
10812: FND_MESSAGE.SET_NAME('INV','INV_NO_CONVERSION_ERR');
10813: FND_MSG_PUB.ADD;
10814: RAISE FND_API.G_EXC_ERROR;
10815: END IF;
10816: p_secondary_quantity := l_secondary_qty;
10817: IF (l_debug = 1) THEN
10818: inv_log_util.trace('validate_quantities: new secondary qty is: '|| l_secondary_qty , g_pkg_name, 9);

Line 10839: RAISE FND_API.G_EXC_ERROR;

10835: inv_log_util.trace('validate_quantities: INV_CONVERT.INV_UM_CONVERT ERROR ', g_pkg_name, 9);
10836: END IF;
10837: FND_MESSAGE.SET_NAME('INV','INV_NO_CONVERSION_ERR');
10838: FND_MSG_PUB.ADD;
10839: RAISE FND_API.G_EXC_ERROR;
10840: END IF;
10841: p_transaction_quantity := l_transaction_quantity;
10842: IF (l_debug = 1) THEN
10843: inv_log_util.trace('validate_quantities: new transaction qty is: '|| l_transaction_quantity , g_pkg_name, 9);

Line 10870: RAISE FND_API.G_EXC_ERROR;

10866: ' p_secondary_uom_code: ' || p_secondary_uom_code, g_pkg_name, 9);
10867: inv_log_util.trace(' p_lot_number: ' || p_lot_number || ' p_inventory_item_id: '||
10868: p_inventory_item_id || ' p_organization_id: ' || p_organization_id, g_pkg_name, 9);
10869: END IF;
10870: RAISE FND_API.G_EXC_ERROR;
10871: END IF;
10872: IF (l_debug = 1) THEN
10873: inv_log_util.trace('validate_quantities: INV_CONVERT.within_deviation (PASS)' , g_pkg_name, 9);
10874: END IF;

Line 10897: RAISE FND_API.G_EXC_ERROR;

10893: inv_log_util.trace('validate_quantities: INV_CONVERT.INV_UM_CONVERT error ', g_pkg_name, 9);
10894: END IF;
10895: FND_MESSAGE.SET_NAME('INV','INV_NO_CONVERSION_ERR');
10896: FND_MSG_PUB.ADD;
10897: RAISE FND_API.G_EXC_ERROR;
10898: END IF;
10899: p_primary_quantity := l_primary_quantity;
10900: IF (l_debug = 1) THEN
10901: inv_log_util.trace('validate_quantities: new primary qty is: '|| l_primary_quantity , g_pkg_name, 9);

Line 10931: RAISE FND_API.G_EXC_ERROR;

10927: -- the transaction is not valid regarding lot indivisible:
10928: IF (l_debug = 1) THEN
10929: inv_log_util.trace('validate_quantities: INV_LOT_API_PUB.VALIDATE_LOT_INDIVISIBLE (ERROR)', g_pkg_name, 9);
10930: END IF;
10931: RAISE FND_API.G_EXC_ERROR;
10932: END IF;
10933: IF (l_debug = 1) THEN
10934: inv_log_util.trace('validate_quantities: INV_LOT_API_PUB.VALIDATE_LOT_INDIVISIBLE (PASS) ', g_pkg_name, 9);
10935: END IF;

Line 10946: WHEN FND_API.G_EXC_ERROR THEN

10942:
10943: RETURN TRUE;
10944:
10945: EXCEPTION
10946: WHEN FND_API.G_EXC_ERROR THEN
10947: x_return_status := FND_API.G_RET_STS_ERROR;
10948: IF (l_debug = 1) THEN
10949: inv_log_util.trace('validate_quantities: FND_API.G_EXC_ERROR ', g_pkg_name, 9);
10950: END IF;

Line 10947: x_return_status := FND_API.G_RET_STS_ERROR;

10943: RETURN TRUE;
10944:
10945: EXCEPTION
10946: WHEN FND_API.G_EXC_ERROR THEN
10947: x_return_status := FND_API.G_RET_STS_ERROR;
10948: IF (l_debug = 1) THEN
10949: inv_log_util.trace('validate_quantities: FND_API.G_EXC_ERROR ', g_pkg_name, 9);
10950: END IF;
10951: FND_MSG_PUB.Count_AND_GET (p_count => x_msg_count, p_data => x_msg_data);

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

10945: EXCEPTION
10946: WHEN FND_API.G_EXC_ERROR THEN
10947: x_return_status := FND_API.G_RET_STS_ERROR;
10948: IF (l_debug = 1) THEN
10949: inv_log_util.trace('validate_quantities: FND_API.G_EXC_ERROR ', g_pkg_name, 9);
10950: END IF;
10951: FND_MSG_PUB.Count_AND_GET (p_count => x_msg_count, p_data => x_msg_data);
10952: RETURN FALSE;
10953:

Line 10954: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

10950: END IF;
10951: FND_MSG_PUB.Count_AND_GET (p_count => x_msg_count, p_data => x_msg_data);
10952: RETURN FALSE;
10953:
10954: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
10955: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
10956: IF (l_debug = 1) THEN
10957: inv_log_util.trace('validate_quantities:when unexp sqlcode= '||sqlcode||' sqlerrm= '||substr(sqlerrm,1,240), g_pkg_name, 9);
10958: END IF;

Line 10955: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

10951: FND_MSG_PUB.Count_AND_GET (p_count => x_msg_count, p_data => x_msg_data);
10952: RETURN FALSE;
10953:
10954: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
10955: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
10956: IF (l_debug = 1) THEN
10957: inv_log_util.trace('validate_quantities:when unexp sqlcode= '||sqlcode||' sqlerrm= '||substr(sqlerrm,1,240), g_pkg_name, 9);
10958: END IF;
10959: FND_MSG_PUB.Count_AND_GET (p_count => x_msg_count, p_data => x_msg_data);

Line 10963: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

10959: FND_MSG_PUB.Count_AND_GET (p_count => x_msg_count, p_data => x_msg_data);
10960: RETURN FALSE;
10961:
10962: WHEN OTHERS THEN
10963: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
10964: IF (l_debug = 1) THEN
10965: inv_log_util.trace('validate_quantities:when others sqlcode= '||sqlcode||' sqlerrm= '||substr(sqlerrm,1,240), g_pkg_name, 9);
10966: END IF;
10967: FND_MSG_PUB.Count_AND_GET (p_count => x_msg_count, p_data => x_msg_data);

Line 11147: , p_init_msg_list => fnd_api.g_false

11143: inv_log_util.trace('lot_UOM_conv_OrgTxf: 2' ||l_expiration_date, g_pkg_name,9);
11144: END IF;
11145: inv_lot_api_pub.insertlot(
11146: p_api_version => 1.0
11147: , p_init_msg_list => fnd_api.g_false
11148: , p_commit => fnd_api.g_false
11149: , p_validation_level => fnd_api.g_valid_level_full
11150: , p_inventory_item_id => p_inventory_item_id
11151: , p_organization_id => p_organization_id

Line 11148: , p_commit => fnd_api.g_false

11144: END IF;
11145: inv_lot_api_pub.insertlot(
11146: p_api_version => 1.0
11147: , p_init_msg_list => fnd_api.g_false
11148: , p_commit => fnd_api.g_false
11149: , p_validation_level => fnd_api.g_valid_level_full
11150: , p_inventory_item_id => p_inventory_item_id
11151: , p_organization_id => p_organization_id
11152: , p_lot_number => p_lot_number

Line 11149: , p_validation_level => fnd_api.g_valid_level_full

11145: inv_lot_api_pub.insertlot(
11146: p_api_version => 1.0
11147: , p_init_msg_list => fnd_api.g_false
11148: , p_commit => fnd_api.g_false
11149: , p_validation_level => fnd_api.g_valid_level_full
11150: , p_inventory_item_id => p_inventory_item_id
11151: , p_organization_id => p_organization_id
11152: , p_lot_number => p_lot_number
11153: , p_expiration_date => l_expiration_date

Line 11162: IF x_return_status <> FND_API.g_ret_sts_success THEN

11158: , x_return_status => x_return_status
11159: , x_msg_count => x_msg_count
11160: , x_msg_data => x_msg_data
11161: );
11162: IF x_return_status <> FND_API.g_ret_sts_success THEN
11163: IF (l_debug = 1) THEN
11164: inv_log_util.trace('Lot insertion failed. ',g_pkg_name,9);
11165: END IF;
11166: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

Line 11166: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

11162: IF x_return_status <> FND_API.g_ret_sts_success THEN
11163: IF (l_debug = 1) THEN
11164: inv_log_util.trace('Lot insertion failed. ',g_pkg_name,9);
11165: END IF;
11166: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
11167: END IF;
11168: IF (l_debug = 1) THEN
11169: inv_log_util.trace('lot_UOM_conv_OrgTxf: 3', g_pkg_name,9);
11170: END IF;

Line 11189: x_return_status := FND_API.G_RET_STS_SUCCESS;

11185: IF (l_debug = 1) THEN
11186: inv_log_util.trace('lot_UOM_conv_OrgTxf: end', g_pkg_name,9);
11187: END IF;
11188:
11189: x_return_status := FND_API.G_RET_STS_SUCCESS;
11190:
11191: EXCEPTION
11192: WHEN FND_API.G_EXC_ERROR THEN
11193: x_return_status := FND_API.G_RET_STS_ERROR;

Line 11192: WHEN FND_API.G_EXC_ERROR THEN

11188:
11189: x_return_status := FND_API.G_RET_STS_SUCCESS;
11190:
11191: EXCEPTION
11192: WHEN FND_API.G_EXC_ERROR THEN
11193: x_return_status := FND_API.G_RET_STS_ERROR;
11194: IF (l_debug = 1) THEN
11195: inv_log_util.trace('lot_UOM_conv_OrgTxf: FND_API.G_EXC_ERROR ', g_pkg_name,9);
11196: END IF;

Line 11193: x_return_status := FND_API.G_RET_STS_ERROR;

11189: x_return_status := FND_API.G_RET_STS_SUCCESS;
11190:
11191: EXCEPTION
11192: WHEN FND_API.G_EXC_ERROR THEN
11193: x_return_status := FND_API.G_RET_STS_ERROR;
11194: IF (l_debug = 1) THEN
11195: inv_log_util.trace('lot_UOM_conv_OrgTxf: FND_API.G_EXC_ERROR ', g_pkg_name,9);
11196: END IF;
11197: FND_MSG_PUB.Count_AND_GET (p_count => x_msg_count, p_data => x_msg_data);

Line 11195: inv_log_util.trace('lot_UOM_conv_OrgTxf: FND_API.G_EXC_ERROR ', g_pkg_name,9);

11191: EXCEPTION
11192: WHEN FND_API.G_EXC_ERROR THEN
11193: x_return_status := FND_API.G_RET_STS_ERROR;
11194: IF (l_debug = 1) THEN
11195: inv_log_util.trace('lot_UOM_conv_OrgTxf: FND_API.G_EXC_ERROR ', g_pkg_name,9);
11196: END IF;
11197: FND_MSG_PUB.Count_AND_GET (p_count => x_msg_count, p_data => x_msg_data);
11198:
11199: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

Line 11199: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

11195: inv_log_util.trace('lot_UOM_conv_OrgTxf: FND_API.G_EXC_ERROR ', g_pkg_name,9);
11196: END IF;
11197: FND_MSG_PUB.Count_AND_GET (p_count => x_msg_count, p_data => x_msg_data);
11198:
11199: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
11200: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
11201: IF (l_debug = 1) THEN
11202: inv_log_util.trace('lot_UOM_conv_OrgTxf:when unexp sqlcode= '||sqlcode||' sqlerrm= '||substr(sqlerrm,1,240), g_pkg_name,9);
11203: END IF;

Line 11200: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

11196: END IF;
11197: FND_MSG_PUB.Count_AND_GET (p_count => x_msg_count, p_data => x_msg_data);
11198:
11199: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
11200: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
11201: IF (l_debug = 1) THEN
11202: inv_log_util.trace('lot_UOM_conv_OrgTxf:when unexp sqlcode= '||sqlcode||' sqlerrm= '||substr(sqlerrm,1,240), g_pkg_name,9);
11203: END IF;
11204: FND_MSG_PUB.Count_AND_GET (p_count => x_msg_count, p_data => x_msg_data);

Line 11207: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

11203: END IF;
11204: FND_MSG_PUB.Count_AND_GET (p_count => x_msg_count, p_data => x_msg_data);
11205:
11206: WHEN OTHERS THEN
11207: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
11208: IF (l_debug = 1) THEN
11209: inv_log_util.trace('lot_UOM_conv_OrgTxf:when others sqlcode= '||sqlcode||' sqlerrm= '||substr(sqlerrm,1,240), g_pkg_name,9);
11210: END IF;
11211: FND_MSG_PUB.Count_AND_GET (p_count => x_msg_count, p_data => x_msg_data);

Line 11298: x_return_status := FND_API.G_RET_STS_SUCCESS;

11294: and INVENTORY_ITEM_ID=p_inventory_item_id
11295: AND TO_UOM_CODE=p_to_UOM_code
11296: AND FROM_UOM_CODE=p_from_UOM_code ;
11297:
11298: x_return_status := FND_API.G_RET_STS_SUCCESS;
11299: --IF (l_debug = 1) THEN
11300: inv_log_util.trace('create_lot_UOM_conv_orgtxf: end ', g_pkg_name, 9);
11301: --END IF;
11302: EXCEPTION

Line 11303: WHEN FND_API.G_EXC_ERROR THEN

11299: --IF (l_debug = 1) THEN
11300: inv_log_util.trace('create_lot_UOM_conv_orgtxf: end ', g_pkg_name, 9);
11301: --END IF;
11302: EXCEPTION
11303: WHEN FND_API.G_EXC_ERROR THEN
11304: x_return_status := FND_API.G_RET_STS_ERROR;
11305: IF (l_debug = 1) THEN
11306: inv_log_util.trace('create_lot_UOM_conv_orgtxf: FND_API.G_EXC_ERROR ', g_pkg_name,9);
11307: END IF;

Line 11304: x_return_status := FND_API.G_RET_STS_ERROR;

11300: inv_log_util.trace('create_lot_UOM_conv_orgtxf: end ', g_pkg_name, 9);
11301: --END IF;
11302: EXCEPTION
11303: WHEN FND_API.G_EXC_ERROR THEN
11304: x_return_status := FND_API.G_RET_STS_ERROR;
11305: IF (l_debug = 1) THEN
11306: inv_log_util.trace('create_lot_UOM_conv_orgtxf: FND_API.G_EXC_ERROR ', g_pkg_name,9);
11307: END IF;
11308: FND_MSG_PUB.Count_AND_GET (p_count => x_msg_count, p_data => x_msg_data);

Line 11306: inv_log_util.trace('create_lot_UOM_conv_orgtxf: FND_API.G_EXC_ERROR ', g_pkg_name,9);

11302: EXCEPTION
11303: WHEN FND_API.G_EXC_ERROR THEN
11304: x_return_status := FND_API.G_RET_STS_ERROR;
11305: IF (l_debug = 1) THEN
11306: inv_log_util.trace('create_lot_UOM_conv_orgtxf: FND_API.G_EXC_ERROR ', g_pkg_name,9);
11307: END IF;
11308: FND_MSG_PUB.Count_AND_GET (p_count => x_msg_count, p_data => x_msg_data);
11309:
11310: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

Line 11310: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

11306: inv_log_util.trace('create_lot_UOM_conv_orgtxf: FND_API.G_EXC_ERROR ', g_pkg_name,9);
11307: END IF;
11308: FND_MSG_PUB.Count_AND_GET (p_count => x_msg_count, p_data => x_msg_data);
11309:
11310: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
11311: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
11312: IF (l_debug = 1) THEN
11313: inv_log_util.trace('create_lot_UOM_conv_orgtxf:when unexp sqlcode= '||sqlcode||' sqlerrm= '||substr(sqlerrm,1,240), g_pkg_name,9);
11314: END IF;

Line 11311: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

11307: END IF;
11308: FND_MSG_PUB.Count_AND_GET (p_count => x_msg_count, p_data => x_msg_data);
11309:
11310: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
11311: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
11312: IF (l_debug = 1) THEN
11313: inv_log_util.trace('create_lot_UOM_conv_orgtxf:when unexp sqlcode= '||sqlcode||' sqlerrm= '||substr(sqlerrm,1,240), g_pkg_name,9);
11314: END IF;
11315: FND_MSG_PUB.Count_AND_GET (p_count => x_msg_count, p_data => x_msg_data);

Line 11318: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

11314: END IF;
11315: FND_MSG_PUB.Count_AND_GET (p_count => x_msg_count, p_data => x_msg_data);
11316:
11317: WHEN OTHERS THEN
11318: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
11319: IF (l_debug = 1) THEN
11320: inv_log_util.trace('create_lot_UOM_conv_orgtxf:when others sqlcode= '||sqlcode||' sqlerrm= '||substr(sqlerrm,1,240), g_pkg_name,9);
11321: END IF;
11322: FND_MSG_PUB.Count_AND_GET (p_count => x_msg_count, p_data => x_msg_data);