DBA Data[Home] [Help]

APPS.MSC_SUPPLY_PKG dependencies on MSC_PHUB_UTIL

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

37: l_item_rn_qid number;
38: l_rowcount1 number := 0;
39: l_rowcount2 number := 0;
40: l_pegging_granularity number := 2;
41: l_owning_currency_code varchar2(20) := msc_phub_util.get_owning_currency_code(p_plan_run_id);
42: l_start_time timestamp := systimestamp;
43: begin
44:
45: msc_phub_util.log('msc_supply_pkg.populate_details');

Line 45: msc_phub_util.log('msc_supply_pkg.populate_details');

41: l_owning_currency_code varchar2(20) := msc_phub_util.get_owning_currency_code(p_plan_run_id);
42: l_start_time timestamp := systimestamp;
43: begin
44:
45: msc_phub_util.log('msc_supply_pkg.populate_details');
46: retcode :=0; -- this means successfully
47: errbuf :='';
48:
49: -- ODS plan

Line 59: l_item_rn_qid := msc_phub_util.get_item_rn_qid(p_plan_id, p_plan_run_id);

55: where plan_run_id = p_plan_run_id;
56:
57: if l_refresh_mode = 2 -- targeted refesh
58: then
59: l_item_rn_qid := msc_phub_util.get_item_rn_qid(p_plan_id, p_plan_run_id);
60:
61: delete from msc_supplies_f
62: where plan_id = p_plan_id
63: and plan_run_id = p_plan_run_id

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

64: and (p_plan_id, sr_instance_id, organization_id, inventory_item_id) in
65: (select number1, number2, number3, number4 from msc_hub_query q where q.query_id = l_item_rn_qid);
66:
67: l_rowcount1 := l_rowcount1 + sql%rowcount;
68: msc_phub_util.log('msc_supplies_f, delete='||sql%rowcount||', l_rowcount1='||l_rowcount1);
69: commit;
70:
71: delete from msc_item_wips_f
72: where plan_id = p_plan_id

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

74: and (p_plan_id, sr_instance_id, organization_id, inventory_item_id) in
75: (select number1, number2, number3, number4 from msc_hub_query q where q.query_id = l_item_rn_qid);
76:
77: l_rowcount2 := l_rowcount2 + sql%rowcount;
78: msc_phub_util.log('msc_item_wips_f, delete='||sql%rowcount||', l_rowcount2='||l_rowcount2);
79: commit;
80: end if;
81: end if;
82:

