DBA Data[Home] [Help]

APPS.WMS_CONTAINER_PVT dependencies on INV_CACHE

Line 28: g_client_rec inv_cache.ct_rec_type; -- Added For LSP Project, bug 9087971

24: TYPE item_uom_conversion_tb IS TABLE OF from_uom_code_tb INDEX BY BINARY_INTEGER;
25: g_item_uom_conversion_tb item_uom_conversion_tb;
26: g_item_uom_conversion_tb_cnt NUMBER := 0;
27:
28: g_client_rec inv_cache.ct_rec_type; -- Added For LSP Project, bug 9087971
29:
30: PROCEDURE mdebug(msg IN VARCHAR2, LEVEL NUMBER := G_MESSAGE) IS
31: BEGIN
32: --DBMS_OUTPUT.put_line(msg);

Line 561: /*IF NOT ( INV_Cache.set_to_locator( p_locator_id ) THEN

557: IF ( p_subinventory IS NOT NULL AND p_locator_id IS NOT NULL ) THEN
558: g_progress := 'Get UOM for Weight and volume of Locator';
559:
560: -- Get locator information from cache
561: /*IF NOT ( INV_Cache.set_to_locator( p_locator_id ) THEN
562: --set_to_locator not implemented
563: END IF;*/
564:
565: SELECT mil.location_weight_uom_code

Line 736: l_client_rec inv_cache.ct_rec_type;

732: ) IS
733: l_api_name CONSTANT VARCHAR2(30) := 'set_client_info';
734: l_debug NUMBER := NVL(FND_PROFILE.VALUE('INV_DEBUG_TRACE'),0);
735: l_client_id NUMBER;
736: l_client_rec inv_cache.ct_rec_type;
737: BEGIN
738: SELECT client_id INTO l_client_id
739: FROM MTL_CLIENT_PARAMETERS
740: WHERE client_code = p_client_code;

Line 742: inv_cache.get_client_default_parameters

738: SELECT client_id INTO l_client_id
739: FROM MTL_CLIENT_PARAMETERS
740: WHERE client_code = p_client_code;
741:
742: inv_cache.get_client_default_parameters
743: ( p_client_id => l_client_id,
744: x_return_status => x_ret_status,
745: x_client_parameters_rec => l_client_rec
746: );

Line 850: l_progress := 'Calling INV_CACHE.Set_Item_Rec to get item values';

846: RAISE fnd_api.g_exc_error;
847: END IF;
848:
849: IF ( p_lpn_table(i).inventory_item_id IS NOT NULL) THEN
850: l_progress := 'Calling INV_CACHE.Set_Item_Rec to get item values';
851:
852: IF ( inv_cache.set_item_rec(
853: p_organization_id => p_lpn_table(i).organization_id
854: , p_item_id => p_lpn_table(i).inventory_item_id ) )

Line 852: IF ( inv_cache.set_item_rec(

848:
849: IF ( p_lpn_table(i).inventory_item_id IS NOT NULL) THEN
850: l_progress := 'Calling INV_CACHE.Set_Item_Rec to get item values';
851:
852: IF ( inv_cache.set_item_rec(
853: p_organization_id => p_lpn_table(i).organization_id
854: , p_item_id => p_lpn_table(i).inventory_item_id ) )
855: THEN
856: IF (l_debug = 1) THEN

Line 857: mdebug('Got Item info citm='||inv_cache.item_rec.container_item_flag||' snctl='||inv_cache.item_rec.serial_number_control_code, G_INFO);

853: p_organization_id => p_lpn_table(i).organization_id
854: , p_item_id => p_lpn_table(i).inventory_item_id ) )
855: THEN
856: IF (l_debug = 1) THEN
857: mdebug('Got Item info citm='||inv_cache.item_rec.container_item_flag||' snctl='||inv_cache.item_rec.serial_number_control_code, G_INFO);
858: mdebug('wuom='||inv_cache.item_rec.weight_uom_code||' wt='||inv_cache.item_rec.unit_weight||' vuom='||inv_cache.item_rec.volume_uom_code||' vol='||inv_cache.item_rec.unit_volume, G_INFO);
859: END IF;
860:
861: IF ( inv_cache.item_rec.container_item_flag = 'N' ) THEN

Line 858: mdebug('wuom='||inv_cache.item_rec.weight_uom_code||' wt='||inv_cache.item_rec.unit_weight||' vuom='||inv_cache.item_rec.volume_uom_code||' vol='||inv_cache.item_rec.unit_volume, G_INFO);

854: , p_item_id => p_lpn_table(i).inventory_item_id ) )
855: THEN
856: IF (l_debug = 1) THEN
857: mdebug('Got Item info citm='||inv_cache.item_rec.container_item_flag||' snctl='||inv_cache.item_rec.serial_number_control_code, G_INFO);
858: mdebug('wuom='||inv_cache.item_rec.weight_uom_code||' wt='||inv_cache.item_rec.unit_weight||' vuom='||inv_cache.item_rec.volume_uom_code||' vol='||inv_cache.item_rec.unit_volume, G_INFO);
859: END IF;
860:
861: IF ( inv_cache.item_rec.container_item_flag = 'N' ) THEN
862: IF (l_debug = 1) THEN

Line 861: IF ( inv_cache.item_rec.container_item_flag = 'N' ) THEN

857: mdebug('Got Item info citm='||inv_cache.item_rec.container_item_flag||' snctl='||inv_cache.item_rec.serial_number_control_code, G_INFO);
858: mdebug('wuom='||inv_cache.item_rec.weight_uom_code||' wt='||inv_cache.item_rec.unit_weight||' vuom='||inv_cache.item_rec.volume_uom_code||' vol='||inv_cache.item_rec.unit_volume, G_INFO);
859: END IF;
860:
861: IF ( inv_cache.item_rec.container_item_flag = 'N' ) THEN
862: IF (l_debug = 1) THEN
863: mdebug(p_lpn_table(i).inventory_item_id || ' is not a container', 1);
864: END IF;
865: fnd_message.set_name('WMS', 'WMS_ITEM_NOT_CONTAINER');

Line 866: fnd_message.set_token('ITEM', inv_cache.item_rec.segment1);

862: IF (l_debug = 1) THEN
863: mdebug(p_lpn_table(i).inventory_item_id || ' is not a container', 1);
864: END IF;
865: fnd_message.set_name('WMS', 'WMS_ITEM_NOT_CONTAINER');
866: fnd_message.set_token('ITEM', inv_cache.item_rec.segment1);
867: fnd_msg_pub.ADD;
868: RAISE fnd_api.g_exc_error;
869: END IF;
870:

Line 871: p_lpn_table(i).tare_weight_uom_code := inv_cache.item_rec.weight_uom_code;

867: fnd_msg_pub.ADD;
868: RAISE fnd_api.g_exc_error;
869: END IF;
870:
871: p_lpn_table(i).tare_weight_uom_code := inv_cache.item_rec.weight_uom_code;
872: p_lpn_table(i).tare_weight := inv_cache.item_rec.unit_weight;
873: p_lpn_table(i).container_volume_uom := inv_cache.item_rec.volume_uom_code;
874: p_lpn_table(i).container_volume := inv_cache.item_rec.unit_volume;
875: ELSE

Line 872: p_lpn_table(i).tare_weight := inv_cache.item_rec.unit_weight;

868: RAISE fnd_api.g_exc_error;
869: END IF;
870:
871: p_lpn_table(i).tare_weight_uom_code := inv_cache.item_rec.weight_uom_code;
872: p_lpn_table(i).tare_weight := inv_cache.item_rec.unit_weight;
873: p_lpn_table(i).container_volume_uom := inv_cache.item_rec.volume_uom_code;
874: p_lpn_table(i).container_volume := inv_cache.item_rec.unit_volume;
875: ELSE
876: l_progress := 'Error calling INV_CACHE.Set_Item_Rec for orgid'||p_lpn_table(i).organization_id||' item id='||p_lpn_table(i).inventory_item_id;

Line 873: p_lpn_table(i).container_volume_uom := inv_cache.item_rec.volume_uom_code;

869: END IF;
870:
871: p_lpn_table(i).tare_weight_uom_code := inv_cache.item_rec.weight_uom_code;
872: p_lpn_table(i).tare_weight := inv_cache.item_rec.unit_weight;
873: p_lpn_table(i).container_volume_uom := inv_cache.item_rec.volume_uom_code;
874: p_lpn_table(i).container_volume := inv_cache.item_rec.unit_volume;
875: ELSE
876: l_progress := 'Error calling INV_CACHE.Set_Item_Rec for orgid'||p_lpn_table(i).organization_id||' item id='||p_lpn_table(i).inventory_item_id;
877: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_ITEM');

Line 874: p_lpn_table(i).container_volume := inv_cache.item_rec.unit_volume;

870:
871: p_lpn_table(i).tare_weight_uom_code := inv_cache.item_rec.weight_uom_code;
872: p_lpn_table(i).tare_weight := inv_cache.item_rec.unit_weight;
873: p_lpn_table(i).container_volume_uom := inv_cache.item_rec.volume_uom_code;
874: p_lpn_table(i).container_volume := inv_cache.item_rec.unit_volume;
875: ELSE
876: l_progress := 'Error calling INV_CACHE.Set_Item_Rec for orgid'||p_lpn_table(i).organization_id||' item id='||p_lpn_table(i).inventory_item_id;
877: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_ITEM');
878: fnd_msg_pub.ADD;

Line 876: l_progress := 'Error calling INV_CACHE.Set_Item_Rec for orgid'||p_lpn_table(i).organization_id||' item id='||p_lpn_table(i).inventory_item_id;

872: p_lpn_table(i).tare_weight := inv_cache.item_rec.unit_weight;
873: p_lpn_table(i).container_volume_uom := inv_cache.item_rec.volume_uom_code;
874: p_lpn_table(i).container_volume := inv_cache.item_rec.unit_volume;
875: ELSE
876: l_progress := 'Error calling INV_CACHE.Set_Item_Rec for orgid'||p_lpn_table(i).organization_id||' item id='||p_lpn_table(i).inventory_item_id;
877: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_ITEM');
878: fnd_msg_pub.ADD;
879: RAISE fnd_api.g_exc_error;
880: END IF;

Line 1344: IF ( NOT Inv_Cache.set_org_rec( p_organization_id => p_lpn_attributes.organization_id ) )THEN

1340: END IF;
1341:
1342: l_progress := 'Validate Organization ID';
1343:
1344: IF ( NOT Inv_Cache.set_org_rec( p_organization_id => p_lpn_attributes.organization_id ) )THEN
1345: IF (l_debug = 1) THEN
1346: mdebug(p_lpn_attributes.organization_id||' is an invalid organization id', G_ERROR);
1347: END IF;
1348: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_ORG');

Line 1371: mdebug('Got org info pfx='||inv_cache.org_rec.lpn_prefix||' sfx='||inv_cache.org_rec.lpn_suffix||' seq='||inv_cache.org_rec.lpn_starting_number||' lgth='||inv_cache.org_rec.total_lpn_length||' ucc='||inv_cache.org_rec.ucc_128_suffix_flag, 5);

1367: END IF;
1368:
1369:
1370: IF (l_debug = 1) THEN
1371: mdebug('Got org info pfx='||inv_cache.org_rec.lpn_prefix||' sfx='||inv_cache.org_rec.lpn_suffix||' seq='||inv_cache.org_rec.lpn_starting_number||' lgth='||inv_cache.org_rec.total_lpn_length||' ucc='||inv_cache.org_rec.ucc_128_suffix_flag, 5);
1372: END IF;
1373:
1374: IF ( p_lpn_attributes.inventory_item_id IS NOT NULL) THEN
1375: l_progress := 'Validate Container Item';

