Seems to be the same issue (with partially using my suggestion) as in this thread:
Trigger problem I just wonder why you do not follow in it.
There are some differences. Firstly, you decided not to describe the 'problem' at all. Hm, how do you expect anybody to guess it?
Secondly, my solution contained treating of NO_DATA_FOUND exception, which is raised, when SELECT INTO does not return any row. It will be raised in every SELECT (so the CHECK function is useless). It is however correct not to catch it, when you want the program to raise ORA-00001 exception. Again, as you did not post exact requirements on code, it might be ok. Please, consult PL/SQL User's Guide and Reference, available e.g. online on
http://tahiti.oracle.com/
And, lastly, the client may not see the message printed via DBMS_OUTPUT (in sqlplus, SERVEROUTPUT may be set OFF). Please, consult the requirements, what shall be done. Is the front-end really in sqlplus?