Line 102: msc_phub_util.log('msc_supply_pkg.populate_details: '||

98: l_pegging_granularity := nvl(fnd_profile.value('MSC_APCC_END_ITEM_ENABLED'), 2);
99: end if;
100:
101:
102: msc_phub_util.log('msc_supply_pkg.populate_details: '||
103: p_plan_id||','||p_plan_run_id||','||l_plan_type||','||
104: l_sr_instance_id||','||l_plan_start_date||','||l_plan_cutoff_date||','||
105: l_refresh_mode||','||l_item_rn_qid||','||l_pegging_granularity);
106:

Line 108: msc_phub_util.gather_table_stats(msc_phub_util.stats_pds, 'MSC_SUPPLIES');

104: l_sr_instance_id||','||l_plan_start_date||','||l_plan_cutoff_date||','||
105: l_refresh_mode||','||l_item_rn_qid||','||l_pegging_granularity);
106:
107: ----------------------------------------------------
108: msc_phub_util.gather_table_stats(msc_phub_util.stats_pds, 'MSC_SUPPLIES');
109: msc_phub_util.gather_table_stats(msc_phub_util.stats_pds, 'MSC_FULL_PEGGING');
110: insert into msc_supplies_f (
111: plan_id, -- plan_id
112: plan_run_id,

Line 109: msc_phub_util.gather_table_stats(msc_phub_util.stats_pds, 'MSC_FULL_PEGGING');

105: l_refresh_mode||','||l_item_rn_qid||','||l_pegging_granularity);
106:
107: ----------------------------------------------------
108: msc_phub_util.gather_table_stats(msc_phub_util.stats_pds, 'MSC_SUPPLIES');
109: msc_phub_util.gather_table_stats(msc_phub_util.stats_pds, 'MSC_FULL_PEGGING');
110: insert into msc_supplies_f (
111: plan_id, -- plan_id
112: plan_run_id,
113: io_plan_flag, --- this flag indidate whether it is an io plan

Line 478: msc_phub_util.log('msc_supplies_f, insert='||sql%rowcount||', l_rowcount1='||l_rowcount1);

474: supply_tbl.supply_type,
475: supply_tbl.vmi_flag;
476:
477: l_rowcount1 := l_rowcount1 + sql%rowcount;
478: msc_phub_util.log('msc_supplies_f, insert='||sql%rowcount||', l_rowcount1='||l_rowcount1);
479: commit;
480: msc_phub_util.gather_table_stats(msc_phub_util.stats_fact, 'MSC_SUPPLIES_F', p_plan_run_id);
481:
482:

Line 480: msc_phub_util.gather_table_stats(msc_phub_util.stats_fact, 'MSC_SUPPLIES_F', p_plan_run_id);

476:
477: l_rowcount1 := l_rowcount1 + sql%rowcount;
478: msc_phub_util.log('msc_supplies_f, insert='||sql%rowcount||', l_rowcount1='||l_rowcount1);
479: commit;
480: msc_phub_util.gather_table_stats(msc_phub_util.stats_fact, 'MSC_SUPPLIES_F', p_plan_run_id);
481:
482:
483: --- populate wip start qty
484: --- msc_item_wip_f

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

568: wip_tbl.vmi_flag,
569: decode(sign(to_number(wip_tbl.wip_start_date-l_plan_start_date)),-1,l_plan_start_date,wip_tbl.wip_start_date);
570:
571: l_rowcount2 := l_rowcount2 + sql%rowcount;
572: msc_phub_util.log('msc_item_wips_f, insert='||sql%rowcount||', l_rowcount2='||l_rowcount2);
573: commit;
574: msc_phub_util.gather_table_stats(msc_phub_util.stats_fact, 'MSC_ITEM_WIPS_F', p_plan_run_id);
575:
576: if (l_rowcount1 > 0) then

Line 574: msc_phub_util.gather_table_stats(msc_phub_util.stats_fact, 'MSC_ITEM_WIPS_F', p_plan_run_id);

570:
571: l_rowcount2 := l_rowcount2 + sql%rowcount;
572: msc_phub_util.log('msc_item_wips_f, insert='||sql%rowcount||', l_rowcount2='||l_rowcount2);
573: commit;
574: msc_phub_util.gather_table_stats(msc_phub_util.stats_fact, 'MSC_ITEM_WIPS_F', p_plan_run_id);
575:
576: if (l_rowcount1 > 0) then
577: summarize_supplies_f(errbuf, retcode, p_plan_id, p_plan_run_id);
578: end if;

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

580: if (l_rowcount2 > 0) then
581: summarize_item_wips_f(errbuf, retcode, p_plan_id, p_plan_run_id);
582: end if;
583:
584: msc_phub_util.log('msc_supply_pkg.populate_details.complete, duration='||(systimestamp-l_start_time));
585:
586: exception
587: when no_data_found then
588: retcode :=2;

Line 589: errbuf := msc_phub_util.get_planning_hub_message('MSC_HUB_DUPLICATE_DATA')||SQLCODE||' -ERROR- '||sqlerrm;

585:
586: exception
587: when no_data_found then
588: retcode :=2;
589: errbuf := msc_phub_util.get_planning_hub_message('MSC_HUB_DUPLICATE_DATA')||SQLCODE||' -ERROR- '||sqlerrm;
590: msc_phub_util.log('msc_supply_pkg.populate_details.exception: '||errbuf);
591:
592:
593: when dup_val_on_index then

Line 590: msc_phub_util.log('msc_supply_pkg.populate_details.exception: '||errbuf);

586: exception
587: when no_data_found then
588: retcode :=2;
589: errbuf := msc_phub_util.get_planning_hub_message('MSC_HUB_DUPLICATE_DATA')||SQLCODE||' -ERROR- '||sqlerrm;
590: msc_phub_util.log('msc_supply_pkg.populate_details.exception: '||errbuf);
591:
592:
593: when dup_val_on_index then
594: retcode :=2;

Line 595: errbuf := msc_phub_util.get_planning_hub_message('MSC_HUB_DUPLICATE_DATA')||SQLCODE||' -ERROR- '||sqlerrm;

591:
592:
593: when dup_val_on_index then
594: retcode :=2;
595: errbuf := msc_phub_util.get_planning_hub_message('MSC_HUB_DUPLICATE_DATA')||SQLCODE||' -ERROR- '||sqlerrm;
596: msc_phub_util.log('msc_supply_pkg.populate_details.exception: '||errbuf);
597:
598: when others then
599: retcode :=2;

Line 596: msc_phub_util.log('msc_supply_pkg.populate_details.exception: '||errbuf);

592:
593: when dup_val_on_index then
594: retcode :=2;
595: errbuf := msc_phub_util.get_planning_hub_message('MSC_HUB_DUPLICATE_DATA')||SQLCODE||' -ERROR- '||sqlerrm;
596: msc_phub_util.log('msc_supply_pkg.populate_details.exception: '||errbuf);
597:
598: when others then
599: retcode :=2;
600: errbuf := msc_phub_util.get_planning_hub_message('MSC_HUB_POPULATE_ERROR')||SQLCODE||' -ERROR- '||sqlerrm;

Line 600: errbuf := msc_phub_util.get_planning_hub_message('MSC_HUB_POPULATE_ERROR')||SQLCODE||' -ERROR- '||sqlerrm;

596: msc_phub_util.log('msc_supply_pkg.populate_details.exception: '||errbuf);
597:
598: when others then
599: retcode :=2;
600: errbuf := msc_phub_util.get_planning_hub_message('MSC_HUB_POPULATE_ERROR')||SQLCODE||' -ERROR- '||sqlerrm;
601: msc_phub_util.log('msc_supply_pkg.populate_details.exception: '||errbuf);
602:
603:
604: end populate_details;

Line 601: msc_phub_util.log('msc_supply_pkg.populate_details.exception: '||errbuf);

597:
598: when others then
599: retcode :=2;
600: errbuf := msc_phub_util.get_planning_hub_message('MSC_HUB_POPULATE_ERROR')||SQLCODE||' -ERROR- '||sqlerrm;
601: msc_phub_util.log('msc_supply_pkg.populate_details.exception: '||errbuf);
602:
603:
604: end populate_details;
605:

Line 612: msc_phub_util.log('msc_supply_pkg.summarize_supplies_f');

608: p_plan_id number, p_plan_run_id number)
609: is
610: l_category_set_id1 number := fnd_profile.value('MSC_HUB_CAT_SET_ID_1');
611: begin
612: msc_phub_util.log('msc_supply_pkg.summarize_supplies_f');
613: retcode := 0;
614: errbuf := '';
615:
616: delete from msc_supplies_f

