DBA Data[Home] [Help]

APPS.INV_RESERVATION_VALIDATE_PVT dependencies on INV_RESERVATION_GLOBAL

Line 32: l_rec inv_reservation_global.organization_record;

28: , x_org_cache_index out NOCOPY INTEGER
29: ) IS
30: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;
31: l_index NUMBER := NULL;
32: l_rec inv_reservation_global.organization_record;
33:
34: BEGIN
35: --
36: IF p_organization_id IS NULL THEN

Line 140: l_rec inv_reservation_global.item_record;

136: , p_organization_id IN NUMBER
137: , x_item_cache_index OUT NOCOPY INTEGER
138: ) IS
139: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;
140: l_rec inv_reservation_global.item_record;
141: l_index NUMBER := NULL;
142: -- Added to call common API
143: l_rec_org inv_reservation_global.organization_record;
144:

Line 143: l_rec_org inv_reservation_global.organization_record;

139: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;
140: l_rec inv_reservation_global.item_record;
141: l_index NUMBER := NULL;
142: -- Added to call common API
143: l_rec_org inv_reservation_global.organization_record;
144:
145: BEGIN
146: l_rec_org.organization_id:=p_organization_id;
147: --

Line 322: IF (p_supply_source_type_id = INV_RESERVATION_GLOBAL.G_SOURCE_TYPE_PO) THEN

