697: -- set output variables
698: IF p_move_order_type <> 3 THEN
699: BEGIN
700: SELECT COUNT(*) INTO l_cnt_lot
701: FROM mtl_transaction_lots_temp
702: WHERE transaction_temp_id = l_transaction_temp_id;
703:
704: IF l_cnt_lot = 1 THEN
705: SELECT lot_number
703:
704: IF l_cnt_lot = 1 THEN
705: SELECT lot_number
706: INTO l_lot_number
707: FROM mtl_transaction_lots_temp
708: WHERE transaction_temp_id = l_transaction_temp_id;
709: END IF;
710: EXCEPTION
711: WHEN OTHERS THEN
1076: -- Delete lot and serial records from temp tables
1077: DELETE mtl_serial_numbers_temp
1078: WHERE group_header_id = p_trx_header_id;
1079:
1080: DELETE mtl_transaction_lots_temp
1081: WHERE group_header_id = p_trx_header_id;
1082:
1083: DELETE mtl_material_transactions_temp
1084: WHERE transaction_header_id = p_trx_header_id;
1098: unmarked_value NUMBER := -1;
1099:
1100: CURSOR lot_temp_csr(trx_temp_id NUMBER) IS
1101: SELECT serial_transaction_temp_id
1102: FROM mtl_transaction_lots_temp
1103: WHERE transaction_temp_id = trx_temp_id;
1104:
1105: CURSOR serial_temp_csr(trx_temp_id NUMBER) IS
1106: SELECT fm_serial_number
1119: p_success := TRUE;
1120:
1121: SELECT COUNT(*)
1122: INTO l_lot_count
1123: FROM mtl_transaction_lots_temp
1124: WHERE transaction_temp_id = p_trx_tmp_id;
1125:
1126: --inv_debug.message('ssia', 'after lot_count = ' || l_lot_count);
1127: --inv_debug.message('ssia', 'p_trx_tmp_id is ' || p_trx_tmp_id);
1178: END LOOP;
1179:
1180: CLOSE lot_temp_csr;
1181:
1182: DELETE mtl_transaction_lots_temp
1183: WHERE transaction_temp_id = p_trx_tmp_id;
1184: ELSE
1185: --inv_debug.message('ssia', 'lot_count = ' || l_lot_count);
1186: SELECT COUNT(*)
1449: SELECT lot_number
1450: , primary_quantity
1451: , transaction_quantity
1452: , serial_transaction_temp_id
1453: FROM mtl_transaction_lots_temp
1454: WHERE transaction_temp_id = l_transaction_temp_id;
1455:
1456: CURSOR serial_csr(l_transaction_id NUMBER, l_lot_control_code NUMBER, l_serial_trx_id NUMBER) IS
1457: SELECT serial_number
1552: END IF;
1553:
1554: SELECT COUNT(transaction_temp_id)
1555: INTO l_lot_count
1556: FROM mtl_transaction_lots_temp
1557: WHERE transaction_temp_id = l_mmtt_rec.transaction_temp_id;
1558:
1559: IF (l_lot_count > 0) THEN
1560: l_transaction_temp_id := l_mmtt_rec.transaction_temp_id;
3002: END IF;
3003: -- Get sum of txn qty of all mtlt's for this mmtt
3004: SELECT nvl(SUM(transaction_quantity),0)
3005: INTO l_all_mtlt
3006: FROM mtl_transaction_lots_temp
3007: WHERE transaction_temp_id = l_transaction_temp_id;
3008:
3009: -- Get this mtlt
3010: SELECT nvl(transaction_quantity,0)
3008:
3009: -- Get this mtlt
3010: SELECT nvl(transaction_quantity,0)
3011: INTO l_this_mtlt
3012: FROM mtl_transaction_lots_temp
3013: WHERE transaction_temp_id = l_transaction_temp_id
3014: AND lot_number = l_lot_num;
3015:
3016: l_other_mtlt := l_all_mtlt - l_this_mtlt;