Call to Function in Oracle says it's not declared When I call the next stored-function in oracle:

CREATE OR REPLACE FUNCTION SOLICITAR_DISPONIBILIDAD (parqueo IN NUMBER, semestre IN NUMBER,
año IN NUMBER, jornada IN NUMBER)
RETURN INTEGER IS
cupo_disponible INTEGER := 0;
cupo_tomado INTEGER := 0;
BEGIN
SELECT capacidad
  INTO cupo_disponible
  FROM estacionamientos
  WHERE numero = parqueo;
SELECT COUNT(*)
  INTO cupo_tomado
  FROM asignacion_parqueos ap
  WHERE ap.par_año = año
    AND ap.par_ciclo = semestre
    AND ap.par_numero = parqueo
    AND ap.par_jornada = jornada;
RETURN cupo_disponible - cupo_tomado;
EXCEPTION
WHEN OTHERS THEN
    ROLLBACK;
    RAISE;
END SOLICITAR_DISPONIBILIDAD;


It says 'SOLICITAR_DISPONIBILIDAD' is not a procedure or is undefined. Does anyone knows why?

I call it like this:EXECUTE SOLICITAR_DISPONIBILIDAD(1,0,2014,0);
A function has to return something (in your case an INTEGER) somewhere.

Try SELECT SOLICITAR_DISPONIBILIDAD(1,0,2014,0) FROM DUAL