create or replace package body odwaxist is /***************************************************************************************** Purpose Package to help construct the short_cut bar in every report In general it will help answer questions with respect to the existence of certain elements Usage Called from every CDWP_ p_el_type_id) , cdwpbase.get_ci_view ( p_type_id => cdwpbase.short_name_to_type_id( p_el_type_of) ) ); -- now find out whether l_tbl_name contains at least one entry with pac_ref = p_pac_irid l_sql:= ' declare cursor c_xst is select 1 from dual where exists ( select 1 from '||l_tbl_name ||' where '||p_ref_column||' = '||to_char(p_pac_irid) ||cdwpbase.ifThenElse ( p_pac_ivid is not null , ' and PARENT_IVID = '||to_char(p_pac_ivid) ) ||cdwpbase.ifThenElse ( p_extra_where is not null , ' and '||p_extra_where ) ||' ) ; r_xst c_xst%rowtype; begin open c_xst; fetch c_xst into r_xst; odwaxist.g_exist:= c_xst%found; close c_xst; end; '; execute immediate l_sql; return odwaxist.g_exist; end; -- exists_detail end; -- package body odwaxist /