[Home] [Help]
1: package body msc_matl_plan_pkg as
2: /* $Header: MSCPCMHB.pls 120.0.12020000.3 2013/04/30 16:53:52 wexia noship $ */
3: g_page_size number := 10;
4: g_max_fetch_size number := 100;
5: g_fetch_size number := g_max_fetch_size;
16: l_org_filter_cnt number;
17: l_cat_filter_cnt number;
18: l_item_filter_cnt number;
19: begin
20: msc_phub_util.log('msc_matl_plan_pkg.prepare_row_dtls('||p_query_id||', '||p_plan_id||
21: ','||p_category_set_id||','||p_page_size||')');
22:
23: delete from msc_form_query where query_id = p_query_id;
24: msc_phub_util.log('delete from msc_form_query: '||sql%rowcount);
128: l_past_date date;
129: l_pre_start_date date;
130: l_plan_cutoff_date date;
131: begin
132: msc_phub_util.log('msc_matl_plan_pkg.populate_data('||p_query_id||', '||p_summary||')');
133:
134: begin
135: select h.plan_id, b.bkt_start_date
136: into l_plan_id, l_past_date
451:
452: procedure summarize_data(p_query_id number)
453: is
454: begin
455: msc_phub_util.log('msc_matl_plan_pkg.summarize_data('||p_query_id||')');
456:
457: update msc_hp_row_dtls
458: set data_flag = 3
459: where query_id = p_query_id
473: p_item_filters varchar2,
474: p_page_size number)
475: is
476: begin
477: msc_phub_util.log('msc_matl_plan_pkg.initialize_data('||p_query_id||', '||p_plan_id||
478: ','||p_category_set_id||','||p_page_size||')');
479:
480: msc_hp_util.prepare_col_dtls(p_plan_id, 2);
481:
492: procedure fetch_data(p_query_id number, p_row_index number)
493: is
494: l_n number;
495: begin
496: msc_phub_util.log('msc_matl_plan_pkg.fetch_data('||p_query_id||', '||p_row_index||')');
497:
498: select count(*) into l_n
499: from msc_hp_row_dtls
500: where query_id = p_query_id
605: l_old_value number;
606: l_fixed number;
607: l_cnt number;
608: begin
609: msc_phub_util.log('msc_matl_plan_pkg.save_changes('||p_query_id||')');
610:
611: for ru in cu loop
612: if (ru.supply_type is not null) then
613: /*
817:
818: procedure close_data(p_query_id number)
819: is
820: begin
821: msc_phub_util.log('msc_matl_plan_pkg.close_data('||p_query_id||')');
822:
823: delete from msc_hp_row_dtls where query_id = p_query_id;
824: msc_phub_util.log('delete from msc_hp_row_dtls: '||sql%rowcount);
825: commit;
833: commit;
834:
835: end close_data;
836:
837: end msc_matl_plan_pkg;