DBA Data[Home] [Help]

APPS.INV_MATERIAL_STATUS_GRP dependencies on INV_CACHE

Line 462: IF inv_cache.set_item_rec(p_organization_id, l_cur_wlc.inventory_item_id) THEN

458: FOR l_cur_wlc IN c_lpn_item LOOP
459: l_serial_controlled := 0;
460: l_serial_status_enabled := 0;
461:
462: IF inv_cache.set_item_rec(p_organization_id, l_cur_wlc.inventory_item_id) THEN
463: inv_trx_util_pub.TRACE('txn allowed or not: .. 120.0','Material Status', 9);
464: IF (inv_cache.item_rec.serial_number_control_code in (2,5)) THEN
465: inv_trx_util_pub.TRACE('txn allowed or not: .. 120.1 serial controlled','Material Status', 9);
466: l_serial_controlled := 1; -- Item is serial controlled

Line 464: IF (inv_cache.item_rec.serial_number_control_code in (2,5)) THEN

460: l_serial_status_enabled := 0;
461:
462: IF inv_cache.set_item_rec(p_organization_id, l_cur_wlc.inventory_item_id) THEN
463: inv_trx_util_pub.TRACE('txn allowed or not: .. 120.0','Material Status', 9);
464: IF (inv_cache.item_rec.serial_number_control_code in (2,5)) THEN
465: inv_trx_util_pub.TRACE('txn allowed or not: .. 120.1 serial controlled','Material Status', 9);
466: l_serial_controlled := 1; -- Item is serial controlled
467: END IF;
468:

Line 469: IF (NVL(inv_cache.item_rec.serial_status_enabled,'Y') = 'Y') THEN

465: inv_trx_util_pub.TRACE('txn allowed or not: .. 120.1 serial controlled','Material Status', 9);
466: l_serial_controlled := 1; -- Item is serial controlled
467: END IF;
468:
469: IF (NVL(inv_cache.item_rec.serial_status_enabled,'Y') = 'Y') THEN
470: inv_trx_util_pub.TRACE('txn allowed or not: .. 120.2 serial status enabled-true','Material Status', 9);
471: l_serial_status_enabled := 1;
472: END IF;
473: END IF;

Line 849: if (inv_cache.set_org_rec(p_organization_id)) then

845: END IF;
846: --END INCONV kkillams
847:
848: -- Onhand Material Status Support
849: if (inv_cache.set_org_rec(p_organization_id)) then
850: l_default_status_id := inv_cache.org_rec.default_status_id;
851: end if;
852:
853:

Line 850: l_default_status_id := inv_cache.org_rec.default_status_id;

846: --END INCONV kkillams
847:
848: -- Onhand Material Status Support
849: if (inv_cache.set_org_rec(p_organization_id)) then
850: l_default_status_id := inv_cache.org_rec.default_status_id;
851: end if;
852:
853:
854: -- Call the new CSI Function at the start and disregard if

Line 1009: if inv_cache.set_item_rec(p_organization_id, p_inventory_item_id) then

1005: return 'Y';
1006: end if;
1007:
1008: -- Onhand Material Status Support
1009: if inv_cache.set_item_rec(p_organization_id, p_inventory_item_id) then
1010: l_default_item_status_id := inv_cache.item_rec.default_material_status_id;
1011: end if;
1012:
1013: /* Bug 6918409 */

Line 1010: l_default_item_status_id := inv_cache.item_rec.default_material_status_id;

1006: end if;
1007:
1008: -- Onhand Material Status Support
1009: if inv_cache.set_item_rec(p_organization_id, p_inventory_item_id) then
1010: l_default_item_status_id := inv_cache.item_rec.default_material_status_id;
1011: end if;
1012:
1013: /* Bug 6918409 */
1014: if inv_cache.set_item_rec(p_organization_id, p_inventory_item_id) then

Line 1014: if inv_cache.set_item_rec(p_organization_id, p_inventory_item_id) then

1010: l_default_item_status_id := inv_cache.item_rec.default_material_status_id;
1011: end if;
1012:
1013: /* Bug 6918409 */
1014: if inv_cache.set_item_rec(p_organization_id, p_inventory_item_id) then
1015: if (inv_cache.item_rec.serial_number_control_code not in (1,6)) then
1016: l_serial_controlled := 1;
1017: end if;
1018: end if;

Line 1015: if (inv_cache.item_rec.serial_number_control_code not in (1,6)) then

1011: end if;
1012:
1013: /* Bug 6918409 */
1014: if inv_cache.set_item_rec(p_organization_id, p_inventory_item_id) then
1015: if (inv_cache.item_rec.serial_number_control_code not in (1,6)) then
1016: l_serial_controlled := 1;
1017: end if;
1018: end if;
1019: /* Bug 6918409 */

Line 1029: NOT(inv_cache.is_pickrelease) OR (inv_cache.is_pickrelease IS NULL) --Bug 6939535

1025: if (p_sub_code is not null ) and (p_object_type = 'Z' or p_object_type = 'A') then
1026: if(( p_organization_id <> nvl(g_isa_organization_id,-9999) ) or
1027: ( p_sub_code <> nvl(g_isa_sub_code,-9999)) or
1028: ( l_default_status_id is not null) or -- Onhand Material Status Support: No caching if status is at onhand level
1029: NOT(inv_cache.is_pickrelease) OR (inv_cache.is_pickrelease IS NULL) --Bug 6939535
1030: )THEN
1031: -- Onhand Material Status Support : If status is tracked at the onhand level,
1032: -- then retrieve status_id from MOQD.
1033: if (l_default_status_id is null) then

Line 1172: elsif inv_cache.set_tosub_rec(p_organization_id, p_sub_code) then

1168:
1169: if (l_count <> 1 ) then
1170: if (l_default_item_status_id is not null) then
1171: g_isa_sub_status_id := l_default_item_status_id;
1172: elsif inv_cache.set_tosub_rec(p_organization_id, p_sub_code) then
1173: g_isa_sub_status_id := inv_cache.tosub_rec.status_id;
1174: end if;
1175: if (g_debug = 1) then
1176: inv_trx_util_pub.TRACE('sub, l_count is 0, sub_status_id: '||g_isa_sub_status_id, 'INV_MATERIAL_STATUS_GRP', 14);

Line 1173: g_isa_sub_status_id := inv_cache.tosub_rec.status_id;

1169: if (l_count <> 1 ) then
1170: if (l_default_item_status_id is not null) then
1171: g_isa_sub_status_id := l_default_item_status_id;
1172: elsif inv_cache.set_tosub_rec(p_organization_id, p_sub_code) then
1173: g_isa_sub_status_id := inv_cache.tosub_rec.status_id;
1174: end if;
1175: if (g_debug = 1) then
1176: inv_trx_util_pub.TRACE('sub, l_count is 0, sub_status_id: '||g_isa_sub_status_id, 'INV_MATERIAL_STATUS_GRP', 14);
1177: end if;

Line 1186: if inv_cache.set_item_rec(p_organization_id, p_inventory_item_id) then

1182:
1183: if (g_isa_sub_status_id is null or g_isa_sub_status_id = 0 or g_isa_sub_status_id = -1)
1184: and p_object_type <> 'A' then
1185:
1186: if inv_cache.set_item_rec(p_organization_id, p_inventory_item_id) then
1187: if (inv_cache.item_rec.serial_number_control_code in (1,6)) then
1188:
1189: if (g_debug = 1) then
1190: inv_trx_util_pub.TRACE('sub, status is null in MOQD for non-serial controlled item', 'INV_MATERIAL_STATUS_GRP', 14);

Line 1187: if (inv_cache.item_rec.serial_number_control_code in (1,6)) then

1183: if (g_isa_sub_status_id is null or g_isa_sub_status_id = 0 or g_isa_sub_status_id = -1)
1184: and p_object_type <> 'A' then
1185:
1186: if inv_cache.set_item_rec(p_organization_id, p_inventory_item_id) then
1187: if (inv_cache.item_rec.serial_number_control_code in (1,6)) then
1188:
1189: if (g_debug = 1) then
1190: inv_trx_util_pub.TRACE('sub, status is null in MOQD for non-serial controlled item', 'INV_MATERIAL_STATUS_GRP', 14);
1191: end if;

Line 1204: elsif ((inv_cache.item_rec.serial_number_control_code not in (1,6)) and g_isa_sub_status_id = -1) then

1200: FND_MSG_PUB.ADD;
1201:
1202: return 'N';
1203:
1204: elsif ((inv_cache.item_rec.serial_number_control_code not in (1,6)) and g_isa_sub_status_id = -1) then
1205: return 'Y';
1206: end if;
1207: end if;
1208: end if;

Line 1338: NOT(inv_cache.is_pickrelease) OR (inv_cache.is_pickrelease IS NULL) --Bug 6939535

1334: p_object_type = 'A' ) then
1335: if(( p_organization_id <> nvl(g_isa_organization_id,-9999) ) or
1336: ( p_locator_id <> nvl(g_isa_locator_id,-9999)) or
1337: ( l_default_status_id is not null) or -- Onhand Material Status Support: No caching if status is at onhand level
1338: NOT(inv_cache.is_pickrelease) OR (inv_cache.is_pickrelease IS NULL) --Bug 6939535
1339: ) THEN
1340:
1341: -- Onhand Material Status Support : If status is tracked at the onhand level,
1342: -- then retrieve status_id from MOQD.

Line 1378: IF inv_cache.set_tosub_rec(p_organization_id, p_sub_code) THEN

1374: (
1375: p_sub_code IS NOT NULL
1376: )
1377: ) THEN -- Bug 8515078 dynamic locator
1378: IF inv_cache.set_tosub_rec(p_organization_id, p_sub_code) THEN
1379: IF (inv_cache.tosub_rec.default_loc_status_id IS NOT NULL) THEN
1380: g_isa_loc_status_id := inv_cache.tosub_rec.default_loc_status_id;
1381: ELSE
1382: RETURN 'Y';

Line 1379: IF (inv_cache.tosub_rec.default_loc_status_id IS NOT NULL) THEN

1375: p_sub_code IS NOT NULL
1376: )
1377: ) THEN -- Bug 8515078 dynamic locator
1378: IF inv_cache.set_tosub_rec(p_organization_id, p_sub_code) THEN
1379: IF (inv_cache.tosub_rec.default_loc_status_id IS NOT NULL) THEN
1380: g_isa_loc_status_id := inv_cache.tosub_rec.default_loc_status_id;
1381: ELSE
1382: RETURN 'Y';
1383: END IF;