Line 1377: IF ( inv_cache.set_item_rec(

1373:
1374: IF ( p_lpn_attributes.inventory_item_id IS NOT NULL) THEN
1375: l_progress := 'Validate Container Item';
1376:
1377: IF ( inv_cache.set_item_rec(
1378: p_organization_id => p_lpn_attributes.organization_id
1379: , p_item_id => p_lpn_attributes.inventory_item_id ) )
1380: THEN
1381: IF (l_debug = 1) THEN

Line 1382: mdebug('Itm info citm='||inv_cache.item_rec.container_item_flag||' snctl='||inv_cache.item_rec.serial_number_control_code, G_INFO);

1378: p_organization_id => p_lpn_attributes.organization_id
1379: , p_item_id => p_lpn_attributes.inventory_item_id ) )
1380: THEN
1381: IF (l_debug = 1) THEN
1382: mdebug('Itm info citm='||inv_cache.item_rec.container_item_flag||' snctl='||inv_cache.item_rec.serial_number_control_code, G_INFO);
1383: END IF;
1384:
1385: IF ( inv_cache.item_rec.container_item_flag = 'N' ) THEN
1386: IF (l_debug = 1) THEN

Line 1385: IF ( inv_cache.item_rec.container_item_flag = 'N' ) THEN

1381: IF (l_debug = 1) THEN
1382: mdebug('Itm info citm='||inv_cache.item_rec.container_item_flag||' snctl='||inv_cache.item_rec.serial_number_control_code, G_INFO);
1383: END IF;
1384:
1385: IF ( inv_cache.item_rec.container_item_flag = 'N' ) THEN
1386: IF (l_debug = 1) THEN
1387: mdebug(p_lpn_attributes.inventory_item_id|| ' is not a container', G_ERROR);
1388: END IF;
1389: fnd_message.set_name('WMS', 'WMS_ITEM_NOT_CONTAINER');

Line 1390: fnd_message.set_token('ITEM', inv_cache.item_rec.segment1);

1386: IF (l_debug = 1) THEN
1387: mdebug(p_lpn_attributes.inventory_item_id|| ' is not a container', G_ERROR);
1388: END IF;
1389: fnd_message.set_name('WMS', 'WMS_ITEM_NOT_CONTAINER');
1390: fnd_message.set_token('ITEM', inv_cache.item_rec.segment1);
1391: fnd_msg_pub.ADD;
1392: RAISE fnd_api.g_exc_error;
1393: END IF;
1394: ELSE

Line 1395: l_progress := 'Error calling INV_CACHE.Set_Item_Rec for orgid'||p_lpn_attributes.organization_id||' item id='||p_lpn_attributes.inventory_item_id;

1391: fnd_msg_pub.ADD;
1392: RAISE fnd_api.g_exc_error;
1393: END IF;
1394: ELSE
1395: l_progress := 'Error calling INV_CACHE.Set_Item_Rec for orgid'||p_lpn_attributes.organization_id||' item id='||p_lpn_attributes.inventory_item_id;
1396: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_ITEM');
1397: fnd_msg_pub.ADD;
1398: RAISE fnd_api.g_exc_error;
1399: END IF;

Line 1421: ELSIF ( inv_cache.org_rec.lpn_starting_number IS NOT NULL ) THEN

1417: ELSIF ( l_lsp_installed = 3 AND l_client_code IS NOT NULL AND g_client_rec.client_rec.lpn_starting_number IS NOT NULL ) THEN
1418: l_seq_source := l_from_client;
1419: l_curr_seq := null;
1420:
1421: ELSIF ( inv_cache.org_rec.lpn_starting_number IS NOT NULL ) THEN
1422: l_seq_source := l_from_org;
1423: l_curr_seq := null;
1424: ELSE
1425: -- neither defined at org level or user level use db seq

Line 1437: l_ucc_128_suffix_flag := inv_cache.org_rec.ucc_128_suffix_flag;

1433: IF ( l_ucc_128_suffix_flag IS NULL ) THEN
1434: IF (l_seq_source = l_from_client) THEN
1435: l_ucc_128_suffix_flag := g_client_rec.client_rec.ucc_128_suffix_flag;
1436: ELSE
1437: l_ucc_128_suffix_flag := inv_cache.org_rec.ucc_128_suffix_flag;
1438: END IF;
1439: END IF;
1440:
1441: IF ( l_lpn_prefix = FND_API.G_MISS_CHAR ) THEN

Line 1447: l_lpn_prefix := NVL(l_lpn_prefix, inv_cache.org_rec.lpn_prefix);

1443: ELSE
1444: IF (l_seq_source = l_from_client) THEN
1445: l_lpn_prefix := NVL(l_lpn_prefix, g_client_rec.client_rec.lpn_prefix);
1446: ELSE
1447: l_lpn_prefix := NVL(l_lpn_prefix, inv_cache.org_rec.lpn_prefix);
1448: END IF;
1449: END IF;
1450:
1451: IF ( l_lpn_suffix = FND_API.G_MISS_CHAR ) THEN

Line 1457: l_lpn_suffix := NVL(l_lpn_suffix, inv_cache.org_rec.lpn_suffix );

1453: ELSE
1454: IF (l_seq_source = l_from_client) THEN
1455: l_lpn_suffix := NVL(l_lpn_suffix, g_client_rec.client_rec.lpn_suffix );
1456: ELSE
1457: l_lpn_suffix := NVL(l_lpn_suffix, inv_cache.org_rec.lpn_suffix );
1458: END IF;
1459: END IF;
1460:
1461: IF ( l_total_lpn_length = FND_API.G_MISS_NUM ) THEN

Line 1467: l_total_lpn_length := NVL(l_total_lpn_length, inv_cache.org_rec.total_lpn_length);

1463: ELSE
1464: IF (l_seq_source = l_from_client) THEN
1465: l_total_lpn_length := NVL(l_total_lpn_length, g_client_rec.client_rec.total_lpn_length);
1466: ELSE
1467: l_total_lpn_length := NVL(l_total_lpn_length, inv_cache.org_rec.total_lpn_length);
1468: END IF;
1469: END IF;
1470:
1471: IF ( l_ucc_128_suffix_flag = 'Y' ) THEN

Line 1512: IF ( p_lpn_attributes.inventory_item_id IS NULL OR inv_cache.item_rec.serial_number_control_code = 1 ) THEN

1508: l_progress := 'Checking for serial numbers';
1509:
1510: IF ( p_serial_ranges.last > 0 AND p_serial_ranges(1).fm_serial_number IS NOT NULL ) THEN
1511: -- Check that item is under serial control
1512: IF ( p_lpn_attributes.inventory_item_id IS NULL OR inv_cache.item_rec.serial_number_control_code = 1 ) THEN
1513: IF (l_debug = 1) THEN
1514: mdebug('Item '||inv_cache.item_rec.inventory_item_id||' is not serial controlled', G_ERROR);
1515: END IF;
1516: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_SER');

Line 1514: mdebug('Item '||inv_cache.item_rec.inventory_item_id||' is not serial controlled', G_ERROR);

1510: IF ( p_serial_ranges.last > 0 AND p_serial_ranges(1).fm_serial_number IS NOT NULL ) THEN
1511: -- Check that item is under serial control
1512: IF ( p_lpn_attributes.inventory_item_id IS NULL OR inv_cache.item_rec.serial_number_control_code = 1 ) THEN
1513: IF (l_debug = 1) THEN
1514: mdebug('Item '||inv_cache.item_rec.inventory_item_id||' is not serial controlled', G_ERROR);
1515: END IF;
1516: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_SER');
1517: fnd_msg_pub.ADD;
1518: RAISE fnd_api.g_exc_error;

Line 2264: IF ( NOT Inv_Cache.set_org_rec( p_organization_id => NVL(p_lpn_table(lpn_tbl_cnt).organization_id, l_old.organization_id)) )THEN

2260: l_progress := 'License Plate Number';
2261: IF ( p_lpn_table(lpn_tbl_cnt).license_plate_number <> l_old.license_plate_number ) THEN
2262: l_progress := 'Validate Organization ID';
2263:
2264: IF ( NOT Inv_Cache.set_org_rec( p_organization_id => NVL(p_lpn_table(lpn_tbl_cnt).organization_id, l_old.organization_id)) )THEN
2265: IF (l_debug = 1) THEN
2266: mdebug(NVL(p_lpn_table(lpn_tbl_cnt).organization_id, l_old.organization_id)||' is an invalid organization id', G_ERROR);
2267: END IF;
2268: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_ORG');

Line 2274: mdebug('Got org info wms_enabled='||inv_cache.org_rec.wms_enabled_flag, 5);

2270: RAISE fnd_api.g_exc_error;
2271: END IF;
2272:
2273: IF (l_debug = 1) THEN
2274: mdebug('Got org info wms_enabled='||inv_cache.org_rec.wms_enabled_flag, 5);
2275: END IF;
2276:
2277: IF ( inv_cache.org_rec.wms_enabled_flag = 'Y' ) THEN
2278: -- License Plate Number cannot be updated in a WMS organziation

Line 2277: IF ( inv_cache.org_rec.wms_enabled_flag = 'Y' ) THEN

2273: IF (l_debug = 1) THEN
2274: mdebug('Got org info wms_enabled='||inv_cache.org_rec.wms_enabled_flag, 5);
2275: END IF;
2276:
2277: IF ( inv_cache.org_rec.wms_enabled_flag = 'Y' ) THEN
2278: -- License Plate Number cannot be updated in a WMS organziation
2279: fnd_message.set_name('WMS', 'WMS_UPDATE_LPN_ATTR_ERR');
2280: fnd_message.set_token('ATTR', 'License Plate Number');
2281: fnd_msg_pub.ADD;

Line 2306: l_progress := 'Calling INV_CACHE.Set_Item_Rec to get item values';

2302: END IF;
2303: RAISE fnd_api.g_exc_error;
2304: END IF;*/
2305:
2306: l_progress := 'Calling INV_CACHE.Set_Item_Rec to get item values';
2307: IF ( inv_cache.set_item_rec(
2308: p_organization_id => NVL(p_lpn_table(lpn_tbl_cnt).organization_id, l_old.organization_id)
2309: , p_item_id => p_lpn_table(lpn_tbl_cnt).inventory_item_id ) )
2310: THEN

Line 2307: IF ( inv_cache.set_item_rec(

2303: RAISE fnd_api.g_exc_error;
2304: END IF;*/
2305:
2306: l_progress := 'Calling INV_CACHE.Set_Item_Rec to get item values';
2307: IF ( inv_cache.set_item_rec(
2308: p_organization_id => NVL(p_lpn_table(lpn_tbl_cnt).organization_id, l_old.organization_id)
2309: , p_item_id => p_lpn_table(lpn_tbl_cnt).inventory_item_id ) )
2310: THEN
2311: IF (l_debug = 1) THEN

Line 2312: mdebug('Got Item info citm='||inv_cache.item_rec.container_item_flag||' snctl='||inv_cache.item_rec.serial_number_control_code, G_INFO);

2308: p_organization_id => NVL(p_lpn_table(lpn_tbl_cnt).organization_id, l_old.organization_id)
2309: , p_item_id => p_lpn_table(lpn_tbl_cnt).inventory_item_id ) )
2310: THEN
2311: IF (l_debug = 1) THEN
2312: mdebug('Got Item info citm='||inv_cache.item_rec.container_item_flag||' snctl='||inv_cache.item_rec.serial_number_control_code, G_INFO);
2313: mdebug('wuom='||inv_cache.item_rec.weight_uom_code||' wt='||inv_cache.item_rec.unit_weight||' vuom='||inv_cache.item_rec.volume_uom_code||' vol='||inv_cache.item_rec.unit_volume, G_INFO);
2314: END IF;
2315:
2316: IF ( inv_cache.item_rec.container_item_flag = 'N' ) THEN

Line 2313: mdebug('wuom='||inv_cache.item_rec.weight_uom_code||' wt='||inv_cache.item_rec.unit_weight||' vuom='||inv_cache.item_rec.volume_uom_code||' vol='||inv_cache.item_rec.unit_volume, G_INFO);

2309: , p_item_id => p_lpn_table(lpn_tbl_cnt).inventory_item_id ) )
2310: THEN
2311: IF (l_debug = 1) THEN
2312: mdebug('Got Item info citm='||inv_cache.item_rec.container_item_flag||' snctl='||inv_cache.item_rec.serial_number_control_code, G_INFO);
2313: mdebug('wuom='||inv_cache.item_rec.weight_uom_code||' wt='||inv_cache.item_rec.unit_weight||' vuom='||inv_cache.item_rec.volume_uom_code||' vol='||inv_cache.item_rec.unit_volume, G_INFO);
2314: END IF;
2315:
2316: IF ( inv_cache.item_rec.container_item_flag = 'N' ) THEN
2317: IF (l_debug = 1) THEN

Line 2316: IF ( inv_cache.item_rec.container_item_flag = 'N' ) THEN

2312: mdebug('Got Item info citm='||inv_cache.item_rec.container_item_flag||' snctl='||inv_cache.item_rec.serial_number_control_code, G_INFO);
2313: mdebug('wuom='||inv_cache.item_rec.weight_uom_code||' wt='||inv_cache.item_rec.unit_weight||' vuom='||inv_cache.item_rec.volume_uom_code||' vol='||inv_cache.item_rec.unit_volume, G_INFO);
2314: END IF;
2315:
2316: IF ( inv_cache.item_rec.container_item_flag = 'N' ) THEN
2317: IF (l_debug = 1) THEN
2318: mdebug(p_lpn_table(lpn_tbl_cnt).inventory_item_id || ' is not a container', 1);
2319: END IF;
2320: fnd_message.set_name('WMS', 'WMS_ITEM_NOT_CONTAINER');

Line 2321: fnd_message.set_token('ITEM', inv_cache.item_rec.segment1);

2317: IF (l_debug = 1) THEN
2318: mdebug(p_lpn_table(lpn_tbl_cnt).inventory_item_id || ' is not a container', 1);
2319: END IF;
2320: fnd_message.set_name('WMS', 'WMS_ITEM_NOT_CONTAINER');
2321: fnd_message.set_token('ITEM', inv_cache.item_rec.segment1);
2322: fnd_msg_pub.ADD;
2323: RAISE fnd_api.g_exc_error;
2324: END IF;
2325: ELSE

Line 2326: l_progress := 'Error calling INV_CACHE.Set_Item_Rec for orgid='||NVL(p_lpn_table(lpn_tbl_cnt).organization_id, l_old.organization_id)||' item id='||p_lpn_table(lpn_tbl_cnt).inventory_item_id;

2322: fnd_msg_pub.ADD;
2323: RAISE fnd_api.g_exc_error;
2324: END IF;
2325: ELSE
2326: l_progress := 'Error calling INV_CACHE.Set_Item_Rec for orgid='||NVL(p_lpn_table(lpn_tbl_cnt).organization_id, l_old.organization_id)||' item id='||p_lpn_table(lpn_tbl_cnt).inventory_item_id;
2327: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_ITEM');
2328: fnd_msg_pub.ADD;
2329: RAISE fnd_api.g_exc_error;
2330: END IF;

Line 2367: IF (inv_cache.set_item_rec(

2363: END IF;
2364: ELSIF ( p_lpn_table(lpn_tbl_cnt).inventory_item_id IS NOT NULL
2365: AND (Nvl(p_lpn_table(lpn_tbl_cnt).inventory_item_id,G_NULL_NUM) <> Nvl(l_old.inventory_item_id,G_NULL_NUM)) ) THEN --Bug#6504032 Modified this ELSIF to allow modifying and attaching container
2366: IF ( l_old.inventory_item_id IS NOT NULL ) THEN
2367: IF (inv_cache.set_item_rec(
2368: p_organization_id => NVL(p_lpn_table(lpn_tbl_cnt).organization_id, l_old.organization_id)
2369: , p_item_id => l_old.inventory_item_id ))
2370: THEN
2371: IF (l_debug = 1) THEN

Line 2372: mdebug('Got Old Item info citm='||inv_cache.item_rec.container_item_flag||' snctl='||inv_cache.item_rec.serial_number_control_code, G_INFO);

2368: p_organization_id => NVL(p_lpn_table(lpn_tbl_cnt).organization_id, l_old.organization_id)
2369: , p_item_id => l_old.inventory_item_id ))
2370: THEN
2371: IF (l_debug = 1) THEN
2372: mdebug('Got Old Item info citm='||inv_cache.item_rec.container_item_flag||' snctl='||inv_cache.item_rec.serial_number_control_code, G_INFO);
2373: mdebug('wuom='||inv_cache.item_rec.weight_uom_code||' wt='||inv_cache.item_rec.unit_weight||' vuom='||inv_cache.item_rec.volume_uom_code||' vol='||inv_cache.item_rec.unit_volume, G_INFO);
2374: END IF;
2375: ELSE
2376: l_progress := 'Error calling INV_CACHE.Set_Item_Rec for orgid='||NVL(p_lpn_table(lpn_tbl_cnt).organization_id, l_old.organization_id)||' item id='||l_old.inventory_item_id;

Line 2373: mdebug('wuom='||inv_cache.item_rec.weight_uom_code||' wt='||inv_cache.item_rec.unit_weight||' vuom='||inv_cache.item_rec.volume_uom_code||' vol='||inv_cache.item_rec.unit_volume, G_INFO);

2369: , p_item_id => l_old.inventory_item_id ))
2370: THEN
2371: IF (l_debug = 1) THEN
2372: mdebug('Got Old Item info citm='||inv_cache.item_rec.container_item_flag||' snctl='||inv_cache.item_rec.serial_number_control_code, G_INFO);
2373: mdebug('wuom='||inv_cache.item_rec.weight_uom_code||' wt='||inv_cache.item_rec.unit_weight||' vuom='||inv_cache.item_rec.volume_uom_code||' vol='||inv_cache.item_rec.unit_volume, G_INFO);
2374: END IF;
2375: ELSE
2376: l_progress := 'Error calling INV_CACHE.Set_Item_Rec for orgid='||NVL(p_lpn_table(lpn_tbl_cnt).organization_id, l_old.organization_id)||' item id='||l_old.inventory_item_id;
2377: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_ITEM');

Line 2376: l_progress := 'Error calling INV_CACHE.Set_Item_Rec for orgid='||NVL(p_lpn_table(lpn_tbl_cnt).organization_id, l_old.organization_id)||' item id='||l_old.inventory_item_id;

2372: mdebug('Got Old Item info citm='||inv_cache.item_rec.container_item_flag||' snctl='||inv_cache.item_rec.serial_number_control_code, G_INFO);
2373: mdebug('wuom='||inv_cache.item_rec.weight_uom_code||' wt='||inv_cache.item_rec.unit_weight||' vuom='||inv_cache.item_rec.volume_uom_code||' vol='||inv_cache.item_rec.unit_volume, G_INFO);
2374: END IF;
2375: ELSE
2376: l_progress := 'Error calling INV_CACHE.Set_Item_Rec for orgid='||NVL(p_lpn_table(lpn_tbl_cnt).organization_id, l_old.organization_id)||' item id='||l_old.inventory_item_id;
2377: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_ITEM');
2378: fnd_msg_pub.ADD;
2379: RAISE fnd_api.g_exc_error;
2380: END IF;

Line 2381: IF ( inv_cache.item_rec.unit_weight IS NOT NULL AND

2377: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_ITEM');
2378: fnd_msg_pub.ADD;
2379: RAISE fnd_api.g_exc_error;
2380: END IF;
2381: IF ( inv_cache.item_rec.unit_weight IS NOT NULL AND
2382: inv_cache.item_rec.weight_uom_code IS NOT NULL ) THEN
2383:
2384: IF ( NVL(l_old.tare_weight, 0) = 0 OR l_old.tare_weight_uom_code IS NULL ) THEN
2385: l_new.tare_weight := 0;

Line 2382: inv_cache.item_rec.weight_uom_code IS NOT NULL ) THEN

2378: fnd_msg_pub.ADD;
2379: RAISE fnd_api.g_exc_error;
2380: END IF;
2381: IF ( inv_cache.item_rec.unit_weight IS NOT NULL AND
2382: inv_cache.item_rec.weight_uom_code IS NOT NULL ) THEN
2383:
2384: IF ( NVL(l_old.tare_weight, 0) = 0 OR l_old.tare_weight_uom_code IS NULL ) THEN
2385: l_new.tare_weight := 0;
2386: l_new.tare_weight_uom_code := NULL;

Line 2387: ELSIF ( l_old.tare_weight_uom_code = inv_cache.item_rec.weight_uom_code ) THEN

2383:
2384: IF ( NVL(l_old.tare_weight, 0) = 0 OR l_old.tare_weight_uom_code IS NULL ) THEN
2385: l_new.tare_weight := 0;
2386: l_new.tare_weight_uom_code := NULL;
2387: ELSIF ( l_old.tare_weight_uom_code = inv_cache.item_rec.weight_uom_code ) THEN
2388: l_new.tare_weight := l_old.tare_weight - inv_cache.item_rec.unit_weight;
2389: l_old.tare_weight := l_old.tare_weight - inv_cache.item_rec.unit_weight;
2390: l_new.tare_weight_uom_code := l_old.tare_weight_uom_code;
2391: ELSE -- Both are not null but with different UOMs need to convert

Line 2388: l_new.tare_weight := l_old.tare_weight - inv_cache.item_rec.unit_weight;

2384: IF ( NVL(l_old.tare_weight, 0) = 0 OR l_old.tare_weight_uom_code IS NULL ) THEN
2385: l_new.tare_weight := 0;
2386: l_new.tare_weight_uom_code := NULL;
2387: ELSIF ( l_old.tare_weight_uom_code = inv_cache.item_rec.weight_uom_code ) THEN
2388: l_new.tare_weight := l_old.tare_weight - inv_cache.item_rec.unit_weight;
2389: l_old.tare_weight := l_old.tare_weight - inv_cache.item_rec.unit_weight;
2390: l_new.tare_weight_uom_code := l_old.tare_weight_uom_code;
2391: ELSE -- Both are not null but with different UOMs need to convert
2392: l_new.tare_weight := Convert_UOM(inv_cache.item_rec.inventory_item_id, inv_cache.item_rec.unit_weight, inv_cache.item_rec.weight_uom_code, l_old.tare_weight_uom_code, G_NO_CONV_RETURN_NULL);

Line 2389: l_old.tare_weight := l_old.tare_weight - inv_cache.item_rec.unit_weight;

2385: l_new.tare_weight := 0;
2386: l_new.tare_weight_uom_code := NULL;
2387: ELSIF ( l_old.tare_weight_uom_code = inv_cache.item_rec.weight_uom_code ) THEN
2388: l_new.tare_weight := l_old.tare_weight - inv_cache.item_rec.unit_weight;
2389: l_old.tare_weight := l_old.tare_weight - inv_cache.item_rec.unit_weight;
2390: l_new.tare_weight_uom_code := l_old.tare_weight_uom_code;
2391: ELSE -- Both are not null but with different UOMs need to convert
2392: l_new.tare_weight := Convert_UOM(inv_cache.item_rec.inventory_item_id, inv_cache.item_rec.unit_weight, inv_cache.item_rec.weight_uom_code, l_old.tare_weight_uom_code, G_NO_CONV_RETURN_NULL);
2393:

Line 2392: l_new.tare_weight := Convert_UOM(inv_cache.item_rec.inventory_item_id, inv_cache.item_rec.unit_weight, inv_cache.item_rec.weight_uom_code, l_old.tare_weight_uom_code, G_NO_CONV_RETURN_NULL);

2388: l_new.tare_weight := l_old.tare_weight - inv_cache.item_rec.unit_weight;
2389: l_old.tare_weight := l_old.tare_weight - inv_cache.item_rec.unit_weight;
2390: l_new.tare_weight_uom_code := l_old.tare_weight_uom_code;
2391: ELSE -- Both are not null but with different UOMs need to convert
2392: l_new.tare_weight := Convert_UOM(inv_cache.item_rec.inventory_item_id, inv_cache.item_rec.unit_weight, inv_cache.item_rec.weight_uom_code, l_old.tare_weight_uom_code, G_NO_CONV_RETURN_NULL);
2393:
2394: l_new.tare_weight := l_old.tare_weight - l_new.tare_weight;
2395: l_old.tare_weight := l_old.tare_weight - inv_cache.item_rec.unit_weight;
2396: l_new.tare_weight_uom_code := l_old.tare_weight_uom_code;

