292: IF p_serial_number IS NULL THEN
293: SELECT 1 INTO l_onhand FROM dual
294: WHERE exists
295: (SELECT wlpn.organization_id
296: FROM wms_lpn_contents wlc, wms_license_plate_numbers wlpn
297: WHERE (wlc.lot_number = p_lot_number
298: OR (p_lot_number IS NULL AND wlc.lot_number IS NULL))
299: AND (wlc.revision = p_revision
300: OR (p_revision IS NULL AND wlc.revision IS NULL))
857: -- Packed material, no serial control
858: SELECT cost_group_id INTO x_cost_group_id
859: FROM (
860: SELECT wlc.cost_group_id
861: FROM wms_lpn_contents wlc,
862: wms_license_plate_numbers wlpn
863: WHERE (wlc.lot_number = p_lot_number
864: OR (p_lot_number IS NULL AND wlc.lot_number IS NULL))
865: AND (wlc.revision = p_revision