Line 1380: g_isa_loc_status_id := inv_cache.tosub_rec.default_loc_status_id;

1376: )
1377: ) THEN -- Bug 8515078 dynamic locator
1378: IF inv_cache.set_tosub_rec(p_organization_id, p_sub_code) THEN
1379: IF (inv_cache.tosub_rec.default_loc_status_id IS NOT NULL) THEN
1380: g_isa_loc_status_id := inv_cache.tosub_rec.default_loc_status_id;
1381: ELSE
1382: RETURN 'Y';
1383: END IF;
1384: ELSE

Line 1483: elsif inv_cache.set_loc_rec(p_organization_id, p_locator_id) then

1479:
1480: if (l_count <> 1 ) then
1481: if (l_default_item_status_id is not null) then
1482: g_isa_loc_status_id := l_default_item_status_id;
1483: elsif inv_cache.set_loc_rec(p_organization_id, p_locator_id) then
1484: if (inv_cache.loc_rec.status_id is not null) then
1485: g_isa_loc_status_id := inv_cache.loc_rec.status_id;
1486: else -- Locator is dynamic
1487: if inv_cache.set_tosub_rec(p_organization_id, p_sub_code) then

Line 1484: if (inv_cache.loc_rec.status_id is not null) then

1480: if (l_count <> 1 ) then
1481: if (l_default_item_status_id is not null) then
1482: g_isa_loc_status_id := l_default_item_status_id;
1483: elsif inv_cache.set_loc_rec(p_organization_id, p_locator_id) then
1484: if (inv_cache.loc_rec.status_id is not null) then
1485: g_isa_loc_status_id := inv_cache.loc_rec.status_id;
1486: else -- Locator is dynamic
1487: if inv_cache.set_tosub_rec(p_organization_id, p_sub_code) then
1488: if (inv_cache.tosub_rec.default_loc_status_id is not null) then

Line 1485: g_isa_loc_status_id := inv_cache.loc_rec.status_id;

1481: if (l_default_item_status_id is not null) then
1482: g_isa_loc_status_id := l_default_item_status_id;
1483: elsif inv_cache.set_loc_rec(p_organization_id, p_locator_id) then
1484: if (inv_cache.loc_rec.status_id is not null) then
1485: g_isa_loc_status_id := inv_cache.loc_rec.status_id;
1486: else -- Locator is dynamic
1487: if inv_cache.set_tosub_rec(p_organization_id, p_sub_code) then
1488: if (inv_cache.tosub_rec.default_loc_status_id is not null) then
1489: g_isa_loc_status_id := inv_cache.tosub_rec.default_loc_status_id;

Line 1487: if inv_cache.set_tosub_rec(p_organization_id, p_sub_code) then

1483: elsif inv_cache.set_loc_rec(p_organization_id, p_locator_id) then
1484: if (inv_cache.loc_rec.status_id is not null) then
1485: g_isa_loc_status_id := inv_cache.loc_rec.status_id;
1486: else -- Locator is dynamic
1487: if inv_cache.set_tosub_rec(p_organization_id, p_sub_code) then
1488: if (inv_cache.tosub_rec.default_loc_status_id is not null) then
1489: g_isa_loc_status_id := inv_cache.tosub_rec.default_loc_status_id;
1490: else
1491: g_isa_loc_status_id := inv_cache.tosub_rec.status_id;

Line 1488: if (inv_cache.tosub_rec.default_loc_status_id is not null) then

1484: if (inv_cache.loc_rec.status_id is not null) then
1485: g_isa_loc_status_id := inv_cache.loc_rec.status_id;
1486: else -- Locator is dynamic
1487: if inv_cache.set_tosub_rec(p_organization_id, p_sub_code) then
1488: if (inv_cache.tosub_rec.default_loc_status_id is not null) then
1489: g_isa_loc_status_id := inv_cache.tosub_rec.default_loc_status_id;
1490: else
1491: g_isa_loc_status_id := inv_cache.tosub_rec.status_id;
1492: end if;

Line 1489: g_isa_loc_status_id := inv_cache.tosub_rec.default_loc_status_id;

1485: g_isa_loc_status_id := inv_cache.loc_rec.status_id;
1486: else -- Locator is dynamic
1487: if inv_cache.set_tosub_rec(p_organization_id, p_sub_code) then
1488: if (inv_cache.tosub_rec.default_loc_status_id is not null) then
1489: g_isa_loc_status_id := inv_cache.tosub_rec.default_loc_status_id;
1490: else
1491: g_isa_loc_status_id := inv_cache.tosub_rec.status_id;
1492: end if;
1493: elsif p_sub_code is null and p_object_type <> 'A' then -- Bug 6918409

Line 1491: g_isa_loc_status_id := inv_cache.tosub_rec.status_id;

1487: if inv_cache.set_tosub_rec(p_organization_id, p_sub_code) then
1488: if (inv_cache.tosub_rec.default_loc_status_id is not null) then
1489: g_isa_loc_status_id := inv_cache.tosub_rec.default_loc_status_id;
1490: else
1491: g_isa_loc_status_id := inv_cache.tosub_rec.status_id;
1492: end if;
1493: elsif p_sub_code is null and p_object_type <> 'A' then -- Bug 6918409
1494: return 'Y';
1495: end if;

Line 1500: elsif inv_cache.set_tosub_rec(p_organization_id, p_sub_code) then

1496: end if;
1497: else
1498: if p_sub_code is null and p_object_type <> 'A' then -- Bug 6787033
1499: return 'Y';
1500: elsif inv_cache.set_tosub_rec(p_organization_id, p_sub_code) then
1501: if (inv_cache.tosub_rec.default_loc_status_id is not null) then
1502: g_isa_loc_status_id := inv_cache.tosub_rec.default_loc_status_id;
1503: else
1504: g_isa_loc_status_id := inv_cache.tosub_rec.status_id;

Line 1501: if (inv_cache.tosub_rec.default_loc_status_id is not null) then

1497: else
1498: if p_sub_code is null and p_object_type <> 'A' then -- Bug 6787033
1499: return 'Y';
1500: elsif inv_cache.set_tosub_rec(p_organization_id, p_sub_code) then
1501: if (inv_cache.tosub_rec.default_loc_status_id is not null) then
1502: g_isa_loc_status_id := inv_cache.tosub_rec.default_loc_status_id;
1503: else
1504: g_isa_loc_status_id := inv_cache.tosub_rec.status_id;
1505: end if;

Line 1502: g_isa_loc_status_id := inv_cache.tosub_rec.default_loc_status_id;

1498: if p_sub_code is null and p_object_type <> 'A' then -- Bug 6787033
1499: return 'Y';
1500: elsif inv_cache.set_tosub_rec(p_organization_id, p_sub_code) then
1501: if (inv_cache.tosub_rec.default_loc_status_id is not null) then
1502: g_isa_loc_status_id := inv_cache.tosub_rec.default_loc_status_id;
1503: else
1504: g_isa_loc_status_id := inv_cache.tosub_rec.status_id;
1505: end if;
1506: end if;

Line 1504: g_isa_loc_status_id := inv_cache.tosub_rec.status_id;

1500: elsif inv_cache.set_tosub_rec(p_organization_id, p_sub_code) then
1501: if (inv_cache.tosub_rec.default_loc_status_id is not null) then
1502: g_isa_loc_status_id := inv_cache.tosub_rec.default_loc_status_id;
1503: else
1504: g_isa_loc_status_id := inv_cache.tosub_rec.status_id;
1505: end if;
1506: end if;
1507: end if;
1508: end if;

Line 1516: if inv_cache.set_item_rec(p_organization_id, p_inventory_item_id) then

1512: end;
1513:
1514: if (g_isa_loc_status_id is null or g_isa_loc_status_id = 0 or g_isa_loc_status_id = -1)
1515: and p_object_type <> 'A' then
1516: if inv_cache.set_item_rec(p_organization_id, p_inventory_item_id) then
1517: if (inv_cache.item_rec.serial_number_control_code in (1,6)) then
1518:
1519: if (g_debug = 1) then
1520: inv_trx_util_pub.TRACE('Loc, status is null in MOQD for non-serial controlled item', 'INV_MATERIAL_STATUS_GRP', 14);

Line 1517: if (inv_cache.item_rec.serial_number_control_code in (1,6)) then

1513:
1514: if (g_isa_loc_status_id is null or g_isa_loc_status_id = 0 or g_isa_loc_status_id = -1)
1515: and p_object_type <> 'A' then
1516: if inv_cache.set_item_rec(p_organization_id, p_inventory_item_id) then
1517: if (inv_cache.item_rec.serial_number_control_code in (1,6)) then
1518:
1519: if (g_debug = 1) then
1520: inv_trx_util_pub.TRACE('Loc, status is null in MOQD for non-serial controlled item', 'INV_MATERIAL_STATUS_GRP', 14);
1521: end if;

Line 1532: elsif ((inv_cache.item_rec.serial_number_control_code not in (1,6)) and g_isa_loc_status_id = -1) then

1528: FND_MESSAGE.SET_TOKEN('LOT', p_lot_number);
1529: FND_MESSAGE.SET_TOKEN('LPN_ID', p_lpn_id);
1530: FND_MSG_PUB.ADD;
1531: return 'N';
1532: elsif ((inv_cache.item_rec.serial_number_control_code not in (1,6)) and g_isa_loc_status_id = -1) then
1533: return 'Y';
1534: end if;
1535: end if;
1536: end if;

Line 1664: (NOT(inv_cache.is_pickrelease) OR (inv_cache.is_pickrelease IS NULL)) OR

1660: ) and (p_object_type = 'O' or p_object_type = 'A') then
1661: if( p_organization_id <> nvl(g_organization_id, -9999) OR
1662: p_inventory_item_id <> nvl(g_inventory_item_id, -9999) OR
1663: p_lot_number <> nvl(g_isa_lot_number, '@@@') OR
1664: (NOT(inv_cache.is_pickrelease) OR (inv_cache.is_pickrelease IS NULL)) OR
1665: ( l_default_status_id is not null) -- Onhand Material Status Support: No caching if status is at onhand level
1666: ) THEN --Bug 5457445
1667:
1668: -- Onhand Material Status Support : If status is tracked at the onhand level,

Line 1779: if inv_cache.set_item_rec(p_organization_id, p_inventory_item_id) then

1775: elsif (p_trx_type_id = 36) then
1776: return 'Y';
1777: else
1778: if (l_lot_status_enabled = 'Y') then
1779: if inv_cache.set_item_rec(p_organization_id, p_inventory_item_id) then
1780: g_isa_lot_number_status_id := inv_cache.item_rec.default_lot_status_id;
1781: end if;
1782: else
1783: /* Bug 6918409 */

Line 1780: g_isa_lot_number_status_id := inv_cache.item_rec.default_lot_status_id;

1776: return 'Y';
1777: else
1778: if (l_lot_status_enabled = 'Y') then
1779: if inv_cache.set_item_rec(p_organization_id, p_inventory_item_id) then
1780: g_isa_lot_number_status_id := inv_cache.item_rec.default_lot_status_id;
1781: end if;
1782: else
1783: /* Bug 6918409 */
1784: if (l_default_item_status_id is not null) then

Line 1787: if inv_cache.set_loc_rec(p_organization_id, l_locator_id) then

1783: /* Bug 6918409 */
1784: if (l_default_item_status_id is not null) then
1785: g_isa_lot_number_status_id := l_default_item_status_id;
1786: elsif (get_locator_control(p_organization_id, p_inventory_item_id, p_sub_code) <> 1) then
1787: if inv_cache.set_loc_rec(p_organization_id, l_locator_id) then
1788: if (inv_cache.loc_rec.status_id is not null) then
1789: g_isa_lot_number_status_id := inv_cache.loc_rec.status_id;
1790: else -- Locator is dynamic
1791: if inv_cache.set_tosub_rec(p_organization_id, p_sub_code) then

Line 1788: if (inv_cache.loc_rec.status_id is not null) then

1784: if (l_default_item_status_id is not null) then
1785: g_isa_lot_number_status_id := l_default_item_status_id;
1786: elsif (get_locator_control(p_organization_id, p_inventory_item_id, p_sub_code) <> 1) then
1787: if inv_cache.set_loc_rec(p_organization_id, l_locator_id) then
1788: if (inv_cache.loc_rec.status_id is not null) then
1789: g_isa_lot_number_status_id := inv_cache.loc_rec.status_id;
1790: else -- Locator is dynamic
1791: if inv_cache.set_tosub_rec(p_organization_id, p_sub_code) then
1792: if (inv_cache.tosub_rec.default_loc_status_id is not null) then

Line 1789: g_isa_lot_number_status_id := inv_cache.loc_rec.status_id;

1785: g_isa_lot_number_status_id := l_default_item_status_id;
1786: elsif (get_locator_control(p_organization_id, p_inventory_item_id, p_sub_code) <> 1) then
1787: if inv_cache.set_loc_rec(p_organization_id, l_locator_id) then
1788: if (inv_cache.loc_rec.status_id is not null) then
1789: g_isa_lot_number_status_id := inv_cache.loc_rec.status_id;
1790: else -- Locator is dynamic
1791: if inv_cache.set_tosub_rec(p_organization_id, p_sub_code) then
1792: if (inv_cache.tosub_rec.default_loc_status_id is not null) then
1793: g_isa_lot_number_status_id := inv_cache.tosub_rec.default_loc_status_id;

Line 1791: if inv_cache.set_tosub_rec(p_organization_id, p_sub_code) then

1787: if inv_cache.set_loc_rec(p_organization_id, l_locator_id) then
1788: if (inv_cache.loc_rec.status_id is not null) then
1789: g_isa_lot_number_status_id := inv_cache.loc_rec.status_id;
1790: else -- Locator is dynamic
1791: if inv_cache.set_tosub_rec(p_organization_id, p_sub_code) then
1792: if (inv_cache.tosub_rec.default_loc_status_id is not null) then
1793: g_isa_lot_number_status_id := inv_cache.tosub_rec.default_loc_status_id;
1794: else
1795: g_isa_lot_number_status_id := inv_cache.tosub_rec.status_id;

Line 1792: if (inv_cache.tosub_rec.default_loc_status_id is not null) then

1788: if (inv_cache.loc_rec.status_id is not null) then
1789: g_isa_lot_number_status_id := inv_cache.loc_rec.status_id;
1790: else -- Locator is dynamic
1791: if inv_cache.set_tosub_rec(p_organization_id, p_sub_code) then
1792: if (inv_cache.tosub_rec.default_loc_status_id is not null) then
1793: g_isa_lot_number_status_id := inv_cache.tosub_rec.default_loc_status_id;
1794: else
1795: g_isa_lot_number_status_id := inv_cache.tosub_rec.status_id;
1796: end if;

Line 1793: g_isa_lot_number_status_id := inv_cache.tosub_rec.default_loc_status_id;

1789: g_isa_lot_number_status_id := inv_cache.loc_rec.status_id;
1790: else -- Locator is dynamic
1791: if inv_cache.set_tosub_rec(p_organization_id, p_sub_code) then
1792: if (inv_cache.tosub_rec.default_loc_status_id is not null) then
1793: g_isa_lot_number_status_id := inv_cache.tosub_rec.default_loc_status_id;
1794: else
1795: g_isa_lot_number_status_id := inv_cache.tosub_rec.status_id;
1796: end if;
1797: elsif p_sub_code is null and p_object_type <> 'A' then

Line 1795: g_isa_lot_number_status_id := inv_cache.tosub_rec.status_id;

1791: if inv_cache.set_tosub_rec(p_organization_id, p_sub_code) then
1792: if (inv_cache.tosub_rec.default_loc_status_id is not null) then
1793: g_isa_lot_number_status_id := inv_cache.tosub_rec.default_loc_status_id;
1794: else
1795: g_isa_lot_number_status_id := inv_cache.tosub_rec.status_id;
1796: end if;
1797: elsif p_sub_code is null and p_object_type <> 'A' then
1798: return 'Y';
1799: end if;

Line 1804: elsif inv_cache.set_tosub_rec(p_organization_id, p_sub_code) then

1800: end if;
1801: else
1802: if p_sub_code is null and p_object_type <> 'A' then -- Bug 6787033
1803: return 'Y';
1804: elsif inv_cache.set_tosub_rec(p_organization_id, p_sub_code) then
1805: if (inv_cache.tosub_rec.default_loc_status_id is not null) then
1806: g_isa_lot_number_status_id := inv_cache.tosub_rec.default_loc_status_id;
1807: else
1808: g_isa_lot_number_status_id := inv_cache.tosub_rec.status_id;

Line 1805: if (inv_cache.tosub_rec.default_loc_status_id is not null) then

1801: else
1802: if p_sub_code is null and p_object_type <> 'A' then -- Bug 6787033
1803: return 'Y';
1804: elsif inv_cache.set_tosub_rec(p_organization_id, p_sub_code) then
1805: if (inv_cache.tosub_rec.default_loc_status_id is not null) then
1806: g_isa_lot_number_status_id := inv_cache.tosub_rec.default_loc_status_id;
1807: else
1808: g_isa_lot_number_status_id := inv_cache.tosub_rec.status_id;
1809: end if;

Line 1806: g_isa_lot_number_status_id := inv_cache.tosub_rec.default_loc_status_id;

1802: if p_sub_code is null and p_object_type <> 'A' then -- Bug 6787033
1803: return 'Y';
1804: elsif inv_cache.set_tosub_rec(p_organization_id, p_sub_code) then
1805: if (inv_cache.tosub_rec.default_loc_status_id is not null) then
1806: g_isa_lot_number_status_id := inv_cache.tosub_rec.default_loc_status_id;
1807: else
1808: g_isa_lot_number_status_id := inv_cache.tosub_rec.status_id;
1809: end if;
1810: end if;

Line 1808: g_isa_lot_number_status_id := inv_cache.tosub_rec.status_id;

1804: elsif inv_cache.set_tosub_rec(p_organization_id, p_sub_code) then
1805: if (inv_cache.tosub_rec.default_loc_status_id is not null) then
1806: g_isa_lot_number_status_id := inv_cache.tosub_rec.default_loc_status_id;
1807: else
1808: g_isa_lot_number_status_id := inv_cache.tosub_rec.status_id;
1809: end if;
1810: end if;
1811: end if;
1812: elsif ( p_sub_code is not null) then

Line 1813: if inv_cache.set_tosub_rec(p_organization_id, p_sub_code) then

1809: end if;
1810: end if;
1811: end if;
1812: elsif ( p_sub_code is not null) then
1813: if inv_cache.set_tosub_rec(p_organization_id, p_sub_code) then
1814: g_isa_lot_number_status_id := inv_cache.tosub_rec.status_id;
1815: end if;
1816: else
1817: return 'Y';

Line 1814: g_isa_lot_number_status_id := inv_cache.tosub_rec.status_id;

1810: end if;
1811: end if;
1812: elsif ( p_sub_code is not null) then
1813: if inv_cache.set_tosub_rec(p_organization_id, p_sub_code) then
1814: g_isa_lot_number_status_id := inv_cache.tosub_rec.status_id;
1815: end if;
1816: else
1817: return 'Y';
1818: end if;

Line 1827: if inv_cache.set_item_rec(p_organization_id, p_inventory_item_id) then

1823: end;
1824:
1825: if (g_isa_lot_number_status_id is null or g_isa_lot_number_status_id = 0 or g_isa_lot_number_status_id = -1)
1826: and p_object_type <> 'A' then
1827: if inv_cache.set_item_rec(p_organization_id, p_inventory_item_id) then
1828: if (inv_cache.item_rec.serial_number_control_code in (1,6)) then
1829:
1830: if (g_debug = 1) then
1831: inv_trx_util_pub.TRACE('lot, status is null in MOQD for non-serial controlled item', 'INV_MATERIAL_STATUS_GRP', 14);

Line 1828: if (inv_cache.item_rec.serial_number_control_code in (1,6)) then

1824:
1825: if (g_isa_lot_number_status_id is null or g_isa_lot_number_status_id = 0 or g_isa_lot_number_status_id = -1)
1826: and p_object_type <> 'A' then
1827: if inv_cache.set_item_rec(p_organization_id, p_inventory_item_id) then
1828: if (inv_cache.item_rec.serial_number_control_code in (1,6)) then
1829:
1830: if (g_debug = 1) then
1831: inv_trx_util_pub.TRACE('lot, status is null in MOQD for non-serial controlled item', 'INV_MATERIAL_STATUS_GRP', 14);
1832: end if;

Line 1843: elsif ((inv_cache.item_rec.serial_number_control_code not in (1,6)) and g_isa_lot_number_status_id = -1) then

1839: FND_MESSAGE.SET_TOKEN('LOT', p_lot_number);
1840: FND_MESSAGE.SET_TOKEN('LPN_ID', p_lpn_id);
1841: FND_MSG_PUB.ADD;
1842: return 'N';
1843: elsif ((inv_cache.item_rec.serial_number_control_code not in (1,6)) and g_isa_lot_number_status_id = -1) then
1844: return 'Y';
1845: end if;
1846: end if;
1847: end if;

Line 2218: if inv_cache.set_org_rec(p_organization_id) then

2214: inv_trx_util_pub.TRACE('loc '|| p_loc_id || ' lot ' || p_lot_number || ' lpn ' || p_lpn_id || ' action ' || p_transaction_action_id || ' src ' || p_src_status_id, 'INV_MATERIAL_STATUS_GRP', 14);
2215: inv_trx_util_pub.TRACE('lock id '|| p_lock_id || ' header id '||p_header_id, 'INV_MATERIAL_STATUS_GRP', 14);
2216: end if;
2217:
2218: if inv_cache.set_org_rec(p_organization_id) then
2219: l_default_org_status_id := inv_cache.org_rec.default_status_id;
2220: end if;
2221:
2222: if (g_debug = 1) then

Line 2219: l_default_org_status_id := inv_cache.org_rec.default_status_id;

2215: inv_trx_util_pub.TRACE('lock id '|| p_lock_id || ' header id '||p_header_id, 'INV_MATERIAL_STATUS_GRP', 14);
2216: end if;
2217:
2218: if inv_cache.set_org_rec(p_organization_id) then
2219: l_default_org_status_id := inv_cache.org_rec.default_status_id;
2220: end if;
2221:
2222: if (g_debug = 1) then
2223: inv_trx_util_pub.TRACE('default org status ' || l_default_org_status_id, 'INV_MATERIAL_STATUS_GRP', 14);

Line 2226: if inv_cache.set_item_rec(p_organization_id, p_inventory_item_id) then

2222: if (g_debug = 1) then
2223: inv_trx_util_pub.TRACE('default org status ' || l_default_org_status_id, 'INV_MATERIAL_STATUS_GRP', 14);
2224: end if;
2225:
2226: if inv_cache.set_item_rec(p_organization_id, p_inventory_item_id) then
2227: if (inv_cache.item_rec.serial_number_control_code in (2,5)) then
2228: l_serial_controlled := 1; -- Item is serial controlled
2229: end if;
2230: end if;

Line 2227: if (inv_cache.item_rec.serial_number_control_code in (2,5)) then

2223: inv_trx_util_pub.TRACE('default org status ' || l_default_org_status_id, 'INV_MATERIAL_STATUS_GRP', 14);
2224: end if;
2225:
2226: if inv_cache.set_item_rec(p_organization_id, p_inventory_item_id) then
2227: if (inv_cache.item_rec.serial_number_control_code in (2,5)) then
2228: l_serial_controlled := 1; -- Item is serial controlled
2229: end if;
2230: end if;
2231:

Line 2439: if inv_cache.set_item_rec(p_organization_id, p_inventory_item_id) then

2435: return p_src_status_id;
2436: End if;
2437: end if;
2438:
2439: if inv_cache.set_item_rec(p_organization_id, p_inventory_item_id) then
2440: if (l_serial_controlled <> 0) then
2441: return null;
2442: elsif (inv_cache.item_rec.lot_status_enabled = 'Y') then
2443: -- Bug 6798024 : Calling the insert procedure to insert the status of the new onhand record into

Line 2442: elsif (inv_cache.item_rec.lot_status_enabled = 'Y') then

2438:
2439: if inv_cache.set_item_rec(p_organization_id, p_inventory_item_id) then
2440: if (l_serial_controlled <> 0) then
2441: return null;
2442: elsif (inv_cache.item_rec.lot_status_enabled = 'Y') then
2443: -- Bug 6798024 : Calling the insert procedure to insert the status of the new onhand record into
2444: -- the table : mtl_material_status_history
2445: insert_status_history(p_organization_id, p_inventory_item_id, p_sub_code, p_loc_id, p_lot_number
2446: ,p_lpn_id, inv_cache.item_rec.default_lot_status_id, p_lock_id);

Line 2446: ,p_lpn_id, inv_cache.item_rec.default_lot_status_id, p_lock_id);

2442: elsif (inv_cache.item_rec.lot_status_enabled = 'Y') then
2443: -- Bug 6798024 : Calling the insert procedure to insert the status of the new onhand record into
2444: -- the table : mtl_material_status_history
2445: insert_status_history(p_organization_id, p_inventory_item_id, p_sub_code, p_loc_id, p_lot_number
2446: ,p_lpn_id, inv_cache.item_rec.default_lot_status_id, p_lock_id);
2447:
2448: return inv_cache.item_rec.default_lot_status_id;
2449: elsif (inv_cache.item_rec.default_material_status_id is not null) then
2450: -- Bug 6798024 : Calling the insert procedure to insert the status of the new onhand record into

Line 2448: return inv_cache.item_rec.default_lot_status_id;

2444: -- the table : mtl_material_status_history
2445: insert_status_history(p_organization_id, p_inventory_item_id, p_sub_code, p_loc_id, p_lot_number
2446: ,p_lpn_id, inv_cache.item_rec.default_lot_status_id, p_lock_id);
2447:
2448: return inv_cache.item_rec.default_lot_status_id;
2449: elsif (inv_cache.item_rec.default_material_status_id is not null) then
2450: -- Bug 6798024 : Calling the insert procedure to insert the status of the new onhand record into
2451: -- the table : mtl_material_status_history
2452: insert_status_history(p_organization_id, p_inventory_item_id, p_sub_code, p_loc_id, p_lot_number

Line 2449: elsif (inv_cache.item_rec.default_material_status_id is not null) then

2445: insert_status_history(p_organization_id, p_inventory_item_id, p_sub_code, p_loc_id, p_lot_number
2446: ,p_lpn_id, inv_cache.item_rec.default_lot_status_id, p_lock_id);
2447:
2448: return inv_cache.item_rec.default_lot_status_id;
2449: elsif (inv_cache.item_rec.default_material_status_id is not null) then
2450: -- Bug 6798024 : Calling the insert procedure to insert the status of the new onhand record into
2451: -- the table : mtl_material_status_history
2452: insert_status_history(p_organization_id, p_inventory_item_id, p_sub_code, p_loc_id, p_lot_number
2453: ,p_lpn_id, inv_cache.item_rec.default_material_status_id, p_lock_id);

Line 2453: ,p_lpn_id, inv_cache.item_rec.default_material_status_id, p_lock_id);

2449: elsif (inv_cache.item_rec.default_material_status_id is not null) then
2450: -- Bug 6798024 : Calling the insert procedure to insert the status of the new onhand record into
2451: -- the table : mtl_material_status_history
2452: insert_status_history(p_organization_id, p_inventory_item_id, p_sub_code, p_loc_id, p_lot_number
2453: ,p_lpn_id, inv_cache.item_rec.default_material_status_id, p_lock_id);
2454:
2455: return inv_cache.item_rec.default_material_status_id;
2456: end if;
2457: end if;

Line 2455: return inv_cache.item_rec.default_material_status_id;

2451: -- the table : mtl_material_status_history
2452: insert_status_history(p_organization_id, p_inventory_item_id, p_sub_code, p_loc_id, p_lot_number
2453: ,p_lpn_id, inv_cache.item_rec.default_material_status_id, p_lock_id);
2454:
2455: return inv_cache.item_rec.default_material_status_id;
2456: end if;
2457: end if;
2458:
2459: if p_loc_id is not null then

Line 2460: if inv_cache.set_loc_rec(p_organization_id, p_loc_id) then

2456: end if;
2457: end if;
2458:
2459: if p_loc_id is not null then
2460: if inv_cache.set_loc_rec(p_organization_id, p_loc_id) then
2461: if (inv_cache.loc_rec.status_id is not null) then
2462: -- Bug 6798024 : Calling the insert procedure to insert the status of the new onhand record into
2463: -- the table : mtl_material_status_history
2464: insert_status_history(p_organization_id, p_inventory_item_id, p_sub_code, p_loc_id, p_lot_number

Line 2461: if (inv_cache.loc_rec.status_id is not null) then

2457: end if;
2458:
2459: if p_loc_id is not null then
2460: if inv_cache.set_loc_rec(p_organization_id, p_loc_id) then
2461: if (inv_cache.loc_rec.status_id is not null) then
2462: -- Bug 6798024 : Calling the insert procedure to insert the status of the new onhand record into
2463: -- the table : mtl_material_status_history
2464: insert_status_history(p_organization_id, p_inventory_item_id, p_sub_code, p_loc_id, p_lot_number
2465: ,p_lpn_id, inv_cache.loc_rec.status_id, p_lock_id);

Line 2465: ,p_lpn_id, inv_cache.loc_rec.status_id, p_lock_id);

2461: if (inv_cache.loc_rec.status_id is not null) then
2462: -- Bug 6798024 : Calling the insert procedure to insert the status of the new onhand record into
2463: -- the table : mtl_material_status_history
2464: insert_status_history(p_organization_id, p_inventory_item_id, p_sub_code, p_loc_id, p_lot_number
2465: ,p_lpn_id, inv_cache.loc_rec.status_id, p_lock_id);
2466:
2467: return inv_cache.loc_rec.status_id;
2468: else -- Locator is dynamic
2469: if inv_cache.set_tosub_rec(p_organization_id, p_sub_code) then

Line 2467: return inv_cache.loc_rec.status_id;

2463: -- the table : mtl_material_status_history
2464: insert_status_history(p_organization_id, p_inventory_item_id, p_sub_code, p_loc_id, p_lot_number
2465: ,p_lpn_id, inv_cache.loc_rec.status_id, p_lock_id);
2466:
2467: return inv_cache.loc_rec.status_id;
2468: else -- Locator is dynamic
2469: if inv_cache.set_tosub_rec(p_organization_id, p_sub_code) then
2470: if (inv_cache.tosub_rec.default_loc_status_id is not null) then
2471: -- Bug 6798024 : Calling the insert procedure to insert the status of the new onhand record into

Line 2469: if inv_cache.set_tosub_rec(p_organization_id, p_sub_code) then

