3466: RETURN VARCHAR2
3467: IS
3468: CURSOR c_line_lot_serials IS
3469: SELECT lot_serial_id
3470: FROM oe_lot_serial_numbers
3471: WHERE LINE_ID = p_line_id;
3472:
3473: l_lot_serial_id NUMBER;
3474: l_lock_lot_serial_id NUMBER;
3487:
3488: -- Lock the sales credits record.
3489: SELECT lot_serial_id
3490: INTO l_lock_lot_serial_id
3491: FROM oe_lot_serial_numbers
3492: WHERE lot_serial_id = l_lot_serial_id
3493: FOR UPDATE NOWAIT;
3494:
3495: delete from oe_lot_serial_numbers
3491: FROM oe_lot_serial_numbers
3492: WHERE lot_serial_id = l_lot_serial_id
3493: FOR UPDATE NOWAIT;
3494:
3495: delete from oe_lot_serial_numbers
3496: where lot_serial_id = l_lot_serial_id;
3497:
3498: END LOOP;
3499: