330:
331: DECLARE
332: -- Delete lot and serial records from temp tables
333: cursor c3 is select group_header_id from
334: mtl_serial_numbers_temp
335: where group_header_id = v_trx_header_id
336: for update of group_header_id nowait;
337: BEGIN
338: open c3 ;
335: where group_header_id = v_trx_header_id
336: for update of group_header_id nowait;
337: BEGIN
338: open c3 ;
339: delete mtl_serial_numbers_temp
340: where group_header_id = v_trx_header_id;
341: close c3 ;
342: EXCEPTION
343: WHEN OTHERS then
409: WHERE mmtt.transaction_header_id = hdr_id AND mmtt.transaction_temp_id
410: IS NOT NULL AND mmtt.transaction_header_id IS NOT NULL);
411:
412:
413: DELETE FROM mtl_serial_numbers_temp
414: WHERE group_header_id = hdr_id AND
415: transaction_temp_id NOT IN
416: (SELECT mmtt.transaction_temp_id FROM
417: mtl_material_transactions_temp mmtt