501: CURSOR get_mtlt_c(p_temp_id NUMBER) IS
502: select primary_quantity
503: ,lot_number
504: -- ,transaction_quantity
505: from mtl_transaction_lots_temp
506: where transaction_temp_id = p_temp_id;
507:
508: CURSOR c_fm_to_serial_number IS
509: SELECT
517: msnt.fm_serial_number,
518: msnt.to_serial_number
519: FROM
520: mtl_serial_numbers_temp msnt,
521: mtl_transaction_lots_temp mtlt
522: WHERE mtlt.transaction_temp_id = p_mmtt_id
523: AND msnt.transaction_temp_id = mtlt.serial_transaction_temp_id;
524:
525: -- WF Fix End
776: if l_serial_control_code NOT IN (1,6) then -- serial controlled
777: begin
778: select count(*)
779: into l_msnt_cnt
780: from mtl_transaction_lots_temp mtlt
781: ,mtl_serial_numbers_temp msnt
782: where mtlt.transaction_temp_id = l_mmtt_id
783: and mtlt.serial_transaction_temp_id = msnt.transaction_temp_id;
784:
853:
854: DELETE FROM mtl_serial_numbers_temp msnt
855: WHERE msnt.transaction_temp_id IN
856: (SELECT mtlt.serial_transaction_temp_id
857: FROM mtl_transaction_lots_temp mtlt
858: WHERE mtlt.transaction_temp_id = l_mmtt_id);
859: mdebug('after delete msnt');
860:
861: exception
868: ELSE
869: mdebug('only lot controlle item');
870: END IF;
871:
872: --DELETE FROM mtl_transaction_lots_temp mtlt
873: --WHERE mtlt.transaction_temp_id = l_mmtt_id;
874: -- we need to use mtlt later and so far just zero out mtlt, later will delete them
875: mdebug('zero out quantity of the mtlt for lot controlled item');
876: update mtl_transaction_lots_temp
872: --DELETE FROM mtl_transaction_lots_temp mtlt
873: --WHERE mtlt.transaction_temp_id = l_mmtt_id;
874: -- we need to use mtlt later and so far just zero out mtlt, later will delete them
875: mdebug('zero out quantity of the mtlt for lot controlled item');
876: update mtl_transaction_lots_temp
877: set primary_quantity = 0
878: ,transaction_quantity = 0
879: where transaction_temp_id = l_mmtt_id;
880:
1178:
1179: --Bug3633573 following deletion not required for mtlt
1180:
1181: --if l_lot_control_code = 2 then
1182: -- DELETE FROM mtl_transaction_lots_temp mtlt
1183: -- WHERE mtlt.transaction_temp_id = l_mmtt_id;
1184: --end if;
1185:
1186: l_return_status := FND_API.G_RET_STS_SUCCESS;