Line 2395: l_old.tare_weight := l_old.tare_weight - inv_cache.item_rec.unit_weight;

2391: ELSE -- Both are not null but with different UOMs need to convert
2392: l_new.tare_weight := Convert_UOM(inv_cache.item_rec.inventory_item_id, inv_cache.item_rec.unit_weight, inv_cache.item_rec.weight_uom_code, l_old.tare_weight_uom_code, G_NO_CONV_RETURN_NULL);
2393:
2394: l_new.tare_weight := l_old.tare_weight - l_new.tare_weight;
2395: l_old.tare_weight := l_old.tare_weight - inv_cache.item_rec.unit_weight;
2396: l_new.tare_weight_uom_code := l_old.tare_weight_uom_code;
2397: END IF;
2398:
2399: l_change_in_tare_weight := 0-inv_cache.item_rec.unit_weight;

Line 2399: l_change_in_tare_weight := 0-inv_cache.item_rec.unit_weight;

2395: l_old.tare_weight := l_old.tare_weight - inv_cache.item_rec.unit_weight;
2396: l_new.tare_weight_uom_code := l_old.tare_weight_uom_code;
2397: END IF;
2398:
2399: l_change_in_tare_weight := 0-inv_cache.item_rec.unit_weight;
2400: l_change_in_tare_weight_uom := l_old.tare_weight_uom_code;
2401: END IF;
2402: END IF;
2403: IF ( inv_cache.set_item_rec(

Line 2403: IF ( inv_cache.set_item_rec(

2399: l_change_in_tare_weight := 0-inv_cache.item_rec.unit_weight;
2400: l_change_in_tare_weight_uom := l_old.tare_weight_uom_code;
2401: END IF;
2402: END IF;
2403: IF ( inv_cache.set_item_rec(
2404: p_organization_id => NVL(p_lpn_table(lpn_tbl_cnt).organization_id, l_old.organization_id)
2405: , p_item_id => p_lpn_table(lpn_tbl_cnt).inventory_item_id ) )
2406: THEN
2407: IF (l_debug = 1) THEN

Line 2408: mdebug('Got Item info citm='||inv_cache.item_rec.container_item_flag||' snctl='||inv_cache.item_rec.serial_number_control_code, G_INFO);

2404: p_organization_id => NVL(p_lpn_table(lpn_tbl_cnt).organization_id, l_old.organization_id)
2405: , p_item_id => p_lpn_table(lpn_tbl_cnt).inventory_item_id ) )
2406: THEN
2407: IF (l_debug = 1) THEN
2408: mdebug('Got Item info citm='||inv_cache.item_rec.container_item_flag||' snctl='||inv_cache.item_rec.serial_number_control_code, G_INFO);
2409: mdebug('wuom='||inv_cache.item_rec.weight_uom_code||' wt='||inv_cache.item_rec.unit_weight||' vuom='||inv_cache.item_rec.volume_uom_code||' vol='||inv_cache.item_rec.unit_volume, G_INFO);
2410: END IF;
2411: ELSE
2412: l_progress := 'Error calling INV_CACHE.Set_Item_Rec for orgid='||NVL(p_lpn_table(lpn_tbl_cnt).organization_id, l_old.organization_id)||' item id='||p_lpn_table(lpn_tbl_cnt).inventory_item_id;

Line 2409: mdebug('wuom='||inv_cache.item_rec.weight_uom_code||' wt='||inv_cache.item_rec.unit_weight||' vuom='||inv_cache.item_rec.volume_uom_code||' vol='||inv_cache.item_rec.unit_volume, G_INFO);

2405: , p_item_id => p_lpn_table(lpn_tbl_cnt).inventory_item_id ) )
2406: THEN
2407: IF (l_debug = 1) THEN
2408: mdebug('Got Item info citm='||inv_cache.item_rec.container_item_flag||' snctl='||inv_cache.item_rec.serial_number_control_code, G_INFO);
2409: mdebug('wuom='||inv_cache.item_rec.weight_uom_code||' wt='||inv_cache.item_rec.unit_weight||' vuom='||inv_cache.item_rec.volume_uom_code||' vol='||inv_cache.item_rec.unit_volume, G_INFO);
2410: END IF;
2411: ELSE
2412: l_progress := 'Error calling INV_CACHE.Set_Item_Rec for orgid='||NVL(p_lpn_table(lpn_tbl_cnt).organization_id, l_old.organization_id)||' item id='||p_lpn_table(lpn_tbl_cnt).inventory_item_id;
2413: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_ITEM');

Line 2412: l_progress := 'Error calling INV_CACHE.Set_Item_Rec for orgid='||NVL(p_lpn_table(lpn_tbl_cnt).organization_id, l_old.organization_id)||' item id='||p_lpn_table(lpn_tbl_cnt).inventory_item_id;

2408: mdebug('Got Item info citm='||inv_cache.item_rec.container_item_flag||' snctl='||inv_cache.item_rec.serial_number_control_code, G_INFO);
2409: mdebug('wuom='||inv_cache.item_rec.weight_uom_code||' wt='||inv_cache.item_rec.unit_weight||' vuom='||inv_cache.item_rec.volume_uom_code||' vol='||inv_cache.item_rec.unit_volume, G_INFO);
2410: END IF;
2411: ELSE
2412: l_progress := 'Error calling INV_CACHE.Set_Item_Rec for orgid='||NVL(p_lpn_table(lpn_tbl_cnt).organization_id, l_old.organization_id)||' item id='||p_lpn_table(lpn_tbl_cnt).inventory_item_id;
2413: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_ITEM');
2414: fnd_msg_pub.ADD;
2415: RAISE fnd_api.g_exc_error;
2416: END IF;

Line 2417: IF ( inv_cache.item_rec.unit_weight IS NOT NULL AND

2413: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_ITEM');
2414: fnd_msg_pub.ADD;
2415: RAISE fnd_api.g_exc_error;
2416: END IF;
2417: IF ( inv_cache.item_rec.unit_weight IS NOT NULL AND
2418: inv_cache.item_rec.weight_uom_code IS NOT NULL ) THEN
2419:
2420: IF ( NVL(l_old.tare_weight, 0) = 0 OR l_old.tare_weight_uom_code IS NULL ) THEN
2421: l_new.tare_weight := inv_cache.item_rec.unit_weight;

Line 2418: inv_cache.item_rec.weight_uom_code IS NOT NULL ) THEN

2414: fnd_msg_pub.ADD;
2415: RAISE fnd_api.g_exc_error;
2416: END IF;
2417: IF ( inv_cache.item_rec.unit_weight IS NOT NULL AND
2418: inv_cache.item_rec.weight_uom_code IS NOT NULL ) THEN
2419:
2420: IF ( NVL(l_old.tare_weight, 0) = 0 OR l_old.tare_weight_uom_code IS NULL ) THEN
2421: l_new.tare_weight := inv_cache.item_rec.unit_weight;
2422: l_new.tare_weight_uom_code := inv_cache.item_rec.weight_uom_code;

Line 2421: l_new.tare_weight := inv_cache.item_rec.unit_weight;

2417: IF ( inv_cache.item_rec.unit_weight IS NOT NULL AND
2418: inv_cache.item_rec.weight_uom_code IS NOT NULL ) THEN
2419:
2420: IF ( NVL(l_old.tare_weight, 0) = 0 OR l_old.tare_weight_uom_code IS NULL ) THEN
2421: l_new.tare_weight := inv_cache.item_rec.unit_weight;
2422: l_new.tare_weight_uom_code := inv_cache.item_rec.weight_uom_code;
2423: ELSIF ( l_old.tare_weight_uom_code = inv_cache.item_rec.weight_uom_code ) THEN
2424: l_new.tare_weight := l_new.tare_weight + inv_cache.item_rec.unit_weight;
2425: l_new.tare_weight_uom_code := l_old.tare_weight_uom_code;

Line 2422: l_new.tare_weight_uom_code := inv_cache.item_rec.weight_uom_code;

2418: inv_cache.item_rec.weight_uom_code IS NOT NULL ) THEN
2419:
2420: IF ( NVL(l_old.tare_weight, 0) = 0 OR l_old.tare_weight_uom_code IS NULL ) THEN
2421: l_new.tare_weight := inv_cache.item_rec.unit_weight;
2422: l_new.tare_weight_uom_code := inv_cache.item_rec.weight_uom_code;
2423: ELSIF ( l_old.tare_weight_uom_code = inv_cache.item_rec.weight_uom_code ) THEN
2424: l_new.tare_weight := l_new.tare_weight + inv_cache.item_rec.unit_weight;
2425: l_new.tare_weight_uom_code := l_old.tare_weight_uom_code;
2426: ELSE -- Both are not null but with different UOMs need to convert

Line 2423: ELSIF ( l_old.tare_weight_uom_code = inv_cache.item_rec.weight_uom_code ) THEN

2419:
2420: IF ( NVL(l_old.tare_weight, 0) = 0 OR l_old.tare_weight_uom_code IS NULL ) THEN
2421: l_new.tare_weight := inv_cache.item_rec.unit_weight;
2422: l_new.tare_weight_uom_code := inv_cache.item_rec.weight_uom_code;
2423: ELSIF ( l_old.tare_weight_uom_code = inv_cache.item_rec.weight_uom_code ) THEN
2424: l_new.tare_weight := l_new.tare_weight + inv_cache.item_rec.unit_weight;
2425: l_new.tare_weight_uom_code := l_old.tare_weight_uom_code;
2426: ELSE -- Both are not null but with different UOMs need to convert
2427: l_new.tare_weight := Convert_UOM(inv_cache.item_rec.inventory_item_id, inv_cache.item_rec.unit_weight, inv_cache.item_rec.weight_uom_code, l_old.tare_weight_uom_code, G_NO_CONV_RETURN_NULL);

Line 2424: l_new.tare_weight := l_new.tare_weight + inv_cache.item_rec.unit_weight;

2420: IF ( NVL(l_old.tare_weight, 0) = 0 OR l_old.tare_weight_uom_code IS NULL ) THEN
2421: l_new.tare_weight := inv_cache.item_rec.unit_weight;
2422: l_new.tare_weight_uom_code := inv_cache.item_rec.weight_uom_code;
2423: ELSIF ( l_old.tare_weight_uom_code = inv_cache.item_rec.weight_uom_code ) THEN
2424: l_new.tare_weight := l_new.tare_weight + inv_cache.item_rec.unit_weight;
2425: l_new.tare_weight_uom_code := l_old.tare_weight_uom_code;
2426: ELSE -- Both are not null but with different UOMs need to convert
2427: l_new.tare_weight := Convert_UOM(inv_cache.item_rec.inventory_item_id, inv_cache.item_rec.unit_weight, inv_cache.item_rec.weight_uom_code, l_old.tare_weight_uom_code, G_NO_CONV_RETURN_NULL);
2428:

Line 2427: l_new.tare_weight := Convert_UOM(inv_cache.item_rec.inventory_item_id, inv_cache.item_rec.unit_weight, inv_cache.item_rec.weight_uom_code, l_old.tare_weight_uom_code, G_NO_CONV_RETURN_NULL);

2423: ELSIF ( l_old.tare_weight_uom_code = inv_cache.item_rec.weight_uom_code ) THEN
2424: l_new.tare_weight := l_new.tare_weight + inv_cache.item_rec.unit_weight;
2425: l_new.tare_weight_uom_code := l_old.tare_weight_uom_code;
2426: ELSE -- Both are not null but with different UOMs need to convert
2427: l_new.tare_weight := Convert_UOM(inv_cache.item_rec.inventory_item_id, inv_cache.item_rec.unit_weight, inv_cache.item_rec.weight_uom_code, l_old.tare_weight_uom_code, G_NO_CONV_RETURN_NULL);
2428:
2429: l_new.tare_weight := l_new.tare_weight + l_old.tare_weight;
2430: l_new.tare_weight_uom_code := l_old.tare_weight_uom_code;
2431: END IF;

Line 2435: l_change_in_tare_weight := l_change_in_tare_weight + inv_cache.item_rec.unit_weight;

2431: END IF;
2432:
2433: -- bug5404902 now that we are just adding the container item unit weight to the
2434: -- existing tare, change in tare is just the container item unit weight
2435: l_change_in_tare_weight := l_change_in_tare_weight + inv_cache.item_rec.unit_weight;
2436: l_change_in_tare_weight_uom := inv_cache.item_rec.weight_uom_code;
2437: END IF;
2438: ELSIF ( p_lpn_table(lpn_tbl_cnt).inventory_item_id IS NULL ----Bug#6504032 Added this ELSIF to take care of container removal
2439: AND l_old.inventory_item_id IS NOT NULL

Line 2436: l_change_in_tare_weight_uom := inv_cache.item_rec.weight_uom_code;

2432:
2433: -- bug5404902 now that we are just adding the container item unit weight to the
2434: -- existing tare, change in tare is just the container item unit weight
2435: l_change_in_tare_weight := l_change_in_tare_weight + inv_cache.item_rec.unit_weight;
2436: l_change_in_tare_weight_uom := inv_cache.item_rec.weight_uom_code;
2437: END IF;
2438: ELSIF ( p_lpn_table(lpn_tbl_cnt).inventory_item_id IS NULL ----Bug#6504032 Added this ELSIF to take care of container removal
2439: AND l_old.inventory_item_id IS NOT NULL
2440: AND l_old.lpn_context IN (1,5)

Line 2442: IF (inv_cache.set_item_rec(

2438: ELSIF ( p_lpn_table(lpn_tbl_cnt).inventory_item_id IS NULL ----Bug#6504032 Added this ELSIF to take care of container removal
2439: AND l_old.inventory_item_id IS NOT NULL
2440: AND l_old.lpn_context IN (1,5)
2441: AND p_caller = 'UpdateLPNPage' ) THEN
2442: IF (inv_cache.set_item_rec(
2443: p_organization_id => NVL(p_lpn_table(lpn_tbl_cnt).organization_id, l_old.organization_id)
2444: , p_item_id => l_old.inventory_item_id ))
2445: THEN
2446: IF (l_debug = 1) THEN

Line 2447: mdebug('Got Old Item info citm='||inv_cache.item_rec.container_item_flag||' snctl='||inv_cache.item_rec.serial_number_control_code, G_INFO);

2443: p_organization_id => NVL(p_lpn_table(lpn_tbl_cnt).organization_id, l_old.organization_id)
2444: , p_item_id => l_old.inventory_item_id ))
2445: THEN
2446: IF (l_debug = 1) THEN
2447: mdebug('Got Old Item info citm='||inv_cache.item_rec.container_item_flag||' snctl='||inv_cache.item_rec.serial_number_control_code, G_INFO);
2448: mdebug('wuom='||inv_cache.item_rec.weight_uom_code||' wt='||inv_cache.item_rec.unit_weight||' vuom='||inv_cache.item_rec.volume_uom_code||' vol='||inv_cache.item_rec.unit_volume, G_INFO);
2449: END IF;
2450: ELSE
2451: l_progress := 'Error calling INV_CACHE.Set_Item_Rec for orgid='||NVL(p_lpn_table(lpn_tbl_cnt).organization_id, l_old.organization_id)||' item id='||p_lpn_table(lpn_tbl_cnt).inventory_item_id;

Line 2448: mdebug('wuom='||inv_cache.item_rec.weight_uom_code||' wt='||inv_cache.item_rec.unit_weight||' vuom='||inv_cache.item_rec.volume_uom_code||' vol='||inv_cache.item_rec.unit_volume, G_INFO);

2444: , p_item_id => l_old.inventory_item_id ))
2445: THEN
2446: IF (l_debug = 1) THEN
2447: mdebug('Got Old Item info citm='||inv_cache.item_rec.container_item_flag||' snctl='||inv_cache.item_rec.serial_number_control_code, G_INFO);
2448: mdebug('wuom='||inv_cache.item_rec.weight_uom_code||' wt='||inv_cache.item_rec.unit_weight||' vuom='||inv_cache.item_rec.volume_uom_code||' vol='||inv_cache.item_rec.unit_volume, G_INFO);
2449: END IF;
2450: ELSE
2451: l_progress := 'Error calling INV_CACHE.Set_Item_Rec for orgid='||NVL(p_lpn_table(lpn_tbl_cnt).organization_id, l_old.organization_id)||' item id='||p_lpn_table(lpn_tbl_cnt).inventory_item_id;
2452: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_ITEM');

Line 2451: l_progress := 'Error calling INV_CACHE.Set_Item_Rec for orgid='||NVL(p_lpn_table(lpn_tbl_cnt).organization_id, l_old.organization_id)||' item id='||p_lpn_table(lpn_tbl_cnt).inventory_item_id;

2447: mdebug('Got Old Item info citm='||inv_cache.item_rec.container_item_flag||' snctl='||inv_cache.item_rec.serial_number_control_code, G_INFO);
2448: mdebug('wuom='||inv_cache.item_rec.weight_uom_code||' wt='||inv_cache.item_rec.unit_weight||' vuom='||inv_cache.item_rec.volume_uom_code||' vol='||inv_cache.item_rec.unit_volume, G_INFO);
2449: END IF;
2450: ELSE
2451: l_progress := 'Error calling INV_CACHE.Set_Item_Rec for orgid='||NVL(p_lpn_table(lpn_tbl_cnt).organization_id, l_old.organization_id)||' item id='||p_lpn_table(lpn_tbl_cnt).inventory_item_id;
2452: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_ITEM');
2453: fnd_msg_pub.ADD;
2454: RAISE fnd_api.g_exc_error;
2455: END IF;

Line 2457: IF (inv_cache.item_rec.unit_weight IS NOT NULL AND

2453: fnd_msg_pub.ADD;
2454: RAISE fnd_api.g_exc_error;
2455: END IF;
2456:
2457: IF (inv_cache.item_rec.unit_weight IS NOT NULL AND
2458: inv_cache.item_rec.weight_uom_code IS NOT NULL ) THEN
2459:
2460: IF ( NVL(l_old.tare_weight, 0) = 0 OR l_old.tare_weight_uom_code IS NULL ) THEN
2461: l_new.tare_weight := 0;

Line 2458: inv_cache.item_rec.weight_uom_code IS NOT NULL ) THEN

2454: RAISE fnd_api.g_exc_error;
2455: END IF;
2456:
2457: IF (inv_cache.item_rec.unit_weight IS NOT NULL AND
2458: inv_cache.item_rec.weight_uom_code IS NOT NULL ) THEN
2459:
2460: IF ( NVL(l_old.tare_weight, 0) = 0 OR l_old.tare_weight_uom_code IS NULL ) THEN
2461: l_new.tare_weight := 0;
2462: l_new.tare_weight_uom_code := NULL;

Line 2463: ELSIF ( l_old.tare_weight_uom_code = inv_cache.item_rec.weight_uom_code ) THEN

2459:
2460: IF ( NVL(l_old.tare_weight, 0) = 0 OR l_old.tare_weight_uom_code IS NULL ) THEN
2461: l_new.tare_weight := 0;
2462: l_new.tare_weight_uom_code := NULL;
2463: ELSIF ( l_old.tare_weight_uom_code = inv_cache.item_rec.weight_uom_code ) THEN
2464: l_new.tare_weight := l_old.tare_weight - inv_cache.item_rec.unit_weight;
2465: l_new.tare_weight_uom_code := l_old.tare_weight_uom_code;
2466: ELSE -- Both are not null but with different UOMs need to convert
2467: l_new.tare_weight := Convert_UOM(inv_cache.item_rec.inventory_item_id, inv_cache.item_rec.unit_weight, inv_cache.item_rec.weight_uom_code, l_old.tare_weight_uom_code, G_NO_CONV_RETURN_NULL);

Line 2464: l_new.tare_weight := l_old.tare_weight - inv_cache.item_rec.unit_weight;

2460: IF ( NVL(l_old.tare_weight, 0) = 0 OR l_old.tare_weight_uom_code IS NULL ) THEN
2461: l_new.tare_weight := 0;
2462: l_new.tare_weight_uom_code := NULL;
2463: ELSIF ( l_old.tare_weight_uom_code = inv_cache.item_rec.weight_uom_code ) THEN
2464: l_new.tare_weight := l_old.tare_weight - inv_cache.item_rec.unit_weight;
2465: l_new.tare_weight_uom_code := l_old.tare_weight_uom_code;
2466: ELSE -- Both are not null but with different UOMs need to convert
2467: l_new.tare_weight := Convert_UOM(inv_cache.item_rec.inventory_item_id, inv_cache.item_rec.unit_weight, inv_cache.item_rec.weight_uom_code, l_old.tare_weight_uom_code, G_NO_CONV_RETURN_NULL);
2468:

Line 2467: l_new.tare_weight := Convert_UOM(inv_cache.item_rec.inventory_item_id, inv_cache.item_rec.unit_weight, inv_cache.item_rec.weight_uom_code, l_old.tare_weight_uom_code, G_NO_CONV_RETURN_NULL);

2463: ELSIF ( l_old.tare_weight_uom_code = inv_cache.item_rec.weight_uom_code ) THEN
2464: l_new.tare_weight := l_old.tare_weight - inv_cache.item_rec.unit_weight;
2465: l_new.tare_weight_uom_code := l_old.tare_weight_uom_code;
2466: ELSE -- Both are not null but with different UOMs need to convert
2467: l_new.tare_weight := Convert_UOM(inv_cache.item_rec.inventory_item_id, inv_cache.item_rec.unit_weight, inv_cache.item_rec.weight_uom_code, l_old.tare_weight_uom_code, G_NO_CONV_RETURN_NULL);
2468:
2469: l_new.tare_weight := l_old.tare_weight - l_new.tare_weight;
2470: l_new.tare_weight_uom_code := l_old.tare_weight_uom_code;
2471: END IF;

Line 2473: l_change_in_tare_weight := 0-inv_cache.item_rec.unit_weight;

2469: l_new.tare_weight := l_old.tare_weight - l_new.tare_weight;
2470: l_new.tare_weight_uom_code := l_old.tare_weight_uom_code;
2471: END IF;
2472:
2473: l_change_in_tare_weight := 0-inv_cache.item_rec.unit_weight;
2474: l_change_in_tare_weight_uom := l_old.tare_weight_uom_code;
2475: END IF;
2476: l_new.inventory_item_id := NULL;
2477: l_new.container_volume := NULL;

Line 2563: l_new.container_volume := inv_cache.item_rec.unit_volume;

2559: l_new.container_volume_uom := p_lpn_table(lpn_tbl_cnt).container_volume_uom;
2560: ELSIF ( p_lpn_table(lpn_tbl_cnt).inventory_item_id IS NOT NULL ) THEN
2561: -- use new container item tare weight and uom if values are not defined yet
2562: --IF ( l_old.container_volume IS NULL OR l_old.container_volume_uom IS NULL ) THEN --Bug#6504032 Commented this IF as container can be updated now
2563: l_new.container_volume := inv_cache.item_rec.unit_volume;
2564: l_new.container_volume_uom := inv_cache.item_rec.volume_uom_code;
2565: --END IF;
2566: END IF;
2567:

Line 2564: l_new.container_volume_uom := inv_cache.item_rec.volume_uom_code;

2560: ELSIF ( p_lpn_table(lpn_tbl_cnt).inventory_item_id IS NOT NULL ) THEN
2561: -- use new container item tare weight and uom if values are not defined yet
2562: --IF ( l_old.container_volume IS NULL OR l_old.container_volume_uom IS NULL ) THEN --Bug#6504032 Commented this IF as container can be updated now
2563: l_new.container_volume := inv_cache.item_rec.unit_volume;
2564: l_new.container_volume_uom := inv_cache.item_rec.volume_uom_code;
2565: --END IF;
2566: END IF;
2567:
2568: l_progress := 'Content Volume';