Line 618: msc_phub_util.log('msc_supply_pkg.summarize_supplies_f, delete='||sql%rowcount);

614: errbuf := '';
615:
616: delete from msc_supplies_f
617: where plan_id=p_plan_id and plan_run_id=p_plan_run_id and aggr_type>0;
618: msc_phub_util.log('msc_supply_pkg.summarize_supplies_f, delete='||sql%rowcount);
619: commit;
620:
621: -- level 1
622: insert into msc_supplies_f (

Line 735: msc_phub_util.log('msc_supply_pkg.summarize_supplies_f, level1='||sql%rowcount);

731: nvl(ic2.sr_category_id, -23453),
732: nvl(ic3.sr_category_id, -23453),
733: f.supply_type, f.vmi_flag;
734:
735: msc_phub_util.log('msc_supply_pkg.summarize_supplies_f, level1='||sql%rowcount);
736: commit;
737:
738: -- level 2
739: insert into msc_supplies_f (

Line 908: msc_phub_util.log('msc_supply_pkg.summarize_supplies_f, level2='||sql%rowcount);

904: f.end_item_cat_id,
905: f.parent_model_cat_id,
906: f.supply_type, f.vmi_flag;
907:
908: msc_phub_util.log('msc_supply_pkg.summarize_supplies_f, level2='||sql%rowcount);
909: commit;
910:
911: exception
912: when others then

Line 923: msc_phub_util.log('msc_supply_pkg.summarize_item_wips_f');

919: p_plan_id number, p_plan_run_id number)
920: is
921: l_category_set_id1 number := fnd_profile.value('MSC_HUB_CAT_SET_ID_1');
922: begin
923: msc_phub_util.log('msc_supply_pkg.summarize_item_wips_f');
924: retcode := 0;
925: errbuf := '';
926:
927: delete from msc_item_wips_f

Line 929: msc_phub_util.log('msc_supply_pkg.summarize_item_wips_f, delete='||sql%rowcount);

925: errbuf := '';
926:
927: delete from msc_item_wips_f
928: where plan_id=p_plan_id and plan_run_id=p_plan_run_id and aggr_type>0;
929: msc_phub_util.log('msc_supply_pkg.summarize_item_wips_f, delete='||sql%rowcount);
930: commit;
931:
932: -- level 1
933: insert into msc_item_wips_f (

Line 972: msc_phub_util.log('msc_supply_pkg.summarize_item_wips_f, level1='||sql%rowcount);

968: f.sr_instance_id, f.organization_id,
969: f.vmi_flag, f.wip_start_date,
970: nvl(q.sr_category_id, -23453);
971:
972: msc_phub_util.log('msc_supply_pkg.summarize_item_wips_f, level1='||sql%rowcount);
973: commit;
974:
975: -- level 2
976: insert into msc_item_wips_f (

Line 1042: msc_phub_util.log('msc_supply_pkg.summarize_item_wips_f, level2='||sql%rowcount);

1038: d.fis_period_start_date,
1039: decode(f.aggr_type, 42, 1019, 43, 1020, 1021),
1040: f.category_set_id, f.sr_category_id;
1041:
1042: msc_phub_util.log('msc_supply_pkg.summarize_item_wips_f, level2='||sql%rowcount);
1043: commit;
1044:
1045: exception
1046: when others then

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

1054: p_st_transaction_id number, p_plan_run_id number,
1055: p_dblink varchar2, p_source_version varchar2)
1056: is
1057: l_sql varchar2(5000);
1058: l_suffix varchar2(32) := msc_phub_util.suffix(p_dblink);
1059: l_apps_schema varchar2(30) := msc_phub_util.apps_schema;
1060: begin
1061: msc_phub_util.log('msc_supply_pkg.export_supplies_f');
1062: retcode := 0;

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

1055: p_dblink varchar2, p_source_version varchar2)
1056: is
1057: l_sql varchar2(5000);
1058: l_suffix varchar2(32) := msc_phub_util.suffix(p_dblink);
1059: l_apps_schema varchar2(30) := msc_phub_util.apps_schema;
1060: begin
1061: msc_phub_util.log('msc_supply_pkg.export_supplies_f');
1062: retcode := 0;
1063: errbuf := null;

Line 1061: msc_phub_util.log('msc_supply_pkg.export_supplies_f');

1057: l_sql varchar2(5000);
1058: l_suffix varchar2(32) := msc_phub_util.suffix(p_dblink);
1059: l_apps_schema varchar2(30) := msc_phub_util.apps_schema;
1060: begin
1061: msc_phub_util.log('msc_supply_pkg.export_supplies_f');
1062: retcode := 0;
1063: errbuf := null;
1064:
1065: delete from msc_st_supplies_f where st_transaction_id=p_st_transaction_id;

Line 1262: msc_phub_util.log('msc_supply_pkg.export_supplies_f: inserted='||sql%rowcount);

1258: ' and proj.sr_instance_id(+)=f.sr_instance_id'||
1259: ' and proj.organization_id(+)=f.organization_id';
1260:
1261: execute immediate l_sql using p_st_transaction_id, p_plan_run_id;
1262: msc_phub_util.log('msc_supply_pkg.export_supplies_f: inserted='||sql%rowcount);
1263: commit;
1264: msc_phub_util.log('msc_supply_pkg.export_supplies_f: complete, retcode='||retcode);
1265:
1266: exception

Line 1264: msc_phub_util.log('msc_supply_pkg.export_supplies_f: complete, retcode='||retcode);

1260:
1261: execute immediate l_sql using p_st_transaction_id, p_plan_run_id;
1262: msc_phub_util.log('msc_supply_pkg.export_supplies_f: inserted='||sql%rowcount);
1263: commit;
1264: msc_phub_util.log('msc_supply_pkg.export_supplies_f: complete, retcode='||retcode);
1265:
1266: exception
1267: when others then
1268: retcode := 2;

Line 1270: msc_phub_util.log(errbuf);

1266: exception
1267: when others then
1268: retcode := 2;
1269: errbuf := 'msc_supply_pkg.export_supplies_f: '||sqlerrm;
1270: msc_phub_util.log(errbuf);
1271: end export_supplies_f;
1272:
1273: procedure export_item_wips_f (
1274: errbuf out nocopy varchar2, retcode out nocopy varchar2,

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

1275: p_st_transaction_id number, p_plan_run_id number,
1276: p_dblink varchar2, p_source_version varchar2)
1277: is
1278: l_sql varchar2(5000);
1279: l_suffix varchar2(32) := msc_phub_util.suffix(p_dblink);
1280: l_apps_schema varchar2(30) := msc_phub_util.apps_schema;
1281: begin
1282: msc_phub_util.log('msc_supply_pkg.export_item_wips_f');
1283: retcode := 0;

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

1276: p_dblink varchar2, p_source_version varchar2)
1277: is
1278: l_sql varchar2(5000);
1279: l_suffix varchar2(32) := msc_phub_util.suffix(p_dblink);
1280: l_apps_schema varchar2(30) := msc_phub_util.apps_schema;
1281: begin
1282: msc_phub_util.log('msc_supply_pkg.export_item_wips_f');
1283: retcode := 0;
1284: errbuf := null;

