DBA Data[Home] [Help]

APPS.MSC_RESOURCE_PKG dependencies on MSC_PHUB_UTIL

Line 14: l_owning_currency_code varchar2(20) := msc_phub_util.get_owning_currency_code(p_plan_run_id);

10: l_plan_type number;
11: l_sr_instance_id number;
12: l_rowcount1 number := 0;
13: l_rowcount2 number := 0;
14: l_owning_currency_code varchar2(20) := msc_phub_util.get_owning_currency_code(p_plan_run_id);
15: l_transfer_id number := null;
16: l_constrained_plan number := null;
17: l_start_time timestamp := systimestamp;
18: l_enable_num number := nvl(fnd_profile.value('MSC_APCC_ENABLE_CUM'), 1);

Line 20: msc_phub_util.log('msc_resource_pkg.populate_details');

16: l_constrained_plan number := null;
17: l_start_time timestamp := systimestamp;
18: l_enable_num number := nvl(fnd_profile.value('MSC_APCC_ENABLE_CUM'), 1);
19: begin
20: msc_phub_util.log('msc_resource_pkg.populate_details');
21: l_constrained_plan := msc_phub_util.is_plan_constrained(p_plan_id);
22: retcode := 0;
23: errbuf := null;
24:

Line 21: l_constrained_plan := msc_phub_util.is_plan_constrained(p_plan_id);

17: l_start_time timestamp := systimestamp;
18: l_enable_num number := nvl(fnd_profile.value('MSC_APCC_ENABLE_CUM'), 1);
19: begin
20: msc_phub_util.log('msc_resource_pkg.populate_details');
21: l_constrained_plan := msc_phub_util.is_plan_constrained(p_plan_id);
22: retcode := 0;
23: errbuf := null;
24:
25: select plan_type, sr_instance_id, plan_start_date, plan_cutoff_date, temp_transfer_id

Line 41: l_res_rn_qid := msc_phub_util.get_resource_rn_qid(p_plan_id, p_plan_run_id);

37: where plan_run_id = p_plan_run_id;
38:
39: if l_refresh_mode = 2 -- targeted refesh
40: then
41: l_res_rn_qid := msc_phub_util.get_resource_rn_qid(p_plan_id, p_plan_run_id);
42:
43: delete from msc_resources_f
44: where plan_id = p_plan_id
45: and plan_run_id = p_plan_run_id

Line 50: msc_phub_util.log('msc_resources_f, delete='||sql%rowcount||', l_rowcount1='||l_rowcount1);

46: and (p_plan_id, sr_instance_id, organization_id, department_id, resource_id) in
47: (select number1, number2, number3, number4, number5 from msc_hub_query q where q.query_id = l_res_rn_qid);
48:
49: l_rowcount1 := l_rowcount1 + sql%rowcount;
50: msc_phub_util.log('msc_resources_f, delete='||sql%rowcount||', l_rowcount1='||l_rowcount1);
51:
52: if (l_enable_num not in (2)) then
53: delete from msc_resources_cum_f
54: where plan_id = p_plan_id

Line 60: msc_phub_util.log('msc_resources_cum_f, delete='||sql%rowcount||', l_rowcount2='||l_rowcount2);

56: and (p_plan_id, sr_instance_id, organization_id, department_id, resource_id) in
57: (select number1, number2, number3, number4, number5 from msc_hub_query q where q.query_id = l_res_rn_qid);
58:
59: l_rowcount2 := l_rowcount2 + sql%rowcount;
60: msc_phub_util.log('msc_resources_cum_f, delete='||sql%rowcount||', l_rowcount2='||l_rowcount2);
61: commit;
62: end if;
63: end if;
64: end if;

Line 66: msc_phub_util.log('msc_resource_pkg.populate_details: '||

62: end if;
63: end if;
64: end if;
65:
66: msc_phub_util.log('msc_resource_pkg.populate_details: '||
67: p_plan_id||','||p_plan_run_id||','||l_plan_type||','||
68: l_sr_instance_id||','||l_plan_start_date||','||l_plan_cutoff_date||','||
69: l_transfer_id||','||l_refresh_mode||','||l_res_rn_qid);
70:

Line 139: msc_phub_util.log('insert into msc_st_resources_f:requirements: '||sql%rowcount);

135: mrr.department_id,
136: mrr.resource_id,
137: trunc(decode(l_constrained_plan,1,mrr.start_date,nvl(mrr.end_date,mrr.start_date)));
138:
139: msc_phub_util.log('insert into msc_st_resources_f:requirements: '||sql%rowcount);
140: commit;
141:
142: -- msc_st_resources_f:availability
143: insert /*+ append nologging */ into msc_st_resources_f (

Line 197: msc_phub_util.log('insert into msc_st_resources_f:availability: '||sql%rowcount);

193: mra.department_id,
194: mra.resource_id,
195: trunc(mra.shift_date);
196:
197: msc_phub_util.log('insert into msc_st_resources_f:availability: '||sql%rowcount);
198: commit;
199:
200: -- msc_st_resources_f:orders
201: insert /*+ append nologging */ into msc_st_resources_f (

Line 263: msc_phub_util.log('insert into msc_st_resources_f:orders: '||sql%rowcount);

259: ms.inventory_item_id,
260: ms.transaction_id,
261: trunc(nvl(mrr.end_date,mrr.start_date));
262:
263: msc_phub_util.log('insert into msc_st_resources_f:orders: '||sql%rowcount);
264: commit;
265:
266: -- msc_st_resources_f:resource_cost
267: insert /*+ append nologging */ into msc_st_resources_f (

Line 359: msc_phub_util.log('insert into msc_st_resources_f:resource_cost: '||sql%rowcount);

355: and mcc.from_currency(+) = decode(l_plan_type, 6, l_owning_currency_code, t1.currency_code)
356: and mcc.calendar_date(+) = t1.resource_date
357: and p_plan_id <> -1;
358:
359: msc_phub_util.log('insert into msc_st_resources_f:resource_cost: '||sql%rowcount);
360: commit;
361:
362: -- msc_resources_f:final
363: msc_phub_util.gather_table_stats(msc_phub_util.stats_st, 'MSC_ST_RESOURCES_F', l_transfer_id);

Line 363: msc_phub_util.gather_table_stats(msc_phub_util.stats_st, 'MSC_ST_RESOURCES_F', l_transfer_id);

359: msc_phub_util.log('insert into msc_st_resources_f:resource_cost: '||sql%rowcount);
360: commit;
361:
362: -- msc_resources_f:final
363: msc_phub_util.gather_table_stats(msc_phub_util.stats_st, 'MSC_ST_RESOURCES_F', l_transfer_id);
364: insert into msc_resources_f (
365: plan_id,
366: plan_run_id,
367: sr_instance_id,

Line 421: msc_phub_util.log('insert into msc_st_resources_f:final: '||sql%rowcount);

417: inventory_item_id,
418: analysis_date;
419:
420: l_rowcount1 := l_rowcount1 + sql%rowcount;
421: msc_phub_util.log('insert into msc_st_resources_f:final: '||sql%rowcount);
422: commit;
423: msc_phub_util.gather_table_stats(msc_phub_util.stats_fact, 'MSC_RESOURCES_F', p_plan_run_id);
424:
425: if (l_enable_num not in (2)) then

Line 423: msc_phub_util.gather_table_stats(msc_phub_util.stats_fact, 'MSC_RESOURCES_F', p_plan_run_id);

419:
420: l_rowcount1 := l_rowcount1 + sql%rowcount;
421: msc_phub_util.log('insert into msc_st_resources_f:final: '||sql%rowcount);
422: commit;
423: msc_phub_util.gather_table_stats(msc_phub_util.stats_fact, 'MSC_RESOURCES_F', p_plan_run_id);
424:
425: if (l_enable_num not in (2)) then
426: -- msc_resources_cum_f
427: insert into msc_resources_cum_f (

Line 488: msc_phub_util.log('msc_resources_cum_f, insert='||sql%rowcount||', l_rowcount2='||l_rowcount2);

484: f.inventory_item_id,
485: d.calendar_date;
486:
487: l_rowcount2 := l_rowcount2 + sql%rowcount;
488: msc_phub_util.log('msc_resources_cum_f, insert='||sql%rowcount||', l_rowcount2='||l_rowcount2);
489: commit;
490: msc_phub_util.gather_table_stats(msc_phub_util.stats_fact, 'MSC_RESOURCES_CUM_F', p_plan_run_id);
491: end if;
492:

Line 490: msc_phub_util.gather_table_stats(msc_phub_util.stats_fact, 'MSC_RESOURCES_CUM_F', p_plan_run_id);

486:
487: l_rowcount2 := l_rowcount2 + sql%rowcount;
488: msc_phub_util.log('msc_resources_cum_f, insert='||sql%rowcount||', l_rowcount2='||l_rowcount2);
489: commit;
490: msc_phub_util.gather_table_stats(msc_phub_util.stats_fact, 'MSC_RESOURCES_CUM_F', p_plan_run_id);
491: end if;
492:
493: if (l_rowcount1 > 0) then
494: summarize_resources_f(errbuf, retcode, p_plan_id, p_plan_run_id);

Line 501: msc_phub_util.log('msc_resource_pkg.populate_details.complete, duration='||(systimestamp-l_start_time));

497: if (l_rowcount2 > 0) then
498: summarize_resources_cum_f(errbuf, retcode, p_plan_id, p_plan_run_id);
499: end if;
500:
501: msc_phub_util.log('msc_resource_pkg.populate_details.complete, duration='||(systimestamp-l_start_time));
502:
503: exception
504: when others then
505: msc_phub_util.log('msc_resource_pkg.populate_details: '||sqlerrm);

Line 505: msc_phub_util.log('msc_resource_pkg.populate_details: '||sqlerrm);

501: msc_phub_util.log('msc_resource_pkg.populate_details.complete, duration='||(systimestamp-l_start_time));
502:
503: exception
504: when others then
505: msc_phub_util.log('msc_resource_pkg.populate_details: '||sqlerrm);
506: raise;
507:
508: end populate_details;
509:

Line 515: msc_phub_util.log('msc_resource_pkg.summarize_resources_f');

511: procedure summarize_resources_f(errbuf out nocopy varchar2, retcode out nocopy varchar2,
512: p_plan_id number, p_plan_run_id number)
513: is
514: begin
515: msc_phub_util.log('msc_resource_pkg.summarize_resources_f');
516: retcode := 0;
517: errbuf := '';
518:
519: delete from msc_resources_f

Line 521: msc_phub_util.log('msc_resource_pkg.summarize_resources_f, delete='||sql%rowcount);

517: errbuf := '';
518:
519: delete from msc_resources_f
520: where plan_id=p_plan_id and plan_run_id=p_plan_run_id and aggr_type>0;
521: msc_phub_util.log('msc_resource_pkg.summarize_resources_f, delete='||sql%rowcount);
522: commit;
523:
524: -- level 1
525: insert into msc_resources_f (

Line 610: msc_phub_util.log('msc_resource_pkg.summarize_resources_f, level1='||sql%rowcount);

606: f.sr_instance_id, f.organization_id,
607: f.inventory_item_id, f.analysis_date,
608: nvl(r.resource_group_id, '-23453');
609:
610: msc_phub_util.log('msc_resource_pkg.summarize_resources_f, level1='||sql%rowcount);
611: commit;
612:
613: -- level 2
614: insert into msc_resources_f (

Line 700: msc_phub_util.log('msc_resource_pkg.summarize_resources_f, level2='||sql%rowcount);

696: f.department_id, f.resource_id,
697: f.inventory_item_id, d.fis_period_start_date,
698: f.resource_group;
699:
700: msc_phub_util.log('msc_resource_pkg.summarize_resources_f, level2='||sql%rowcount);
701: commit;
702:
703: exception
704: when others then

Line 715: msc_phub_util.log('msc_resource_pkg.summarize_resources_cum_f');

711: procedure summarize_resources_cum_f(errbuf out nocopy varchar2, retcode out nocopy varchar2,
712: p_plan_id number, p_plan_run_id number)
713: is
714: begin
715: msc_phub_util.log('msc_resource_pkg.summarize_resources_cum_f');
716: retcode := 0;
717: errbuf := '';
718:
719: delete from msc_resources_cum_f

Line 721: msc_phub_util.log('msc_resource_pkg.summarize_resources_cum_f, delete='||sql%rowcount);

717: errbuf := '';
718:
719: delete from msc_resources_cum_f
720: where plan_id=p_plan_id and plan_run_id=p_plan_run_id and aggr_type>0;
721: msc_phub_util.log('msc_resource_pkg.summarize_resources_cum_f, delete='||sql%rowcount);
722: commit;
723:
724: -- level 1
725: insert into msc_resources_cum_f (

Line 789: msc_phub_util.log('msc_resource_pkg.summarize_resources_cum_f, level1='||sql%rowcount);

785: f.sr_instance_id, f.organization_id,
786: f.inventory_item_id, f.analysis_date,
787: nvl(r.resource_group_id, '-23453');
788:
789: msc_phub_util.log('msc_resource_pkg.summarize_resources_cum_f, level1='||sql%rowcount);
790: commit;
791:
792: exception
793: when others then

Line 805: l_suffix varchar2(32) := msc_phub_util.suffix(p_dblink);

801: p_st_transaction_id number, p_plan_run_id number,
802: p_dblink varchar2, p_source_version varchar2)
803: is
804: l_sql varchar2(5000);
805: l_suffix varchar2(32) := msc_phub_util.suffix(p_dblink);
806: l_apps_schema varchar2(30) := msc_phub_util.apps_schema;
807: begin
808: msc_phub_util.log('msc_resource_pkg.export_resources_f');
809: retcode := 0;

Line 806: l_apps_schema varchar2(30) := msc_phub_util.apps_schema;

802: p_dblink varchar2, p_source_version varchar2)
803: is
804: l_sql varchar2(5000);
805: l_suffix varchar2(32) := msc_phub_util.suffix(p_dblink);
806: l_apps_schema varchar2(30) := msc_phub_util.apps_schema;
807: begin
808: msc_phub_util.log('msc_resource_pkg.export_resources_f');
809: retcode := 0;
810: errbuf := null;

Line 808: msc_phub_util.log('msc_resource_pkg.export_resources_f');

804: l_sql varchar2(5000);
805: l_suffix varchar2(32) := msc_phub_util.suffix(p_dblink);
806: l_apps_schema varchar2(30) := msc_phub_util.apps_schema;
807: begin
808: msc_phub_util.log('msc_resource_pkg.export_resources_f');
809: retcode := 0;
810: errbuf := null;
811:
812: delete from msc_st_resources_f where st_transaction_id=p_st_transaction_id;

Line 886: msc_phub_util.log('msc_resource_pkg.export_resources_f: complete, retcode='||retcode);

882: ' and mdr.organization_id(+)=f.organization_id';
883:
884: execute immediate l_sql using p_st_transaction_id, p_plan_run_id;
885: commit;
886: msc_phub_util.log('msc_resource_pkg.export_resources_f: complete, retcode='||retcode);
887:
888: exception
889: when others then
890: retcode := 2;

Line 892: msc_phub_util.log(errbuf);

888: exception
889: when others then
890: retcode := 2;
891: errbuf := 'msc_resource_pkg.export_resources_f: '||sqlerrm;
892: msc_phub_util.log(errbuf);
893: end export_resources_f;
894:
895: procedure export_resources_cum_f (
896: errbuf out nocopy varchar2, retcode out nocopy varchar2,

Line 901: l_suffix varchar2(32) := msc_phub_util.suffix(p_dblink);

897: p_st_transaction_id number, p_plan_run_id number,
898: p_dblink varchar2, p_source_version varchar2)
899: is
900: l_sql varchar2(5000);
901: l_suffix varchar2(32) := msc_phub_util.suffix(p_dblink);
902: l_apps_schema varchar2(30) := msc_phub_util.apps_schema;
903: begin
904: msc_phub_util.log('msc_resource_pkg.export_resources_cum_f');
905: retcode := 0;

Line 902: l_apps_schema varchar2(30) := msc_phub_util.apps_schema;

898: p_dblink varchar2, p_source_version varchar2)
899: is
900: l_sql varchar2(5000);
901: l_suffix varchar2(32) := msc_phub_util.suffix(p_dblink);
902: l_apps_schema varchar2(30) := msc_phub_util.apps_schema;
903: begin
904: msc_phub_util.log('msc_resource_pkg.export_resources_cum_f');
905: retcode := 0;
906: errbuf := null;

Line 904: msc_phub_util.log('msc_resource_pkg.export_resources_cum_f');

900: l_sql varchar2(5000);
901: l_suffix varchar2(32) := msc_phub_util.suffix(p_dblink);
902: l_apps_schema varchar2(30) := msc_phub_util.apps_schema;
903: begin
904: msc_phub_util.log('msc_resource_pkg.export_resources_cum_f');
905: retcode := 0;
906: errbuf := null;
907:
908: delete from msc_st_resources_cum_f where st_transaction_id=p_st_transaction_id;

Line 974: msc_phub_util.log('msc_resource_pkg.export_resources_cum_f: complete, retcode='||retcode);

970: ' and mdr.organization_id(+)=f.organization_id';
971:
972: execute immediate l_sql using p_st_transaction_id, p_plan_run_id;
973: commit;
974: msc_phub_util.log('msc_resource_pkg.export_resources_cum_f: complete, retcode='||retcode);
975:
976: exception
977: when others then
978: retcode := 2;

Line 980: msc_phub_util.log(errbuf);

976: exception
977: when others then
978: retcode := 2;
979: errbuf := 'msc_resource_pkg.export_resources_cum_f: '||sqlerrm;
980: msc_phub_util.log(errbuf);
981: end export_resources_cum_f;
982:
983: procedure import_resources_f (
984: errbuf out nocopy varchar2, retcode out nocopy varchar2,

Line 993: msc_phub_util.log('msc_resource_pkg.import_resources_f');

989: l_staging_table varchar2(30) := 'msc_st_resources_f';
990: l_fact_table varchar2(30) := 'msc_resources_f';
991: l_result number := 0;
992: begin
993: msc_phub_util.log('msc_resource_pkg.import_resources_f');
994: retcode := 0;
995: errbuf := null;
996:
997: l_result := l_result + msc_phub_util.prepare_staging_dates(

Line 997: l_result := l_result + msc_phub_util.prepare_staging_dates(

993: msc_phub_util.log('msc_resource_pkg.import_resources_f');
994: retcode := 0;
995: errbuf := null;
996:
997: l_result := l_result + msc_phub_util.prepare_staging_dates(
998: l_staging_table, 'analysis_date', p_st_transaction_id,
999: p_upload_mode, p_overwrite_after_date,
1000: p_plan_start_date, p_plan_cutoff_date);
1001:

Line 1002: l_result := l_result + msc_phub_util.prepare_fact_dates(

998: l_staging_table, 'analysis_date', p_st_transaction_id,
999: p_upload_mode, p_overwrite_after_date,
1000: p_plan_start_date, p_plan_cutoff_date);
1001:
1002: l_result := l_result + msc_phub_util.prepare_fact_dates(
1003: l_fact_table, 1, 'analysis_date', p_plan_id, p_plan_run_id,
1004: p_upload_mode, p_overwrite_after_date);
1005:
1006: l_result := l_result + msc_phub_util.decode_organization_key(

Line 1006: l_result := l_result + msc_phub_util.decode_organization_key(

1002: l_result := l_result + msc_phub_util.prepare_fact_dates(
1003: l_fact_table, 1, 'analysis_date', p_plan_id, p_plan_run_id,
1004: p_upload_mode, p_overwrite_after_date);
1005:
1006: l_result := l_result + msc_phub_util.decode_organization_key(
1007: l_staging_table, p_st_transaction_id, p_def_instance_code,
1008: 'sr_instance_id', 'organization_id', 'organization_code');
1009:
1010: l_result := l_result + msc_phub_util.decode_item_key(

Line 1010: l_result := l_result + msc_phub_util.decode_item_key(

1006: l_result := l_result + msc_phub_util.decode_organization_key(
1007: l_staging_table, p_st_transaction_id, p_def_instance_code,
1008: 'sr_instance_id', 'organization_id', 'organization_code');
1009:
1010: l_result := l_result + msc_phub_util.decode_item_key(
1011: l_staging_table, p_st_transaction_id, 'inventory_item_id', 'item_name');
1012:
1013: l_result := l_result + msc_phub_util.decode_resource_key(
1014: l_staging_table, p_st_transaction_id);

Line 1013: l_result := l_result + msc_phub_util.decode_resource_key(

1009:
1010: l_result := l_result + msc_phub_util.decode_item_key(
1011: l_staging_table, p_st_transaction_id, 'inventory_item_id', 'item_name');
1012:
1013: l_result := l_result + msc_phub_util.decode_resource_key(
1014: l_staging_table, p_st_transaction_id);
1015:
1016: msc_phub_util.log('msc_resource_pkg.import_resources_f: insert into msc_resources_f');
1017: insert into msc_resources_f (

Line 1016: msc_phub_util.log('msc_resource_pkg.import_resources_f: insert into msc_resources_f');

1012:
1013: l_result := l_result + msc_phub_util.decode_resource_key(
1014: l_staging_table, p_st_transaction_id);
1015:
1016: msc_phub_util.log('msc_resource_pkg.import_resources_f: insert into msc_resources_f');
1017: insert into msc_resources_f (
1018: plan_id,
1019: plan_run_id,
1020: sr_instance_id,

Line 1061: msc_phub_util.log('msc_resource_pkg.import_resources_f: inserted='||sql%rowcount);

1057: fnd_global.user_id, sysdate, fnd_global.login_id
1058: from msc_st_resources_f
1059: where st_transaction_id=p_st_transaction_id and error_code=0;
1060:
1061: msc_phub_util.log('msc_resource_pkg.import_resources_f: inserted='||sql%rowcount);
1062: commit;
1063:
1064: summarize_resources_f(errbuf, retcode, p_plan_id, p_plan_run_id);
1065:

Line 1070: msc_phub_util.log('msc_resource_pkg.import_resources_f: complete, retcode='||retcode);

1066: if (l_result > 0) then
1067: retcode := -1;
1068: end if;
1069:
1070: msc_phub_util.log('msc_resource_pkg.import_resources_f: complete, retcode='||retcode);
1071:
1072: exception
1073: when others then
1074: retcode := 2;

Line 1076: msc_phub_util.log(errbuf);

1072: exception
1073: when others then
1074: retcode := 2;
1075: errbuf := 'msc_resource_pkg.import_resources_f: '||sqlerrm;
1076: msc_phub_util.log(errbuf);
1077: end import_resources_f;
1078:
1079: procedure import_resources_cum_f (
1080: errbuf out nocopy varchar2, retcode out nocopy varchar2,

Line 1089: msc_phub_util.log('msc_resource_pkg.import_resources_cum_f');

1085: l_staging_table varchar2(30) := 'msc_st_resources_cum_f';
1086: l_fact_table varchar2(30) := 'msc_resources_cum_f';
1087: l_result number := 0;
1088: begin
1089: msc_phub_util.log('msc_resource_pkg.import_resources_cum_f');
1090: retcode := 0;
1091: errbuf := null;
1092:
1093: l_result := l_result + msc_phub_util.prepare_staging_dates(

Line 1093: l_result := l_result + msc_phub_util.prepare_staging_dates(

1089: msc_phub_util.log('msc_resource_pkg.import_resources_cum_f');
1090: retcode := 0;
1091: errbuf := null;
1092:
1093: l_result := l_result + msc_phub_util.prepare_staging_dates(
1094: l_staging_table, 'analysis_date', p_st_transaction_id,
1095: p_upload_mode, p_overwrite_after_date,
1096: p_plan_start_date, p_plan_cutoff_date);
1097:

Line 1098: l_result := l_result + msc_phub_util.prepare_fact_dates(

1094: l_staging_table, 'analysis_date', p_st_transaction_id,
1095: p_upload_mode, p_overwrite_after_date,
1096: p_plan_start_date, p_plan_cutoff_date);
1097:
1098: l_result := l_result + msc_phub_util.prepare_fact_dates(
1099: l_fact_table, 1, 'analysis_date', p_plan_id, p_plan_run_id,
1100: p_upload_mode, p_overwrite_after_date);
1101:
1102: l_result := l_result + msc_phub_util.decode_organization_key(

Line 1102: l_result := l_result + msc_phub_util.decode_organization_key(

1098: l_result := l_result + msc_phub_util.prepare_fact_dates(
1099: l_fact_table, 1, 'analysis_date', p_plan_id, p_plan_run_id,
1100: p_upload_mode, p_overwrite_after_date);
1101:
1102: l_result := l_result + msc_phub_util.decode_organization_key(
1103: l_staging_table, p_st_transaction_id, p_def_instance_code,
1104: 'sr_instance_id', 'organization_id', 'organization_code');
1105:
1106: l_result := l_result + msc_phub_util.decode_item_key(

Line 1106: l_result := l_result + msc_phub_util.decode_item_key(

1102: l_result := l_result + msc_phub_util.decode_organization_key(
1103: l_staging_table, p_st_transaction_id, p_def_instance_code,
1104: 'sr_instance_id', 'organization_id', 'organization_code');
1105:
1106: l_result := l_result + msc_phub_util.decode_item_key(
1107: l_staging_table, p_st_transaction_id, 'inventory_item_id', 'item_name');
1108:
1109: l_result := l_result + msc_phub_util.decode_resource_key(
1110: l_staging_table, p_st_transaction_id);

Line 1109: l_result := l_result + msc_phub_util.decode_resource_key(

1105:
1106: l_result := l_result + msc_phub_util.decode_item_key(
1107: l_staging_table, p_st_transaction_id, 'inventory_item_id', 'item_name');
1108:
1109: l_result := l_result + msc_phub_util.decode_resource_key(
1110: l_staging_table, p_st_transaction_id);
1111:
1112: msc_phub_util.log('msc_resource_pkg.import_resources_cum_f: insert into msc_resources_cum_f');
1113: insert into msc_resources_cum_f (

Line 1112: msc_phub_util.log('msc_resource_pkg.import_resources_cum_f: insert into msc_resources_cum_f');

1108:
1109: l_result := l_result + msc_phub_util.decode_resource_key(
1110: l_staging_table, p_st_transaction_id);
1111:
1112: msc_phub_util.log('msc_resource_pkg.import_resources_cum_f: insert into msc_resources_cum_f');
1113: insert into msc_resources_cum_f (
1114: plan_id,
1115: plan_run_id,
1116: sr_instance_id,

Line 1143: msc_phub_util.log('msc_resource_pkg.import_resources_cum_f: inserted='||sql%rowcount);

1139: fnd_global.user_id, sysdate, fnd_global.login_id
1140: from msc_st_resources_cum_f
1141: where st_transaction_id=p_st_transaction_id and error_code=0;
1142:
1143: msc_phub_util.log('msc_resource_pkg.import_resources_cum_f: inserted='||sql%rowcount);
1144: commit;
1145:
1146: summarize_resources_cum_f(errbuf, retcode, p_plan_id, p_plan_run_id);
1147:

Line 1152: msc_phub_util.log('msc_resource_pkg.import_resources_cum_f: complete, retcode='||retcode);

1148: if (l_result > 0) then
1149: retcode := -1;
1150: end if;
1151:
1152: msc_phub_util.log('msc_resource_pkg.import_resources_cum_f: complete, retcode='||retcode);
1153:
1154: exception
1155: when others then
1156: retcode := 2;

Line 1158: msc_phub_util.log(errbuf);

1154: exception
1155: when others then
1156: retcode := 2;
1157: errbuf := 'msc_resource_pkg.import_resources_cum_f: '||sqlerrm;
1158: msc_phub_util.log(errbuf);
1159: end import_resources_cum_f;
1160:
1161: end msc_resource_pkg;