206: -- End Bug 1992880;
207:
208: select count(transaction_temp_id)
209: into l_lot_count
210: from mtl_transaction_lots_temp
211: where transaction_temp_id = l_mold_tbl(j).transaction_temp_id;
212: IF (l_debug = 1) THEN
213: TraceLog('l_lot_count is before lot_handling ' || l_lot_count, 'Pick_Confirm');
214: END IF;
554: END IF; --Call Old tm for WIP Picking records
555:
556: -- Insert_Row.Clear_Orphan_Lots_Serials(l_transaction_header_id,-999);
557: Begin
558: DELETE FROM mtl_transaction_lots_temp
559: WHERE group_header_id = l_transaction_header_id
560: AND transaction_temp_id NOT IN
561: ( SELECT mmtt.transaction_temp_id
562: FROM mtl_material_transactions_temp mmtt
571: WHERE mmtt.transaction_header_id = l_transaction_header_id
572: AND mmtt.transaction_temp_id IS NOT NULL)
573: AND transaction_temp_id NOT IN
574: ( SELECT mtlt.serial_transaction_temp_id
575: FROM mtl_transaction_lots_temp mtlt
576: WHERE mtlt.group_header_id = l_transaction_header_id
577: AND mtlt.serial_transaction_temp_id IS NOT NULL);
578:
579: -- Bug 5879916