Line 1282: msc_phub_util.log('msc_supply_pkg.export_item_wips_f');

1278: l_sql varchar2(5000);
1279: l_suffix varchar2(32) := msc_phub_util.suffix(p_dblink);
1280: l_apps_schema varchar2(30) := msc_phub_util.apps_schema;
1281: begin
1282: msc_phub_util.log('msc_supply_pkg.export_item_wips_f');
1283: retcode := 0;
1284: errbuf := null;
1285:
1286: delete from msc_st_item_wips_f where st_transaction_id=p_st_transaction_id;

Line 1329: msc_phub_util.log('msc_supply_pkg.export_item_wips_f: inserted='||sql%rowcount);

1325: ' and mtp.sr_tp_id(+)=f.organization_id'||
1326: ' and mi.inventory_item_id(+)=f.inventory_item_id';
1327:
1328: execute immediate l_sql using p_st_transaction_id, p_plan_run_id;
1329: msc_phub_util.log('msc_supply_pkg.export_item_wips_f: inserted='||sql%rowcount);
1330: commit;
1331: msc_phub_util.log('msc_supply_pkg.export_item_wips_f: complete, retcode='||retcode);
1332:
1333: exception

Line 1331: msc_phub_util.log('msc_supply_pkg.export_item_wips_f: complete, retcode='||retcode);