2465: ,p_lpn_id, inv_cache.loc_rec.status_id, p_lock_id);
2466:
2467: return inv_cache.loc_rec.status_id;
2468: else -- Locator is dynamic
2469: if inv_cache.set_tosub_rec(p_organization_id, p_sub_code) then
2470: if (inv_cache.tosub_rec.default_loc_status_id is not null) then
2471: -- Bug 6798024 : Calling the insert procedure to insert the status of the new onhand record into
2472: -- the table : mtl_material_status_history
2473: insert_status_history(p_organization_id, p_inventory_item_id, p_sub_code, p_loc_id, p_lot_number

Line 2470: if (inv_cache.tosub_rec.default_loc_status_id is not null) then

2466:
2467: return inv_cache.loc_rec.status_id;
2468: else -- Locator is dynamic
2469: if inv_cache.set_tosub_rec(p_organization_id, p_sub_code) then
2470: if (inv_cache.tosub_rec.default_loc_status_id is not null) then
2471: -- Bug 6798024 : Calling the insert procedure to insert the status of the new onhand record into
2472: -- the table : mtl_material_status_history
2473: insert_status_history(p_organization_id, p_inventory_item_id, p_sub_code, p_loc_id, p_lot_number
2474: ,p_lpn_id, inv_cache.tosub_rec.default_loc_status_id, p_lock_id);

Line 2474: ,p_lpn_id, inv_cache.tosub_rec.default_loc_status_id, p_lock_id);

2470: if (inv_cache.tosub_rec.default_loc_status_id is not null) then
2471: -- Bug 6798024 : Calling the insert procedure to insert the status of the new onhand record into
2472: -- the table : mtl_material_status_history
2473: insert_status_history(p_organization_id, p_inventory_item_id, p_sub_code, p_loc_id, p_lot_number
2474: ,p_lpn_id, inv_cache.tosub_rec.default_loc_status_id, p_lock_id);
2475:
2476: return inv_cache.tosub_rec.default_loc_status_id;
2477: end if;
2478: end if;

Line 2476: return inv_cache.tosub_rec.default_loc_status_id;

2472: -- the table : mtl_material_status_history
2473: insert_status_history(p_organization_id, p_inventory_item_id, p_sub_code, p_loc_id, p_lot_number
2474: ,p_lpn_id, inv_cache.tosub_rec.default_loc_status_id, p_lock_id);
2475:
2476: return inv_cache.tosub_rec.default_loc_status_id;
2477: end if;
2478: end if;
2479: end if;
2480: else -- Locator is dynamic

Line 2481: if inv_cache.set_tosub_rec(p_organization_id, p_sub_code) then

2477: end if;
2478: end if;
2479: end if;
2480: else -- Locator is dynamic
2481: if inv_cache.set_tosub_rec(p_organization_id, p_sub_code) then
2482: if (inv_cache.tosub_rec.default_loc_status_id is not null) then
2483: -- Bug 6798024 : Calling the insert procedure to insert the status of the new onhand record into
2484: -- the table : mtl_material_status_history
2485: insert_status_history(p_organization_id, p_inventory_item_id, p_sub_code, p_loc_id, p_lot_number

Line 2482: if (inv_cache.tosub_rec.default_loc_status_id is not null) then

2478: end if;
2479: end if;
2480: else -- Locator is dynamic
2481: if inv_cache.set_tosub_rec(p_organization_id, p_sub_code) then
2482: if (inv_cache.tosub_rec.default_loc_status_id is not null) then
2483: -- Bug 6798024 : Calling the insert procedure to insert the status of the new onhand record into
2484: -- the table : mtl_material_status_history
2485: insert_status_history(p_organization_id, p_inventory_item_id, p_sub_code, p_loc_id, p_lot_number
2486: ,p_lpn_id, inv_cache.tosub_rec.default_loc_status_id, p_lock_id);

Line 2486: ,p_lpn_id, inv_cache.tosub_rec.default_loc_status_id, p_lock_id);

2482: if (inv_cache.tosub_rec.default_loc_status_id is not null) then
2483: -- Bug 6798024 : Calling the insert procedure to insert the status of the new onhand record into
2484: -- the table : mtl_material_status_history
2485: insert_status_history(p_organization_id, p_inventory_item_id, p_sub_code, p_loc_id, p_lot_number
2486: ,p_lpn_id, inv_cache.tosub_rec.default_loc_status_id, p_lock_id);
2487:
2488: return inv_cache.tosub_rec.default_loc_status_id;
2489: else
2490: -- Bug 6798024 : Calling the insert procedure to insert the status of the new onhand record into

Line 2488: return inv_cache.tosub_rec.default_loc_status_id;

2484: -- the table : mtl_material_status_history
2485: insert_status_history(p_organization_id, p_inventory_item_id, p_sub_code, p_loc_id, p_lot_number
2486: ,p_lpn_id, inv_cache.tosub_rec.default_loc_status_id, p_lock_id);
2487:
2488: return inv_cache.tosub_rec.default_loc_status_id;
2489: else
2490: -- Bug 6798024 : Calling the insert procedure to insert the status of the new onhand record into
2491: -- the table : mtl_material_status_history
2492: insert_status_history(p_organization_id, p_inventory_item_id, p_sub_code, p_loc_id, p_lot_number

Line 2493: ,p_lpn_id, inv_cache.tosub_rec.status_id, p_lock_id);

2489: else
2490: -- Bug 6798024 : Calling the insert procedure to insert the status of the new onhand record into
2491: -- the table : mtl_material_status_history
2492: insert_status_history(p_organization_id, p_inventory_item_id, p_sub_code, p_loc_id, p_lot_number
2493: ,p_lpn_id, inv_cache.tosub_rec.status_id, p_lock_id);
2494:
2495: return inv_cache.tosub_rec.status_id;
2496: end if;
2497: end if;

Line 2495: return inv_cache.tosub_rec.status_id;

2491: -- the table : mtl_material_status_history
2492: insert_status_history(p_organization_id, p_inventory_item_id, p_sub_code, p_loc_id, p_lot_number
2493: ,p_lpn_id, inv_cache.tosub_rec.status_id, p_lock_id);
2494:
2495: return inv_cache.tosub_rec.status_id;
2496: end if;
2497: end if;
2498: end if;
2499: end if;

Line 2501: if inv_cache.set_tosub_rec(p_organization_id, p_sub_code) then

2497: end if;
2498: end if;
2499: end if;
2500:
2501: if inv_cache.set_tosub_rec(p_organization_id, p_sub_code) then
2502: if (inv_cache.tosub_rec.status_id is not null) then
2503: -- Bug 6798024 : Calling the insert procedure to insert the status of the new onhand record into
2504: -- the table : mtl_material_status_history
2505: insert_status_history(p_organization_id, p_inventory_item_id, p_sub_code, p_loc_id, p_lot_number

Line 2502: if (inv_cache.tosub_rec.status_id is not null) then

2498: end if;
2499: end if;
2500:
2501: if inv_cache.set_tosub_rec(p_organization_id, p_sub_code) then
2502: if (inv_cache.tosub_rec.status_id is not null) then
2503: -- Bug 6798024 : Calling the insert procedure to insert the status of the new onhand record into
2504: -- the table : mtl_material_status_history
2505: insert_status_history(p_organization_id, p_inventory_item_id, p_sub_code, p_loc_id, p_lot_number
2506: ,p_lpn_id, inv_cache.tosub_rec.status_id, p_lock_id);

Line 2506: ,p_lpn_id, inv_cache.tosub_rec.status_id, p_lock_id);

2502: if (inv_cache.tosub_rec.status_id is not null) then
2503: -- Bug 6798024 : Calling the insert procedure to insert the status of the new onhand record into
2504: -- the table : mtl_material_status_history
2505: insert_status_history(p_organization_id, p_inventory_item_id, p_sub_code, p_loc_id, p_lot_number
2506: ,p_lpn_id, inv_cache.tosub_rec.status_id, p_lock_id);
2507:
2508: return inv_cache.tosub_rec.status_id;
2509: end if;
2510: end if;

Line 2508: return inv_cache.tosub_rec.status_id;

2504: -- the table : mtl_material_status_history
2505: insert_status_history(p_organization_id, p_inventory_item_id, p_sub_code, p_loc_id, p_lot_number
2506: ,p_lpn_id, inv_cache.tosub_rec.status_id, p_lock_id);
2507:
2508: return inv_cache.tosub_rec.status_id;
2509: end if;
2510: end if;
2511:
2512: if inv_cache.set_org_rec(p_organization_id) then

Line 2512: if inv_cache.set_org_rec(p_organization_id) then

2508: return inv_cache.tosub_rec.status_id;
2509: end if;
2510: end if;
2511:
2512: if inv_cache.set_org_rec(p_organization_id) then
2513: -- Bug 6798024 : Calling the insert procedure to insert the status of the new onhand record into
2514: -- the table : mtl_material_status_history
2515: insert_status_history(p_organization_id, p_inventory_item_id, p_sub_code, p_loc_id, p_lot_number
2516: ,p_lpn_id, inv_cache.org_rec.default_status_id, p_lock_id);

Line 2516: ,p_lpn_id, inv_cache.org_rec.default_status_id, p_lock_id);

2512: if inv_cache.set_org_rec(p_organization_id) then
2513: -- Bug 6798024 : Calling the insert procedure to insert the status of the new onhand record into
2514: -- the table : mtl_material_status_history
2515: insert_status_history(p_organization_id, p_inventory_item_id, p_sub_code, p_loc_id, p_lot_number
2516: ,p_lpn_id, inv_cache.org_rec.default_status_id, p_lock_id);
2517:
2518: return inv_cache.org_rec.default_status_id;
2519: end if;
2520:

Line 2518: return inv_cache.org_rec.default_status_id;

2514: -- the table : mtl_material_status_history
2515: insert_status_history(p_organization_id, p_inventory_item_id, p_sub_code, p_loc_id, p_lot_number
2516: ,p_lpn_id, inv_cache.org_rec.default_status_id, p_lock_id);
2517:
2518: return inv_cache.org_rec.default_status_id;
2519: end if;
2520:
2521: WHEN OTHERS THEN
2522:

Line 2607: if inv_cache.set_org_rec(p_organization_id) then

