924: END IF;
925:
926: --If the MO is of type replenishment / requisition
927: IF (l_move_order_type IN
928: (inv_globals.g_move_order_replenishment,
929: inv_globals.g_move_order_requisition)
930: ) THEN
931:
932: SELECT OVPK_TRANSFER_ORDERS_ENABLED
925:
926: --If the MO is of type replenishment / requisition
927: IF (l_move_order_type IN
928: (inv_globals.g_move_order_replenishment,
929: inv_globals.g_move_order_requisition)
930: ) THEN
931:
932: SELECT OVPK_TRANSFER_ORDERS_ENABLED
933: INTO l_temp
939: mydebug('OVPK: l_temp for replenishment/requisition MO = '||l_temp, l_api_name);
940: mydebug('OVPK: l_check_overpick_passed for replenishment/requisition MO = '||l_check_overpick_passed, l_api_name);
941: END IF;
942:
943: ELSIF (l_move_order_type = inv_globals.g_move_order_mfg_pick) THEN
944:
945: SELECT wip_overpick_enabled
946: INTO l_temp
947: FROM mtl_parameters
952: mydebug('OVPK: l_temp for WIP MO = '||l_temp, l_api_name);
953: mydebug('OVPK: l_check_overpick_passed for WIP MO = '||l_check_overpick_passed, l_api_name);
954: END IF;
955:
956: ELSIF (l_move_order_type = inv_globals.g_move_order_pick_wave) THEN
957:
958: l_check_overpick_passed := NVL(fnd_profile.VALUE('WSH_OVERPICK_ENABLED'), 'N');
959:
960: IF l_debug = 1 THEN
1357: l_message VARCHAR2(400);
1358:
1359: CURSOR c_det_pick_type(p_org_id IN NUMBER, p_lpn_id IN NUMBER) IS
1360: SELECT DECODE (mtrh.move_order_type
1361: , inv_globals.g_move_order_mfg_pick, 'MFG'
1362: , 'OTHERS')
1363: FROM mtl_material_transactions_temp mmtt
1364: , mtl_txn_request_lines mtrl
1365: , mtl_txn_request_headers mtrh
1424: LOOP
1425: FETCH c_get_mfg_drop_details INTO mfg_drop_rec;
1426: EXIT WHEN c_get_mfg_drop_details%NOTFOUND;
1427:
1428: IF ( mfg_drop_rec.transaction_type_id = INV_Globals.G_TYPE_XFER_ORDER_WIP_ISSUE
1429: AND mfg_orig_drop_rec.transaction_type_id = INV_Globals.G_TYPE_XFER_ORDER_WIP_ISSUE
1430: AND(( mfg_drop_rec.txn_source_id <> mfg_orig_drop_rec.txn_source_id)
1431: OR ( mfg_drop_rec.txn_source_line_id <> mfg_orig_drop_rec.txn_source_line_id)
1432: OR ( mfg_drop_rec.reference_id <> mfg_orig_drop_rec.reference_id)))
1425: FETCH c_get_mfg_drop_details INTO mfg_drop_rec;
1426: EXIT WHEN c_get_mfg_drop_details%NOTFOUND;
1427:
1428: IF ( mfg_drop_rec.transaction_type_id = INV_Globals.G_TYPE_XFER_ORDER_WIP_ISSUE
1429: AND mfg_orig_drop_rec.transaction_type_id = INV_Globals.G_TYPE_XFER_ORDER_WIP_ISSUE
1430: AND(( mfg_drop_rec.txn_source_id <> mfg_orig_drop_rec.txn_source_id)
1431: OR ( mfg_drop_rec.txn_source_line_id <> mfg_orig_drop_rec.txn_source_line_id)
1432: OR ( mfg_drop_rec.reference_id <> mfg_orig_drop_rec.reference_id)))
1433: OR ( mfg_drop_rec.transaction_type_id = INV_Globals.G_TYPE_XFER_ORDER_REPL_SUBXFR
1429: AND mfg_orig_drop_rec.transaction_type_id = INV_Globals.G_TYPE_XFER_ORDER_WIP_ISSUE
1430: AND(( mfg_drop_rec.txn_source_id <> mfg_orig_drop_rec.txn_source_id)
1431: OR ( mfg_drop_rec.txn_source_line_id <> mfg_orig_drop_rec.txn_source_line_id)
1432: OR ( mfg_drop_rec.reference_id <> mfg_orig_drop_rec.reference_id)))
1433: OR ( mfg_drop_rec.transaction_type_id = INV_Globals.G_TYPE_XFER_ORDER_REPL_SUBXFR
1434: AND mfg_orig_drop_rec.transaction_type_id = INV_Globals.G_TYPE_XFER_ORDER_REPL_SUBXFR
1435: AND (( mfg_drop_rec.transfer_subinventory <> mfg_orig_drop_rec.transfer_subinventory)
1436: OR ( mfg_drop_rec.transfer_to_location <> mfg_orig_drop_rec.transfer_to_location)))
1437: OR ( mfg_drop_rec.transaction_type_id <> mfg_orig_drop_rec.transaction_type_id)
1430: AND(( mfg_drop_rec.txn_source_id <> mfg_orig_drop_rec.txn_source_id)
1431: OR ( mfg_drop_rec.txn_source_line_id <> mfg_orig_drop_rec.txn_source_line_id)
1432: OR ( mfg_drop_rec.reference_id <> mfg_orig_drop_rec.reference_id)))
1433: OR ( mfg_drop_rec.transaction_type_id = INV_Globals.G_TYPE_XFER_ORDER_REPL_SUBXFR
1434: AND mfg_orig_drop_rec.transaction_type_id = INV_Globals.G_TYPE_XFER_ORDER_REPL_SUBXFR
1435: AND (( mfg_drop_rec.transfer_subinventory <> mfg_orig_drop_rec.transfer_subinventory)
1436: OR ( mfg_drop_rec.transfer_to_location <> mfg_orig_drop_rec.transfer_to_location)))
1437: OR ( mfg_drop_rec.transaction_type_id <> mfg_orig_drop_rec.transaction_type_id)
1438: THEN
1491: , wms_dispatched_tasks wdt
1492: , mtl_system_items_vl msik /* Bug 5581528 */
1493: WHERE mmtt.organization_id = p_organization_id
1494: AND mmtt.transfer_lpn_id = p_transfer_lpn_id
1495: AND mmtt.transaction_source_type_id = inv_globals.g_sourcetype_inventory
1496: AND mmtt.transaction_action_id = inv_globals.g_action_subxfr
1497: AND msi.organization_id = mmtt.organization_id
1498: AND msi.secondary_inventory_name = mmtt.transfer_subinventory
1499: AND mmtt.organization_id = mil.organization_id
1492: , mtl_system_items_vl msik /* Bug 5581528 */
1493: WHERE mmtt.organization_id = p_organization_id
1494: AND mmtt.transfer_lpn_id = p_transfer_lpn_id
1495: AND mmtt.transaction_source_type_id = inv_globals.g_sourcetype_inventory
1496: AND mmtt.transaction_action_id = inv_globals.g_action_subxfr
1497: AND msi.organization_id = mmtt.organization_id
1498: AND msi.secondary_inventory_name = mmtt.transfer_subinventory
1499: AND mmtt.organization_id = mil.organization_id
1500: AND mmtt.transfer_subinventory = mil.subinventory_code
1540: , wms_dispatched_tasks wdt
1541: , mtl_system_items_vl msik /* Bug 5581528 */
1542: WHERE mmtt.organization_id = p_organization_id
1543: AND mmtt.transfer_lpn_id = p_transfer_lpn_id
1544: AND mmtt.transaction_source_type_id = inv_globals.g_sourcetype_wip
1545: AND mmtt.transaction_action_id = inv_globals.g_action_issue
1546: AND mtrl.line_id = mmtt.move_order_line_id
1547: AND wdt.organization_id = mmtt.organization_id
1548: AND wdt.transaction_temp_id = mmtt.transaction_temp_id
1541: , mtl_system_items_vl msik /* Bug 5581528 */
1542: WHERE mmtt.organization_id = p_organization_id
1543: AND mmtt.transfer_lpn_id = p_transfer_lpn_id
1544: AND mmtt.transaction_source_type_id = inv_globals.g_sourcetype_wip
1545: AND mmtt.transaction_action_id = inv_globals.g_action_issue
1546: AND mtrl.line_id = mmtt.move_order_line_id
1547: AND wdt.organization_id = mmtt.organization_id
1548: AND wdt.transaction_temp_id = mmtt.transaction_temp_id
1549: AND wdt.status IN (3, 4)
1635: , x_display_serials OUT NOCOPY VARCHAR2
1636: , p_txn_temp_id_list IN VARCHAR2
1637: ) IS
1638: l_api_name VARCHAR2(30) := 'GET_LOT_NUMBER_INFO';
1639: l_temp_lot_num_tbl inv_globals.varchar_tbl_type;
1640: l_temp_lot_qty_tbl inv_globals.number_tbl_type;
1641: l_lot_num_tbl inv_globals.varchar_tbl_type;
1642: l_lot_qty_tbl inv_globals.number_tbl_type;
1643: l_start NUMBER;
1636: , p_txn_temp_id_list IN VARCHAR2
1637: ) IS
1638: l_api_name VARCHAR2(30) := 'GET_LOT_NUMBER_INFO';
1639: l_temp_lot_num_tbl inv_globals.varchar_tbl_type;
1640: l_temp_lot_qty_tbl inv_globals.number_tbl_type;
1641: l_lot_num_tbl inv_globals.varchar_tbl_type;
1642: l_lot_qty_tbl inv_globals.number_tbl_type;
1643: l_start NUMBER;
1644: l_end NUMBER;
1637: ) IS
1638: l_api_name VARCHAR2(30) := 'GET_LOT_NUMBER_INFO';
1639: l_temp_lot_num_tbl inv_globals.varchar_tbl_type;
1640: l_temp_lot_qty_tbl inv_globals.number_tbl_type;
1641: l_lot_num_tbl inv_globals.varchar_tbl_type;
1642: l_lot_qty_tbl inv_globals.number_tbl_type;
1643: l_start NUMBER;
1644: l_end NUMBER;
1645: l_txn_temp_id NUMBER;
1638: l_api_name VARCHAR2(30) := 'GET_LOT_NUMBER_INFO';
1639: l_temp_lot_num_tbl inv_globals.varchar_tbl_type;
1640: l_temp_lot_qty_tbl inv_globals.number_tbl_type;
1641: l_lot_num_tbl inv_globals.varchar_tbl_type;
1642: l_lot_qty_tbl inv_globals.number_tbl_type;
1643: l_start NUMBER;
1644: l_end NUMBER;
1645: l_txn_temp_id NUMBER;
1646: l_found BOOLEAN;
1761: , p_txn_temp_id_list IN VARCHAR2
1762: , p_lot_number IN VARCHAR2
1763: ) IS
1764: l_api_name VARCHAR2(30) := 'GET_SERIAL_NUMBERS';
1765: l_temp_serial_list inv_globals.varchar_tbl_type;
1766: l_start NUMBER;
1767: l_end NUMBER;
1768: l_txn_temp_id NUMBER;
1769: