165: exception when others then return null;
166: end;
167:
168: function doc_type( p_code in varchar2)
169: return okc_bus_doc_types_tl.name%type
170: as
171: result okc_bus_doc_types_tl.name%type;
172: begin
173: select name into result
167:
168: function doc_type( p_code in varchar2)
169: return okc_bus_doc_types_tl.name%type
170: as
171: result okc_bus_doc_types_tl.name%type;
172: begin
173: select name into result
174: from okc_bus_doc_types_tl
175: where document_type = p_code
170: as
171: result okc_bus_doc_types_tl.name%type;
172: begin
173: select name into result
174: from okc_bus_doc_types_tl
175: where document_type = p_code
176: and language = userenv('LANG');
177: return result;
178: exception when others then return null;