2603: inv_trx_util_pub.TRACE('org id ' ||p_organization_id || ' Item id ' || p_inventory_item_id || ' sub ' || p_sub_code, 'INV_MATERIAL_STATUS_GRP', 14);
2604: inv_trx_util_pub.TRACE('loc '|| p_loc_id || ' lot ' || p_lot_number || ' lpn ' || p_lpn_id, 'INV_MATERIAL_STATUS_GRP', 14);
2605: end if;
2606:
2607: if inv_cache.set_org_rec(p_organization_id) then
2608: l_default_org_status_id := inv_cache.org_rec.default_status_id;
2609: end if;
2610:
2611: l_default_status_id := l_default_org_status_id;

Line 2608: l_default_org_status_id := inv_cache.org_rec.default_status_id;

2604: inv_trx_util_pub.TRACE('loc '|| p_loc_id || ' lot ' || p_lot_number || ' lpn ' || p_lpn_id, 'INV_MATERIAL_STATUS_GRP', 14);
2605: end if;
2606:
2607: if inv_cache.set_org_rec(p_organization_id) then
2608: l_default_org_status_id := inv_cache.org_rec.default_status_id;
2609: end if;
2610:
2611: l_default_status_id := l_default_org_status_id;
2612:

Line 2617: if inv_cache.set_item_rec(p_organization_id, p_inventory_item_id) then

2613: if (g_debug = 1) then
2614: inv_trx_util_pub.TRACE('default org status ' || l_default_org_status_id, 'INV_MATERIAL_STATUS_GRP', 14);
2615: end if;
2616:
2617: if inv_cache.set_item_rec(p_organization_id, p_inventory_item_id) then
2618: if (inv_cache.item_rec.serial_number_control_code in (2,5)) then
2619: l_serial_controlled := 1; -- Item is serial controlled
2620: end if;
2621: end if;

Line 2618: if (inv_cache.item_rec.serial_number_control_code in (2,5)) then

2614: inv_trx_util_pub.TRACE('default org status ' || l_default_org_status_id, 'INV_MATERIAL_STATUS_GRP', 14);
2615: end if;
2616:
2617: if inv_cache.set_item_rec(p_organization_id, p_inventory_item_id) then
2618: if (inv_cache.item_rec.serial_number_control_code in (2,5)) then
2619: l_serial_controlled := 1; -- Item is serial controlled
2620: end if;
2621: end if;
2622:

Line 2625: if inv_cache.set_item_rec(p_organization_id, p_inventory_item_id) then

2621: end if;
2622:
2623: if (l_default_org_status_id is null) then
2624:
2625: if inv_cache.set_item_rec(p_organization_id, p_inventory_item_id) then
2626: if (l_serial_controlled <> 0) then -- serial
2627: return null;
2628: elsif (inv_cache.item_rec.lot_status_enabled = 'Y') then -- lot
2629: return inv_cache.item_rec.default_lot_status_id;

Line 2628: elsif (inv_cache.item_rec.lot_status_enabled = 'Y') then -- lot

2624:
2625: if inv_cache.set_item_rec(p_organization_id, p_inventory_item_id) then
2626: if (l_serial_controlled <> 0) then -- serial
2627: return null;
2628: elsif (inv_cache.item_rec.lot_status_enabled = 'Y') then -- lot
2629: return inv_cache.item_rec.default_lot_status_id;
2630: elsif (inv_cache.item_rec.default_material_status_id is not null) then -- item
2631: return inv_cache.item_rec.default_material_status_id;
2632: end if;

Line 2629: return inv_cache.item_rec.default_lot_status_id;

2625: if inv_cache.set_item_rec(p_organization_id, p_inventory_item_id) then
2626: if (l_serial_controlled <> 0) then -- serial
2627: return null;
2628: elsif (inv_cache.item_rec.lot_status_enabled = 'Y') then -- lot
2629: return inv_cache.item_rec.default_lot_status_id;
2630: elsif (inv_cache.item_rec.default_material_status_id is not null) then -- item
2631: return inv_cache.item_rec.default_material_status_id;
2632: end if;
2633: end if;

Line 2630: elsif (inv_cache.item_rec.default_material_status_id is not null) then -- item

2626: if (l_serial_controlled <> 0) then -- serial
2627: return null;
2628: elsif (inv_cache.item_rec.lot_status_enabled = 'Y') then -- lot
2629: return inv_cache.item_rec.default_lot_status_id;
2630: elsif (inv_cache.item_rec.default_material_status_id is not null) then -- item
2631: return inv_cache.item_rec.default_material_status_id;
2632: end if;
2633: end if;
2634:

Line 2631: return inv_cache.item_rec.default_material_status_id;

2627: return null;
2628: elsif (inv_cache.item_rec.lot_status_enabled = 'Y') then -- lot
2629: return inv_cache.item_rec.default_lot_status_id;
2630: elsif (inv_cache.item_rec.default_material_status_id is not null) then -- item
2631: return inv_cache.item_rec.default_material_status_id;
2632: end if;
2633: end if;
2634:
2635: if p_loc_id is not null then

Line 2636: if inv_cache.set_loc_rec(p_organization_id, p_loc_id) then

2632: end if;
2633: end if;
2634:
2635: if p_loc_id is not null then
2636: if inv_cache.set_loc_rec(p_organization_id, p_loc_id) then
2637: if (inv_cache.loc_rec.status_id is not null) then
2638: return inv_cache.loc_rec.status_id;
2639: else -- Locator is dynamic
2640: if inv_cache.set_tosub_rec(p_organization_id, p_sub_code) then

Line 2637: if (inv_cache.loc_rec.status_id is not null) then

2633: end if;
2634:
2635: if p_loc_id is not null then
2636: if inv_cache.set_loc_rec(p_organization_id, p_loc_id) then
2637: if (inv_cache.loc_rec.status_id is not null) then
2638: return inv_cache.loc_rec.status_id;
2639: else -- Locator is dynamic
2640: if inv_cache.set_tosub_rec(p_organization_id, p_sub_code) then
2641: if (inv_cache.tosub_rec.default_loc_status_id is not null) then

Line 2638: return inv_cache.loc_rec.status_id;

2634:
2635: if p_loc_id is not null then
2636: if inv_cache.set_loc_rec(p_organization_id, p_loc_id) then
2637: if (inv_cache.loc_rec.status_id is not null) then
2638: return inv_cache.loc_rec.status_id;
2639: else -- Locator is dynamic
2640: if inv_cache.set_tosub_rec(p_organization_id, p_sub_code) then
2641: if (inv_cache.tosub_rec.default_loc_status_id is not null) then
2642: return inv_cache.tosub_rec.default_loc_status_id;

Line 2640: if inv_cache.set_tosub_rec(p_organization_id, p_sub_code) then

2636: if inv_cache.set_loc_rec(p_organization_id, p_loc_id) then
2637: if (inv_cache.loc_rec.status_id is not null) then
2638: return inv_cache.loc_rec.status_id;
2639: else -- Locator is dynamic
2640: if inv_cache.set_tosub_rec(p_organization_id, p_sub_code) then
2641: if (inv_cache.tosub_rec.default_loc_status_id is not null) then
2642: return inv_cache.tosub_rec.default_loc_status_id;
2643: end if;
2644: end if;

Line 2641: if (inv_cache.tosub_rec.default_loc_status_id is not null) then

2637: if (inv_cache.loc_rec.status_id is not null) then
2638: return inv_cache.loc_rec.status_id;
2639: else -- Locator is dynamic
2640: if inv_cache.set_tosub_rec(p_organization_id, p_sub_code) then
2641: if (inv_cache.tosub_rec.default_loc_status_id is not null) then
2642: return inv_cache.tosub_rec.default_loc_status_id;
2643: end if;
2644: end if;
2645: end if;

Line 2642: return inv_cache.tosub_rec.default_loc_status_id;

2638: return inv_cache.loc_rec.status_id;
2639: else -- Locator is dynamic
2640: if inv_cache.set_tosub_rec(p_organization_id, p_sub_code) then
2641: if (inv_cache.tosub_rec.default_loc_status_id is not null) then
2642: return inv_cache.tosub_rec.default_loc_status_id;
2643: end if;
2644: end if;
2645: end if;
2646: else -- Locator is dynamic

Line 2647: if inv_cache.set_tosub_rec(p_organization_id, p_sub_code) then

2643: end if;
2644: end if;
2645: end if;
2646: else -- Locator is dynamic
2647: if inv_cache.set_tosub_rec(p_organization_id, p_sub_code) then
2648: if (inv_cache.tosub_rec.default_loc_status_id is not null) then
2649: return inv_cache.tosub_rec.default_loc_status_id;
2650: else
2651: return inv_cache.tosub_rec.status_id;

Line 2648: if (inv_cache.tosub_rec.default_loc_status_id is not null) then

2644: end if;
2645: end if;
2646: else -- Locator is dynamic
2647: if inv_cache.set_tosub_rec(p_organization_id, p_sub_code) then
2648: if (inv_cache.tosub_rec.default_loc_status_id is not null) then
2649: return inv_cache.tosub_rec.default_loc_status_id;
2650: else
2651: return inv_cache.tosub_rec.status_id;
2652: end if;

Line 2649: return inv_cache.tosub_rec.default_loc_status_id;

2645: end if;
2646: else -- Locator is dynamic
2647: if inv_cache.set_tosub_rec(p_organization_id, p_sub_code) then
2648: if (inv_cache.tosub_rec.default_loc_status_id is not null) then
2649: return inv_cache.tosub_rec.default_loc_status_id;
2650: else
2651: return inv_cache.tosub_rec.status_id;
2652: end if;
2653: end if;

Line 2651: return inv_cache.tosub_rec.status_id;

2647: if inv_cache.set_tosub_rec(p_organization_id, p_sub_code) then
2648: if (inv_cache.tosub_rec.default_loc_status_id is not null) then
2649: return inv_cache.tosub_rec.default_loc_status_id;
2650: else
2651: return inv_cache.tosub_rec.status_id;
2652: end if;
2653: end if;
2654: end if;
2655: end if;

Line 2657: if inv_cache.set_tosub_rec(p_organization_id, p_sub_code) then

2653: end if;
2654: end if;
2655: end if;
2656:
2657: if inv_cache.set_tosub_rec(p_organization_id, p_sub_code) then
2658: if (inv_cache.tosub_rec.status_id is not null) then
2659: return inv_cache.tosub_rec.status_id;
2660: end if;
2661: end if;

Line 2658: if (inv_cache.tosub_rec.status_id is not null) then

