49: procedure process_sql_type_measures;
50: -------------------------------------------------------------------
51: PROCEDURE debug( debug_str VARCHAR2) IS
52: BEGIN
53: g_debug := fnd_profile.value('BIC_DEBUG');
54: FND_LOG.G_CURRENT_RUNTIME_LEVEL := 1;
55: FND_GLOBAL.APPS_INITIALIZE (fnd_global.user_id,fnd_global.resp_id,fnd_global.prog_appl_id);
56: if g_debug = 'Y' then
57: --This is to meet 11.5.10 logging standards
338: x_amount => p_amt);
339: return(x_converted_amt);
340: end;
341:
342: -- This procedure checks value of profile option, BIC_DEBUG and if its value
343: -- is 'Y' then it sets g_log_output variable and message are inserted into
344: -- bic_debug table.
345: procedure set_debug is
346: begin
340: end;
341:
342: -- This procedure checks value of profile option, BIC_DEBUG and if its value
343: -- is 'Y' then it sets g_log_output variable and message are inserted into
344: -- bic_debug table.
345: procedure set_debug is
346: begin
347: g_debug := fnd_profile.value('BIC_DEBUG');
348: exception
343: -- is 'Y' then it sets g_log_output variable and message are inserted into
344: -- bic_debug table.
345: procedure set_debug is
346: begin
347: g_debug := fnd_profile.value('BIC_DEBUG');
348: exception
349: when others then null;
350: end set_debug;
351: --
352: --This procedure writes debug messages
353: procedure write_debug_msg(p_msg varchar2) is
354: begin
355: if g_debug = 'Y' then
356: insert into bic_debug ( report_id,message,creation_date)
357: values ('BICCSUMM' || to_char(g_srl_no,'999'),
358: to_char(g_srl_no,'99') || '-'|| p_msg || ': ' ||
359: g_proc_name || ': ' ||
360: to_char(sysdate,'HH24:mi:ss'),
2488: exception
2489: when others then
2490: x_err := substr(sqlerrm,1,240);
2491: --dbms_output.put_line(to_char(g_srl_no) || x_err);
2492: insert into bic_debug(report_id,message) values ('BICSUMMB',x_err);
2493: end;
2494: procedure process_sql_type_measures is
2495: x_str varchar2(5000);
2496: x_stmnt1 varchar2(2000);
2512: x_msr_code bic_measure_attribs.measure_code % type;
2513: begin
2514: --x_start_date := to_date('01-jan-2000','dd-mm-yyyy');
2515: --x_end_date := to_date('31-jan-2000','dd-mm-yyyy');
2516: --delete from bic_debug where report_id like 'BIC%SUMM%';
2517: open c_sql_measures;
2518: loop
2519: fetch c_sql_measures into x_stmnt1, x_msr_code;
2520: if c_sql_measures % notfound then exit; end if;
2559: where a.measure_id = b.measure_id(+)
2560: and nvl(a.value,0) >= nvl(b.low_value (+),0)
2561: and nvl(a.value,0) < nvl(b.high_value (+),
2562: nvl(a.value,0)+2) ';
2563: insert into bic_debug(report_id,message) values ('BICSUMMB',x_str);
2564: write_log('Measure Code being processed-'||x_msr_code);
2565: bulk_insert_sql_measures(x_str);
2566: end loop;
2567: close c_sql_measures;