Line 3064: IF ( inv_cache.set_item_rec(

3060: -- Add all attibutes to new lpn record
3061: l_tmp_new := l_tmp_old;
3062:
3063: --8447369 start
3064: IF ( inv_cache.set_item_rec(
3065: p_organization_id => l_tmp_old.organization_id
3066: , p_item_id => l_tmp_old.inventory_item_id ) ) THEN
3067:
3068: mdebug('Found parent lpn item details', G_INFO);

Line 3071: l_progress := 'Error calling INV_CACHE.Set_Item_Rec for orgid'||l_tmp_old.organization_id ||' item id='||l_tmp_old.inventory_item_id;

3067:
3068: mdebug('Found parent lpn item details', G_INFO);
3069:
3070: ELSE
3071: l_progress := 'Error calling INV_CACHE.Set_Item_Rec for orgid'||l_tmp_old.organization_id ||' item id='||l_tmp_old.inventory_item_id;
3072: mdebug('Did not find parent lpn item details', G_INFO);
3073:
3074: END IF;
3075: --8447369 end

Line 3099: IF (inv_cache.item_rec.weight_uom_code IS NOT NULL ) THEN

3095: END IF;
3096: END IF;
3097:
3098: --8447369 start
3099: IF (inv_cache.item_rec.weight_uom_code IS NOT NULL ) THEN
3100: IF (l_tmp_new.gross_weight_uom_code <> inv_cache.item_rec.weight_uom_code ) THEN
3101: l_tmp_new.gross_weight := Convert_UOM(
3102: p_inventory_item_id => l_tmp_old.inventory_item_id
3103: , p_fm_quantity => l_tmp_new.gross_weight

Line 3100: IF (l_tmp_new.gross_weight_uom_code <> inv_cache.item_rec.weight_uom_code ) THEN

3096: END IF;
3097:
3098: --8447369 start
3099: IF (inv_cache.item_rec.weight_uom_code IS NOT NULL ) THEN
3100: IF (l_tmp_new.gross_weight_uom_code <> inv_cache.item_rec.weight_uom_code ) THEN
3101: l_tmp_new.gross_weight := Convert_UOM(
3102: p_inventory_item_id => l_tmp_old.inventory_item_id
3103: , p_fm_quantity => l_tmp_new.gross_weight
3104: , p_fm_uom => l_tmp_new.gross_weight_uom_code

Line 3105: , p_to_uom => inv_cache.item_rec.weight_uom_code

3101: l_tmp_new.gross_weight := Convert_UOM(
3102: p_inventory_item_id => l_tmp_old.inventory_item_id
3103: , p_fm_quantity => l_tmp_new.gross_weight
3104: , p_fm_uom => l_tmp_new.gross_weight_uom_code
3105: , p_to_uom => inv_cache.item_rec.weight_uom_code
3106: , p_mode => G_NO_CONV_RETURN_ZERO );
3107: l_tmp_new.gross_weight_uom_code := inv_cache.item_rec.weight_uom_code;
3108: END IF;
3109: END IF;

Line 3107: l_tmp_new.gross_weight_uom_code := inv_cache.item_rec.weight_uom_code;

3103: , p_fm_quantity => l_tmp_new.gross_weight
3104: , p_fm_uom => l_tmp_new.gross_weight_uom_code
3105: , p_to_uom => inv_cache.item_rec.weight_uom_code
3106: , p_mode => G_NO_CONV_RETURN_ZERO );
3107: l_tmp_new.gross_weight_uom_code := inv_cache.item_rec.weight_uom_code;
3108: END IF;
3109: END IF;
3110: mdebug('after conv l_tmp_new.gross_weight' || l_tmp_new.gross_weight, G_INFO);
3111: mdebug('after conv l_tmp_new.gross_weight_uom_code' || l_tmp_new.gross_weight_uom_code, G_INFO);

Line 3160: IF (inv_cache.item_rec.weight_uom_code IS NOT NULL ) THEN

3156: END IF;
3157: END IF;
3158:
3159: --8447369 start
3160: IF (inv_cache.item_rec.weight_uom_code IS NOT NULL ) THEN
3161: IF (l_tmp_new.tare_weight_uom_code <> inv_cache.item_rec.weight_uom_code ) THEN
3162: l_tmp_new.tare_weight := Convert_UOM(
3163: p_inventory_item_id => l_tmp_old.inventory_item_id
3164: , p_fm_quantity => l_tmp_new.tare_weight

Line 3161: IF (l_tmp_new.tare_weight_uom_code <> inv_cache.item_rec.weight_uom_code ) THEN

3157: END IF;
3158:
3159: --8447369 start
3160: IF (inv_cache.item_rec.weight_uom_code IS NOT NULL ) THEN
3161: IF (l_tmp_new.tare_weight_uom_code <> inv_cache.item_rec.weight_uom_code ) THEN
3162: l_tmp_new.tare_weight := Convert_UOM(
3163: p_inventory_item_id => l_tmp_old.inventory_item_id
3164: , p_fm_quantity => l_tmp_new.tare_weight
3165: , p_fm_uom => l_tmp_new.tare_weight_uom_code

Line 3166: , p_to_uom => inv_cache.item_rec.weight_uom_code

3162: l_tmp_new.tare_weight := Convert_UOM(
3163: p_inventory_item_id => l_tmp_old.inventory_item_id
3164: , p_fm_quantity => l_tmp_new.tare_weight
3165: , p_fm_uom => l_tmp_new.tare_weight_uom_code
3166: , p_to_uom => inv_cache.item_rec.weight_uom_code
3167: , p_mode => G_NO_CONV_RETURN_ZERO );
3168: l_tmp_new.tare_weight_uom_code := inv_cache.item_rec.weight_uom_code ;
3169: END IF;
3170: END IF;

Line 3168: l_tmp_new.tare_weight_uom_code := inv_cache.item_rec.weight_uom_code ;

3164: , p_fm_quantity => l_tmp_new.tare_weight
3165: , p_fm_uom => l_tmp_new.tare_weight_uom_code
3166: , p_to_uom => inv_cache.item_rec.weight_uom_code
3167: , p_mode => G_NO_CONV_RETURN_ZERO );
3168: l_tmp_new.tare_weight_uom_code := inv_cache.item_rec.weight_uom_code ;
3169: END IF;
3170: END IF;
3171: mdebug(' after conv l_tmp_new.tare_weight' || l_tmp_new.tare_weight, G_INFO);
3172: mdebug(' after conv l_tmp_new.tare_weight_uom_code' || l_tmp_new.tare_weight_uom_code, G_INFO);

Line 3288: IF ( NOT inv_cache.set_item_rec(

3284: l_new.outermost_lpn_id )
3285: LOOP
3286: l_progress := 'Find the primary uom code for this item in the source org';
3287:
3288: IF ( NOT inv_cache.set_item_rec(
3289: p_organization_id => l_old.organization_id
3290: , p_item_id => new_org.inventory_item_id ) )
3291: THEN
3292: l_progress := 'Error calling INV_CACHE.Set_Item_Rec for orgid='||l_old.organization_id||' item id='||new_org.inventory_item_id;

Line 3292: l_progress := 'Error calling INV_CACHE.Set_Item_Rec for orgid='||l_old.organization_id||' item id='||new_org.inventory_item_id;

3288: IF ( NOT inv_cache.set_item_rec(
3289: p_organization_id => l_old.organization_id
3290: , p_item_id => new_org.inventory_item_id ) )
3291: THEN
3292: l_progress := 'Error calling INV_CACHE.Set_Item_Rec for orgid='||l_old.organization_id||' item id='||new_org.inventory_item_id;
3293: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_ITEM');
3294: fnd_msg_pub.ADD;
3295: RAISE fnd_api.g_exc_error;
3296: END IF;

Line 3299: mdebug('Got WLC for orgxfer itm='||new_org.inventory_item_id||' oldpuom='||inv_cache.item_rec.primary_uom_code||' newpuom='||new_org.primary_uom_code||

3295: RAISE fnd_api.g_exc_error;
3296: END IF;
3297:
3298: IF (l_debug = 1) THEN
3299: mdebug('Got WLC for orgxfer itm='||new_org.inventory_item_id||' oldpuom='||inv_cache.item_rec.primary_uom_code||' newpuom='||new_org.primary_uom_code||
3300: ' sctl='||new_org.serial_number_control_code||' lctl='||new_org.lot_control_code||' rctl='||new_org.revision_qty_control_code, G_INFO);
3301: END IF;
3302:
3303: UPDATE wms_lpn_contents wlc

Line 3311: , wlc.primary_quantity = Round(Convert_UOM(new_org.inventory_item_id, primary_quantity, inv_cache.item_rec.primary_uom_code, new_org.primary_uom_code), 5) --13591755 added for GRUPO

3307: , wlc.serial_summary_entry = DECODE (new_org.serial_number_control_code,1,2,6,2,wlc.serial_summary_entry)
3308: , wlc.serial_number = DECODE (new_org.serial_number_control_code,1,NULL,6,NULL,wlc.serial_number)
3309: , wlc.lot_number = DECODE (new_org.lot_control_code,1,NULL,wlc.lot_number)
3310: , wlc.revision = DECODE (new_org.revision_qty_control_code,1,NULL,wlc.revision)
3311: , wlc.primary_quantity = Round(Convert_UOM(new_org.inventory_item_id, primary_quantity, inv_cache.item_rec.primary_uom_code, new_org.primary_uom_code), 5) --13591755 added for GRUPO
3312: WHERE rowid = new_org.rowid;
3313: END LOOP;
3314: END IF;
3315:

Line 4915: l_progress := 'Calling INV_CACHE.Set_Item_Rec to get item values';

4911:
4912: l_quantity := 1;
4913: l_primary_quantity := 1;
4914: ELSIF ( p_content_item_id IS NOT NULL ) THEN
4915: l_progress := 'Calling INV_CACHE.Set_Item_Rec to get item values';
4916:
4917: IF ( inv_cache.set_item_rec(
4918: p_organization_id => p_organization_id
4919: , p_item_id => p_content_item_id ) )

Line 4917: IF ( inv_cache.set_item_rec(

4913: l_primary_quantity := 1;
4914: ELSIF ( p_content_item_id IS NOT NULL ) THEN
4915: l_progress := 'Calling INV_CACHE.Set_Item_Rec to get item values';
4916:
4917: IF ( inv_cache.set_item_rec(
4918: p_organization_id => p_organization_id
4919: , p_item_id => p_content_item_id ) )
4920: THEN
4921: IF (l_debug = 1) THEN

Line 4922: mdebug('Got Item info puom='||inv_cache.item_rec.primary_uom_code||' snctl='||inv_cache.item_rec.serial_number_control_code, G_INFO);

4918: p_organization_id => p_organization_id
4919: , p_item_id => p_content_item_id ) )
4920: THEN
4921: IF (l_debug = 1) THEN
4922: mdebug('Got Item info puom='||inv_cache.item_rec.primary_uom_code||' snctl='||inv_cache.item_rec.serial_number_control_code, G_INFO);
4923: mdebug('wuom='||inv_cache.item_rec.weight_uom_code||' wt='||inv_cache.item_rec.unit_weight||' vuom='||inv_cache.item_rec.volume_uom_code||' vol='||inv_cache.item_rec.unit_volume, G_INFO);
4924: END IF;
4925: ELSE
4926: l_progress := 'Error calling INV_CACHE.Set_Item_Rec for orgid'||p_organization_id||' item id='||p_content_item_id;

Line 4923: mdebug('wuom='||inv_cache.item_rec.weight_uom_code||' wt='||inv_cache.item_rec.unit_weight||' vuom='||inv_cache.item_rec.volume_uom_code||' vol='||inv_cache.item_rec.unit_volume, G_INFO);

4919: , p_item_id => p_content_item_id ) )
4920: THEN
4921: IF (l_debug = 1) THEN
4922: mdebug('Got Item info puom='||inv_cache.item_rec.primary_uom_code||' snctl='||inv_cache.item_rec.serial_number_control_code, G_INFO);
4923: mdebug('wuom='||inv_cache.item_rec.weight_uom_code||' wt='||inv_cache.item_rec.unit_weight||' vuom='||inv_cache.item_rec.volume_uom_code||' vol='||inv_cache.item_rec.unit_volume, G_INFO);
4924: END IF;
4925: ELSE
4926: l_progress := 'Error calling INV_CACHE.Set_Item_Rec for orgid'||p_organization_id||' item id='||p_content_item_id;
4927: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_ITEM');

Line 4926: l_progress := 'Error calling INV_CACHE.Set_Item_Rec for orgid'||p_organization_id||' item id='||p_content_item_id;

4922: mdebug('Got Item info puom='||inv_cache.item_rec.primary_uom_code||' snctl='||inv_cache.item_rec.serial_number_control_code, G_INFO);
4923: mdebug('wuom='||inv_cache.item_rec.weight_uom_code||' wt='||inv_cache.item_rec.unit_weight||' vuom='||inv_cache.item_rec.volume_uom_code||' vol='||inv_cache.item_rec.unit_volume, G_INFO);
4924: END IF;
4925: ELSE
4926: l_progress := 'Error calling INV_CACHE.Set_Item_Rec for orgid'||p_organization_id||' item id='||p_content_item_id;
4927: fnd_message.set_name('WMS', 'WMS_CONT_INVALID_ITEM');
4928: fnd_msg_pub.ADD;
4929: RAISE fnd_api.g_exc_error;
4930: END IF;

Line 4933: IF ( p_uom = inv_cache.item_rec.primary_uom_code ) THEN

4929: RAISE fnd_api.g_exc_error;
4930: END IF;
4931:
4932: IF ( p_primary_quantity IS NULL ) THEN
4933: IF ( p_uom = inv_cache.item_rec.primary_uom_code ) THEN
4934: l_primary_quantity := p_quantity;
4935: ELSE
4936: l_primary_quantity := Round(Convert_UOM(p_content_item_id, p_quantity, p_uom, inv_cache.item_rec.primary_uom_code), 5); --13591755 added for GRUPO
4937: END IF;

Line 4936: l_primary_quantity := Round(Convert_UOM(p_content_item_id, p_quantity, p_uom, inv_cache.item_rec.primary_uom_code), 5); --13591755 added for GRUPO

4932: IF ( p_primary_quantity IS NULL ) THEN
4933: IF ( p_uom = inv_cache.item_rec.primary_uom_code ) THEN
4934: l_primary_quantity := p_quantity;
4935: ELSE
4936: l_primary_quantity := Round(Convert_UOM(p_content_item_id, p_quantity, p_uom, inv_cache.item_rec.primary_uom_code), 5); --13591755 added for GRUPO
4937: END IF;
4938: ELSE
4939: l_primary_quantity := p_primary_quantity;
4940: END IF;

Line 4961: IF ( inv_cache.item_rec.serial_number_control_code NOT IN (1) ) THEN

4957: -- Parse Serials with out validation
4958: -- Sub and locator might not be given in the case of pre-packing
4959: IF (p_content_item_id IS NOT NULL) THEN
4960: /* Toshiba Fix */
4961: IF ( inv_cache.item_rec.serial_number_control_code NOT IN (1) ) THEN
4962: IF ((p_from_serial_number IS NOT NULL) AND (p_to_serial_number IS NOT NULL)) THEN
4963: l_progress := 'Call this API to parse sn '||p_from_serial_number||'-'||p_to_serial_number;
4964:
4965: IF (NOT mtl_serial_check.inv_serial_info(p_from_serial_number, p_to_serial_number, l_prefix, l_quantity, l_from_number, l_to_number, l_errorcode)) THEN

Line 5021: l_progress := 'Calling Inv_Cache.Set_Tosub_Rec to get sub';

5017: l_locator_id := p_locator_id;
5018: END IF;
5019:
5020: IF ( l_subinventory IS NOT NULL ) THEN
5021: l_progress := 'Calling Inv_Cache.Set_Tosub_Rec to get sub';
5022: IF ( NOT inv_cache.set_tosub_rec(p_organization_id, l_subinventory) ) THEN
5023: l_progress := 'Failed to find subinventory org='||p_organization_id||' sub='||l_subinventory;
5024: FND_MESSAGE.SET_NAME('INV', 'INVALID_SUB');
5025: FND_MSG_PUB.ADD;

Line 5022: IF ( NOT inv_cache.set_tosub_rec(p_organization_id, l_subinventory) ) THEN

5018: END IF;
5019:
5020: IF ( l_subinventory IS NOT NULL ) THEN
5021: l_progress := 'Calling Inv_Cache.Set_Tosub_Rec to get sub';
5022: IF ( NOT inv_cache.set_tosub_rec(p_organization_id, l_subinventory) ) THEN
5023: l_progress := 'Failed to find subinventory org='||p_organization_id||' sub='||l_subinventory;
5024: FND_MESSAGE.SET_NAME('INV', 'INVALID_SUB');
5025: FND_MSG_PUB.ADD;
5026: RAISE FND_API.G_EXC_ERROR;

Line 5030: IF ( p_subinventory IS NOT NULL AND NVL(inv_cache.tosub_rec.lpn_controlled_flag, 2) = 1 ) THEN

5026: RAISE FND_API.G_EXC_ERROR;
5027: END IF;
5028: END IF;
5029:
5030: IF ( p_subinventory IS NOT NULL AND NVL(inv_cache.tosub_rec.lpn_controlled_flag, 2) = 1 ) THEN
5031: -- subinventory and location infromation was passed validate against lpn
5032: IF ( p_subinventory <> NVL(l_lpn.subinventory_code, l_content_lpn.subinventory_code) OR
5033: p_locator_id <> NVL(l_lpn.locator_id, l_content_lpn.locator_id ) ) THEN
5034: IF (l_debug = 1) THEN

Line 5052: IF ( l_subinventory IS NOT NULL AND NVL(inv_cache.tosub_rec.lpn_controlled_flag, 2) <> 1 ) THEN

5048: /*** Packing or Adjust Operation ***/
5049: IF ( l_operation_mode = L_PACK OR l_operation_mode = L_CORRECT ) THEN
5050: -- Check that in case of a pack, the destination subinventory
5051: -- is an LPN enabled/controlled subinventory otherwise fail.
5052: IF ( l_subinventory IS NOT NULL AND NVL(inv_cache.tosub_rec.lpn_controlled_flag, 2) <> 1 ) THEN
5053: fnd_message.set_name('WMS', 'WMS_CONT_NON_LPN_SUB');
5054: fnd_msg_pub.ADD;
5055: RAISE fnd_api.g_exc_error;
5056: END IF;

Line 5362: l_change_in_gross_weight := l_item_quantity * inv_cache.item_rec.unit_weight;

5358: CLOSE existing_record_cursor;
5359:
5360: l_progress := 'Pack item: Need to update parent lpns weight and volume';
5361: l_wt_vol_new := l_lpn;
5362: l_change_in_gross_weight := l_item_quantity * inv_cache.item_rec.unit_weight;
5363: l_change_in_gross_weight_uom := inv_cache.item_rec.weight_uom_code;
5364: l_change_in_volume := l_item_quantity * inv_cache.item_rec.unit_volume;
5365: l_change_in_volume_uom := inv_cache.item_rec.volume_uom_code;
5366: ELSE /** Packing a one time item **/

Line 5363: l_change_in_gross_weight_uom := inv_cache.item_rec.weight_uom_code;

5359:
5360: l_progress := 'Pack item: Need to update parent lpns weight and volume';
5361: l_wt_vol_new := l_lpn;
5362: l_change_in_gross_weight := l_item_quantity * inv_cache.item_rec.unit_weight;
5363: l_change_in_gross_weight_uom := inv_cache.item_rec.weight_uom_code;
5364: l_change_in_volume := l_item_quantity * inv_cache.item_rec.unit_volume;
5365: l_change_in_volume_uom := inv_cache.item_rec.volume_uom_code;
5366: ELSE /** Packing a one time item **/
5367: -- If the LPN has no sub or loc information, it will take on the

Line 5364: l_change_in_volume := l_item_quantity * inv_cache.item_rec.unit_volume;

5360: l_progress := 'Pack item: Need to update parent lpns weight and volume';
5361: l_wt_vol_new := l_lpn;
5362: l_change_in_gross_weight := l_item_quantity * inv_cache.item_rec.unit_weight;
5363: l_change_in_gross_weight_uom := inv_cache.item_rec.weight_uom_code;
5364: l_change_in_volume := l_item_quantity * inv_cache.item_rec.unit_volume;
5365: l_change_in_volume_uom := inv_cache.item_rec.volume_uom_code;
5366: ELSE /** Packing a one time item **/
5367: -- If the LPN has no sub or loc information, it will take on the
5368: -- values of the packed item.

Line 5365: l_change_in_volume_uom := inv_cache.item_rec.volume_uom_code;

5361: l_wt_vol_new := l_lpn;
5362: l_change_in_gross_weight := l_item_quantity * inv_cache.item_rec.unit_weight;
5363: l_change_in_gross_weight_uom := inv_cache.item_rec.weight_uom_code;
5364: l_change_in_volume := l_item_quantity * inv_cache.item_rec.unit_volume;
5365: l_change_in_volume_uom := inv_cache.item_rec.volume_uom_code;
5366: ELSE /** Packing a one time item **/
5367: -- If the LPN has no sub or loc information, it will take on the
5368: -- values of the packed item.
5369: IF (l_lpn.subinventory_code IS NULL AND

Line 5472: IF( l_subinventory IS NOT NULL AND NVL(inv_cache.tosub_rec.lpn_controlled_flag, 2) = 1 ) THEN

5468: l_cont_new.parent_lpn_id := FND_API.G_MISS_NUM;
5469: l_cont_new.outermost_lpn_id := p_content_lpn_id;
5470:
5471: /* Bug 2308339: Update the Organization, Sub, Locator only if Sub is LPN Controlled */
5472: IF( l_subinventory IS NOT NULL AND NVL(inv_cache.tosub_rec.lpn_controlled_flag, 2) = 1 ) THEN
5473: FOR l_child_lpn IN nested_children_cursor(p_content_lpn_id) LOOP
5474: -- Only if there is a difference in location, update nested
5475: -- lpns/items/serials with the new location
5476: IF ( l_content_lpn.organization_id <> p_organization_id OR

Line 5601: , inv_cache.item_rec.primary_uom_code), 5); --13591755 added for GRUPO

5597: l_temp_record.primary_quantity := Round(Convert_UOM(
5598: p_content_item_id
5599: , l_temp_record.quantity
5600: , l_temp_record.uom_code
5601: , inv_cache.item_rec.primary_uom_code), 5); --13591755 added for GRUPO
5602:
5603: IF (l_debug = 1) THEN
5604: mdebug('Converted WLC pri qty='||l_temp_record.primary_quantity, G_INFO);
5605: END IF;

Line 5647: mdebug('inv_cache.item_rec.primary_uom_code ='||inv_cache.item_rec.primary_uom_code, G_INFO);

5643: IF (l_debug = 1) THEN
5644: mdebug('l_item_quantity ='||l_item_quantity, G_INFO);
5645: mdebug('l_temp_record.primary_quantity ='||l_temp_record.primary_quantity, G_INFO);
5646: mdebug('l_temp_record.uom_code ='||l_temp_record.uom_code, G_INFO);
5647: mdebug('inv_cache.item_rec.primary_uom_code ='||inv_cache.item_rec.primary_uom_code, G_INFO);
5648: END IF;
5649:
5650: --INCONV kkillams
5651:

Line 5653: IF inv_cache.item_rec.tracking_quantity_ind = 'PS' THEN -- 16466243

5649:
5650: --INCONV kkillams
5651:
5652: IF ( round(l_item_quantity, g_precision) < round(l_temp_record.primary_quantity, g_precision) ) THEN
5653: IF inv_cache.item_rec.tracking_quantity_ind = 'PS' THEN -- 16466243
5654:
5655: UPDATE wms_lpn_contents
5656: SET last_update_date = SYSDATE
5657: , last_updated_by = fnd_global.user_id

Line 5659: , quantity = (CASE WHEN uom_code = inv_cache.item_rec.primary_uom_code

5655: UPDATE wms_lpn_contents
5656: SET last_update_date = SYSDATE
5657: , last_updated_by = fnd_global.user_id
5658: , request_id = l_request_id
5659: , quantity = (CASE WHEN uom_code = inv_cache.item_rec.primary_uom_code
5660: THEN Round((primary_quantity - l_item_quantity), 5)
5661: ELSE
5662: CASE WHEN uom_code = Nvl(SECONDARY_UOM_CODE,'@@@')
5663: THEN Round((secondary_quantity - p_sec_quantity), 5)

Line 5667: , inv_cache.item_rec.primary_uom_code

5663: THEN Round((secondary_quantity - p_sec_quantity), 5)
5664: ELSE quantity - Round(Convert_UOM(
5665: p_content_item_id
5666: , l_item_quantity
5667: , inv_cache.item_rec.primary_uom_code
5668: , l_temp_record.uom_code), 5)
5669: END
5670: END )
5671: , primary_quantity = Round((primary_quantity - l_item_quantity), 5)

Line 5679: IF ( l_temp_record.uom_code <> inv_cache.item_rec.primary_uom_code ) THEN

5675: , secondary_uom_code = p_sec_uom
5676: WHERE rowid = l_temp_record.rowid;
5677:
5678: ELSE -- 16466243
5679: IF ( l_temp_record.uom_code <> inv_cache.item_rec.primary_uom_code ) THEN
5680: l_converted_quantity := Round(Convert_UOM(
5681: p_content_item_id
5682: , l_item_quantity
5683: , inv_cache.item_rec.primary_uom_code

Line 5683: , inv_cache.item_rec.primary_uom_code

5679: IF ( l_temp_record.uom_code <> inv_cache.item_rec.primary_uom_code ) THEN
5680: l_converted_quantity := Round(Convert_UOM(
5681: p_content_item_id
5682: , l_item_quantity
5683: , inv_cache.item_rec.primary_uom_code
5684: , l_temp_record.uom_code), 5); --13591755 added for GRUPO
5685: ELSE
5686: l_converted_quantity := l_item_quantity;
5687: END IF;

Line 5767: l_change_in_gross_weight := -1 * l_primary_quantity * inv_cache.item_rec.unit_weight;

5763: -- Otherwise this calculation is irrelevant since the lpn will become pregenerated
5764: IF ( l_lpn_is_empty <> 1 ) THEN
5765: l_progress := 'Unpack item: Need to update parent lpns weight and volume';
5766: l_wt_vol_new := l_lpn;
5767: l_change_in_gross_weight := -1 * l_primary_quantity * inv_cache.item_rec.unit_weight;
5768: l_change_in_gross_weight_uom := inv_cache.item_rec.weight_uom_code;
5769: l_change_in_volume := -1 * l_primary_quantity * inv_cache.item_rec.unit_volume;
5770: l_change_in_volume_uom := inv_cache.item_rec.volume_uom_code;
5771: END IF;

Line 5768: l_change_in_gross_weight_uom := inv_cache.item_rec.weight_uom_code;

5764: IF ( l_lpn_is_empty <> 1 ) THEN
5765: l_progress := 'Unpack item: Need to update parent lpns weight and volume';
5766: l_wt_vol_new := l_lpn;
5767: l_change_in_gross_weight := -1 * l_primary_quantity * inv_cache.item_rec.unit_weight;
5768: l_change_in_gross_weight_uom := inv_cache.item_rec.weight_uom_code;
5769: l_change_in_volume := -1 * l_primary_quantity * inv_cache.item_rec.unit_volume;
5770: l_change_in_volume_uom := inv_cache.item_rec.volume_uom_code;
5771: END IF;
5772: ELSIF (p_content_item_desc IS NOT NULL) THEN /*Unpacking a one time item*/

Line 5769: l_change_in_volume := -1 * l_primary_quantity * inv_cache.item_rec.unit_volume;

5765: l_progress := 'Unpack item: Need to update parent lpns weight and volume';
5766: l_wt_vol_new := l_lpn;
5767: l_change_in_gross_weight := -1 * l_primary_quantity * inv_cache.item_rec.unit_weight;
5768: l_change_in_gross_weight_uom := inv_cache.item_rec.weight_uom_code;
5769: l_change_in_volume := -1 * l_primary_quantity * inv_cache.item_rec.unit_volume;
5770: l_change_in_volume_uom := inv_cache.item_rec.volume_uom_code;
5771: END IF;
5772: ELSIF (p_content_item_desc IS NOT NULL) THEN /*Unpacking a one time item*/
5773: OPEN one_time_item_cursor;

Line 5770: l_change_in_volume_uom := inv_cache.item_rec.volume_uom_code;

5766: l_wt_vol_new := l_lpn;
5767: l_change_in_gross_weight := -1 * l_primary_quantity * inv_cache.item_rec.unit_weight;
5768: l_change_in_gross_weight_uom := inv_cache.item_rec.weight_uom_code;
5769: l_change_in_volume := -1 * l_primary_quantity * inv_cache.item_rec.unit_volume;
5770: l_change_in_volume_uom := inv_cache.item_rec.volume_uom_code;
5771: END IF;
5772: ELSIF (p_content_item_desc IS NOT NULL) THEN /*Unpacking a one time item*/
5773: OPEN one_time_item_cursor;
5774: FETCH one_time_item_cursor INTO l_one_time_item_rec;

Line 6065: IF ( inv_cache.item_rec.weight_uom_code IS NOT NULL) THEN

6061: l_wt_vol_new.gross_weight := l_wt_vol_new.gross_weight + l_change_in_gross_weight;
6062: ELSE
6063: -- Both are not null but with different UOMs need to convert
6064: -- If cannot covert uom, ignore the change in volume
6065: IF ( inv_cache.item_rec.weight_uom_code IS NOT NULL) THEN
6066: IF (l_change_in_gross_weight_uom <> inv_cache.item_rec.weight_uom_code) THEN --8447369 added condition
6067: l_change_in_gross_weight := Convert_UOM(
6068: p_inventory_item_id => l_lpn.inventory_item_id
6069: , p_fm_quantity => l_change_in_gross_weight

Line 6066: IF (l_change_in_gross_weight_uom <> inv_cache.item_rec.weight_uom_code) THEN --8447369 added condition

6062: ELSE
6063: -- Both are not null but with different UOMs need to convert
6064: -- If cannot covert uom, ignore the change in volume
6065: IF ( inv_cache.item_rec.weight_uom_code IS NOT NULL) THEN
6066: IF (l_change_in_gross_weight_uom <> inv_cache.item_rec.weight_uom_code) THEN --8447369 added condition
6067: l_change_in_gross_weight := Convert_UOM(
6068: p_inventory_item_id => l_lpn.inventory_item_id
6069: , p_fm_quantity => l_change_in_gross_weight
6070: , p_fm_uom => l_change_in_gross_weight_uom

Line 6071: , p_to_uom => inv_cache.item_rec.weight_uom_code

6067: l_change_in_gross_weight := Convert_UOM(
6068: p_inventory_item_id => l_lpn.inventory_item_id
6069: , p_fm_quantity => l_change_in_gross_weight
6070: , p_fm_uom => l_change_in_gross_weight_uom
6071: , p_to_uom => inv_cache.item_rec.weight_uom_code
6072: , p_mode => G_NO_CONV_RETURN_ZERO );
6073: END IF;
6074:
6075: IF (l_wt_vol_new.gross_weight_uom_code <> inv_cache.item_rec.weight_uom_code ) THEN --8447369 added condition

Line 6075: IF (l_wt_vol_new.gross_weight_uom_code <> inv_cache.item_rec.weight_uom_code ) THEN --8447369 added condition

6071: , p_to_uom => inv_cache.item_rec.weight_uom_code
6072: , p_mode => G_NO_CONV_RETURN_ZERO );
6073: END IF;
6074:
6075: IF (l_wt_vol_new.gross_weight_uom_code <> inv_cache.item_rec.weight_uom_code ) THEN --8447369 added condition
6076: l_wt_vol_new.gross_weight := Convert_UOM(
6077: p_inventory_item_id => l_lpn.inventory_item_id
6078: , p_fm_quantity => l_wt_vol_new.gross_weight
6079: , p_fm_uom => l_wt_vol_new.gross_weight_uom_code

Line 6080: , p_to_uom => inv_cache.item_rec.weight_uom_code

6076: l_wt_vol_new.gross_weight := Convert_UOM(
6077: p_inventory_item_id => l_lpn.inventory_item_id
6078: , p_fm_quantity => l_wt_vol_new.gross_weight
6079: , p_fm_uom => l_wt_vol_new.gross_weight_uom_code
6080: , p_to_uom => inv_cache.item_rec.weight_uom_code
6081: , p_mode => G_NO_CONV_RETURN_ZERO );
6082: l_wt_vol_new.gross_weight_uom_code := inv_cache.item_rec.weight_uom_code ;
6083: END IF;
6084: ELSE

Line 6082: l_wt_vol_new.gross_weight_uom_code := inv_cache.item_rec.weight_uom_code ;

6078: , p_fm_quantity => l_wt_vol_new.gross_weight
6079: , p_fm_uom => l_wt_vol_new.gross_weight_uom_code
6080: , p_to_uom => inv_cache.item_rec.weight_uom_code
6081: , p_mode => G_NO_CONV_RETURN_ZERO );
6082: l_wt_vol_new.gross_weight_uom_code := inv_cache.item_rec.weight_uom_code ;
6083: END IF;
6084: ELSE
6085: l_change_in_gross_weight := Convert_UOM(
6086: p_inventory_item_id => l_lpn.inventory_item_id

Line 6108: IF (inv_cache.item_rec.weight_uom_code IS NOT NULL AND NVL(l_wt_vol_new.tare_weight, 0) <> 0 AND l_wt_vol_new.tare_weight_uom_code <> inv_cache.item_rec.weight_uom_code) THEN

6104: IF ( NVL(l_change_in_tare_weight, 0) = 0 OR l_change_in_tare_weight_uom IS NULL ) THEN
6105: -- Child LPN tare weight not defined, no change in tare weight
6106: mdebug('l_wt_vol_new.tare_weight_uom_code'|| l_wt_vol_new.tare_weight_uom_code, G_INFO);
6107: -- 8447369 Added If condition
6108: IF (inv_cache.item_rec.weight_uom_code IS NOT NULL AND NVL(l_wt_vol_new.tare_weight, 0) <> 0 AND l_wt_vol_new.tare_weight_uom_code <> inv_cache.item_rec.weight_uom_code) THEN
6109: l_wt_vol_new.tare_weight := Convert_UOM(
6110: p_inventory_item_id => l_lpn.inventory_item_id
6111: , p_fm_quantity => l_wt_vol_new.tare_weight
6112: , p_fm_uom => l_wt_vol_new.tare_weight_uom_code

Line 6113: , p_to_uom => inv_cache.item_rec.weight_uom_code

6109: l_wt_vol_new.tare_weight := Convert_UOM(
6110: p_inventory_item_id => l_lpn.inventory_item_id
6111: , p_fm_quantity => l_wt_vol_new.tare_weight
6112: , p_fm_uom => l_wt_vol_new.tare_weight_uom_code
6113: , p_to_uom => inv_cache.item_rec.weight_uom_code
6114: , p_mode => G_NO_CONV_RETURN_ZERO );
6115:
6116: l_wt_vol_new.tare_weight_uom_code := inv_cache.item_rec.weight_uom_code;
6117: ELSE

Line 6116: l_wt_vol_new.tare_weight_uom_code := inv_cache.item_rec.weight_uom_code;

6112: , p_fm_uom => l_wt_vol_new.tare_weight_uom_code
6113: , p_to_uom => inv_cache.item_rec.weight_uom_code
6114: , p_mode => G_NO_CONV_RETURN_ZERO );
6115:
6116: l_wt_vol_new.tare_weight_uom_code := inv_cache.item_rec.weight_uom_code;
6117: ELSE
6118: l_wt_vol_new.tare_weight := NULL;
6119: l_wt_vol_new.tare_weight_uom_code := NULL;
6120: END IF;