2654: end if;
2655: end if;
2656:
2657: if inv_cache.set_tosub_rec(p_organization_id, p_sub_code) then
2658: if (inv_cache.tosub_rec.status_id is not null) then
2659: return inv_cache.tosub_rec.status_id;
2660: end if;
2661: end if;
2662:

Line 2659: return inv_cache.tosub_rec.status_id;

2655: end if;
2656:
2657: if inv_cache.set_tosub_rec(p_organization_id, p_sub_code) then
2658: if (inv_cache.tosub_rec.status_id is not null) then
2659: return inv_cache.tosub_rec.status_id;
2660: end if;
2661: end if;
2662:
2663: if inv_cache.set_org_rec(p_organization_id) then

Line 2663: if inv_cache.set_org_rec(p_organization_id) then

2659: return inv_cache.tosub_rec.status_id;
2660: end if;
2661: end if;
2662:
2663: if inv_cache.set_org_rec(p_organization_id) then
2664: return inv_cache.org_rec.default_status_id;
2665: end if;
2666:
2667: end if;

Line 2664: return inv_cache.org_rec.default_status_id;

2660: end if;
2661: end if;
2662:
2663: if inv_cache.set_org_rec(p_organization_id) then
2664: return inv_cache.org_rec.default_status_id;
2665: end if;
2666:
2667: end if;
2668:

Line 2899: IF inv_cache.set_org_rec(l_transfer_org_id) THEN

2895: l_allow_different_status := 1;
2896: END; */
2897:
2898: /*Using inv chache instead of running above query every time */
2899: IF inv_cache.set_org_rec(l_transfer_org_id) THEN
2900: l_allow_different_status := NVL(inv_cache.org_rec.allow_different_status,1);
2901: END IF;
2902:
2903: if (g_debug = 1) then

Line 2900: l_allow_different_status := NVL(inv_cache.org_rec.allow_different_status,1);

2896: END; */
2897:
2898: /*Using inv chache instead of running above query every time */
2899: IF inv_cache.set_org_rec(l_transfer_org_id) THEN
2900: l_allow_different_status := NVL(inv_cache.org_rec.allow_different_status,1);
2901: END IF;
2902:
2903: if (g_debug = 1) then
2904: inv_trx_util_pub.TRACE('inside check_move_diff: l_allow_different_status = ' || l_allow_different_status, 'INV_MATERIAL_STATUS_GRP', 9);

Line 2919: IF inv_cache.set_item_rec(l_org_id,p_inventory_item_id) THEN

2915: , p_transfer_subinventory);
2916:
2917: --Get lot and serial control for item from source and destination orgs:
2918:
2919: IF inv_cache.set_item_rec(l_org_id,p_inventory_item_id) THEN
2920: l_lot_source_status := NVL(inv_cache.item_rec.LOT_STATUS_ENABLED,'N');
2921: l_lot_control_code_source := NVL(inv_cache.item_rec.LOT_CONTROL_CODE,1);
2922: l_serial_control_code_source := NVL(inv_cache.item_rec.SERIAL_NUMBER_CONTROL_CODE,1);
2923: END IF;

Line 2920: l_lot_source_status := NVL(inv_cache.item_rec.LOT_STATUS_ENABLED,'N');

2916:
2917: --Get lot and serial control for item from source and destination orgs:
2918:
2919: IF inv_cache.set_item_rec(l_org_id,p_inventory_item_id) THEN
2920: l_lot_source_status := NVL(inv_cache.item_rec.LOT_STATUS_ENABLED,'N');
2921: l_lot_control_code_source := NVL(inv_cache.item_rec.LOT_CONTROL_CODE,1);
2922: l_serial_control_code_source := NVL(inv_cache.item_rec.SERIAL_NUMBER_CONTROL_CODE,1);
2923: END IF;
2924:

Line 2921: l_lot_control_code_source := NVL(inv_cache.item_rec.LOT_CONTROL_CODE,1);

2917: --Get lot and serial control for item from source and destination orgs:
2918:
2919: IF inv_cache.set_item_rec(l_org_id,p_inventory_item_id) THEN
2920: l_lot_source_status := NVL(inv_cache.item_rec.LOT_STATUS_ENABLED,'N');
2921: l_lot_control_code_source := NVL(inv_cache.item_rec.LOT_CONTROL_CODE,1);
2922: l_serial_control_code_source := NVL(inv_cache.item_rec.SERIAL_NUMBER_CONTROL_CODE,1);
2923: END IF;
2924:
2925: IF inv_cache.set_item_rec(l_transfer_org_id,p_inventory_item_id) THEN

Line 2922: l_serial_control_code_source := NVL(inv_cache.item_rec.SERIAL_NUMBER_CONTROL_CODE,1);

2918:
2919: IF inv_cache.set_item_rec(l_org_id,p_inventory_item_id) THEN
2920: l_lot_source_status := NVL(inv_cache.item_rec.LOT_STATUS_ENABLED,'N');
2921: l_lot_control_code_source := NVL(inv_cache.item_rec.LOT_CONTROL_CODE,1);
2922: l_serial_control_code_source := NVL(inv_cache.item_rec.SERIAL_NUMBER_CONTROL_CODE,1);
2923: END IF;
2924:
2925: IF inv_cache.set_item_rec(l_transfer_org_id,p_inventory_item_id) THEN
2926: l_revision_control_code_destin := NVL(inv_cache.item_rec.REVISION_QTY_CONTROL_CODE,1);

Line 2925: IF inv_cache.set_item_rec(l_transfer_org_id,p_inventory_item_id) THEN

2921: l_lot_control_code_source := NVL(inv_cache.item_rec.LOT_CONTROL_CODE,1);
2922: l_serial_control_code_source := NVL(inv_cache.item_rec.SERIAL_NUMBER_CONTROL_CODE,1);
2923: END IF;
2924:
2925: IF inv_cache.set_item_rec(l_transfer_org_id,p_inventory_item_id) THEN
2926: l_revision_control_code_destin := NVL(inv_cache.item_rec.REVISION_QTY_CONTROL_CODE,1);
2927: l_lot_destin_status := NVL(inv_cache.item_rec.LOT_STATUS_ENABLED,'N');
2928: l_lot_control_code_destin := NVL(inv_cache.item_rec.LOT_CONTROL_CODE,1);
2929: l_serial_control_code_destin := NVL(inv_cache.item_rec.SERIAL_NUMBER_CONTROL_CODE,1);

Line 2926: l_revision_control_code_destin := NVL(inv_cache.item_rec.REVISION_QTY_CONTROL_CODE,1);

2922: l_serial_control_code_source := NVL(inv_cache.item_rec.SERIAL_NUMBER_CONTROL_CODE,1);
2923: END IF;
2924:
2925: IF inv_cache.set_item_rec(l_transfer_org_id,p_inventory_item_id) THEN
2926: l_revision_control_code_destin := NVL(inv_cache.item_rec.REVISION_QTY_CONTROL_CODE,1);
2927: l_lot_destin_status := NVL(inv_cache.item_rec.LOT_STATUS_ENABLED,'N');
2928: l_lot_control_code_destin := NVL(inv_cache.item_rec.LOT_CONTROL_CODE,1);
2929: l_serial_control_code_destin := NVL(inv_cache.item_rec.SERIAL_NUMBER_CONTROL_CODE,1);
2930: END IF;

Line 2927: l_lot_destin_status := NVL(inv_cache.item_rec.LOT_STATUS_ENABLED,'N');

2923: END IF;
2924:
2925: IF inv_cache.set_item_rec(l_transfer_org_id,p_inventory_item_id) THEN
2926: l_revision_control_code_destin := NVL(inv_cache.item_rec.REVISION_QTY_CONTROL_CODE,1);
2927: l_lot_destin_status := NVL(inv_cache.item_rec.LOT_STATUS_ENABLED,'N');
2928: l_lot_control_code_destin := NVL(inv_cache.item_rec.LOT_CONTROL_CODE,1);
2929: l_serial_control_code_destin := NVL(inv_cache.item_rec.SERIAL_NUMBER_CONTROL_CODE,1);
2930: END IF;
2931:

Line 2928: l_lot_control_code_destin := NVL(inv_cache.item_rec.LOT_CONTROL_CODE,1);

2924:
2925: IF inv_cache.set_item_rec(l_transfer_org_id,p_inventory_item_id) THEN
2926: l_revision_control_code_destin := NVL(inv_cache.item_rec.REVISION_QTY_CONTROL_CODE,1);
2927: l_lot_destin_status := NVL(inv_cache.item_rec.LOT_STATUS_ENABLED,'N');
2928: l_lot_control_code_destin := NVL(inv_cache.item_rec.LOT_CONTROL_CODE,1);
2929: l_serial_control_code_destin := NVL(inv_cache.item_rec.SERIAL_NUMBER_CONTROL_CODE,1);
2930: END IF;
2931:
2932: if (g_debug = 1) then

Line 2929: l_serial_control_code_destin := NVL(inv_cache.item_rec.SERIAL_NUMBER_CONTROL_CODE,1);

2925: IF inv_cache.set_item_rec(l_transfer_org_id,p_inventory_item_id) THEN
2926: l_revision_control_code_destin := NVL(inv_cache.item_rec.REVISION_QTY_CONTROL_CODE,1);
2927: l_lot_destin_status := NVL(inv_cache.item_rec.LOT_STATUS_ENABLED,'N');
2928: l_lot_control_code_destin := NVL(inv_cache.item_rec.LOT_CONTROL_CODE,1);
2929: l_serial_control_code_destin := NVL(inv_cache.item_rec.SERIAL_NUMBER_CONTROL_CODE,1);
2930: END IF;
2931:
2932: if (g_debug = 1) then
2933:

Line 2959: IF inv_cache.set_org_rec(l_org_id) THEN

2955: )
2956: OR
2957: ( p_object_type = 'O' AND p_lot_number IS NOT NULL)
2958: THEN
2959: IF inv_cache.set_org_rec(l_org_id) THEN
2960: l_default_source_status_id := NVL(inv_cache.org_rec.default_status_id,0);
2961: IF l_default_source_status_id <> 0 THEN
2962: l_default_source_status := 'Y';
2963: ELSE

Line 2960: l_default_source_status_id := NVL(inv_cache.org_rec.default_status_id,0);

2956: OR
2957: ( p_object_type = 'O' AND p_lot_number IS NOT NULL)
2958: THEN
2959: IF inv_cache.set_org_rec(l_org_id) THEN
2960: l_default_source_status_id := NVL(inv_cache.org_rec.default_status_id,0);
2961: IF l_default_source_status_id <> 0 THEN
2962: l_default_source_status := 'Y';
2963: ELSE
2964: l_default_source_status := 'N';