318: IF (l_debug = 1) THEN
319: debug_print('In validate_supply_source_po: supply_source_type_id = ' || p_supply_source_type_id);
320: END IF;
321:
322: IF (p_supply_source_type_id = INV_RESERVATION_GLOBAL.G_SOURCE_TYPE_PO) THEN
323:
324: RCV_AVAILABILITY.validate_supply_demand
325: (
326: x_return_status => l_return_status

Line 457: IF (p_supply_source_type_id = INV_RESERVATION_GLOBAL.G_SOURCE_TYPE_REQ) THEN

453: IF (l_debug = 1) THEN
454: debug_print('In validate_supply_source_req, supply_source_type_id = ' || p_supply_source_type_id);
455: END IF;
456:
457: IF (p_supply_source_type_id = INV_RESERVATION_GLOBAL.G_SOURCE_TYPE_REQ) THEN
458:
459: -- validate document
460: OPEN c_req_supply;
461: FETCH c_req_supply INTO l_valid_supply;

Line 555: IF (p_supply_source_type_id = INV_RESERVATION_GLOBAL.G_SOURCE_TYPE_INTERNAL_REQ) THEN

551: IF (l_debug = 1) THEN
552: debug_print('In validate_supply_source_intreq, supply_source_type_id = ' || p_supply_source_type_id);
553: END IF;
554:
555: IF (p_supply_source_type_id = INV_RESERVATION_GLOBAL.G_SOURCE_TYPE_INTERNAL_REQ) THEN
556: -- validate document
557: RCV_AVAILABILITY.validate_supply_demand
558: (
559: x_return_status => l_return_status

Line 659: IF (p_supply_source_type_id = INV_RESERVATION_GLOBAL.G_SOURCE_TYPE_ASN) THEN

655: IF (l_debug = 1) THEN
656: debug_print('In validate_supply_source_asn, supply_source_type_id = ' || p_supply_source_type_id);
657: END IF;
658:
659: IF (p_supply_source_type_id = INV_RESERVATION_GLOBAL.G_SOURCE_TYPE_ASN) THEN
660:
661: -- validate the document
662: RCV_AVAILABILITY.validate_supply_demand
663: (

Line 778: IF (p_supply_source_type_id = INV_RESERVATION_GLOBAL.G_SOURCE_TYPE_INTRANSIT) THEN

774: IF (l_debug = 1) THEN
775: debug_print('In validate_supply_source_intran, supply_source_type_id = ' || p_supply_source_type_id);
776: END IF;
777:
778: IF (p_supply_source_type_id = INV_RESERVATION_GLOBAL.G_SOURCE_TYPE_INTRANSIT) THEN
779:
780: -- validate document
781: RCV_AVAILABILITY.validate_supply_demand
782: (

Line 913: IF (p_supply_source_type_id = INV_RESERVATION_GLOBAL.G_SOURCE_TYPE_RCV) THEN

909: IF (l_debug = 1) THEN
910: debug_print('In validate_supply_source_rcv, supply_source_type_id = ' || p_supply_source_type_id);
911: END IF;
912:
913: IF (p_supply_source_type_id = INV_RESERVATION_GLOBAL.G_SOURCE_TYPE_RCV) THEN
914:
915: -- validate the document
916: /*
917: RCV_package.validate_supply_demand

Line 1031: IF (p_supply_source_type_id = INV_RESERVATION_GLOBAL.G_SOURCE_TYPE_WIP) THEN

1027: IF (l_debug = 1) THEN
1028: debug_print('In validate_supply_source_wipdisc, supply_source_type_id = ' || p_supply_source_type_id);
1029: END IF;
1030:
1031: IF (p_supply_source_type_id = INV_RESERVATION_GLOBAL.G_SOURCE_TYPE_WIP) THEN
1032: IF (p_wip_entity_type = INV_RESERVATION_GLOBAL.G_WIP_SOURCE_TYPE_DISCRETE) THEN
1033:
1034:
1035: -- validate document

Line 1032: IF (p_wip_entity_type = INV_RESERVATION_GLOBAL.G_WIP_SOURCE_TYPE_DISCRETE) THEN

1028: debug_print('In validate_supply_source_wipdisc, supply_source_type_id = ' || p_supply_source_type_id);
1029: END IF;
1030:
1031: IF (p_supply_source_type_id = INV_RESERVATION_GLOBAL.G_SOURCE_TYPE_WIP) THEN
1032: IF (p_wip_entity_type = INV_RESERVATION_GLOBAL.G_WIP_SOURCE_TYPE_DISCRETE) THEN
1033:
1034:
1035: -- validate document
1036: WIP_RESERVATIONS_GRP.validate_supply_demand

Line 1138: IF (p_supply_source_type_id = INV_RESERVATION_GLOBAL.G_SOURCE_TYPE_WIP) THEN

1134: IF (l_debug = 1) THEN
1135: debug_print('In validate_supply_source_osfm, supply_source_type_id = ' || p_supply_source_type_id);
1136: END IF;
1137:
1138: IF (p_supply_source_type_id = INV_RESERVATION_GLOBAL.G_SOURCE_TYPE_WIP) THEN
1139: IF (p_wip_entity_type = INV_RESERVATION_GLOBAL.G_WIP_SOURCE_TYPE_OSFM) THEN
1140:
1141: -- validate document
1142: WSM_RESERVATIONS_GRP.validate_supply_demand

Line 1139: IF (p_wip_entity_type = INV_RESERVATION_GLOBAL.G_WIP_SOURCE_TYPE_OSFM) THEN

1135: debug_print('In validate_supply_source_osfm, supply_source_type_id = ' || p_supply_source_type_id);
1136: END IF;
1137:
1138: IF (p_supply_source_type_id = INV_RESERVATION_GLOBAL.G_SOURCE_TYPE_WIP) THEN
1139: IF (p_wip_entity_type = INV_RESERVATION_GLOBAL.G_WIP_SOURCE_TYPE_OSFM) THEN
1140:
1141: -- validate document
1142: WSM_RESERVATIONS_GRP.validate_supply_demand
1143: (

Line 1265: IF (p_supply_source_type_id = INV_RESERVATION_GLOBAL.G_SOURCE_TYPE_WIP) THEN

1261: IF (l_debug = 1) THEN
1262: debug_print('In validate_supply_source_fpo, supply_source_type_id = ' || p_supply_source_type_id);
1263: END IF;
1264:
1265: IF (p_supply_source_type_id = INV_RESERVATION_GLOBAL.G_SOURCE_TYPE_WIP) THEN
1266: IF (p_wip_entity_type = INV_RESERVATION_GLOBAL.G_WIP_SOURCE_TYPE_FPO) THEN
1267:
1268: -- validate document
1269: /*

Line 1266: IF (p_wip_entity_type = INV_RESERVATION_GLOBAL.G_WIP_SOURCE_TYPE_FPO) THEN

1262: debug_print('In validate_supply_source_fpo, supply_source_type_id = ' || p_supply_source_type_id);
1263: END IF;
1264:
1265: IF (p_supply_source_type_id = INV_RESERVATION_GLOBAL.G_SOURCE_TYPE_WIP) THEN
1266: IF (p_wip_entity_type = INV_RESERVATION_GLOBAL.G_WIP_SOURCE_TYPE_FPO) THEN
1267:
1268: -- validate document
1269: /*
1270: FPO_package.validate_supply_demand

Line 1394: IF (p_supply_source_type_id = INV_RESERVATION_GLOBAL.G_SOURCE_TYPE_WIP) THEN

1390: IF (l_debug = 1) THEN
1391: debug_print('In validate_supply_source_batch, supply_source_type_id = ' || p_supply_source_type_id);
1392: END IF;
1393:
1394: IF (p_supply_source_type_id = INV_RESERVATION_GLOBAL.G_SOURCE_TYPE_WIP) THEN
1395: IF (p_wip_entity_type = INV_RESERVATION_GLOBAL.G_WIP_SOURCE_TYPE_BATCH) THEN
1396:
1397: -- validate document
1398: /*

Line 1395: IF (p_wip_entity_type = INV_RESERVATION_GLOBAL.G_WIP_SOURCE_TYPE_BATCH) THEN

1391: debug_print('In validate_supply_source_batch, supply_source_type_id = ' || p_supply_source_type_id);
1392: END IF;
1393:
1394: IF (p_supply_source_type_id = INV_RESERVATION_GLOBAL.G_SOURCE_TYPE_WIP) THEN
1395: IF (p_wip_entity_type = INV_RESERVATION_GLOBAL.G_WIP_SOURCE_TYPE_BATCH) THEN
1396:
1397: -- validate document
1398: /*
1399: BATCH_package.validate_supply_demand

Line 1524: IF (p_supply_source_type_id = INV_RESERVATION_GLOBAL.G_SOURCE_TYPE_WIP) THEN

1520: IF (l_debug = 1) THEN
1521: debug_print('In validate_supply_source_cmro, supply_source_type_id = ' || p_supply_source_type_id);
1522: END IF;
1523:
1524: IF (p_supply_source_type_id = INV_RESERVATION_GLOBAL.G_SOURCE_TYPE_WIP) THEN
1525: IF (p_wip_entity_type = INV_RESERVATION_GLOBAL.G_WIP_SOURCE_TYPE_CMRO) THEN
1526:
1527: AHL_INV_RESERVATIONS_GRP.validate_supply_demand
1528: (

Line 1525: IF (p_wip_entity_type = INV_RESERVATION_GLOBAL.G_WIP_SOURCE_TYPE_CMRO) THEN

1521: debug_print('In validate_supply_source_cmro, supply_source_type_id = ' || p_supply_source_type_id);
1522: END IF;
1523:
1524: IF (p_supply_source_type_id = INV_RESERVATION_GLOBAL.G_SOURCE_TYPE_WIP) THEN
1525: IF (p_wip_entity_type = INV_RESERVATION_GLOBAL.G_WIP_SOURCE_TYPE_CMRO) THEN
1526:
1527: AHL_INV_RESERVATIONS_GRP.validate_supply_demand
1528: (
1529: x_return_status => l_return_status

Line 1629: IF (p_demand_source_type_id = INV_RESERVATION_GLOBAL.G_SOURCE_TYPE_OE and OE_DS_PVT.G_DS_SOISSUE_FLAG <> 'Y') THEN

1625: debug_print('In validate_demand_source_so: demand_source_type_id = ' || p_demand_source_type_id);
1626: debug_print('In validate_demand_source_so: oe_ds_pvt.g_ds_soissue_flag = ' || OE_DS_PVT.G_DS_SOISSUE_FLAG );
1627: END IF;
1628:
1629: IF (p_demand_source_type_id = INV_RESERVATION_GLOBAL.G_SOURCE_TYPE_OE and OE_DS_PVT.G_DS_SOISSUE_FLAG <> 'Y') THEN
1630: select count(1)
1631: into l_dropship_count
1632: from oe_drop_ship_sources
1633: where header_id = p_demand_source_header_id

Line 1719: IF (p_demand_source_type_id = inv_reservation_global.g_source_type_wip AND

1715: debug_print('demand_source_line_detail = ' || p_demand_source_line_detail);
1716: debug_print('wip_entity_type = ' || p_wip_entity_type);
1717: END IF;
1718:
1719: IF (p_demand_source_type_id = inv_reservation_global.g_source_type_wip AND
1720: p_wip_entity_type = inv_reservation_global.g_wip_source_type_cmro) THEN
1721: -- validate document
1722: AHL_INV_RESERVATIONS_GRP.validate_supply_demand
1723: (

Line 1720: p_wip_entity_type = inv_reservation_global.g_wip_source_type_cmro) THEN

1716: debug_print('wip_entity_type = ' || p_wip_entity_type);
1717: END IF;
1718:
1719: IF (p_demand_source_type_id = inv_reservation_global.g_source_type_wip AND
1720: p_wip_entity_type = inv_reservation_global.g_wip_source_type_cmro) THEN
1721: -- validate document
1722: AHL_INV_RESERVATIONS_GRP.validate_supply_demand
1723: (
1724: x_return_status => l_return_status

Line 1825: IF (p_demand_source_type_id = inv_reservation_global.g_source_type_wip AND

1821: debug_print('demand_source_line_id = ' || p_demand_source_line_id);
1822: debug_print('wip_entity_type = ' || p_wip_entity_type);
1823: END IF;
1824:
1825: IF (p_demand_source_type_id = inv_reservation_global.g_source_type_wip AND
1826: p_wip_entity_type = inv_reservation_global.g_wip_source_type_fpo) THEN
1827: -- validate document
1828: /*
1829: FPO_package.validate_supply_demand

Line 1826: p_wip_entity_type = inv_reservation_global.g_wip_source_type_fpo) THEN

1822: debug_print('wip_entity_type = ' || p_wip_entity_type);
1823: END IF;
1824:
1825: IF (p_demand_source_type_id = inv_reservation_global.g_source_type_wip AND
1826: p_wip_entity_type = inv_reservation_global.g_wip_source_type_fpo) THEN
1827: -- validate document
1828: /*
1829: FPO_package.validate_supply_demand
1830: (

Line 1933: IF (p_demand_source_type_id = inv_reservation_global.g_source_type_wip AND

1929: debug_print('demand_source_line_id = ' || p_demand_source_line_id);
1930: debug_print('wip_entity_type = ' || p_wip_entity_type);
1931: END IF;
1932:
1933: IF (p_demand_source_type_id = inv_reservation_global.g_source_type_wip AND
1934: p_wip_entity_type = inv_reservation_global.g_wip_source_type_batch) THEN
1935: -- validate document
1936: /*
1937: Batch_package.validate_supply_demand

Line 1934: p_wip_entity_type = inv_reservation_global.g_wip_source_type_batch) THEN

1930: debug_print('wip_entity_type = ' || p_wip_entity_type);
1931: END IF;
1932:
1933: IF (p_demand_source_type_id = inv_reservation_global.g_source_type_wip AND
1934: p_wip_entity_type = inv_reservation_global.g_wip_source_type_batch) THEN
1935: -- validate document
1936: /*
1937: Batch_package.validate_supply_demand
1938: (

Line 2051: , p_serial_array IN inv_reservation_global.serial_number_tbl_type

2047: , p_revision IN VARCHAR2
2048: , p_lot_number IN VARCHAR2
2049: , p_subinventory_code IN VARCHAR2
2050: , p_locator_id IN NUMBER
2051: , p_serial_array IN inv_reservation_global.serial_number_tbl_type
2052: , p_item_cache_index IN INTEGER
2053: , p_org_cache_index IN INTEGER
2054: , x_sub_cache_index OUT NOCOPY INTEGER
2055: ) IS

Line 2060: l_rec inv_reservation_global.sub_record;

2056: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;
2057: l_resultant_locator_control NUMBER := NULL;
2058: l_loop_index NUMBER := NULL;
2059: l_sub_cache_index NUMBER := NULL;
2060: l_rec inv_reservation_global.sub_record;
2061: l_found VARCHAR2(1);
2062: l_lot_expiration_date DATE;
2063: l_debug NUMBER;
2064: l_default_onhand_status_id NUMBER; -- Bug 6870416

Line 2066: l_rec_loc inv_reservation_global.locator_record;

2062: l_lot_expiration_date DATE;
2063: l_debug NUMBER;
2064: l_default_onhand_status_id NUMBER; -- Bug 6870416
2065: -- Added for common API
2066: l_rec_loc inv_reservation_global.locator_record;
2067: l_rec_serial inv_reservation_global.serial_record;
2068: l_rec_lot inv_reservation_global.lot_record;
2069:
2070:

Line 2067: l_rec_serial inv_reservation_global.serial_record;

2063: l_debug NUMBER;
2064: l_default_onhand_status_id NUMBER; -- Bug 6870416
2065: -- Added for common API
2066: l_rec_loc inv_reservation_global.locator_record;
2067: l_rec_serial inv_reservation_global.serial_record;
2068: l_rec_lot inv_reservation_global.lot_record;
2069:
2070:
2071: BEGIN

Line 2068: l_rec_lot inv_reservation_global.lot_record;

2064: l_default_onhand_status_id NUMBER; -- Bug 6870416
2065: -- Added for common API
2066: l_rec_loc inv_reservation_global.locator_record;
2067: l_rec_serial inv_reservation_global.serial_record;
2068: l_rec_lot inv_reservation_global.lot_record;
2069:
2070:
2071: BEGIN
2072:

Line 2089: IF inv_reservation_global.g_item_record_cache(p_item_cache_index).serial_number_control_code

2085: IF (l_debug = 1) THEN
2086: debug_print('Inside validate item sku: ' || l_return_status);
2087: END IF;
2088:
2089: IF inv_reservation_global.g_item_record_cache(p_item_cache_index).serial_number_control_code
2090: NOT IN (inv_reservation_global.g_serial_control_predefined,
2091: inv_reservation_global.g_serial_control_dynamic_inv)
2092: AND p_serial_array.COUNT >0 THEN
2093: fnd_message.set_name('INV', 'INV_EXTRA_SERIAL');

Line 2090: NOT IN (inv_reservation_global.g_serial_control_predefined,

2086: debug_print('Inside validate item sku: ' || l_return_status);
2087: END IF;
2088:
2089: IF inv_reservation_global.g_item_record_cache(p_item_cache_index).serial_number_control_code
2090: NOT IN (inv_reservation_global.g_serial_control_predefined,
2091: inv_reservation_global.g_serial_control_dynamic_inv)
2092: AND p_serial_array.COUNT >0 THEN
2093: fnd_message.set_name('INV', 'INV_EXTRA_SERIAL');
2094: fnd_msg_pub.add;

Line 2091: inv_reservation_global.g_serial_control_dynamic_inv)

2087: END IF;
2088:
2089: IF inv_reservation_global.g_item_record_cache(p_item_cache_index).serial_number_control_code
2090: NOT IN (inv_reservation_global.g_serial_control_predefined,
2091: inv_reservation_global.g_serial_control_dynamic_inv)
2092: AND p_serial_array.COUNT >0 THEN
2093: fnd_message.set_name('INV', 'INV_EXTRA_SERIAL');
2094: fnd_msg_pub.add;
2095: RAISE fnd_api.g_exc_error;

Line 2104: IF inv_reservation_global.g_item_record_cache

2100: END IF;
2101: -- if the item is not under lot control
2102: -- and the input lot number is not empty,
2103: -- raise the error
2104: IF inv_reservation_global.g_item_record_cache
2105: (p_item_cache_index).lot_control_code =
2106: inv_reservation_global.g_lot_control_no
2107: AND p_lot_number IS NOT NULL THEN
2108: fnd_message.set_name('INV', 'INV_NO_LOT_CONTROL');

Line 2106: inv_reservation_global.g_lot_control_no

2102: -- and the input lot number is not empty,
2103: -- raise the error
2104: IF inv_reservation_global.g_item_record_cache
2105: (p_item_cache_index).lot_control_code =
2106: inv_reservation_global.g_lot_control_no
2107: AND p_lot_number IS NOT NULL THEN
2108: fnd_message.set_name('INV', 'INV_NO_LOT_CONTROL');
2109: fnd_msg_pub.add;
2110: RAISE fnd_api.g_exc_error;

Line 2119: IF inv_reservation_global.g_item_record_cache

2115: --
2116: -- if the item is not under revision control
2117: -- and the input revision is not empty,
2118: -- raise the error
2119: IF inv_reservation_global.g_item_record_cache
2120: (p_item_cache_index).revision_qty_control_code =
2121: inv_reservation_global.g_revision_control_no
2122: AND p_revision IS NOT NULL THEN
2123: fnd_message.set_name('INV', 'INV_NO_REVISION_CONTROL');

Line 2121: inv_reservation_global.g_revision_control_no

2117: -- and the input revision is not empty,
2118: -- raise the error
2119: IF inv_reservation_global.g_item_record_cache
2120: (p_item_cache_index).revision_qty_control_code =
2121: inv_reservation_global.g_revision_control_no
2122: AND p_revision IS NOT NULL THEN
2123: fnd_message.set_name('INV', 'INV_NO_REVISION_CONTROL');
2124: fnd_msg_pub.add;
2125: RAISE fnd_api.g_exc_error;

Line 2134: IF inv_reservation_global.g_item_record_cache

2130: END IF;
2131: -- if the item is under revision control
2132: -- and the input revision is null but subinventory_code or locator_id is
2133: -- not null, raise the error
2134: IF inv_reservation_global.g_item_record_cache
2135: (p_item_cache_index).revision_qty_control_code =
2136: inv_reservation_global.g_revision_control_yes
2137: AND p_revision IS NULL
2138: AND (p_subinventory_code IS NOT NULL

Line 2136: inv_reservation_global.g_revision_control_yes

2132: -- and the input revision is null but subinventory_code or locator_id is
2133: -- not null, raise the error
2134: IF inv_reservation_global.g_item_record_cache
2135: (p_item_cache_index).revision_qty_control_code =
2136: inv_reservation_global.g_revision_control_yes
2137: AND p_revision IS NULL
2138: AND (p_subinventory_code IS NOT NULL
2139: OR
2140: p_locator_id IS NOT NULL

Line 2154: IF inv_reservation_global.g_item_record_cache

2150: --
2151: -- if the item is under lot control
2152: -- and the input lot_number is null but subinventory_code or locator_id is
2153: -- not null, raise the error
2154: IF inv_reservation_global.g_item_record_cache
2155: (p_item_cache_index).lot_control_code
2156: = inv_reservation_global.g_lot_control_yes
2157: AND p_lot_number IS NULL
2158: AND (p_subinventory_code IS NOT NULL

Line 2156: = inv_reservation_global.g_lot_control_yes

2152: -- and the input lot_number is null but subinventory_code or locator_id is
2153: -- not null, raise the error
2154: IF inv_reservation_global.g_item_record_cache
2155: (p_item_cache_index).lot_control_code
2156: = inv_reservation_global.g_lot_control_yes
2157: AND p_lot_number IS NULL
2158: AND (p_subinventory_code IS NOT NULL
2159: OR
2160: p_locator_id IS NOT NULL

Line 2183: IF inv_reservation_global.g_item_record_cache

2179: --
2180: -- if the item is under revision and lot control
2181: -- and the input revision is null but lot_number is
2182: -- not null, raise the error
2183: IF inv_reservation_global.g_item_record_cache
2184: (p_item_cache_index).revision_qty_control_code =
2185: inv_reservation_global.g_revision_control_yes
2186: AND inv_reservation_global.g_item_record_cache
2187: (p_item_cache_index).lot_control_code

Line 2185: inv_reservation_global.g_revision_control_yes

2181: -- and the input revision is null but lot_number is
2182: -- not null, raise the error
2183: IF inv_reservation_global.g_item_record_cache
2184: (p_item_cache_index).revision_qty_control_code =
2185: inv_reservation_global.g_revision_control_yes
2186: AND inv_reservation_global.g_item_record_cache
2187: (p_item_cache_index).lot_control_code
2188: = inv_reservation_global.g_lot_control_yes
2189: AND p_revision IS NULL

Line 2186: AND inv_reservation_global.g_item_record_cache

2182: -- not null, raise the error
2183: IF inv_reservation_global.g_item_record_cache
2184: (p_item_cache_index).revision_qty_control_code =
2185: inv_reservation_global.g_revision_control_yes
2186: AND inv_reservation_global.g_item_record_cache
2187: (p_item_cache_index).lot_control_code
2188: = inv_reservation_global.g_lot_control_yes
2189: AND p_revision IS NULL
2190: AND p_lot_number IS NOT NULL THEN

Line 2188: = inv_reservation_global.g_lot_control_yes

2184: (p_item_cache_index).revision_qty_control_code =
2185: inv_reservation_global.g_revision_control_yes
2186: AND inv_reservation_global.g_item_record_cache
2187: (p_item_cache_index).lot_control_code
2188: = inv_reservation_global.g_lot_control_yes
2189: AND p_revision IS NULL
2190: AND p_lot_number IS NOT NULL THEN
2191: fnd_message.set_name('INV', 'INV_MISSING_REV');
2192: fnd_msg_pub.add;

Line 2249: p_org => inv_reservation_global.g_organization_record_cache(p_org_cache_index)

2245: l_rec.secondary_inventory_name :=p_subinventory_code;
2246: IF INV_Validate.subinventory
2247: (
2248: p_sub => l_rec,
2249: p_org => inv_reservation_global.g_organization_record_cache(p_org_cache_index)
2250: )=INV_Validate.F THEN
2251: fnd_message.set_name('INV','INVALID_SUB');
2252: fnd_msg_pub.add;
2253: RAISE fnd_api.g_exc_error;

Line 2289: l_rec := inv_reservation_global.g_sub_record_cache(l_sub_cache_index);

2285: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2286: RAISE fnd_api.g_exc_unexpected_error;
2287: END IF;
2288: ELSE
2289: l_rec := inv_reservation_global.g_sub_record_cache(l_sub_cache_index);
2290: END IF;
2291: --
2292: -- check lcator control based on settings at org, sub, item levels
2293: l_resultant_locator_control :=

Line 2297: => inv_reservation_global.g_organization_record_cache

2293: l_resultant_locator_control :=
2294: inv_reservation_util_pvt.locator_control
2295: (
2296: p_org_control
2297: => inv_reservation_global.g_organization_record_cache
2298: (p_org_cache_index)
2299: .stock_locator_control_code
2300: , p_sub_control
2301: => inv_reservation_global.g_sub_record_cache

Line 2301: => inv_reservation_global.g_sub_record_cache

2297: => inv_reservation_global.g_organization_record_cache
2298: (p_org_cache_index)
2299: .stock_locator_control_code
2300: , p_sub_control
2301: => inv_reservation_global.g_sub_record_cache
2302: (l_sub_cache_index).locator_type
2303: , p_item_control
2304: => inv_reservation_global.g_item_record_cache
2305: (p_item_cache_index)

Line 2304: => inv_reservation_global.g_item_record_cache

2300: , p_sub_control
2301: => inv_reservation_global.g_sub_record_cache
2302: (l_sub_cache_index).locator_type
2303: , p_item_control
2304: => inv_reservation_global.g_item_record_cache
2305: (p_item_cache_index)
2306: .location_control_code
2307: );
2308: --

Line 2343: p_org => inv_reservation_global.g_organization_record_cache

2339: END;*/
2340: IF INV_Validate.revision
2341: (
2342: p_revision => p_revision,
2343: p_org => inv_reservation_global.g_organization_record_cache
2344: (p_org_cache_index),
2345: p_item => inv_reservation_global.g_item_record_cache(p_item_cache_index) )=INV_Validate.F THEN
2346:
2347: fnd_message.set_name('INV','INVALID_REVISION');

Line 2345: p_item => inv_reservation_global.g_item_record_cache(p_item_cache_index) )=INV_Validate.F THEN

2341: (
2342: p_revision => p_revision,
2343: p_org => inv_reservation_global.g_organization_record_cache
2344: (p_org_cache_index),
2345: p_item => inv_reservation_global.g_item_record_cache(p_item_cache_index) )=INV_Validate.F THEN
2346:
2347: fnd_message.set_name('INV','INVALID_REVISION');
2348: fnd_msg_pub.add;
2349: RAISE fnd_api.g_exc_error;

Line 2399: IF inv_reservation_global.g_item_record_cache

2395: END;*/
2396:
2397:
2398: --
2399: IF inv_reservation_global.g_item_record_cache
2400: (p_item_cache_index)
2401: .restrict_subinventories_code = 1 THEN
2402: -- for restricted subs, use table mtl_item_subinventories
2403: BEGIN

Line 2416: ELSIF inv_reservation_global.g_item_record_cache

2412: fnd_message.set_name('INV','INVALID_SUB');
2413: fnd_msg_pub.add;
2414: RAISE fnd_api.g_exc_error;
2415: END ;
2416: ELSIF inv_reservation_global.g_item_record_cache
2417: (p_item_cache_index)
2418: .restrict_subinventories_code = 2 THEN
2419: -- item is not restricted to specific subs
2420: BEGIN

Line 2439: IF inv_reservation_global.g_item_record_cache

2435:
2436:
2437: IF (p_locator_id IS NOT NULL AND p_locator_id > 0) THEN
2438: -- check if locator is restricted to subs
2439: IF inv_reservation_global.g_item_record_cache
2440: (p_item_cache_index)
2441: .restrict_locators_code = 1 THEN
2442: BEGIN
2443: -- Modified to call common API

Line 2466: p_org => inv_reservation_global.g_organization_record_cache

2462:
2463:
2464: IF INV_Validate.validateLocator(
2465: p_locator => l_rec_loc,
2466: p_org => inv_reservation_global.g_organization_record_cache
2467: (p_org_cache_index),
2468: p_sub => l_rec,
2469: p_item => inv_reservation_global.g_item_record_cache(p_item_cache_index)
2470: )=INV_Validate.F THEN

Line 2469: p_item => inv_reservation_global.g_item_record_cache(p_item_cache_index)

2465: p_locator => l_rec_loc,
2466: p_org => inv_reservation_global.g_organization_record_cache
2467: (p_org_cache_index),
2468: p_sub => l_rec,
2469: p_item => inv_reservation_global.g_item_record_cache(p_item_cache_index)
2470: )=INV_Validate.F THEN
2471: fnd_message.set_name('INV','INV_LOCATOR_NOT_AVAILABLE');
2472: fnd_msg_pub.add;
2473: RAISE fnd_api.g_exc_error;

Line 2476: ELSIF inv_reservation_global.g_item_record_cache

2472: fnd_msg_pub.add;
2473: RAISE fnd_api.g_exc_error;
2474: END IF;
2475: END;
2476: ELSIF inv_reservation_global.g_item_record_cache
2477: (p_item_cache_index)
2478: .restrict_locators_code = 2 THEN
2479: /* BEGIN
2480: SELECT 'Y' INTO l_found

Line 2500: p_org => inv_reservation_global.g_organization_record_cache

2496: -- Modified for common API
2497:
2498: IF INV_Validate.validateLocator(
2499: p_locator => l_rec_loc,
2500: p_org => inv_reservation_global.g_organization_record_cache
2501: (p_org_cache_index),
2502: p_sub => l_rec)=INV_Validate.F THEN
2503: fnd_message.set_name('INV','INV_LOCATOR_NOT_AVAILABLE');
2504: fnd_msg_pub.add;

Line 2537: -- p_org => inv_reservation_global.g_organization_record_cache

2533: -- l_rec_serial.serial_number:=p_serial_array(l_loop_index).serial_number;
2534: /*** {{ R12 Enhanced reservations code changes ***/
2535: -- IF INV_Validate.check_serial(
2536: -- p_serial => l_rec_serial,
2537: -- p_org => inv_reservation_global.g_organization_record_cache
2538: -- (p_org_cache_index),
2539: -- p_item => inv_reservation_global.g_item_record_cache(p_item_cache_index)
2540: -- ,
2541: -- p_from_sub => l_rec,

Line 2539: -- p_item => inv_reservation_global.g_item_record_cache(p_item_cache_index)

2535: -- IF INV_Validate.check_serial(
2536: -- p_serial => l_rec_serial,
2537: -- p_org => inv_reservation_global.g_organization_record_cache
2538: -- (p_org_cache_index),
2539: -- p_item => inv_reservation_global.g_item_record_cache(p_item_cache_index)
2540: -- ,
2541: -- p_from_sub => l_rec,
2542: -- p_lot => l_rec_lot,
2543: -- p_loc => l_rec_loc,

Line 2576: IF inv_reservation_global.g_item_record_cache

2572: --
2573: -- if the item is defined as lot_indivisible (lot_divisible_flag <> 'Y')
2574: -- the reservation must be detailed to lot level so ensure that the
2575: -- lot_number is populated
2576: IF inv_reservation_global.g_item_record_cache
2577: (p_item_cache_index).lot_divisible_flag <> 'Y' AND
2578: inv_reservation_global.g_item_record_cache(p_item_cache_index).lot_control_code = inv_reservation_global.g_lot_control_yes AND
2579: p_lot_number IS NULL THEN
2580: --FlexiLotAlloc

Line 2578: inv_reservation_global.g_item_record_cache(p_item_cache_index).lot_control_code = inv_reservation_global.g_lot_control_yes AND

2574: -- the reservation must be detailed to lot level so ensure that the
2575: -- lot_number is populated
2576: IF inv_reservation_global.g_item_record_cache
2577: (p_item_cache_index).lot_divisible_flag <> 'Y' AND
2578: inv_reservation_global.g_item_record_cache(p_item_cache_index).lot_control_code = inv_reservation_global.g_lot_control_yes AND
2579: p_lot_number IS NULL THEN
2580: --FlexiLotAlloc
2581: IF NVL(INV_FLEX_LOT_ALLOCATION_PUB.G_LOT_VALIDATION,'Y') = 'N' THEN
2582: IF (l_debug = 1) THEN

Line 2638: , p_serial_array IN inv_reservation_global.serial_number_tbl_type

2634: , p_revision IN VARCHAR2
2635: , p_lot_number IN VARCHAR2
2636: , p_subinventory_code IN VARCHAR2
2637: , p_locator_id IN NUMBER
2638: , p_serial_array IN inv_reservation_global.serial_number_tbl_type
2639: , p_demand_ship_date IN DATE
2640: , p_supply_receipt_date IN DATE
2641: , p_item_cache_index IN INTEGER
2642: , p_org_cache_index IN INTEGER

Line 2651: l_rec inv_reservation_global.supply_record;

2647: l_structure_num NUMBER := NULL;
2648: l_supply_cache_index NUMBER := NULL;
2649: l_sub_cache_index NUMBER := NULL;
2650: l_is_valid NUMBER := NULL;
2651: l_rec inv_reservation_global.supply_record;
2652:
2653: /*** {{ R12 Enhanced reservations code changes ***/
2654: l_msg_count NUMBER;
2655: l_msg_data VARCHAR2(1000);

Line 2690: (inv_reservation_global.g_source_type_po,

2686:
2687: /*** {{ R12 Enhanced reservations code changes ***/
2688: -- Returns error if we do not support the supply type
2689: IF (p_supply_source_type_id NOT IN
2690: (inv_reservation_global.g_source_type_po,
2691: inv_reservation_global.g_source_type_inv, inv_reservation_global.g_source_type_req,
2692: inv_reservation_global.g_source_type_internal_req, inv_reservation_global.g_source_type_asn,
2693: inv_reservation_global.g_source_type_intransit, inv_reservation_global.g_source_type_wip,
2694: inv_reservation_global.g_source_type_rcv)) THEN

Line 2691: inv_reservation_global.g_source_type_inv, inv_reservation_global.g_source_type_req,

2687: /*** {{ R12 Enhanced reservations code changes ***/
2688: -- Returns error if we do not support the supply type
2689: IF (p_supply_source_type_id NOT IN
2690: (inv_reservation_global.g_source_type_po,
2691: inv_reservation_global.g_source_type_inv, inv_reservation_global.g_source_type_req,
2692: inv_reservation_global.g_source_type_internal_req, inv_reservation_global.g_source_type_asn,
2693: inv_reservation_global.g_source_type_intransit, inv_reservation_global.g_source_type_wip,
2694: inv_reservation_global.g_source_type_rcv)) THEN
2695:

Line 2692: inv_reservation_global.g_source_type_internal_req, inv_reservation_global.g_source_type_asn,

2688: -- Returns error if we do not support the supply type
2689: IF (p_supply_source_type_id NOT IN
2690: (inv_reservation_global.g_source_type_po,
2691: inv_reservation_global.g_source_type_inv, inv_reservation_global.g_source_type_req,
2692: inv_reservation_global.g_source_type_internal_req, inv_reservation_global.g_source_type_asn,
2693: inv_reservation_global.g_source_type_intransit, inv_reservation_global.g_source_type_wip,
2694: inv_reservation_global.g_source_type_rcv)) THEN
2695:
2696: fnd_message.set_name('INV', 'INV_RSV_INVALID_SUPPLY');

Line 2693: inv_reservation_global.g_source_type_intransit, inv_reservation_global.g_source_type_wip,

2689: IF (p_supply_source_type_id NOT IN
2690: (inv_reservation_global.g_source_type_po,
2691: inv_reservation_global.g_source_type_inv, inv_reservation_global.g_source_type_req,
2692: inv_reservation_global.g_source_type_internal_req, inv_reservation_global.g_source_type_asn,
2693: inv_reservation_global.g_source_type_intransit, inv_reservation_global.g_source_type_wip,
2694: inv_reservation_global.g_source_type_rcv)) THEN
2695:
2696: fnd_message.set_name('INV', 'INV_RSV_INVALID_SUPPLY');
2697: fnd_msg_pub.ADD;

Line 2694: inv_reservation_global.g_source_type_rcv)) THEN

2690: (inv_reservation_global.g_source_type_po,
2691: inv_reservation_global.g_source_type_inv, inv_reservation_global.g_source_type_req,
2692: inv_reservation_global.g_source_type_internal_req, inv_reservation_global.g_source_type_asn,
2693: inv_reservation_global.g_source_type_intransit, inv_reservation_global.g_source_type_wip,
2694: inv_reservation_global.g_source_type_rcv)) THEN
2695:
2696: fnd_message.set_name('INV', 'INV_RSV_INVALID_SUPPLY');
2697: fnd_msg_pub.ADD;
2698: RAISE fnd_api.g_exc_error;

Line 2733: IF p_supply_source_type_id = inv_reservation_global.g_source_type_po

2729: debug_print('After calling supply cache ' || p_supply_source_type_id);
2730: debug_print('Return status :' || l_return_status);
2731: END IF;
2732:
2733: IF p_supply_source_type_id = inv_reservation_global.g_source_type_po
2734: THEN
2735: IF (l_debug = 1) THEN
2736: debug_print('Before calling validate po ' || l_return_status);
2737: END IF;

Line 2762: ELSIF p_supply_source_type_id = inv_reservation_global.g_source_type_req

2758: --
2759: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2760: RAISE fnd_api.g_exc_unexpected_error;
2761: END IF;
2762: ELSIF p_supply_source_type_id = inv_reservation_global.g_source_type_req
2763: THEN
2764: IF (l_debug = 1) THEN
2765: debug_print('Before calling validate req ' || l_return_status);
2766: END IF;

Line 2791: ELSIF (p_supply_source_type_id = inv_reservation_global.g_source_type_internal_req) THEN

2787: RAISE fnd_api.g_exc_unexpected_error;
2788: END IF;
2789:
2790: /*** {{ R12 Enhanced reservations code changes ***/
2791: ELSIF (p_supply_source_type_id = inv_reservation_global.g_source_type_internal_req) THEN
2792: validate_supply_source_intreq
2793: (
2794: x_return_status => l_return_status
2795: , p_organization_id => p_organization_id

Line 2810: ELSIF (p_supply_source_type_id = inv_reservation_global.g_source_type_asn) THEN

2806: RAISE fnd_api.g_exc_error;
2807: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
2808: RAISE fnd_api.g_exc_unexpected_error;
2809: END IF;
2810: ELSIF (p_supply_source_type_id = inv_reservation_global.g_source_type_asn) THEN
2811: validate_supply_source_asn
2812: (
2813: x_return_status => l_return_status
2814: , p_organization_id => p_organization_id

Line 2829: ELSIF (p_supply_source_type_id = inv_reservation_global.g_source_type_intransit) THEN

2825: RAISE fnd_api.g_exc_error;
2826: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
2827: RAISE fnd_api.g_exc_unexpected_error;
2828: END IF;
2829: ELSIF (p_supply_source_type_id = inv_reservation_global.g_source_type_intransit) THEN
2830: validate_supply_source_intran
2831: (
2832: x_return_status => l_return_status
2833: , p_organization_id => p_organization_id

Line 2848: ELSIF (p_supply_source_type_id = inv_reservation_global.g_source_type_rcv) THEN

2844: RAISE fnd_api.g_exc_error;
2845: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
2846: RAISE fnd_api.g_exc_unexpected_error;
2847: END IF;
2848: ELSIF (p_supply_source_type_id = inv_reservation_global.g_source_type_rcv) THEN
2849: validate_supply_source_rcv
2850: (
2851: x_return_status => l_return_status
2852: , p_organization_id => p_organization_id

Line 2868: ELSIF (p_supply_source_type_id = inv_reservation_global.g_source_type_wip) THEN

2864: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
2865: RAISE fnd_api.g_exc_unexpected_error;
2866: END IF;
2867:
2868: ELSIF (p_supply_source_type_id = inv_reservation_global.g_source_type_wip) THEN
2869: -- get wip entity id from wip_record_cache
2870: inv_reservation_util_pvt.get_wip_cache
2871: (
2872: x_return_status => l_return_status

Line 2881: l_wip_entity_type := inv_reservation_global.g_wip_record_cache(p_supply_source_header_id).wip_entity_type;

2877: RAISE fnd_api.g_exc_error;
2878: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
2879: RAISE fnd_api.g_exc_unexpected_error;
2880: ELSE
2881: l_wip_entity_type := inv_reservation_global.g_wip_record_cache(p_supply_source_header_id).wip_entity_type;
2882: l_wip_job_type := inv_reservation_global.g_wip_record_cache(p_supply_source_header_id).wip_entity_job;
2883: END IF;
2884:
2885: /* Added inv_reservation_global.g_wip_source_type_cmro for bug 13524480 */

Line 2882: l_wip_job_type := inv_reservation_global.g_wip_record_cache(p_supply_source_header_id).wip_entity_job;

2878: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
2879: RAISE fnd_api.g_exc_unexpected_error;
2880: ELSE
2881: l_wip_entity_type := inv_reservation_global.g_wip_record_cache(p_supply_source_header_id).wip_entity_type;
2882: l_wip_job_type := inv_reservation_global.g_wip_record_cache(p_supply_source_header_id).wip_entity_job;
2883: END IF;
2884:
2885: /* Added inv_reservation_global.g_wip_source_type_cmro for bug 13524480 */
2886:

Line 2885: /* Added inv_reservation_global.g_wip_source_type_cmro for bug 13524480 */

2881: l_wip_entity_type := inv_reservation_global.g_wip_record_cache(p_supply_source_header_id).wip_entity_type;
2882: l_wip_job_type := inv_reservation_global.g_wip_record_cache(p_supply_source_header_id).wip_entity_job;
2883: END IF;
2884:
2885: /* Added inv_reservation_global.g_wip_source_type_cmro for bug 13524480 */
2886:
2887: IF (l_wip_entity_type NOT IN
2888: (inv_reservation_global.g_wip_source_type_discrete,
2889: inv_reservation_global.g_wip_source_type_osfm, inv_reservation_global.g_wip_source_type_fpo,

Line 2888: (inv_reservation_global.g_wip_source_type_discrete,

2884:
2885: /* Added inv_reservation_global.g_wip_source_type_cmro for bug 13524480 */
2886:
2887: IF (l_wip_entity_type NOT IN
2888: (inv_reservation_global.g_wip_source_type_discrete,
2889: inv_reservation_global.g_wip_source_type_osfm, inv_reservation_global.g_wip_source_type_fpo,
2890: inv_reservation_global.g_wip_source_type_batch, inv_reservation_global.g_wip_source_type_cmro)) THEN
2891: fnd_message.set_name('INV', 'INV_RSV_WIP_ENT_ERR');
2892: fnd_msg_pub.ADD;

Line 2889: inv_reservation_global.g_wip_source_type_osfm, inv_reservation_global.g_wip_source_type_fpo,

2885: /* Added inv_reservation_global.g_wip_source_type_cmro for bug 13524480 */
2886:
2887: IF (l_wip_entity_type NOT IN
2888: (inv_reservation_global.g_wip_source_type_discrete,
2889: inv_reservation_global.g_wip_source_type_osfm, inv_reservation_global.g_wip_source_type_fpo,
2890: inv_reservation_global.g_wip_source_type_batch, inv_reservation_global.g_wip_source_type_cmro)) THEN
2891: fnd_message.set_name('INV', 'INV_RSV_WIP_ENT_ERR');
2892: fnd_msg_pub.ADD;
2893: RAISE fnd_api.g_exc_error;

Line 2890: inv_reservation_global.g_wip_source_type_batch, inv_reservation_global.g_wip_source_type_cmro)) THEN

2886:
2887: IF (l_wip_entity_type NOT IN
2888: (inv_reservation_global.g_wip_source_type_discrete,
2889: inv_reservation_global.g_wip_source_type_osfm, inv_reservation_global.g_wip_source_type_fpo,
2890: inv_reservation_global.g_wip_source_type_batch, inv_reservation_global.g_wip_source_type_cmro)) THEN
2891: fnd_message.set_name('INV', 'INV_RSV_WIP_ENT_ERR');
2892: fnd_msg_pub.ADD;
2893: RAISE fnd_api.g_exc_error;
2894: END IF;

Line 2898: IF (l_wip_entity_type = inv_reservation_global.g_wip_source_type_discrete OR

2894: END IF;
2895:
2896: -- add validation to check if the supply is wip discrete and osfm, then the
2897: -- demand source needs to be sales order or internal order, otherwise, error out.
2898: IF (l_wip_entity_type = inv_reservation_global.g_wip_source_type_discrete OR
2899: l_wip_entity_type = inv_reservation_global.g_wip_source_type_osfm) THEN
2900: IF (p_demand_source_type_id NOT IN (inv_reservation_global.g_source_type_oe,
2901: inv_reservation_global.g_source_type_internal_ord)) THEN
2902: fnd_message.set_name('INV', 'INV_INVALID_DEMAND_SOURCE');

Line 2899: l_wip_entity_type = inv_reservation_global.g_wip_source_type_osfm) THEN

2895:
2896: -- add validation to check if the supply is wip discrete and osfm, then the
2897: -- demand source needs to be sales order or internal order, otherwise, error out.
2898: IF (l_wip_entity_type = inv_reservation_global.g_wip_source_type_discrete OR
2899: l_wip_entity_type = inv_reservation_global.g_wip_source_type_osfm) THEN
2900: IF (p_demand_source_type_id NOT IN (inv_reservation_global.g_source_type_oe,
2901: inv_reservation_global.g_source_type_internal_ord)) THEN
2902: fnd_message.set_name('INV', 'INV_INVALID_DEMAND_SOURCE');
2903: fnd_msg_pub.ADD;

Line 2900: IF (p_demand_source_type_id NOT IN (inv_reservation_global.g_source_type_oe,

2896: -- add validation to check if the supply is wip discrete and osfm, then the
2897: -- demand source needs to be sales order or internal order, otherwise, error out.
2898: IF (l_wip_entity_type = inv_reservation_global.g_wip_source_type_discrete OR
2899: l_wip_entity_type = inv_reservation_global.g_wip_source_type_osfm) THEN
2900: IF (p_demand_source_type_id NOT IN (inv_reservation_global.g_source_type_oe,
2901: inv_reservation_global.g_source_type_internal_ord)) THEN
2902: fnd_message.set_name('INV', 'INV_INVALID_DEMAND_SOURCE');
2903: fnd_msg_pub.ADD;
2904: RAISE fnd_api.g_exc_error;

Line 2901: inv_reservation_global.g_source_type_internal_ord)) THEN

2897: -- demand source needs to be sales order or internal order, otherwise, error out.
2898: IF (l_wip_entity_type = inv_reservation_global.g_wip_source_type_discrete OR
2899: l_wip_entity_type = inv_reservation_global.g_wip_source_type_osfm) THEN
2900: IF (p_demand_source_type_id NOT IN (inv_reservation_global.g_source_type_oe,
2901: inv_reservation_global.g_source_type_internal_ord)) THEN
2902: fnd_message.set_name('INV', 'INV_INVALID_DEMAND_SOURCE');
2903: fnd_msg_pub.ADD;
2904: RAISE fnd_api.g_exc_error;
2905: END IF;

Line 2908: IF (l_wip_entity_type = inv_reservation_global.g_wip_source_type_discrete) THEN

2904: RAISE fnd_api.g_exc_error;
2905: END IF;
2906: END IF;
2907:
2908: IF (l_wip_entity_type = inv_reservation_global.g_wip_source_type_discrete) THEN
2909: validate_supply_source_wipdisc
2910: (
2911: x_return_status => l_return_status
2912: , p_organization_id => p_organization_id

Line 2933: ELSIF (l_wip_entity_type = inv_reservation_global.g_wip_source_type_osfm) THEN

2929: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
2930: RAISE fnd_api.g_exc_unexpected_error;
2931: END IF;
2932:
2933: ELSIF (l_wip_entity_type = inv_reservation_global.g_wip_source_type_osfm) THEN
2934: validate_supply_source_osfm
2935: (
2936: x_return_status => l_return_status
2937: , p_organization_id => p_organization_id

Line 2954: ELSIF (l_wip_entity_type = inv_reservation_global.g_wip_source_type_fpo) THEN

2950: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
2951: RAISE fnd_api.g_exc_unexpected_error;
2952: END IF;
2953:
2954: ELSIF (l_wip_entity_type = inv_reservation_global.g_wip_source_type_fpo) THEN
2955: validate_supply_source_fpo
2956: (
2957: x_return_status => l_return_status
2958: , p_organization_id => p_organization_id

Line 2973: ELSIF (l_wip_entity_type = inv_reservation_global.g_wip_source_type_batch) THEN

2969: RAISE fnd_api.g_exc_error;
2970: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
2971: RAISE fnd_api.g_exc_unexpected_error;
2972: END IF;
2973: ELSIF (l_wip_entity_type = inv_reservation_global.g_wip_source_type_batch) THEN
2974: validate_supply_source_batch
2975: (
2976: x_return_status => l_return_status
2977: , p_organization_id => p_organization_id

Line 2992: ELSIF (l_wip_entity_type = inv_reservation_global.g_wip_source_type_cmro) THEN /* Added for bug 13524480 */

2988: RAISE fnd_api.g_exc_error;
2989: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
2990: RAISE fnd_api.g_exc_unexpected_error;
2991: END IF;
2992: ELSIF (l_wip_entity_type = inv_reservation_global.g_wip_source_type_cmro) THEN /* Added for bug 13524480 */
2993: debug_print('Calling validate_supply_source_cmro :' || l_return_status);
2994:
2995: validate_supply_source_cmro
2996: (

Line 3048: IF p_supply_source_type_id = inv_reservation_global.g_source_type_inv

3044: END IF;
3045: END IF;
3046: --
3047: -- call validate_item_sku
3048: IF p_supply_source_type_id = inv_reservation_global.g_source_type_inv
3049: THEN
3050: validate_item_sku
3051: (
3052: x_return_status => l_return_status

Line 3174: IF inv_reservation_global.g_item_record_cache

3170:
3171: -- if the item is not defined as dual control
3172: -- secondary_uom_code and secondary_reservation_quantity
3173: -- should be empty
3174: IF inv_reservation_global.g_item_record_cache
3175: (p_item_cache_index).tracking_quantity_ind <> 'PS' THEN
3176: -- SINGLE UOM TRACKING
3177: -- ===================
3178: IF p_secondary_uom IS NOT NULL THEN

Line 3187: ELSIF inv_reservation_global.g_item_record_cache

3183: fnd_message.set_name('INV', 'INV_SECONDARY_QTY_NOT_REQUIRED');-- INVCONV New Message
3184: fnd_msg_pub.add;
3185: RAISE fnd_api.g_exc_error;
3186: END IF;
3187: ELSIF inv_reservation_global.g_item_record_cache
3188: (p_item_cache_index).tracking_quantity_ind = 'PS' THEN
3189: -- DUAL UOM TRACKING
3190: -- =================
3191: IF p_secondary_uom IS NULL THEN

Line 3195: ELSIF p_secondary_uom <> inv_reservation_global.g_item_record_cache(p_item_cache_index).secondary_uom_code THEN

3191: IF p_secondary_uom IS NULL THEN
3192: fnd_message.set_name('INV', 'INV_SECONDARY_UOM_REQUIRED'); -- INVCONV New Message
3193: fnd_msg_pub.add;
3194: RAISE fnd_api.g_exc_error;
3195: ELSIF p_secondary_uom <> inv_reservation_global.g_item_record_cache(p_item_cache_index).secondary_uom_code THEN
3196: fnd_message.set_name('INV', 'INV_INCORRECT_SECONDARY_UOM'); -- INVCONV New Message
3197: fnd_msg_pub.add;
3198: RAISE fnd_api.g_exc_error;
3199: ELSIF p_secondary_quantity IS NULL THEN

Line 3209: IF( (inv_reservation_global.g_item_record_cache(p_item_cache_index).secondary_default_ind = 'F')

3205:
3206: /* IF the Reservation UOM and Secondary UOM are the same AND the Reservation qty and the Secondary Reservation
3207: Qty are the same and it's a fixed conversion item , there's no need to check deviation
3208: INVCONV Bug#3933849 */
3209: IF( (inv_reservation_global.g_item_record_cache(p_item_cache_index).secondary_default_ind = 'F')
3210: AND (p_reservation_quantity = p_secondary_quantity) AND (p_reservation_uom = p_secondary_uom)) THEN
3211: NULL;
3212: ELSE
3213: l_qtys_within_dev := INV_CONVERT.Within_Deviation

Line 3215: inv_reservation_global.g_item_record_cache(p_item_cache_index).organization_id

3211: NULL;
3212: ELSE
3213: l_qtys_within_dev := INV_CONVERT.Within_Deviation
3214: ( p_organization_id =>
3215: inv_reservation_global.g_item_record_cache(p_item_cache_index).organization_id
3216: , p_inventory_item_id =>
3217: inv_reservation_global.g_item_record_cache(p_item_cache_index).inventory_item_id
3218: , p_lot_number => p_lot_number
3219: , p_precision => 5

Line 3217: inv_reservation_global.g_item_record_cache(p_item_cache_index).inventory_item_id

3213: l_qtys_within_dev := INV_CONVERT.Within_Deviation
3214: ( p_organization_id =>
3215: inv_reservation_global.g_item_record_cache(p_item_cache_index).organization_id
3216: , p_inventory_item_id =>
3217: inv_reservation_global.g_item_record_cache(p_item_cache_index).inventory_item_id
3218: , p_lot_number => p_lot_number
3219: , p_precision => 5
3220: , p_quantity => p_primary_quantity
3221: , p_uom_code1 => p_primary_uom

Line 3313: IF p_demand_type_id in (inv_reservation_global.g_source_type_oe,

3309: BEGIN
3310: -- Initialize return status
3311: x_return_status := fnd_api.g_ret_sts_success;
3312:
3313: IF p_demand_type_id in (inv_reservation_global.g_source_type_oe,
3314: inv_reservation_global.g_source_type_internal_ord,
3315: inv_reservation_global.g_source_type_rma) THEN
3316:
3317: -- Fetch row from oe_order_lines

Line 3314: inv_reservation_global.g_source_type_internal_ord,

3310: -- Initialize return status
3311: x_return_status := fnd_api.g_ret_sts_success;
3312:
3313: IF p_demand_type_id in (inv_reservation_global.g_source_type_oe,
3314: inv_reservation_global.g_source_type_internal_ord,
3315: inv_reservation_global.g_source_type_rma) THEN
3316:
3317: -- Fetch row from oe_order_lines
3318:

Line 3315: inv_reservation_global.g_source_type_rma) THEN

3311: x_return_status := fnd_api.g_ret_sts_success;
3312:
3313: IF p_demand_type_id in (inv_reservation_global.g_source_type_oe,
3314: inv_reservation_global.g_source_type_internal_ord,
3315: inv_reservation_global.g_source_type_rma) THEN
3316:
3317: -- Fetch row from oe_order_lines
3318:
3319: /*l_org_id := OE_GLOBALS.G_ORG_ID;

Line 3386: IF (nvl(l_booked_flag, 'N') <> 'Y' AND p_supply_type_id <> inv_reservation_global.g_source_type_inv) THEN

3382:
3383: -- /*** {{ R12 Enhanced reservations code changes ***/
3384: -- Validate 4 -- booked_flag: If the supply is not Inventory, sales
3385: -- order has to be booked.
3386: IF (nvl(l_booked_flag, 'N') <> 'Y' AND p_supply_type_id <> inv_reservation_global.g_source_type_inv) THEN
3387: FND_MESSAGE.SET_NAME('INV', 'INV_RSV_SO_NOT_BOOKED');
3388: FND_MSG_PUB.ADD;
3389: RAISE fnd_api.g_exc_error;
3390: END IF;

Line 3401: IF (p_demand_type_id = inv_reservation_global.g_source_type_oe and NVL(l_source_type_code, 'INTERNAL') = 'EXTERNAL' and OE_DS_PVT.G_DS_SOISSUE_FLAG <> 'Y') THEN

3397: END IF;
3398: --
3399: -- Validate 5 -- if the demand type is sales order, call validate_demand_source_so
3400: -- to see if the sales order is dropship order.
3401: IF (p_demand_type_id = inv_reservation_global.g_source_type_oe and NVL(l_source_type_code, 'INTERNAL') = 'EXTERNAL' and OE_DS_PVT.G_DS_SOISSUE_FLAG <> 'Y') THEN
3402: validate_demand_source_so
3403: ( x_return_status => l_return_status
3404: , p_demand_source_type_id => p_demand_type_id
3405: , p_demand_source_header_id => l_order_header_id

Line 3549: l_rec inv_reservation_global.demand_record;

3545: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;
3546: l_structure_num NUMBER := NULL;
3547: l_index NUMBER := NULL;
3548: l_is_valid NUMBER := NULL;
3549: l_rec inv_reservation_global.demand_record;
3550: /*** {{ R12 Enhanced reservations code changes ***/
3551: l_debug NUMBER;
3552: l_msg_count NUMBER;
3553: l_msg_data VARCHAR2(1000);

Line 3601: (inv_reservation_global.g_source_type_inv,inv_reservation_global.g_source_type_po,

3597: -- in case Return is attemped with profile 'WMS:Express Return' as 'No'
3598:
3599: /*** {{ R12 Enhanced reservations code changes ***/
3600: IF (p_demand_source_type_id NOT IN
3601: (inv_reservation_global.g_source_type_inv,inv_reservation_global.g_source_type_po,
3602: inv_reservation_global.g_source_type_oe, inv_reservation_global.g_source_type_account,
3603: inv_reservation_global.g_source_type_account_alias,
3604: inv_reservation_global.g_source_type_cycle_count, inv_reservation_global.g_source_type_physical_inv,
3605: inv_reservation_global.g_source_type_internal_ord,

Line 3602: inv_reservation_global.g_source_type_oe, inv_reservation_global.g_source_type_account,

3598:
3599: /*** {{ R12 Enhanced reservations code changes ***/
3600: IF (p_demand_source_type_id NOT IN
3601: (inv_reservation_global.g_source_type_inv,inv_reservation_global.g_source_type_po,
3602: inv_reservation_global.g_source_type_oe, inv_reservation_global.g_source_type_account,
3603: inv_reservation_global.g_source_type_account_alias,
3604: inv_reservation_global.g_source_type_cycle_count, inv_reservation_global.g_source_type_physical_inv,
3605: inv_reservation_global.g_source_type_internal_ord,
3606: inv_reservation_global.g_source_type_rma, inv_reservation_global.g_source_type_wip)

Line 3603: inv_reservation_global.g_source_type_account_alias,

3599: /*** {{ R12 Enhanced reservations code changes ***/
3600: IF (p_demand_source_type_id NOT IN
3601: (inv_reservation_global.g_source_type_inv,inv_reservation_global.g_source_type_po,
3602: inv_reservation_global.g_source_type_oe, inv_reservation_global.g_source_type_account,
3603: inv_reservation_global.g_source_type_account_alias,
3604: inv_reservation_global.g_source_type_cycle_count, inv_reservation_global.g_source_type_physical_inv,
3605: inv_reservation_global.g_source_type_internal_ord,
3606: inv_reservation_global.g_source_type_rma, inv_reservation_global.g_source_type_wip)
3607: AND NOT(p_demand_source_type_id >= 100)) THEN --Bug# 10194255

Line 3604: inv_reservation_global.g_source_type_cycle_count, inv_reservation_global.g_source_type_physical_inv,

3600: IF (p_demand_source_type_id NOT IN
3601: (inv_reservation_global.g_source_type_inv,inv_reservation_global.g_source_type_po,
3602: inv_reservation_global.g_source_type_oe, inv_reservation_global.g_source_type_account,
3603: inv_reservation_global.g_source_type_account_alias,
3604: inv_reservation_global.g_source_type_cycle_count, inv_reservation_global.g_source_type_physical_inv,
3605: inv_reservation_global.g_source_type_internal_ord,
3606: inv_reservation_global.g_source_type_rma, inv_reservation_global.g_source_type_wip)
3607: AND NOT(p_demand_source_type_id >= 100)) THEN --Bug# 10194255
3608: fnd_message.set_name('INV','INV_INVALID_DEMAND_SOURCE');

Line 3605: inv_reservation_global.g_source_type_internal_ord,

3601: (inv_reservation_global.g_source_type_inv,inv_reservation_global.g_source_type_po,
3602: inv_reservation_global.g_source_type_oe, inv_reservation_global.g_source_type_account,
3603: inv_reservation_global.g_source_type_account_alias,
3604: inv_reservation_global.g_source_type_cycle_count, inv_reservation_global.g_source_type_physical_inv,
3605: inv_reservation_global.g_source_type_internal_ord,
3606: inv_reservation_global.g_source_type_rma, inv_reservation_global.g_source_type_wip)
3607: AND NOT(p_demand_source_type_id >= 100)) THEN --Bug# 10194255
3608: fnd_message.set_name('INV','INV_INVALID_DEMAND_SOURCE');
3609: fnd_msg_pub.add;

Line 3606: inv_reservation_global.g_source_type_rma, inv_reservation_global.g_source_type_wip)

3602: inv_reservation_global.g_source_type_oe, inv_reservation_global.g_source_type_account,
3603: inv_reservation_global.g_source_type_account_alias,
3604: inv_reservation_global.g_source_type_cycle_count, inv_reservation_global.g_source_type_physical_inv,
3605: inv_reservation_global.g_source_type_internal_ord,
3606: inv_reservation_global.g_source_type_rma, inv_reservation_global.g_source_type_wip)
3607: AND NOT(p_demand_source_type_id >= 100)) THEN --Bug# 10194255
3608: fnd_message.set_name('INV','INV_INVALID_DEMAND_SOURCE');
3609: fnd_msg_pub.add;
3610: RAISE fnd_api.g_exc_error;

Line 3616: IF p_demand_source_type_id = inv_reservation_global.g_source_type_inv

3612: /*** End R12 }} ***/
3613:
3614: -- if the demand source type is inventory, or type id > 100
3615: -- the source name should not be null
3616: IF p_demand_source_type_id = inv_reservation_global.g_source_type_inv
3617: OR p_demand_source_type_id >= 100 THEN --Bug# 10194255
3618: if p_demand_source_name IS NULL THEN
3619: fnd_message.set_name('INV','INV_INVALID_DEMAND_SOURCE');
3620: fnd_msg_pub.add;

Line 3656: IF p_demand_source_type_id = inv_reservation_global.g_source_type_account

3652: --
3653: -- not in cache goes here
3654: -- if the source type is account, demand header id should not
3655: -- be null, and it should be a valid GL account number
3656: IF p_demand_source_type_id = inv_reservation_global.g_source_type_account
3657: THEN
3658: IF p_demand_source_header_id IS NOT NULL THEN
3659: BEGIN
3660: -- find the flex field structure number

Line 3699: = inv_reservation_global.g_source_type_account_alias

3695: END IF;
3696: END IF;
3697: --
3698: IF p_demand_source_type_id
3699: = inv_reservation_global.g_source_type_account_alias
3700: THEN
3701: IF p_demand_source_header_id IS NOT NULL THEN
3702: IF NOT fnd_flex_keyval.validate_ccid
3703: (

Line 3718: IF (p_demand_source_type_id = inv_reservation_global.g_source_type_wip) THEN

3714: END IF;
3715: END IF;
3716:
3717: /*** {{ R12 Enhanced reservations code changes ***/
3718: IF (p_demand_source_type_id = inv_reservation_global.g_source_type_wip) THEN
3719: -- get wip entity id from wip_record_cache
3720: inv_reservation_util_pvt.get_wip_cache
3721: (
3722: x_return_status => l_return_status

Line 3731: l_wip_entity_type := inv_reservation_global.g_wip_record_cache(p_demand_source_header_id).wip_entity_type;

3727: RAISE fnd_api.g_exc_error;
3728: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
3729: RAISE fnd_api.g_exc_unexpected_error;
3730: ELSE
3731: l_wip_entity_type := inv_reservation_global.g_wip_record_cache(p_demand_source_header_id).wip_entity_type;
3732: l_wip_job_type := inv_reservation_global.g_wip_record_cache(p_demand_source_header_id).wip_entity_job;
3733: END IF;
3734:
3735: IF (l_wip_entity_type = inv_reservation_global.g_wip_source_type_cmro) THEN

Line 3732: l_wip_job_type := inv_reservation_global.g_wip_record_cache(p_demand_source_header_id).wip_entity_job;

3728: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
3729: RAISE fnd_api.g_exc_unexpected_error;
3730: ELSE
3731: l_wip_entity_type := inv_reservation_global.g_wip_record_cache(p_demand_source_header_id).wip_entity_type;
3732: l_wip_job_type := inv_reservation_global.g_wip_record_cache(p_demand_source_header_id).wip_entity_job;
3733: END IF;
3734:
3735: IF (l_wip_entity_type = inv_reservation_global.g_wip_source_type_cmro) THEN
3736: validate_demand_source_cmro(

Line 3735: IF (l_wip_entity_type = inv_reservation_global.g_wip_source_type_cmro) THEN

3731: l_wip_entity_type := inv_reservation_global.g_wip_record_cache(p_demand_source_header_id).wip_entity_type;
3732: l_wip_job_type := inv_reservation_global.g_wip_record_cache(p_demand_source_header_id).wip_entity_job;
3733: END IF;
3734:
3735: IF (l_wip_entity_type = inv_reservation_global.g_wip_source_type_cmro) THEN
3736: validate_demand_source_cmro(
3737: x_return_status => l_return_status
3738: , p_organization_id => p_organization_id
3739: , p_inventory_item_id => p_inventory_item_id

Line 3754: ELSIF (l_wip_entity_type = inv_reservation_global.g_wip_source_type_fpo) THEN

3750: RAISE fnd_api.g_exc_error;
3751: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
3752: RAISE fnd_api.g_exc_unexpected_error;
3753: END IF;
3754: ELSIF (l_wip_entity_type = inv_reservation_global.g_wip_source_type_fpo) THEN
3755: validate_demand_source_fpo(
3756: x_return_status => l_return_status
3757: , p_organization_id => p_organization_id
3758: , p_inventory_item_id => p_inventory_item_id

Line 3773: ELSIF (l_wip_entity_type = inv_reservation_global.g_wip_source_type_batch) THEN

3769: RAISE fnd_api.g_exc_error;
3770: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
3771: RAISE fnd_api.g_exc_unexpected_error;
3772: END IF;
3773: ELSIF (l_wip_entity_type = inv_reservation_global.g_wip_source_type_batch) THEN
3774: validate_demand_source_batch(
3775: x_return_status => l_return_status
3776: , p_organization_id => p_organization_id
3777: , p_inventory_item_id => p_inventory_item_id

Line 3796: inv_reservation_global.g_source_type_oe

3792: END IF;
3793: END IF;
3794:
3795: IF (p_demand_source_type_id IN (
3796: inv_reservation_global.g_source_type_oe
3797: , inv_reservation_global.g_source_type_internal_ord
3798: , inv_reservation_global.g_source_type_rma)
3799: ) THEN
3800: --Bug #5202033

Line 3797: , inv_reservation_global.g_source_type_internal_ord

3793: END IF;
3794:
3795: IF (p_demand_source_type_id IN (
3796: inv_reservation_global.g_source_type_oe
3797: , inv_reservation_global.g_source_type_internal_ord
3798: , inv_reservation_global.g_source_type_rma)
3799: ) THEN
3800: --Bug #5202033
3801: --If action is UPDATE/TRANSFER and the demand source info has not changed,

Line 3798: , inv_reservation_global.g_source_type_rma)

3794:
3795: IF (p_demand_source_type_id IN (
3796: inv_reservation_global.g_source_type_oe
3797: , inv_reservation_global.g_source_type_internal_ord
3798: , inv_reservation_global.g_source_type_rma)
3799: ) THEN
3800: --Bug #5202033
3801: --If action is UPDATE/TRANSFER and the demand source info has not changed,
3802: --do not call validate_sales_order

Line 3849: -- = inv_reservation_global.g_source_type_wip THEN

3845: --
3846: -- comment out lines below until R11.8 when more demand sources
3847: -- will be considered
3848: -- IF p_demand_source_type_id
3849: -- = inv_reservation_global.g_source_type_wip THEN
3850: -- call wip_validation api()
3851: -- IF p_demand_source_type_id
3852: -- = inv_reservation_global.g_source_type_oe THEN
3853: -- call oe_validation api()

Line 3852: -- = inv_reservation_global.g_source_type_oe THEN

3848: -- IF p_demand_source_type_id
3849: -- = inv_reservation_global.g_source_type_wip THEN
3850: -- call wip_validation api()
3851: -- IF p_demand_source_type_id
3852: -- = inv_reservation_global.g_source_type_oe THEN
3853: -- call oe_validation api()
3854: --
3855: l_rec.demand_source_type_id := p_demand_source_type_id;
3856: l_rec.demand_source_header_id := p_demand_source_header_id;

Line 3913: , p_rsv_rec IN inv_reservation_global.mtl_reservation_rec_type

3909: (
3910: x_return_status OUT NOCOPY VARCHAR2
3911: , x_msg_count OUT NOCOPY NUMBER
3912: , x_msg_data OUT NOCOPY VARCHAR2
3913: , p_rsv_rec IN inv_reservation_global.mtl_reservation_rec_type
3914: ) IS
3915: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;
3916: l_msg_count NUMBER;
3917: l_msg_data VARCHAR2(1000);

Line 3991: , p_orig_rsv_rec IN inv_reservation_global.mtl_reservation_rec_type

3987: (
3988: x_return_status OUT NOCOPY VARCHAR2
3989: , x_msg_count OUT NOCOPY NUMBER
3990: , x_msg_data OUT NOCOPY VARCHAR2
3991: , p_orig_rsv_rec IN inv_reservation_global.mtl_reservation_rec_type
3992: , p_to_rsv_rec IN inv_reservation_global.mtl_reservation_rec_type
3993: ) IS
3994: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;
3995: l_msg_count NUMBER;

Line 3992: , p_to_rsv_rec IN inv_reservation_global.mtl_reservation_rec_type

3988: x_return_status OUT NOCOPY VARCHAR2
3989: , x_msg_count OUT NOCOPY NUMBER
3990: , x_msg_data OUT NOCOPY VARCHAR2
3991: , p_orig_rsv_rec IN inv_reservation_global.mtl_reservation_rec_type
3992: , p_to_rsv_rec IN inv_reservation_global.mtl_reservation_rec_type
3993: ) IS
3994: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;
3995: l_msg_count NUMBER;
3996: l_msg_data VARCHAR2(1000);

Line 4070: , p_orig_rsv_rec IN inv_reservation_global.mtl_reservation_rec_type

4066: (
4067: x_return_status OUT NOCOPY VARCHAR2
4068: , x_msg_count OUT NOCOPY NUMBER
4069: , x_msg_data OUT NOCOPY VARCHAR2
4070: , p_orig_rsv_rec IN inv_reservation_global.mtl_reservation_rec_type
4071: , p_to_rsv_rec IN inv_reservation_global.mtl_reservation_rec_type
4072: ) IS
4073: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;
4074: l_msg_count NUMBER;

Line 4071: , p_to_rsv_rec IN inv_reservation_global.mtl_reservation_rec_type

4067: x_return_status OUT NOCOPY VARCHAR2
4068: , x_msg_count OUT NOCOPY NUMBER
4069: , x_msg_data OUT NOCOPY VARCHAR2
4070: , p_orig_rsv_rec IN inv_reservation_global.mtl_reservation_rec_type
4071: , p_to_rsv_rec IN inv_reservation_global.mtl_reservation_rec_type
4072: ) IS
4073: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;
4074: l_msg_count NUMBER;
4075: l_msg_data VARCHAR2(1000);

Line 4148: , p_rsv_rec IN inv_reservation_global.mtl_reservation_rec_type

4144: (
4145: x_return_status OUT NOCOPY VARCHAR2
4146: , x_msg_count OUT NOCOPY NUMBER
4147: , x_msg_data OUT NOCOPY VARCHAR2
4148: , p_rsv_rec IN inv_reservation_global.mtl_reservation_rec_type
4149: ) IS
4150: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;
4151: l_msg_count NUMBER;
4152: l_msg_data VARCHAR2(1000);

Line 4224: , p_rsv_rec IN inv_reservation_global.mtl_reservation_rec_type

4220: (
4221: x_return_status OUT NOCOPY VARCHAR2
4222: , x_msg_count OUT NOCOPY NUMBER
4223: , x_msg_data OUT NOCOPY VARCHAR2
4224: , p_rsv_rec IN inv_reservation_global.mtl_reservation_rec_type
4225: ) IS
4226: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;
4227: l_msg_count NUMBER;
4228: l_msg_data VARCHAR2(1000);

Line 4316: p_mtl_maintain_rsv_rec inv_reservation_global.mtl_maintain_rsv_rec_type;

4312: l_task_id NUMBER;
4313: l_wip_entity_type NUMBER;
4314: l_wip_job_type VARCHAR2(15);
4315: l_debug NUMBER;
4316: p_mtl_maintain_rsv_rec inv_reservation_global.mtl_maintain_rsv_rec_type;
4317: l_delete_flag VARCHAR2(1) := 'N';
4318: l_sort_by_criteria Number;
4319: l_qty_modified NUMBER := 0;
4320: BEGIN

Line 4339: IF (p_supply_source_type_id = inv_reservation_global.g_source_type_intransit) THEN

4335: FROM mtl_parameters
4336: WHERE organization_id = p_organization_id;
4337:
4338: IF (l_pjm_enabled = 1 and l_wms_enabled = 'Y') THEN
4339: IF (p_supply_source_type_id = inv_reservation_global.g_source_type_intransit) THEN
4340: IF (l_debug = 1) THEN
4341: debug_print('Reservation of intransit shipment supply cannot be created in PJM and WMS organization');
4342: END IF;
4343:

Line 4348: ELSIF (p_supply_source_type_id = inv_reservation_global.g_source_type_po OR

4344: fnd_message.set_name('INV', 'INV_RSV_PJM_WMS_INTRAN');
4345: fnd_msg_pub.ADD;
4346:
4347: RAISE fnd_api.g_exc_error;
4348: ELSIF (p_supply_source_type_id = inv_reservation_global.g_source_type_po OR
4349: p_supply_source_type_id = inv_reservation_global.g_source_type_asn) THEN
4350:
4351: SELECT count(min(po_distribution_id))
4352: INTO l_project_count

Line 4349: p_supply_source_type_id = inv_reservation_global.g_source_type_asn) THEN

4345: fnd_msg_pub.ADD;
4346:
4347: RAISE fnd_api.g_exc_error;
4348: ELSIF (p_supply_source_type_id = inv_reservation_global.g_source_type_po OR
4349: p_supply_source_type_id = inv_reservation_global.g_source_type_asn) THEN
4350:
4351: SELECT count(min(po_distribution_id))
4352: INTO l_project_count
4353: FROM po_distributions_all

Line 4367: l_sort_by_criteria := inv_reservation_global.g_query_demand_ship_date_desc;

4363: -- Call the reduce reservations API by setting the
4364: -- delete_flag to yes. delete all reservations for that
4365: -- supply line.
4366: l_delete_flag := 'Y';
4367: l_sort_by_criteria := inv_reservation_global.g_query_demand_ship_date_desc;
4368: p_mtl_maintain_rsv_rec.organization_id := p_organization_id;
4369: p_mtl_maintain_rsv_rec.inventory_item_id := p_inventory_item_id;
4370: p_mtl_maintain_rsv_rec.supply_source_type_id := p_supply_source_type_id;
4371: p_mtl_maintain_rsv_rec.supply_source_header_id := p_supply_source_header_id;

Line 4427: l_sort_by_criteria := inv_reservation_global.g_query_demand_ship_date_desc;

4423: -- Call the reduce reservations API by setting the
4424: -- delete_flag to yes. delete all reservations for that
4425: -- supply line.
4426: l_delete_flag := 'Y';
4427: l_sort_by_criteria := inv_reservation_global.g_query_demand_ship_date_desc;
4428: p_mtl_maintain_rsv_rec.organization_id := p_organization_id;
4429: p_mtl_maintain_rsv_rec.inventory_item_id := p_inventory_item_id;
4430: p_mtl_maintain_rsv_rec.supply_source_type_id := p_supply_source_type_id;
4431: p_mtl_maintain_rsv_rec.supply_source_header_id := p_supply_source_header_id;

Line 4467: ELSIF (p_supply_source_type_id = inv_reservation_global.g_source_type_internal_req OR

4463:
4464: END IF;
4465: END IF;
4466: END IF;
4467: ELSIF (p_supply_source_type_id = inv_reservation_global.g_source_type_internal_req OR
4468: p_supply_source_type_id = inv_reservation_global.g_source_type_req) THEN
4469:
4470: SELECT count(1)
4471: INTO l_project_count

Line 4468: p_supply_source_type_id = inv_reservation_global.g_source_type_req) THEN

4464: END IF;
4465: END IF;
4466: END IF;
4467: ELSIF (p_supply_source_type_id = inv_reservation_global.g_source_type_internal_req OR
4468: p_supply_source_type_id = inv_reservation_global.g_source_type_req) THEN
4469:
4470: SELECT count(1)
4471: INTO l_project_count
4472: FROM po_requisition_lines_all prl, po_req_distributions_all prd

Line 4506: ELSIF (p_supply_source_type_id = inv_reservation_global.g_source_type_wip) THEN

4502: fnd_msg_pub.ADD;
4503: RAISE fnd_api.g_exc_error;
4504: END IF;
4505: END IF;
4506: ELSIF (p_supply_source_type_id = inv_reservation_global.g_source_type_wip) THEN
4507:
4508: -- get wip entity id from wip_record_cache
4509: inv_reservation_util_pvt.get_wip_cache
4510: (

Line 4520: l_wip_entity_type := inv_reservation_global.g_wip_record_cache(p_supply_source_header_id).wip_entity_type;

4516: RAISE fnd_api.g_exc_error;
4517: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
4518: RAISE fnd_api.g_exc_unexpected_error;
4519: ELSE
4520: l_wip_entity_type := inv_reservation_global.g_wip_record_cache(p_supply_source_header_id).wip_entity_type;
4521: l_wip_job_type := inv_reservation_global.g_wip_record_cache(p_supply_source_header_id).wip_entity_job;
4522: END IF;
4523:
4524: -- Commenting out the code as we dont validate for these supply

Line 4521: l_wip_job_type := inv_reservation_global.g_wip_record_cache(p_supply_source_header_id).wip_entity_job;

4517: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
4518: RAISE fnd_api.g_exc_unexpected_error;
4519: ELSE
4520: l_wip_entity_type := inv_reservation_global.g_wip_record_cache(p_supply_source_header_id).wip_entity_type;
4521: l_wip_job_type := inv_reservation_global.g_wip_record_cache(p_supply_source_header_id).wip_entity_job;
4522: END IF;
4523:
4524: -- Commenting out the code as we dont validate for these supply
4525: --types

Line 4527: IF (l_wip_entity_type IN (inv_reservation_global.g_wip_source_type_discrete,

4523:
4524: -- Commenting out the code as we dont validate for these supply
4525: --types
4526: /************************************
4527: IF (l_wip_entity_type IN (inv_reservation_global.g_wip_source_type_discrete,
4528: inv_reservation_global.g_wip_source_type_osfm,
4529: inv_reservation_global.g_wip_source_type_fpo,
4530: inv_reservation_global.g_wip_source_type_batch)) THEN
4531:

Line 4528: inv_reservation_global.g_wip_source_type_osfm,

4524: -- Commenting out the code as we dont validate for these supply
4525: --types
4526: /************************************
4527: IF (l_wip_entity_type IN (inv_reservation_global.g_wip_source_type_discrete,
4528: inv_reservation_global.g_wip_source_type_osfm,
4529: inv_reservation_global.g_wip_source_type_fpo,
4530: inv_reservation_global.g_wip_source_type_batch)) THEN
4531:
4532: SELECT count(1)

Line 4529: inv_reservation_global.g_wip_source_type_fpo,

4525: --types
4526: /************************************
4527: IF (l_wip_entity_type IN (inv_reservation_global.g_wip_source_type_discrete,
4528: inv_reservation_global.g_wip_source_type_osfm,
4529: inv_reservation_global.g_wip_source_type_fpo,
4530: inv_reservation_global.g_wip_source_type_batch)) THEN
4531:
4532: SELECT count(1)
4533: INTO l_project_count

Line 4530: inv_reservation_global.g_wip_source_type_batch)) THEN

4526: /************************************
4527: IF (l_wip_entity_type IN (inv_reservation_global.g_wip_source_type_discrete,
4528: inv_reservation_global.g_wip_source_type_osfm,
4529: inv_reservation_global.g_wip_source_type_fpo,
4530: inv_reservation_global.g_wip_source_type_batch)) THEN
4531:
4532: SELECT count(1)
4533: INTO l_project_count
4534: FROM wip_discrete_jobs

Line 4609: , p_orig_rsv_rec IN inv_reservation_global.mtl_reservation_rec_type

4605:
4606: PROCEDURE validate_serials
4607: (
4608: x_return_status OUT NOCOPY VARCHAR2
4609: , p_orig_rsv_rec IN inv_reservation_global.mtl_reservation_rec_type
4610: , p_to_rsv_rec IN inv_reservation_global.mtl_reservation_rec_type
4611: , p_orig_serial_array IN inv_reservation_global.serial_number_tbl_type
4612: , p_to_serial_array IN inv_reservation_global.serial_number_tbl_type
4613: , p_rsv_action_name IN VARCHAR2

Line 4610: , p_to_rsv_rec IN inv_reservation_global.mtl_reservation_rec_type

4606: PROCEDURE validate_serials
4607: (
4608: x_return_status OUT NOCOPY VARCHAR2
4609: , p_orig_rsv_rec IN inv_reservation_global.mtl_reservation_rec_type
4610: , p_to_rsv_rec IN inv_reservation_global.mtl_reservation_rec_type
4611: , p_orig_serial_array IN inv_reservation_global.serial_number_tbl_type
4612: , p_to_serial_array IN inv_reservation_global.serial_number_tbl_type
4613: , p_rsv_action_name IN VARCHAR2
4614: ) IS

Line 4611: , p_orig_serial_array IN inv_reservation_global.serial_number_tbl_type

4607: (
4608: x_return_status OUT NOCOPY VARCHAR2
4609: , p_orig_rsv_rec IN inv_reservation_global.mtl_reservation_rec_type
4610: , p_to_rsv_rec IN inv_reservation_global.mtl_reservation_rec_type
4611: , p_orig_serial_array IN inv_reservation_global.serial_number_tbl_type
4612: , p_to_serial_array IN inv_reservation_global.serial_number_tbl_type
4613: , p_rsv_action_name IN VARCHAR2
4614: ) IS
4615: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;

Line 4612: , p_to_serial_array IN inv_reservation_global.serial_number_tbl_type

4608: x_return_status OUT NOCOPY VARCHAR2
4609: , p_orig_rsv_rec IN inv_reservation_global.mtl_reservation_rec_type
4610: , p_to_rsv_rec IN inv_reservation_global.mtl_reservation_rec_type
4611: , p_orig_serial_array IN inv_reservation_global.serial_number_tbl_type
4612: , p_to_serial_array IN inv_reservation_global.serial_number_tbl_type
4613: , p_rsv_action_name IN VARCHAR2
4614: ) IS
4615: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;
4616: l_msg_count NUMBER;

Line 4634: l_orig_rsv_rec inv_reservation_global.mtl_reservation_rec_type;

4630: l_sub_cache_index NUMBER;
4631: l_item_cache_index NUMBER;
4632: l_org_cache_index NUMBER;
4633: l_result_locator_control NUMBER;
4634: l_orig_rsv_rec inv_reservation_global.mtl_reservation_rec_type;
4635: l_to_rsv_rec inv_reservation_global.mtl_reservation_rec_type;
4636: l_sub_rec inv_reservation_global.sub_record;
4637: l_org_rec inv_reservation_global.organization_record;
4638: l_item_rec inv_reservation_global.item_record;

Line 4635: l_to_rsv_rec inv_reservation_global.mtl_reservation_rec_type;

4631: l_item_cache_index NUMBER;
4632: l_org_cache_index NUMBER;
4633: l_result_locator_control NUMBER;
4634: l_orig_rsv_rec inv_reservation_global.mtl_reservation_rec_type;
4635: l_to_rsv_rec inv_reservation_global.mtl_reservation_rec_type;
4636: l_sub_rec inv_reservation_global.sub_record;
4637: l_org_rec inv_reservation_global.organization_record;
4638: l_item_rec inv_reservation_global.item_record;
4639:

Line 4636: l_sub_rec inv_reservation_global.sub_record;

4632: l_org_cache_index NUMBER;
4633: l_result_locator_control NUMBER;
4634: l_orig_rsv_rec inv_reservation_global.mtl_reservation_rec_type;
4635: l_to_rsv_rec inv_reservation_global.mtl_reservation_rec_type;
4636: l_sub_rec inv_reservation_global.sub_record;
4637: l_org_rec inv_reservation_global.organization_record;
4638: l_item_rec inv_reservation_global.item_record;
4639:
4640: CURSOR c_item(p_inventory_item_id NUMBER) IS

Line 4637: l_org_rec inv_reservation_global.organization_record;

4633: l_result_locator_control NUMBER;
4634: l_orig_rsv_rec inv_reservation_global.mtl_reservation_rec_type;
4635: l_to_rsv_rec inv_reservation_global.mtl_reservation_rec_type;
4636: l_sub_rec inv_reservation_global.sub_record;
4637: l_org_rec inv_reservation_global.organization_record;
4638: l_item_rec inv_reservation_global.item_record;
4639:
4640: CURSOR c_item(p_inventory_item_id NUMBER) IS
4641: SELECT *

Line 4638: l_item_rec inv_reservation_global.item_record;

4634: l_orig_rsv_rec inv_reservation_global.mtl_reservation_rec_type;
4635: l_to_rsv_rec inv_reservation_global.mtl_reservation_rec_type;
4636: l_sub_rec inv_reservation_global.sub_record;
4637: l_org_rec inv_reservation_global.organization_record;
4638: l_item_rec inv_reservation_global.item_record;
4639:
4640: CURSOR c_item(p_inventory_item_id NUMBER) IS
4641: SELECT *
4642: FROM mtl_system_items

Line 4722: IF (p_orig_rsv_rec.supply_source_type_id <> inv_reservation_global.g_source_type_inv) THEN

4718:
4719: END IF;
4720:
4721: -- validate the supply source for serial reservation of original reservation record
4722: IF (p_orig_rsv_rec.supply_source_type_id <> inv_reservation_global.g_source_type_inv) THEN
4723: IF (l_debug = 1) THEN
4724: debug_print('Serial reservation can be created with Inventory supply only');
4725: END IF;
4726:

Line 4736: IF (p_orig_rsv_rec.demand_source_type_id = inv_reservation_global.g_source_type_wip) THEN

4732: IF (l_debug = 1) THEN
4733: debug_print('Before calling WIP cache');
4734: END IF;
4735: -- validate the demand source for serial reservation of original reservation record
4736: IF (p_orig_rsv_rec.demand_source_type_id = inv_reservation_global.g_source_type_wip) THEN
4737: -- get wip entity id from wip_record_cache
4738: inv_reservation_util_pvt.get_wip_cache
4739: (
4740: x_return_status => l_return_status

Line 4749: l_wip_entity_type := inv_reservation_global.g_wip_record_cache(p_orig_rsv_rec.demand_source_header_id).wip_entity_type;

4745: RAISE fnd_api.g_exc_error;
4746: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
4747: RAISE fnd_api.g_exc_unexpected_error;
4748: ELSE
4749: l_wip_entity_type := inv_reservation_global.g_wip_record_cache(p_orig_rsv_rec.demand_source_header_id).wip_entity_type;
4750: l_wip_job_type := inv_reservation_global.g_wip_record_cache(p_orig_rsv_rec.demand_source_header_id).wip_entity_job;
4751: END IF;
4752: END IF;
4753:

Line 4750: l_wip_job_type := inv_reservation_global.g_wip_record_cache(p_orig_rsv_rec.demand_source_header_id).wip_entity_job;

4746: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
4747: RAISE fnd_api.g_exc_unexpected_error;
4748: ELSE
4749: l_wip_entity_type := inv_reservation_global.g_wip_record_cache(p_orig_rsv_rec.demand_source_header_id).wip_entity_type;
4750: l_wip_job_type := inv_reservation_global.g_wip_record_cache(p_orig_rsv_rec.demand_source_header_id).wip_entity_job;
4751: END IF;
4752: END IF;
4753:
4754: IF (l_debug = 1) THEN

Line 4758: IF ((p_orig_rsv_rec.demand_source_type_id NOT IN (inv_reservation_global.g_source_type_oe,

4754: IF (l_debug = 1) THEN
4755: debug_print('After calling WIP cache');
4756: END IF;
4757:
4758: IF ((p_orig_rsv_rec.demand_source_type_id NOT IN (inv_reservation_global.g_source_type_oe,
4759: inv_reservation_global.g_source_type_internal_ord,inv_reservation_global.g_source_type_rma,
4760: inv_reservation_global.g_source_type_inv)) AND
4761: (p_orig_rsv_rec.demand_source_type_id <> inv_reservation_global.g_source_type_wip AND
4762: l_wip_entity_type <> inv_reservation_global.g_wip_source_type_cmro)) THEN

Line 4759: inv_reservation_global.g_source_type_internal_ord,inv_reservation_global.g_source_type_rma,

4755: debug_print('After calling WIP cache');
4756: END IF;
4757:
4758: IF ((p_orig_rsv_rec.demand_source_type_id NOT IN (inv_reservation_global.g_source_type_oe,
4759: inv_reservation_global.g_source_type_internal_ord,inv_reservation_global.g_source_type_rma,
4760: inv_reservation_global.g_source_type_inv)) AND
4761: (p_orig_rsv_rec.demand_source_type_id <> inv_reservation_global.g_source_type_wip AND
4762: l_wip_entity_type <> inv_reservation_global.g_wip_source_type_cmro)) THEN
4763:

Line 4760: inv_reservation_global.g_source_type_inv)) AND

4756: END IF;
4757:
4758: IF ((p_orig_rsv_rec.demand_source_type_id NOT IN (inv_reservation_global.g_source_type_oe,
4759: inv_reservation_global.g_source_type_internal_ord,inv_reservation_global.g_source_type_rma,
4760: inv_reservation_global.g_source_type_inv)) AND
4761: (p_orig_rsv_rec.demand_source_type_id <> inv_reservation_global.g_source_type_wip AND
4762: l_wip_entity_type <> inv_reservation_global.g_wip_source_type_cmro)) THEN
4763:
4764: IF (l_debug = 1) THEN

Line 4761: (p_orig_rsv_rec.demand_source_type_id <> inv_reservation_global.g_source_type_wip AND

4757:
4758: IF ((p_orig_rsv_rec.demand_source_type_id NOT IN (inv_reservation_global.g_source_type_oe,
4759: inv_reservation_global.g_source_type_internal_ord,inv_reservation_global.g_source_type_rma,
4760: inv_reservation_global.g_source_type_inv)) AND
4761: (p_orig_rsv_rec.demand_source_type_id <> inv_reservation_global.g_source_type_wip AND
4762: l_wip_entity_type <> inv_reservation_global.g_wip_source_type_cmro)) THEN
4763:
4764: IF (l_debug = 1) THEN
4765: debug_print('Serial reservation can be created with Inventory, sales order or CMRO demand only');

Line 4762: l_wip_entity_type <> inv_reservation_global.g_wip_source_type_cmro)) THEN

4758: IF ((p_orig_rsv_rec.demand_source_type_id NOT IN (inv_reservation_global.g_source_type_oe,
4759: inv_reservation_global.g_source_type_internal_ord,inv_reservation_global.g_source_type_rma,
4760: inv_reservation_global.g_source_type_inv)) AND
4761: (p_orig_rsv_rec.demand_source_type_id <> inv_reservation_global.g_source_type_wip AND
4762: l_wip_entity_type <> inv_reservation_global.g_wip_source_type_cmro)) THEN
4763:
4764: IF (l_debug = 1) THEN
4765: debug_print('Serial reservation can be created with Inventory, sales order or CMRO demand only');
4766: END IF;

Line 4827: IF (inv_reservation_global.g_item_record_cache(l_orig_rsv_rec.inventory_item_id).revision_qty_control_code =

4823: end if;
4824: End If;
4825:
4826: -- if revision controlled and revision in reservation record is null, return errors
4827: IF (inv_reservation_global.g_item_record_cache(l_orig_rsv_rec.inventory_item_id).revision_qty_control_code =
4828: inv_reservation_global.g_revision_control_yes AND l_orig_rsv_rec.revision is null) THEN
4829: IF (l_debug = 1) THEN
4830: debug_print('Serial reservation needs to be detailed, revision is null');
4831: END IF;

Line 4828: inv_reservation_global.g_revision_control_yes AND l_orig_rsv_rec.revision is null) THEN

4824: End If;
4825:
4826: -- if revision controlled and revision in reservation record is null, return errors
4827: IF (inv_reservation_global.g_item_record_cache(l_orig_rsv_rec.inventory_item_id).revision_qty_control_code =
4828: inv_reservation_global.g_revision_control_yes AND l_orig_rsv_rec.revision is null) THEN
4829: IF (l_debug = 1) THEN
4830: debug_print('Serial reservation needs to be detailed, revision is null');
4831: END IF;
4832:

Line 4842: IF (inv_reservation_global.g_item_record_cache(l_orig_rsv_rec.inventory_item_id).lot_control_code =

4838: debug_print('After revision check');
4839: END IF;
4840:
4841: -- if lot controlled and lot number is null, return errors
4842: IF (inv_reservation_global.g_item_record_cache(l_orig_rsv_rec.inventory_item_id).lot_control_code =
4843: inv_reservation_global.g_lot_control_yes AND l_orig_rsv_rec.lot_number is null) THEN
4844: IF (l_debug = 1) THEN
4845: debug_print('Serial reservation needs to be detailed, lot number is null');
4846: END IF;

Line 4843: inv_reservation_global.g_lot_control_yes AND l_orig_rsv_rec.lot_number is null) THEN

4839: END IF;
4840:
4841: -- if lot controlled and lot number is null, return errors
4842: IF (inv_reservation_global.g_item_record_cache(l_orig_rsv_rec.inventory_item_id).lot_control_code =
4843: inv_reservation_global.g_lot_control_yes AND l_orig_rsv_rec.lot_number is null) THEN
4844: IF (l_debug = 1) THEN
4845: debug_print('Serial reservation needs to be detailed, lot number is null');
4846: END IF;
4847:

Line 4925: debug_print('org control' || inv_reservation_global.g_organization_record_cache

4921: debug_print('sub ' || l_orig_rsv_rec.subinventory_code);
4922: debug_print('item id' ||
4923: l_orig_rsv_rec.inventory_item_id);
4924:
4925: debug_print('org control' || inv_reservation_global.g_organization_record_cache
4926: (l_orig_rsv_rec.organization_id).stock_locator_control_code);
4927: debug_print('sub control' || inv_reservation_global.g_sub_record_cache
4928: (l_sub_cache_index).locator_type);
4929: debug_print('item control' || inv_reservation_global.g_item_record_cache

Line 4927: debug_print('sub control' || inv_reservation_global.g_sub_record_cache

4923: l_orig_rsv_rec.inventory_item_id);
4924:
4925: debug_print('org control' || inv_reservation_global.g_organization_record_cache
4926: (l_orig_rsv_rec.organization_id).stock_locator_control_code);
4927: debug_print('sub control' || inv_reservation_global.g_sub_record_cache
4928: (l_sub_cache_index).locator_type);
4929: debug_print('item control' || inv_reservation_global.g_item_record_cache
4930: (l_orig_rsv_rec.inventory_item_id).location_control_code);
4931: END IF;

Line 4929: debug_print('item control' || inv_reservation_global.g_item_record_cache

4925: debug_print('org control' || inv_reservation_global.g_organization_record_cache
4926: (l_orig_rsv_rec.organization_id).stock_locator_control_code);
4927: debug_print('sub control' || inv_reservation_global.g_sub_record_cache
4928: (l_sub_cache_index).locator_type);
4929: debug_print('item control' || inv_reservation_global.g_item_record_cache
4930: (l_orig_rsv_rec.inventory_item_id).location_control_code);
4931: END IF;
4932:
4933: l_result_locator_control := inv_reservation_util_pvt.locator_control

Line 4934: ( p_org_control => inv_reservation_global.g_organization_record_cache

4930: (l_orig_rsv_rec.inventory_item_id).location_control_code);
4931: END IF;
4932:
4933: l_result_locator_control := inv_reservation_util_pvt.locator_control
4934: ( p_org_control => inv_reservation_global.g_organization_record_cache
4935: (l_orig_rsv_rec.organization_id).stock_locator_control_code
4936: , p_sub_control => inv_reservation_global.g_sub_record_cache
4937: (l_sub_cache_index).locator_type
4938: , p_item_control => inv_reservation_global.g_item_record_cache

Line 4936: , p_sub_control => inv_reservation_global.g_sub_record_cache

4932:
4933: l_result_locator_control := inv_reservation_util_pvt.locator_control
4934: ( p_org_control => inv_reservation_global.g_organization_record_cache
4935: (l_orig_rsv_rec.organization_id).stock_locator_control_code
4936: , p_sub_control => inv_reservation_global.g_sub_record_cache
4937: (l_sub_cache_index).locator_type
4938: , p_item_control => inv_reservation_global.g_item_record_cache
4939: (l_orig_rsv_rec.inventory_item_id).location_control_code
4940: );

Line 4938: , p_item_control => inv_reservation_global.g_item_record_cache

4934: ( p_org_control => inv_reservation_global.g_organization_record_cache
4935: (l_orig_rsv_rec.organization_id).stock_locator_control_code
4936: , p_sub_control => inv_reservation_global.g_sub_record_cache
4937: (l_sub_cache_index).locator_type
4938: , p_item_control => inv_reservation_global.g_item_record_cache
4939: (l_orig_rsv_rec.inventory_item_id).location_control_code
4940: );
4941:
4942: IF (l_debug = 1) THEN

Line 5029: inv_reservation_global.g_source_type_wip AND

5025: -- if ((cmro and relieve) and status not in (3,4))
5026: -- then error.
5027:
5028: IF ((NOT(p_orig_rsv_rec.demand_source_type_id =
5029: inv_reservation_global.g_source_type_wip AND
5030: l_wip_entity_type =
5031: inv_reservation_global.g_wip_source_type_cmro) AND
5032: ( p_rsv_action_name = 'RELIEVE')) AND
5033: (l_current_status <> 3)) OR

Line 5031: inv_reservation_global.g_wip_source_type_cmro) AND

5027:
5028: IF ((NOT(p_orig_rsv_rec.demand_source_type_id =
5029: inv_reservation_global.g_source_type_wip AND
5030: l_wip_entity_type =
5031: inv_reservation_global.g_wip_source_type_cmro) AND
5032: ( p_rsv_action_name = 'RELIEVE')) AND
5033: (l_current_status <> 3)) OR
5034: (((p_orig_rsv_rec.demand_source_type_id =
5035: inv_reservation_global.g_source_type_wip AND

Line 5035: inv_reservation_global.g_source_type_wip AND

5031: inv_reservation_global.g_wip_source_type_cmro) AND
5032: ( p_rsv_action_name = 'RELIEVE')) AND
5033: (l_current_status <> 3)) OR
5034: (((p_orig_rsv_rec.demand_source_type_id =
5035: inv_reservation_global.g_source_type_wip AND
5036: l_wip_entity_type =
5037: inv_reservation_global.g_wip_source_type_cmro) AND
5038: ( p_rsv_action_name = 'RELIEVE')) AND (l_current_status NOT IN (3,4)))
5039: THEN

Line 5037: inv_reservation_global.g_wip_source_type_cmro) AND

5033: (l_current_status <> 3)) OR
5034: (((p_orig_rsv_rec.demand_source_type_id =
5035: inv_reservation_global.g_source_type_wip AND
5036: l_wip_entity_type =
5037: inv_reservation_global.g_wip_source_type_cmro) AND
5038: ( p_rsv_action_name = 'RELIEVE')) AND (l_current_status NOT IN (3,4)))
5039: THEN
5040: IF (l_debug = 1) THEN
5041: debug_print('The serial number is not in inventory for serial reservation');

Line 5165: IF (p_to_rsv_rec.supply_source_type_id <> inv_reservation_global.g_source_type_inv) THEN

5161: debug_print('After org check: to record: ');
5162: END IF;
5163:
5164: -- validate the supply source for serial reservation of to reservation record
5165: IF (p_to_rsv_rec.supply_source_type_id <> inv_reservation_global.g_source_type_inv) THEN
5166: IF (l_debug = 1) THEN
5167: debug_print('Serial reservation can be created with Inventory supply only');
5168: END IF;
5169:

Line 5176: IF (p_to_rsv_rec.demand_source_type_id = inv_reservation_global.g_source_type_wip) THEN

5172: RAISE fnd_api.g_exc_error;
5173: END IF;
5174:
5175: -- validate the demand source for serial reservation of to reservation record
5176: IF (p_to_rsv_rec.demand_source_type_id = inv_reservation_global.g_source_type_wip) THEN
5177: -- get wip entity id from wip_record_cache
5178: inv_reservation_util_pvt.get_wip_cache
5179: (
5180: x_return_status => l_return_status

Line 5189: l_wip_entity_type := inv_reservation_global.g_wip_record_cache(p_to_rsv_rec.demand_source_header_id).wip_entity_type;

5185: RAISE fnd_api.g_exc_error;
5186: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
5187: RAISE fnd_api.g_exc_unexpected_error;
5188: ELSE
5189: l_wip_entity_type := inv_reservation_global.g_wip_record_cache(p_to_rsv_rec.demand_source_header_id).wip_entity_type;
5190: l_wip_job_type := inv_reservation_global.g_wip_record_cache(p_to_rsv_rec.demand_source_header_id).wip_entity_job;
5191: END IF;
5192: END IF;
5193:

Line 5190: l_wip_job_type := inv_reservation_global.g_wip_record_cache(p_to_rsv_rec.demand_source_header_id).wip_entity_job;

5186: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
5187: RAISE fnd_api.g_exc_unexpected_error;
5188: ELSE
5189: l_wip_entity_type := inv_reservation_global.g_wip_record_cache(p_to_rsv_rec.demand_source_header_id).wip_entity_type;
5190: l_wip_job_type := inv_reservation_global.g_wip_record_cache(p_to_rsv_rec.demand_source_header_id).wip_entity_job;
5191: END IF;
5192: END IF;
5193:
5194: IF (l_debug = 1) THEN

Line 5198: IF ((p_to_rsv_rec.demand_source_type_id NOT IN (inv_reservation_global.g_source_type_oe,

5194: IF (l_debug = 1) THEN
5195: debug_print('After wip check: to record: ');
5196: END IF;
5197:
5198: IF ((p_to_rsv_rec.demand_source_type_id NOT IN (inv_reservation_global.g_source_type_oe,
5199: inv_reservation_global.g_source_type_inv)) AND
5200: (p_to_rsv_rec. demand_source_type_id <> inv_reservation_global.g_source_type_wip AND
5201: l_wip_entity_type <> inv_reservation_global.g_wip_source_type_cmro)) THEN
5202:

Line 5199: inv_reservation_global.g_source_type_inv)) AND

5195: debug_print('After wip check: to record: ');
5196: END IF;
5197:
5198: IF ((p_to_rsv_rec.demand_source_type_id NOT IN (inv_reservation_global.g_source_type_oe,
5199: inv_reservation_global.g_source_type_inv)) AND
5200: (p_to_rsv_rec. demand_source_type_id <> inv_reservation_global.g_source_type_wip AND
5201: l_wip_entity_type <> inv_reservation_global.g_wip_source_type_cmro)) THEN
5202:
5203: IF (l_debug = 1) THEN

Line 5200: (p_to_rsv_rec. demand_source_type_id <> inv_reservation_global.g_source_type_wip AND

5196: END IF;
5197:
5198: IF ((p_to_rsv_rec.demand_source_type_id NOT IN (inv_reservation_global.g_source_type_oe,
5199: inv_reservation_global.g_source_type_inv)) AND
5200: (p_to_rsv_rec. demand_source_type_id <> inv_reservation_global.g_source_type_wip AND
5201: l_wip_entity_type <> inv_reservation_global.g_wip_source_type_cmro)) THEN
5202:
5203: IF (l_debug = 1) THEN
5204: debug_print('Serial reservation can be created with Inventory, sales order or CMRO demand only');

Line 5201: l_wip_entity_type <> inv_reservation_global.g_wip_source_type_cmro)) THEN

5197:
5198: IF ((p_to_rsv_rec.demand_source_type_id NOT IN (inv_reservation_global.g_source_type_oe,
5199: inv_reservation_global.g_source_type_inv)) AND
5200: (p_to_rsv_rec. demand_source_type_id <> inv_reservation_global.g_source_type_wip AND
5201: l_wip_entity_type <> inv_reservation_global.g_wip_source_type_cmro)) THEN
5202:
5203: IF (l_debug = 1) THEN
5204: debug_print('Serial reservation can be created with Inventory, sales order or CMRO demand only');
5205: END IF;

Line 5267: IF (inv_reservation_global.g_item_record_cache(l_to_rsv_rec.inventory_item_id).revision_qty_control_code =

5263: end if;
5264: End If;
5265:
5266: -- if revision controlled and revision in reservation record is null, return errors
5267: IF (inv_reservation_global.g_item_record_cache(l_to_rsv_rec.inventory_item_id).revision_qty_control_code =
5268: inv_reservation_global.g_revision_control_yes AND l_to_rsv_rec.revision is null) THEN
5269: IF (l_debug = 1) THEN
5270: debug_print('Serial reservation needs to be detailed, revision is null');
5271: END IF;

Line 5268: inv_reservation_global.g_revision_control_yes AND l_to_rsv_rec.revision is null) THEN

5264: End If;
5265:
5266: -- if revision controlled and revision in reservation record is null, return errors
5267: IF (inv_reservation_global.g_item_record_cache(l_to_rsv_rec.inventory_item_id).revision_qty_control_code =
5268: inv_reservation_global.g_revision_control_yes AND l_to_rsv_rec.revision is null) THEN
5269: IF (l_debug = 1) THEN
5270: debug_print('Serial reservation needs to be detailed, revision is null');
5271: END IF;
5272:

Line 5278: IF (inv_reservation_global.g_item_record_cache(l_to_rsv_rec.inventory_item_id).lot_control_code =

5274: fnd_msg_pub.ADD;
5275: END IF;
5276:
5277: -- if lot controlled and lot number is null, return errors
5278: IF (inv_reservation_global.g_item_record_cache(l_to_rsv_rec.inventory_item_id).lot_control_code =
5279: inv_reservation_global.g_lot_control_yes AND l_to_rsv_rec.lot_number is null) THEN
5280: IF (l_debug = 1) THEN
5281: debug_print('Serial reservation needs to be detailed, lot number is null');
5282: END IF;

Line 5279: inv_reservation_global.g_lot_control_yes AND l_to_rsv_rec.lot_number is null) THEN

5275: END IF;
5276:
5277: -- if lot controlled and lot number is null, return errors
5278: IF (inv_reservation_global.g_item_record_cache(l_to_rsv_rec.inventory_item_id).lot_control_code =
5279: inv_reservation_global.g_lot_control_yes AND l_to_rsv_rec.lot_number is null) THEN
5280: IF (l_debug = 1) THEN
5281: debug_print('Serial reservation needs to be detailed, lot number is null');
5282: END IF;
5283:

Line 5362: debug_print('org control' || inv_reservation_global.g_organization_record_cache

5358: debug_print('sub ' || l_to_rsv_rec.subinventory_code);
5359: debug_print('item id' ||
5360: l_to_rsv_rec.inventory_item_id);
5361:
5362: debug_print('org control' || inv_reservation_global.g_organization_record_cache
5363: (l_to_rsv_rec.organization_id).stock_locator_control_code);
5364: debug_print('sub control' || inv_reservation_global.g_sub_record_cache
5365: (l_sub_cache_index).locator_type);
5366: debug_print('item control' || inv_reservation_global.g_item_record_cache

Line 5364: debug_print('sub control' || inv_reservation_global.g_sub_record_cache

5360: l_to_rsv_rec.inventory_item_id);
5361:
5362: debug_print('org control' || inv_reservation_global.g_organization_record_cache
5363: (l_to_rsv_rec.organization_id).stock_locator_control_code);
5364: debug_print('sub control' || inv_reservation_global.g_sub_record_cache
5365: (l_sub_cache_index).locator_type);
5366: debug_print('item control' || inv_reservation_global.g_item_record_cache
5367: (l_to_rsv_rec.inventory_item_id).location_control_code);
5368: END IF;

Line 5366: debug_print('item control' || inv_reservation_global.g_item_record_cache

5362: debug_print('org control' || inv_reservation_global.g_organization_record_cache
5363: (l_to_rsv_rec.organization_id).stock_locator_control_code);
5364: debug_print('sub control' || inv_reservation_global.g_sub_record_cache
5365: (l_sub_cache_index).locator_type);
5366: debug_print('item control' || inv_reservation_global.g_item_record_cache
5367: (l_to_rsv_rec.inventory_item_id).location_control_code);
5368: END IF;
5369:
5370: l_result_locator_control := inv_reservation_util_pvt.locator_control

Line 5372: => inv_reservation_global.g_organization_record_cache

5368: END IF;
5369:
5370: l_result_locator_control := inv_reservation_util_pvt.locator_control
5371: ( p_org_control
5372: => inv_reservation_global.g_organization_record_cache
5373: (l_to_rsv_rec.organization_id).stock_locator_control_code
5374: , p_sub_control
5375: => inv_reservation_global.g_sub_record_cache
5376: (l_sub_cache_index).locator_type

Line 5375: => inv_reservation_global.g_sub_record_cache

5371: ( p_org_control
5372: => inv_reservation_global.g_organization_record_cache
5373: (l_to_rsv_rec.organization_id).stock_locator_control_code
5374: , p_sub_control
5375: => inv_reservation_global.g_sub_record_cache
5376: (l_sub_cache_index).locator_type
5377: , p_item_control
5378: => inv_reservation_global.g_item_record_cache
5379: (l_to_rsv_rec.inventory_item_id).location_control_code

Line 5378: => inv_reservation_global.g_item_record_cache

5374: , p_sub_control
5375: => inv_reservation_global.g_sub_record_cache
5376: (l_sub_cache_index).locator_type
5377: , p_item_control
5378: => inv_reservation_global.g_item_record_cache
5379: (l_to_rsv_rec.inventory_item_id).location_control_code
5380: );
5381: IF (l_result_locator_control <> 1 AND l_to_rsv_rec.locator_id is null) THEN
5382: IF (l_debug = 1) THEN

Line 5526: , p_orig_rsv_rec IN inv_reservation_global.mtl_reservation_rec_type

5522:
5523: PROCEDURE validate_input_parameters
5524: (
5525: x_return_status OUT NOCOPY VARCHAR2
5526: , p_orig_rsv_rec IN inv_reservation_global.mtl_reservation_rec_type
5527: , p_to_rsv_rec IN inv_reservation_global.mtl_reservation_rec_type
5528: , p_orig_serial_array IN inv_reservation_global.serial_number_tbl_type
5529: , p_to_serial_array IN inv_reservation_global.serial_number_tbl_type
5530: , p_rsv_action_name IN VARCHAR2

Line 5527: , p_to_rsv_rec IN inv_reservation_global.mtl_reservation_rec_type

5523: PROCEDURE validate_input_parameters
5524: (
5525: x_return_status OUT NOCOPY VARCHAR2
5526: , p_orig_rsv_rec IN inv_reservation_global.mtl_reservation_rec_type
5527: , p_to_rsv_rec IN inv_reservation_global.mtl_reservation_rec_type
5528: , p_orig_serial_array IN inv_reservation_global.serial_number_tbl_type
5529: , p_to_serial_array IN inv_reservation_global.serial_number_tbl_type
5530: , p_rsv_action_name IN VARCHAR2
5531: , x_orig_item_cache_index OUT NOCOPY INTEGER

Line 5528: , p_orig_serial_array IN inv_reservation_global.serial_number_tbl_type

5524: (
5525: x_return_status OUT NOCOPY VARCHAR2
5526: , p_orig_rsv_rec IN inv_reservation_global.mtl_reservation_rec_type
5527: , p_to_rsv_rec IN inv_reservation_global.mtl_reservation_rec_type
5528: , p_orig_serial_array IN inv_reservation_global.serial_number_tbl_type
5529: , p_to_serial_array IN inv_reservation_global.serial_number_tbl_type
5530: , p_rsv_action_name IN VARCHAR2
5531: , x_orig_item_cache_index OUT NOCOPY INTEGER
5532: , x_orig_org_cache_index OUT NOCOPY INTEGER

Line 5529: , p_to_serial_array IN inv_reservation_global.serial_number_tbl_type

5525: x_return_status OUT NOCOPY VARCHAR2
5526: , p_orig_rsv_rec IN inv_reservation_global.mtl_reservation_rec_type
5527: , p_to_rsv_rec IN inv_reservation_global.mtl_reservation_rec_type
5528: , p_orig_serial_array IN inv_reservation_global.serial_number_tbl_type
5529: , p_to_serial_array IN inv_reservation_global.serial_number_tbl_type
5530: , p_rsv_action_name IN VARCHAR2
5531: , x_orig_item_cache_index OUT NOCOPY INTEGER
5532: , x_orig_org_cache_index OUT NOCOPY INTEGER
5533: , x_orig_demand_cache_index OUT NOCOPY INTEGER

Line 5555: l_item_rec inv_reservation_global.item_record;

5551: l_to_org_cache_index INTEGER := NULL;
5552: l_to_demand_cache_index INTEGER := NULL;
5553: l_to_supply_cache_index INTEGER := NULL;
5554: l_to_sub_cache_index INTEGER := NULL;
5555: l_item_rec inv_reservation_global.item_record;
5556: /*** {{ R12 Enhanced reservations code changes ***/
5557: l_msg_count NUMBER;
5558: l_msg_data VARCHAR2(1000);
5559: l_debug NUMBER;

Line 5651: IF (p_orig_rsv_rec.supply_source_type_id = inv_reservation_global.g_source_type_wip)

5647: --
5648:
5649: -- Bug: 4661026: Passing the requirement date if the demand ship date
5650: -- is null
5651: IF (p_orig_rsv_rec.supply_source_type_id = inv_reservation_global.g_source_type_wip)
5652: THEN
5653: l_demand_ship_date := Nvl(p_orig_rsv_rec.demand_ship_date,p_orig_rsv_rec.requirement_date);
5654:
5655: END IF;

Line 5794: INV_RESERVATION_GLOBAL.G_SOURCE_TYPE_WIP) THEN

5790:
5791: -- check to see if there are existing crossdock reservations against this
5792: --wip job for a different demand. If so, fail.
5793: IF (p_orig_rsv_rec.supply_source_type_id =
5794: INV_RESERVATION_GLOBAL.G_SOURCE_TYPE_WIP) THEN
5795: IF (l_debug = 1) THEN
5796: debug_print('checked wip');
5797: END IF;
5798: -- Bug 4608452: Get the wip entity type to check for existing reservations

Line 5816: l_wip_entity_type := inv_reservation_global.g_wip_record_cache(p_orig_rsv_rec.supply_source_header_id).wip_entity_type;

5812: RAISE fnd_api.g_exc_error;
5813: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
5814: RAISE fnd_api.g_exc_unexpected_error;
5815: ELSE
5816: l_wip_entity_type := inv_reservation_global.g_wip_record_cache(p_orig_rsv_rec.supply_source_header_id).wip_entity_type;
5817: l_wip_job_type := inv_reservation_global.g_wip_record_cache(p_orig_rsv_rec.supply_source_header_id).wip_entity_job;
5818: END IF;
5819:
5820: /* 9695544- commented the following. Now we allow multiple demand lines for same WIP LPN

Line 5817: l_wip_job_type := inv_reservation_global.g_wip_record_cache(p_orig_rsv_rec.supply_source_header_id).wip_entity_job;

5813: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
5814: RAISE fnd_api.g_exc_unexpected_error;
5815: ELSE
5816: l_wip_entity_type := inv_reservation_global.g_wip_record_cache(p_orig_rsv_rec.supply_source_header_id).wip_entity_type;
5817: l_wip_job_type := inv_reservation_global.g_wip_record_cache(p_orig_rsv_rec.supply_source_header_id).wip_entity_job;
5818: END IF;
5819:
5820: /* 9695544- commented the following. Now we allow multiple demand lines for same WIP LPN
5821: IF (l_wip_entity_type = inv_reservation_global.g_wip_source_type_discrete) THEN

Line 5821: IF (l_wip_entity_type = inv_reservation_global.g_wip_source_type_discrete) THEN

5817: l_wip_job_type := inv_reservation_global.g_wip_record_cache(p_orig_rsv_rec.supply_source_header_id).wip_entity_job;
5818: END IF;
5819:
5820: /* 9695544- commented the following. Now we allow multiple demand lines for same WIP LPN
5821: IF (l_wip_entity_type = inv_reservation_global.g_wip_source_type_discrete) THEN
5822: IF (l_debug = 1) THEN
5823: debug_print('inside wip');
5824: END IF;
5825: BEGIN

Line 5972: IF (p_to_rsv_rec.supply_source_type_id = inv_reservation_global.g_source_type_wip)

5968: --
5969:
5970: -- Bug: 4661026: Passing the requirement date if the demand ship date
5971: -- is null
5972: IF (p_to_rsv_rec.supply_source_type_id = inv_reservation_global.g_source_type_wip)
5973: THEN
5974: l_demand_ship_date := Nvl(p_to_rsv_rec.demand_ship_date,p_to_rsv_rec.requirement_date);
5975:
5976: END IF;

Line 6185: IF (p_to_rsv_rec.supply_source_type_id = INV_RESERVATION_GLOBAL.G_SOURCE_TYPE_WIP) THEN

6181: END IF;
6182:
6183: -- check to see if there are existing crossdock reservations against this
6184: --wip job for a different demand. If so, fail.
6185: IF (p_to_rsv_rec.supply_source_type_id = INV_RESERVATION_GLOBAL.G_SOURCE_TYPE_WIP) THEN
6186: -- Bug 4608452: Get the wip entity type to check for existing reservations
6187: /*** Get the wip entity type ***/
6188: -- get wip entity id from wip_record_cache
6189: inv_reservation_util_pvt.get_wip_cache

Line 6200: l_wip_entity_type := inv_reservation_global.g_wip_record_cache(p_to_rsv_rec.supply_source_header_id).wip_entity_type;

6196: RAISE fnd_api.g_exc_error;
6197: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
6198: RAISE fnd_api.g_exc_unexpected_error;
6199: ELSE
6200: l_wip_entity_type := inv_reservation_global.g_wip_record_cache(p_to_rsv_rec.supply_source_header_id).wip_entity_type;
6201: l_wip_job_type := inv_reservation_global.g_wip_record_cache(p_to_rsv_rec.supply_source_header_id).wip_entity_job;
6202: END IF;
6203:
6204: /* 9695544-commented following since we dont need this restriction any more

Line 6201: l_wip_job_type := inv_reservation_global.g_wip_record_cache(p_to_rsv_rec.supply_source_header_id).wip_entity_job;

6197: ELSIF (l_return_status = fnd_api.g_ret_sts_unexp_error) THEN
6198: RAISE fnd_api.g_exc_unexpected_error;
6199: ELSE
6200: l_wip_entity_type := inv_reservation_global.g_wip_record_cache(p_to_rsv_rec.supply_source_header_id).wip_entity_type;
6201: l_wip_job_type := inv_reservation_global.g_wip_record_cache(p_to_rsv_rec.supply_source_header_id).wip_entity_job;
6202: END IF;
6203:
6204: /* 9695544-commented following since we dont need this restriction any more
6205: IF (l_wip_entity_type = inv_reservation_global.g_wip_source_type_discrete) THEN

Line 6205: IF (l_wip_entity_type = inv_reservation_global.g_wip_source_type_discrete) THEN

6201: l_wip_job_type := inv_reservation_global.g_wip_record_cache(p_to_rsv_rec.supply_source_header_id).wip_entity_job;
6202: END IF;
6203:
6204: /* 9695544-commented following since we dont need this restriction any more
6205: IF (l_wip_entity_type = inv_reservation_global.g_wip_source_type_discrete) THEN
6206: BEGIN
6207: SELECT distinct
6208: inv_salesorder.get_salesorder_for_oeheader(wdd.source_header_id),
6209: wdd.source_line_id INTO l_demand_source_header_id, l_demand_source_line_id