1327:
1328: execute immediate l_sql using p_st_transaction_id, p_plan_run_id;
1329: msc_phub_util.log('msc_supply_pkg.export_item_wips_f: inserted='||sql%rowcount);
1330: commit;
1331: msc_phub_util.log('msc_supply_pkg.export_item_wips_f: complete, retcode='||retcode);
1332:
1333: exception
1334: when others then
1335: retcode := 2;

Line 1337: msc_phub_util.log(errbuf);

1333: exception
1334: when others then
1335: retcode := 2;
1336: errbuf := 'msc_supply_pkg.export_item_wips_f: '||sqlerrm;
1337: msc_phub_util.log(errbuf);
1338: end export_item_wips_f;
1339:
1340: procedure import_supplies_f (
1341: errbuf out nocopy varchar2, retcode out nocopy varchar2,

Line 1350: msc_phub_util.log('msc_supply_pkg.import_supplies_f');

1346: l_staging_table varchar2(30) := 'msc_st_supplies_f';
1347: l_fact_table varchar2(30) := 'msc_supplies_f';
1348: l_result number := 0;
1349: begin
1350: msc_phub_util.log('msc_supply_pkg.import_supplies_f');
1351: retcode := 0;
1352: errbuf := null;
1353:
1354: l_result := l_result + msc_phub_util.prepare_staging_dates(

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

1350: msc_phub_util.log('msc_supply_pkg.import_supplies_f');
1351: retcode := 0;
1352: errbuf := null;
1353:
1354: l_result := l_result + msc_phub_util.prepare_staging_dates(
1355: l_staging_table, 'supply_date', p_st_transaction_id,
1356: p_upload_mode, p_overwrite_after_date,
1357: p_plan_start_date, p_plan_cutoff_date);
1358:

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

1355: l_staging_table, 'supply_date', p_st_transaction_id,
1356: p_upload_mode, p_overwrite_after_date,
1357: p_plan_start_date, p_plan_cutoff_date);
1358:
1359: l_result := l_result + msc_phub_util.prepare_fact_dates(
1360: l_fact_table, 1, 'supply_date', p_plan_id, p_plan_run_id,
1361: p_upload_mode, p_overwrite_after_date);
1362:
1363: l_result := l_result + msc_phub_util.decode_organization_key(

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

1359: l_result := l_result + msc_phub_util.prepare_fact_dates(
1360: l_fact_table, 1, 'supply_date', p_plan_id, p_plan_run_id,
1361: p_upload_mode, p_overwrite_after_date);
1362:
1363: l_result := l_result + msc_phub_util.decode_organization_key(
1364: l_staging_table, p_st_transaction_id, p_def_instance_code,
1365: 'sr_instance_id', 'organization_id', 'organization_code');
1366:
1367: l_result := l_result + msc_phub_util.decode_organization_key(

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

1363: l_result := l_result + msc_phub_util.decode_organization_key(
1364: l_staging_table, p_st_transaction_id, p_def_instance_code,
1365: 'sr_instance_id', 'organization_id', 'organization_code');
1366:
1367: l_result := l_result + msc_phub_util.decode_organization_key(
1368: l_staging_table, p_st_transaction_id, p_def_instance_code,
1369: 'owning_inst_id', 'owning_org_id', 'owning_org_code');
1370:
1371: l_result := l_result + msc_phub_util.decode_organization_key(

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

1367: l_result := l_result + msc_phub_util.decode_organization_key(
1368: l_staging_table, p_st_transaction_id, p_def_instance_code,
1369: 'owning_inst_id', 'owning_org_id', 'owning_org_code');
1370:
1371: l_result := l_result + msc_phub_util.decode_organization_key(
1372: l_staging_table, p_st_transaction_id, p_def_instance_code,
1373: 'source_org_instance_id', 'source_organization_id', 'source_org_code');
1374:
1375: l_result := l_result + msc_phub_util.decode_item_key(

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

1371: l_result := l_result + msc_phub_util.decode_organization_key(
1372: l_staging_table, p_st_transaction_id, p_def_instance_code,
1373: 'source_org_instance_id', 'source_organization_id', 'source_org_code');
1374:
1375: l_result := l_result + msc_phub_util.decode_item_key(
1376: l_staging_table, p_st_transaction_id, 'inventory_item_id', 'item_name');
1377:
1378: l_result := l_result + msc_phub_util.decode_supplier_key(
1379: l_staging_table, p_st_transaction_id,

Line 1378: l_result := l_result + msc_phub_util.decode_supplier_key(

1374:
1375: l_result := l_result + msc_phub_util.decode_item_key(
1376: l_staging_table, p_st_transaction_id, 'inventory_item_id', 'item_name');
1377:
1378: l_result := l_result + msc_phub_util.decode_supplier_key(
1379: l_staging_table, p_st_transaction_id,
1380: 'supplier_id', 'supplier_site_id',
1381: 'supplier_name', 'supplier_site_code');
1382:

Line 1383: l_result := l_result + msc_phub_util.decode_project_key(

1379: l_staging_table, p_st_transaction_id,
1380: 'supplier_id', 'supplier_site_id',
1381: 'supplier_name', 'supplier_site_code');
1382:
1383: l_result := l_result + msc_phub_util.decode_project_key(
1384: l_staging_table, p_st_transaction_id);
1385:
1386: l_result := l_result + msc_phub_util.decode_customer_key(
1387: l_staging_table, p_st_transaction_id,

Line 1386: l_result := l_result + msc_phub_util.decode_customer_key(

1382:
1383: l_result := l_result + msc_phub_util.decode_project_key(
1384: l_staging_table, p_st_transaction_id);
1385:
1386: l_result := l_result + msc_phub_util.decode_customer_key(
1387: l_staging_table, p_st_transaction_id,
1388: null, null, 'owning_inst_id', 'customer_region_id',
1389: null, null, 'customer_zone');
1390:

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

1387: l_staging_table, p_st_transaction_id,
1388: null, null, 'owning_inst_id', 'customer_region_id',
1389: null, null, 'customer_zone');
1390:
1391: l_result := l_result + msc_phub_util.decode_organization_key(
1392: l_staging_table, p_st_transaction_id, p_def_instance_code,
1393: 'end_item_inst_id', 'end_item_org_id', 'end_item_org_code');
1394:
1395: l_result := l_result + msc_phub_util.decode_item_key(

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

1391: l_result := l_result + msc_phub_util.decode_organization_key(
1392: l_staging_table, p_st_transaction_id, p_def_instance_code,
1393: 'end_item_inst_id', 'end_item_org_id', 'end_item_org_code');
1394:
1395: l_result := l_result + msc_phub_util.decode_item_key(
1396: l_staging_table, p_st_transaction_id, 'end_item_id', 'end_item_name');
1397:
1398: l_result := l_result + msc_phub_util.decode_item_key(
1399: l_staging_table, p_st_transaction_id, 'parent_model_item_id', 'parent_model_item_name');

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

1394:
1395: l_result := l_result + msc_phub_util.decode_item_key(
1396: l_staging_table, p_st_transaction_id, 'end_item_id', 'end_item_name');
1397:
1398: l_result := l_result + msc_phub_util.decode_item_key(
1399: l_staging_table, p_st_transaction_id, 'parent_model_item_id', 'parent_model_item_name');
1400:
1401: msc_phub_util.log('msc_supply_pkg.import_supplies_f: insert into msc_supplies_f');
1402: insert into msc_supplies_f (

Line 1401: msc_phub_util.log('msc_supply_pkg.import_supplies_f: insert into msc_supplies_f');

1397:
1398: l_result := l_result + msc_phub_util.decode_item_key(
1399: l_staging_table, p_st_transaction_id, 'parent_model_item_id', 'parent_model_item_name');
1400:
1401: msc_phub_util.log('msc_supply_pkg.import_supplies_f: insert into msc_supplies_f');
1402: insert into msc_supplies_f (
1403: plan_id,
1404: plan_run_id,
1405: sr_instance_id,

Line 1502: msc_phub_util.log('msc_supply_pkg.import_supplies_f: inserted='||sql%rowcount);

1498: fnd_global.user_id, sysdate, fnd_global.login_id
1499: from msc_st_supplies_f
1500: where st_transaction_id=p_st_transaction_id and error_code=0;
1501:
1502: msc_phub_util.log('msc_supply_pkg.import_supplies_f: inserted='||sql%rowcount);
1503: commit;
1504:
1505: summarize_supplies_f(errbuf, retcode, p_plan_id, p_plan_run_id);
1506:

Line 1511: msc_phub_util.log('msc_supply_pkg.import_supplies_f: complete, retcode='||retcode);

1507: if (l_result > 0) then
1508: retcode := -1;
1509: end if;
1510:
1511: msc_phub_util.log('msc_supply_pkg.import_supplies_f: complete, retcode='||retcode);
1512:
1513: exception
1514: when others then
1515: retcode := 2;

Line 1530: msc_phub_util.log('msc_supply_pkg.import_item_wips_f');

1526: l_staging_table varchar2(30) := 'msc_st_item_wips_f';
1527: l_fact_table varchar2(30) := 'msc_item_wips_f';
1528: l_result number := 0;
1529: begin
1530: msc_phub_util.log('msc_supply_pkg.import_item_wips_f');
1531: retcode := 0;
1532: errbuf := null;
1533:
1534: l_result := l_result + msc_phub_util.prepare_staging_dates(

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

1530: msc_phub_util.log('msc_supply_pkg.import_item_wips_f');
1531: retcode := 0;
1532: errbuf := null;
1533:
1534: l_result := l_result + msc_phub_util.prepare_staging_dates(
1535: l_staging_table, 'wip_start_date', p_st_transaction_id,
1536: p_upload_mode, p_overwrite_after_date,
1537: p_plan_start_date, p_plan_cutoff_date);
1538:

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

1535: l_staging_table, 'wip_start_date', p_st_transaction_id,
1536: p_upload_mode, p_overwrite_after_date,
1537: p_plan_start_date, p_plan_cutoff_date);
1538:
1539: l_result := l_result + msc_phub_util.prepare_fact_dates(
1540: l_fact_table, 1, 'wip_start_date', p_plan_id, p_plan_run_id,
1541: p_upload_mode, p_overwrite_after_date);
1542:
1543: l_result := l_result + msc_phub_util.decode_organization_key(

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

1539: l_result := l_result + msc_phub_util.prepare_fact_dates(
1540: l_fact_table, 1, 'wip_start_date', p_plan_id, p_plan_run_id,
1541: p_upload_mode, p_overwrite_after_date);
1542:
1543: l_result := l_result + msc_phub_util.decode_organization_key(
1544: l_staging_table, p_st_transaction_id, p_def_instance_code,
1545: 'sr_instance_id', 'organization_id', 'organization_code');
1546:
1547: l_result := l_result + msc_phub_util.decode_item_key(

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

1543: l_result := l_result + msc_phub_util.decode_organization_key(
1544: l_staging_table, p_st_transaction_id, p_def_instance_code,
1545: 'sr_instance_id', 'organization_id', 'organization_code');
1546:
1547: l_result := l_result + msc_phub_util.decode_item_key(
1548: l_staging_table, p_st_transaction_id, 'inventory_item_id', 'item_name');
1549:
1550: msc_phub_util.log('msc_supply_pkg.import_item_wips_f: insert into msc_item_wips_f');
1551: insert into msc_item_wips_f (

Line 1550: msc_phub_util.log('msc_supply_pkg.import_item_wips_f: insert into msc_item_wips_f');

1546:
1547: l_result := l_result + msc_phub_util.decode_item_key(
1548: l_staging_table, p_st_transaction_id, 'inventory_item_id', 'item_name');
1549:
1550: msc_phub_util.log('msc_supply_pkg.import_item_wips_f: insert into msc_item_wips_f');
1551: insert into msc_item_wips_f (
1552: plan_id,
1553: plan_run_id,
1554: sr_instance_id,

Line 1579: msc_phub_util.log('msc_supply_pkg.import_item_wips_f: inserted='||sql%rowcount);

1575: fnd_global.user_id, sysdate, fnd_global.login_id
1576: from msc_st_item_wips_f
1577: where st_transaction_id=p_st_transaction_id and error_code=0;
1578:
1579: msc_phub_util.log('msc_supply_pkg.import_item_wips_f: inserted='||sql%rowcount);
1580: commit;
1581:
1582: summarize_item_wips_f(errbuf, retcode, p_plan_id, p_plan_run_id);
1583:

Line 1588: msc_phub_util.log('msc_supply_pkg.import_item_wips_f: complete, retcode='||retcode);

1584: if (l_result > 0) then
1585: retcode := -1;
1586: end if;
1587:
1588: msc_phub_util.log('msc_supply_pkg.import_item_wips_f: complete, retcode='||retcode);
1589:
1590: exception
1591: when others then
1592: retcode := 2;