Line 2968: IF inv_cache.set_org_rec(l_transfer_org_id) THEN

2964: l_default_source_status := 'N';
2965: END IF;
2966: END IF;
2967:
2968: IF inv_cache.set_org_rec(l_transfer_org_id) THEN
2969: l_default_destin_status_id := NVL(inv_cache.org_rec.default_status_id,0);
2970: IF l_default_destin_status_id <> 0 THEN
2971: l_default_destin_status := 'Y';
2972: ELSE

Line 2969: l_default_destin_status_id := NVL(inv_cache.org_rec.default_status_id,0);

2965: END IF;
2966: END IF;
2967:
2968: IF inv_cache.set_org_rec(l_transfer_org_id) THEN
2969: l_default_destin_status_id := NVL(inv_cache.org_rec.default_status_id,0);
2970: IF l_default_destin_status_id <> 0 THEN
2971: l_default_destin_status := 'Y';
2972: ELSE
2973: l_default_destin_status := 'N';

Line 3347: IF inv_cache.set_item_rec(l_lpn_org_id, l_mmtt_cur.inventory_item_id) THEN

3343: LOOP
3344: l_serial_status_enabled := 0;
3345: l_serial_controlled := 0;
3346: l_lot_controlled := 0;
3347: IF inv_cache.set_item_rec(l_lpn_org_id, l_mmtt_cur.inventory_item_id) THEN
3348: IF (inv_cache.item_rec.serial_number_control_code in (2,5)) THEN
3349: l_serial_controlled := 1; -- Item is serial controlled
3350: IF (NVL(inv_cache.item_rec.serial_status_enabled,'Y') = 'Y') THEN
3351: l_serial_status_enabled := 1;

Line 3348: IF (inv_cache.item_rec.serial_number_control_code in (2,5)) THEN

3344: l_serial_status_enabled := 0;
3345: l_serial_controlled := 0;
3346: l_lot_controlled := 0;
3347: IF inv_cache.set_item_rec(l_lpn_org_id, l_mmtt_cur.inventory_item_id) THEN
3348: IF (inv_cache.item_rec.serial_number_control_code in (2,5)) THEN
3349: l_serial_controlled := 1; -- Item is serial controlled
3350: IF (NVL(inv_cache.item_rec.serial_status_enabled,'Y') = 'Y') THEN
3351: l_serial_status_enabled := 1;
3352: END IF;

Line 3350: IF (NVL(inv_cache.item_rec.serial_status_enabled,'Y') = 'Y') THEN

3346: l_lot_controlled := 0;
3347: IF inv_cache.set_item_rec(l_lpn_org_id, l_mmtt_cur.inventory_item_id) THEN
3348: IF (inv_cache.item_rec.serial_number_control_code in (2,5)) THEN
3349: l_serial_controlled := 1; -- Item is serial controlled
3350: IF (NVL(inv_cache.item_rec.serial_status_enabled,'Y') = 'Y') THEN
3351: l_serial_status_enabled := 1;
3352: END IF;
3353: END IF;
3354: IF (inv_cache.item_rec.lot_control_code = 2) THEN

Line 3354: IF (inv_cache.item_rec.lot_control_code = 2) THEN

3350: IF (NVL(inv_cache.item_rec.serial_status_enabled,'Y') = 'Y') THEN
3351: l_serial_status_enabled := 1;
3352: END IF;
3353: END IF;
3354: IF (inv_cache.item_rec.lot_control_code = 2) THEN
3355: l_lot_controlled := 1;
3356: END IF;
3357: END IF;
3358:

Line 3439: IF inv_cache.set_item_rec(p_organization_id, l_cur_wlc.inventory_item_id) THEN

3435: FOR l_cur_wlc IN c_lpn_item
3436: LOOP
3437: l_serial_controlled := 0;
3438: l_serial_status_enabled := 0;
3439: IF inv_cache.set_item_rec(p_organization_id, l_cur_wlc.inventory_item_id) THEN
3440: IF (inv_cache.item_rec.serial_number_control_code in (2,5)) THEN
3441: l_serial_controlled := 1; -- Item is serial controlled
3442: END IF;
3443: IF (NVL(inv_cache.item_rec.serial_status_enabled,'Y') = 'Y') THEN

Line 3440: IF (inv_cache.item_rec.serial_number_control_code in (2,5)) THEN

3436: LOOP
3437: l_serial_controlled := 0;
3438: l_serial_status_enabled := 0;
3439: IF inv_cache.set_item_rec(p_organization_id, l_cur_wlc.inventory_item_id) THEN
3440: IF (inv_cache.item_rec.serial_number_control_code in (2,5)) THEN
3441: l_serial_controlled := 1; -- Item is serial controlled
3442: END IF;
3443: IF (NVL(inv_cache.item_rec.serial_status_enabled,'Y') = 'Y') THEN
3444: l_serial_status_enabled := 1;

Line 3443: IF (NVL(inv_cache.item_rec.serial_status_enabled,'Y') = 'Y') THEN

3439: IF inv_cache.set_item_rec(p_organization_id, l_cur_wlc.inventory_item_id) THEN
3440: IF (inv_cache.item_rec.serial_number_control_code in (2,5)) THEN
3441: l_serial_controlled := 1; -- Item is serial controlled
3442: END IF;
3443: IF (NVL(inv_cache.item_rec.serial_status_enabled,'Y') = 'Y') THEN
3444: l_serial_status_enabled := 1;
3445: END IF;
3446: END IF;
3447: IF (l_serial_controlled <> 1) then

Line 3929: IF inv_cache.set_item_rec(p_organization_id, l_cur_mtrl.inventory_item_id) THEN

3925: inv_trx_util_pub.TRACE('In loop, Checking the material status for the item: '||l_cur_mtrl.inventory_item_id);
3926: END IF;
3927: l_serial_controlled := 0;
3928: l_serial_status_enabled := 0;
3929: IF inv_cache.set_item_rec(p_organization_id, l_cur_mtrl.inventory_item_id) THEN
3930: IF (inv_cache.item_rec.serial_number_control_code in (2,5)) THEN
3931: l_serial_controlled := 1; -- Item is serial controlled
3932: END IF;
3933: IF (NVL(inv_cache.item_rec.serial_status_enabled,'Y') = 'Y') THEN

Line 3930: IF (inv_cache.item_rec.serial_number_control_code in (2,5)) THEN

3926: END IF;
3927: l_serial_controlled := 0;
3928: l_serial_status_enabled := 0;
3929: IF inv_cache.set_item_rec(p_organization_id, l_cur_mtrl.inventory_item_id) THEN
3930: IF (inv_cache.item_rec.serial_number_control_code in (2,5)) THEN
3931: l_serial_controlled := 1; -- Item is serial controlled
3932: END IF;
3933: IF (NVL(inv_cache.item_rec.serial_status_enabled,'Y') = 'Y') THEN
3934: l_serial_status_enabled := 1;

Line 3933: IF (NVL(inv_cache.item_rec.serial_status_enabled,'Y') = 'Y') THEN

3929: IF inv_cache.set_item_rec(p_organization_id, l_cur_mtrl.inventory_item_id) THEN
3930: IF (inv_cache.item_rec.serial_number_control_code in (2,5)) THEN
3931: l_serial_controlled := 1; -- Item is serial controlled
3932: END IF;
3933: IF (NVL(inv_cache.item_rec.serial_status_enabled,'Y') = 'Y') THEN
3934: l_serial_status_enabled := 1;
3935: END IF;
3936: END IF;
3937: IF (l_serial_controlled <> 1) then

Line 4038: IF inv_cache.set_item_rec(l_lpn_org_id, l_mmtt_cur.inventory_item_id) THEN

4034: LOOP
4035: l_serial_status_enabled := 0;
4036: l_serial_controlled := 0;
4037: l_lot_controlled := 0;
4038: IF inv_cache.set_item_rec(l_lpn_org_id, l_mmtt_cur.inventory_item_id) THEN
4039: IF (inv_cache.item_rec.serial_number_control_code in (2,5)) THEN
4040: l_serial_controlled := 1; -- Item is serial controlled
4041: IF (NVL(inv_cache.item_rec.serial_status_enabled,'Y') = 'Y') THEN
4042: l_serial_status_enabled := 1;

Line 4039: IF (inv_cache.item_rec.serial_number_control_code in (2,5)) THEN

4035: l_serial_status_enabled := 0;
4036: l_serial_controlled := 0;
4037: l_lot_controlled := 0;
4038: IF inv_cache.set_item_rec(l_lpn_org_id, l_mmtt_cur.inventory_item_id) THEN
4039: IF (inv_cache.item_rec.serial_number_control_code in (2,5)) THEN
4040: l_serial_controlled := 1; -- Item is serial controlled
4041: IF (NVL(inv_cache.item_rec.serial_status_enabled,'Y') = 'Y') THEN
4042: l_serial_status_enabled := 1;
4043: END IF;

Line 4041: IF (NVL(inv_cache.item_rec.serial_status_enabled,'Y') = 'Y') THEN

4037: l_lot_controlled := 0;
4038: IF inv_cache.set_item_rec(l_lpn_org_id, l_mmtt_cur.inventory_item_id) THEN
4039: IF (inv_cache.item_rec.serial_number_control_code in (2,5)) THEN
4040: l_serial_controlled := 1; -- Item is serial controlled
4041: IF (NVL(inv_cache.item_rec.serial_status_enabled,'Y') = 'Y') THEN
4042: l_serial_status_enabled := 1;
4043: END IF;
4044: END IF;
4045: IF (inv_cache.item_rec.lot_control_code = 2) THEN

Line 4045: IF (inv_cache.item_rec.lot_control_code = 2) THEN

4041: IF (NVL(inv_cache.item_rec.serial_status_enabled,'Y') = 'Y') THEN
4042: l_serial_status_enabled := 1;
4043: END IF;
4044: END IF;
4045: IF (inv_cache.item_rec.lot_control_code = 2) THEN
4046: l_lot_controlled := 1; -- item is lot controlled
4047: END IF;
4048: END IF;
4049: inv_trx_util_pub.TRACE('L_SERIAL_CONTROLLED_FLAG IS '||l_serial_controlled||'l_serial_status_enabled flag is '||l_serial_status_enabled,9);