CREATE or REPLACE FUNCTION CTB_CCAJUSREC(
P_CDAJUCTREC IN AJCTRECEBER.CDAJUCTREC%TYPE) RETURN VARCHAR2
AS
   V_CDCONTCTBL VARCHAR2(20);
BEGIN
   BEGIN
      SELECT CDCONTCTBL
        INTO V_CDCONTCTBL
        FROM TIPOAJRECEBER
       WHERE CDAJUCTREC = P_CDAJUCTREC;
   EXCEPTION
      WHEN NO_DATA_FOUND THEN
         V_CDCONTCTBL := NULL;
   END;
  RETURN V_CDCONTCTBL;
END;
/

-- VERSAO --
BEGIN ATUVEROBJ('CTB_CCAJUSREC','5.50.000'); END;
/