296:
297: -----------------------------------------------------
298: l_debug_info := 'open cursor';
299: -----------------------------------------------------
300: l_cur_hdl := dbms_sql.open_cursor;
301:
302: -----------------------------------------------------
303: l_debug_info := 'set query statement';
304: -----------------------------------------------------
327:
328: -----------------------------------------------------
329: l_debug_info := 'parse cursor';
330: -----------------------------------------------------
331: dbms_sql.parse(l_cur_hdl, l_query_stmt,dbms_sql.native);
332:
333: -----------------------------------------------------
334: l_debug_info := 'bind values to the placeholder';
335: -----------------------------------------------------
332:
333: -----------------------------------------------------
334: l_debug_info := 'bind values to the placeholder';
335: -----------------------------------------------------
336: dbms_sql.bind_variable(l_cur_hdl, ':costCenter', p_cost_center);
337: dbms_sql.bind_variable(l_cur_hdl, ':reportHeaderId', p_report_header_id);
338: dbms_sql.bind_variable(l_cur_hdl, ':charOfAccountsId', l_char_of_accounts_id);
339:
340: -----------------------------------------------------
333: -----------------------------------------------------
334: l_debug_info := 'bind values to the placeholder';
335: -----------------------------------------------------
336: dbms_sql.bind_variable(l_cur_hdl, ':costCenter', p_cost_center);
337: dbms_sql.bind_variable(l_cur_hdl, ':reportHeaderId', p_report_header_id);
338: dbms_sql.bind_variable(l_cur_hdl, ':charOfAccountsId', l_char_of_accounts_id);
339:
340: -----------------------------------------------------
341: l_debug_info := 'setup output';
334: l_debug_info := 'bind values to the placeholder';
335: -----------------------------------------------------
336: dbms_sql.bind_variable(l_cur_hdl, ':costCenter', p_cost_center);
337: dbms_sql.bind_variable(l_cur_hdl, ':reportHeaderId', p_report_header_id);
338: dbms_sql.bind_variable(l_cur_hdl, ':charOfAccountsId', l_char_of_accounts_id);
339:
340: -----------------------------------------------------
341: l_debug_info := 'setup output';
342: -----------------------------------------------------
339:
340: -----------------------------------------------------
341: l_debug_info := 'setup output';
342: -----------------------------------------------------
343: dbms_sql.define_column(l_cur_hdl, 1, l_cc_owner_id, 150);
344:
345: -----------------------------------------------------
346: l_debug_info := 'execute cursor';
347: -----------------------------------------------------
344:
345: -----------------------------------------------------
346: l_debug_info := 'execute cursor';
347: -----------------------------------------------------
348: l_rows_processed := dbms_sql.execute(l_cur_hdl);
349:
350: -----------------------------------------------------
351: l_debug_info := 'fetch a row';
352: -----------------------------------------------------
349:
350: -----------------------------------------------------
351: l_debug_info := 'fetch a row';
352: -----------------------------------------------------
353: IF dbms_sql.fetch_rows(l_cur_hdl) > 0 then
354: -- fetch columns from the row
355: dbms_sql.column_value(l_cur_hdl, 1, l_cc_owner_id);
356: END IF;
357:
351: l_debug_info := 'fetch a row';
352: -----------------------------------------------------
353: IF dbms_sql.fetch_rows(l_cur_hdl) > 0 then
354: -- fetch columns from the row
355: dbms_sql.column_value(l_cur_hdl, 1, l_cc_owner_id);
356: END IF;
357:
358: -----------------------------------------------------
359: l_debug_info := 'close cursor';
357:
358: -----------------------------------------------------
359: l_debug_info := 'close cursor';
360: -----------------------------------------------------
361: dbms_sql.close_cursor(l_cur_hdl);
362:
363: END IF;
364:
365: return l_cc_owner_id;