DBA Data[Home] [Help]

APPS.MSC_PHUB_FILE_PKG dependencies on MSC_PHUB_FILE_PKG

Line 1: package body msc_phub_file_pkg as

1: package body msc_phub_file_pkg as
2: /* $Header: MSCHBPFB.pls 120.15.12020000.2 2012/10/11 13:58:56 wexia ship $ */
3:
4: function get_staging_table(p_fact_type number) return varchar2
5: is

Line 29: msc_phub_util.log('msc_phub_file_pkg.export_table');

25: l_package varchar2(30);
26: l_entity_name varchar2(30);
27: l_sql varchar2(200);
28: begin
29: msc_phub_util.log('msc_phub_file_pkg.export_table');
30: update msc_apcc_upload_detail set
31: last_updated_by=fnd_global.user_id,
32: last_update_date=sysdate,
33: last_update_login=fnd_global.login_id,

Line 49: msc_phub_util.log('msc_phub_file_pkg.export_table: '||

45: into l_plan_run_id, l_source_dblink, l_source_version
46: from msc_apcc_upload
47: where transfer_id=p_transfer_id;
48:
49: msc_phub_util.log('msc_phub_file_pkg.export_table: '||
50: 'p_transfer_id='||p_transfer_id||','||
51: 'p_fact_type='||p_fact_type||','||
52: 'l_plan_run_id='||l_plan_run_id||','||
53: 'l_source_dblink='||l_source_dblink||','||

Line 64: msc_phub_util.log('msc_phub_file_pkg.export_table: complete, retcode='||retcode);

60: ':p_plan_run_id, :p_dblink, :p_source_version); end;';
61: execute immediate l_sql using out errbuf, out retcode, p_transfer_id,
62: l_plan_run_id, l_source_dblink, l_source_version;
63:
64: msc_phub_util.log('msc_phub_file_pkg.export_table: complete, retcode='||retcode);
65:
66: exception
67: when others then
68: if (retcode = 0) then

Line 70: errbuf := 'msc_phub_file_pkg.export_table: '||sqlerrm;

66: exception
67: when others then
68: if (retcode = 0) then
69: retcode := 2;
70: errbuf := 'msc_phub_file_pkg.export_table: '||sqlerrm;
71: end if;
72: raise;
73: end;
74:

Line 84: msc_phub_util.log('msc_phub_file_pkg.prepare_transfer_tables_ui('||p_query_id||')');

80: n number;
81: e_prepare_transfer_tables_ui exception;
82: begin
83: -- dup data from query_id
84: msc_phub_util.log('msc_phub_file_pkg.prepare_transfer_tables_ui('||p_query_id||')');
85: l_transfer_id := msc_phub_pkg.create_staging_partitions(null, null);
86:
87: select count(*) into n
88: from msc_hub_query

Line 93: errbuf := 'msc_phub_file_pkg.prepare_transfer_tables_ui: n1='||n;

89: where query_id=p_query_id and number1=1;
90:
91: if (n <> 1) then
92: retcode := 2;
93: errbuf := 'msc_phub_file_pkg.prepare_transfer_tables_ui: n1='||n;
94: raise e_prepare_transfer_tables_ui;
95: end if;
96:
97: select count(*) into n

Line 103: errbuf := 'msc_phub_file_pkg.prepare_transfer_tables_ui: n2='||n;

99: where query_id=p_query_id and number1=2 and blob1 is not null;
100:
101: if (n < 1) then
102: retcode := 2;
103: errbuf := 'msc_phub_file_pkg.prepare_transfer_tables_ui: n2='||n;
104: raise e_prepare_transfer_tables_ui;
105: end if;
106:
107: insert into msc_apcc_upload (

Line 165: errbuf := 'msc_phub_file_pkg.prepare_transfer_tables_ui.exception: '||sqlerrm;

161: exception
162: when others then
163: if (retcode = 0) then
164: retcode := 2;
165: errbuf := 'msc_phub_file_pkg.prepare_transfer_tables_ui.exception: '||sqlerrm;
166: end if;
167: msc_phub_util.log(errbuf);
168: return l_transfer_id;
169:

Line 197: msc_phub_util.log('msc_phub_file_pkg.prepare_transfer_tables');

193: l_transfer_id number;
194: l_sr_instance_id number;
195: l_organization_id number;
196: begin
197: msc_phub_util.log('msc_phub_file_pkg.prepare_transfer_tables');
198:
199: l_transfer_id := msc_phub_pkg.create_staging_partitions(null, null);
200:
201: begin

Line 261: msc_phub_util.log('msc_phub_file_pkg.prepare_transfer_tables'||

257: p_plan_cutoff_date,
258: p_plan_completion_date,
259: fnd_global.user_id, sysdate, fnd_global.user_id, sysdate, fnd_global.login_id);
260:
261: msc_phub_util.log('msc_phub_file_pkg.prepare_transfer_tables'||
262: ',p_include_ods='||p_include_ods||
263: ',p_include_pds='||p_include_pds||
264: ',l_sr_instance_id='||l_sr_instance_id||
265: ',l_organization_id='||l_organization_id);

Line 286: msc_phub_util.log('msc_phub_file_pkg.save_overwrite_date ('||

282: procedure save_overwrite_date(p_transfer_id number, p_fact_type number,
283: p_overwrite_after_date date)
284: is
285: begin
286: msc_phub_util.log('msc_phub_file_pkg.save_overwrite_date ('||
287: p_transfer_id||','||p_fact_type||','||p_overwrite_after_date||')');
288: update msc_apcc_upload_detail
289: set overwrite_after_date=p_overwrite_after_date
290: where transfer_id=p_transfer_id and fact_type=p_fact_type;

Line 308: msc_phub_util.log('msc_phub_file_pkg.prepare_export ('||p_transfer_id||')');

304: l_fact_type number;
305: e_prepare_export exception;
306: l_transfer_id number;
307: begin
308: msc_phub_util.log('msc_phub_file_pkg.prepare_export ('||p_transfer_id||')');
309: retcode := 0;
310: errbuf := null;
311:
312: update msc_apcc_upload set

Line 344: errbuf := 'msc_phub_file_pkg.prepare_export: '||sqlerrm;

340: exception
341: when others then
342: if (retcode = 0) then
343: retcode := 2;
344: errbuf := 'msc_phub_file_pkg.prepare_export: '||sqlerrm;
345: end if;
346: end prepare_export;
347:
348: procedure finalize_export(errbuf out nocopy varchar2, retcode out nocopy varchar2,

Line 360: errbuf := 'msc_phub_file_pkg.finalize_export: '||sqlerrm;

356:
357: exception
358: when others then
359: retcode := 2;
360: errbuf := 'msc_phub_file_pkg.finalize_export: '||sqlerrm;
361: end finalize_export;
362:
363: procedure prepare_import(errbuf out nocopy varchar2, retcode out nocopy varchar2,
364: p_transfer_id number)

Line 368: msc_phub_util.log('msc_phub_file_pkg.prepare_import ('||p_transfer_id||')');

364: p_transfer_id number)
365: is
366: e_prepare_import exception;
367: begin
368: msc_phub_util.log('msc_phub_file_pkg.prepare_import ('||p_transfer_id||')');
369: retcode := 0;
370: errbuf := null;
371:
372: update msc_apcc_upload set

Line 392: errbuf := 'msc_phub_file_pkg.prepare_import.exception: '||sqlerrm;

388: exception
389: when others then
390: if (retcode = 0) then
391: retcode := 2;
392: errbuf := 'msc_phub_file_pkg.prepare_import.exception: '||sqlerrm;
393: msc_phub_util.log(errbuf);
394: end if;
395: raise;
396: end prepare_import;

Line 407: msc_phub_util.log('msc_phub_file_pkg.finalize_import('||p_transfer_id||')');

403: l_plan_run_id number;
404: l_keep_previous number := msc_phub_pkg.sys_yes;
405: e_finanlize_import exception;
406: begin
407: msc_phub_util.log('msc_phub_file_pkg.finalize_import('||p_transfer_id||')');
408:
409: select upload_mode, plan_id, plan_run_id
410: into l_upload_mode, l_plan_id, l_plan_run_id
411: from msc_apcc_upload

Line 437: errbuf := 'msc_phub_file_pkg.finalize_import: '||sqlerrm;

433: exception
434: when others then
435: if (retcode = 0) then
436: retcode := 2;
437: errbuf := 'msc_phub_file_pkg.finalize_import: '||sqlerrm;
438: end if;
439: end finalize_import;
440:
441: procedure prepare_context(errbuf out nocopy varchar2, retcode out nocopy varchar2,

Line 458: msc_phub_util.log('msc_phub_file_pkg.prepare_context('||

454: begin
455: retcode := 0;
456: errbuf := null;
457:
458: msc_phub_util.log('msc_phub_file_pkg.prepare_context('||
459: p_transfer_id||','||p_validate_only||')');
460:
461: select
462: plan_id,

Line 481: msc_phub_util.log('msc_phub_file_pkg.prepare_context: '||

477: into l_import_level, l_upload_mode
478: from msc_apcc_upload
479: where transfer_id=p_transfer_id;
480:
481: msc_phub_util.log('msc_phub_file_pkg.prepare_context: '||
482: 'l_import_level='||l_import_level||','||
483: 'l_pi.plan_name='||l_pi.plan_name||','||
484: 'l_pi.plan_type='||l_pi.plan_type||','||
485: 'l_upload_mode='||l_upload_mode);

Line 495: msc_phub_util.log('msc_phub_file_pkg.prepare_context: l_include_ods=YES');

491: and (file_data is not null or l_import_level <> 3);
492:
493: l_include_ods := (n = 1);
494: if (l_include_ods) then
495: msc_phub_util.log('msc_phub_file_pkg.prepare_context: l_include_ods=YES');
496: else
497: msc_phub_util.log('msc_phub_file_pkg.prepare_context: l_include_ods=NO');
498: end if;
499:

Line 497: msc_phub_util.log('msc_phub_file_pkg.prepare_context: l_include_ods=NO');

493: l_include_ods := (n = 1);
494: if (l_include_ods) then
495: msc_phub_util.log('msc_phub_file_pkg.prepare_context: l_include_ods=YES');
496: else
497: msc_phub_util.log('msc_phub_file_pkg.prepare_context: l_include_ods=NO');
498: end if;
499:
500: if (l_pi.plan_name is null) then
501: msc_phub_util.log('msc_phub_file_pkg.prepare_context: l_pi.plan_name is null');

Line 501: msc_phub_util.log('msc_phub_file_pkg.prepare_context: l_pi.plan_name is null');

497: msc_phub_util.log('msc_phub_file_pkg.prepare_context: l_include_ods=NO');
498: end if;
499:
500: if (l_pi.plan_name is null) then
501: msc_phub_util.log('msc_phub_file_pkg.prepare_context: l_pi.plan_name is null');
502: if (l_include_ods) then
503: msc_phub_util.log('msc_phub_file_pkg.prepare_context: l_include_ods');
504: return;
505: else

Line 503: msc_phub_util.log('msc_phub_file_pkg.prepare_context: l_include_ods');

499:
500: if (l_pi.plan_name is null) then
501: msc_phub_util.log('msc_phub_file_pkg.prepare_context: l_pi.plan_name is null');
502: if (l_include_ods) then
503: msc_phub_util.log('msc_phub_file_pkg.prepare_context: l_include_ods');
504: return;
505: else
506: retcode := 2;
507: fnd_message.set_name('MSC', 'MSC_APCC_MISSING_PLAN_INFO');

Line 528: msc_phub_util.log('msc_phub_file_pkg.prepare_context: '

524: exception
525: when no_data_found then null;
526: end;
527:
528: msc_phub_util.log('msc_phub_file_pkg.prepare_context: '
529: ||'l_plan_run_id='||l_plan_run_id);
530: if (l_plan_run_id is not null) then
531: if (l_plan_type2 <> l_pi.plan_type) then
532: retcode := 1;

Line 599: msc_phub_util.log('msc_phub_file_pkg.prepare_context: '||

595: exception
596: when no_data_found then null;
597: end;
598:
599: msc_phub_util.log('msc_phub_file_pkg.prepare_context: '||
600: 'l_pi.plan_id='||l_pi.plan_id);
601:
602: if (l_pi.plan_id is not null) then
603: if (l_plan_type2 <> l_pi.plan_type) then

Line 657: errbuf := 'msc_phub_file_pkg.prepare_context.exception: '||sqlerrm;

653: exception
654: when others then
655: if (retcode = 0) then
656: retcode := 2;
657: errbuf := 'msc_phub_file_pkg.prepare_context.exception: '||sqlerrm;
658: end if;
659: msc_phub_util.log(errbuf);
660: end prepare_context;
661:

Line 682: msc_phub_util.log('msc_phub_file_pkg.import_table');

678: l_package varchar2(30);
679: l_entity_name varchar2(30);
680: l_sql varchar2(1000);
681: begin
682: msc_phub_util.log('msc_phub_file_pkg.import_table');
683: update msc_apcc_upload_detail set
684: last_updated_by=fnd_global.user_id,
685: last_update_date=sysdate,
686: last_update_login=fnd_global.login_id,

Line 719: msc_phub_util.log('msc_phub_file_pkg.import_table: '||

715: exception
716: when others then null;
717: end;
718:
719: msc_phub_util.log('msc_phub_file_pkg.import_table: '||
720: 'p_transfer_id='||p_transfer_id||','||
721: 'p_fact_type='||p_fact_type||','||
722: 'l_plan_id='||l_plan_id||','||
723: 'l_plan_run_id='||l_plan_run_id||','||

Line 750: msc_phub_util.log('msc_phub_file_pkg.import_table: complete, retcode='||retcode);

746: p_transfer_id, l_plan_id, l_plan_run_id,
747: l_plan_type, l_plan_start_date, l_plan_cutoff_date,
748: l_upload_mode, l_overwrite_after_date, l_def_instance_code;
749:
750: msc_phub_util.log('msc_phub_file_pkg.import_table: complete, retcode='||retcode);
751: exception
752: when others then
753: if (retcode = 0) then
754: retcode := 2;

Line 755: errbuf := 'msc_phub_file_pkg.import_table: '||sqlerrm;

751: exception
752: when others then
753: if (retcode = 0) then
754: retcode := 2;
755: errbuf := 'msc_phub_file_pkg.import_table: '||sqlerrm;
756: end if;
757: msc_phub_util.log(errbuf);
758: end;
759:

Line 768: msc_phub_util.log('msc_phub_file_pkg.create_plan '||l_plan_name);

764: l_return_status varchar2(10);
765: l_plan_id number;
766: e_create_plan exception;
767: begin
768: msc_phub_util.log('msc_phub_file_pkg.create_plan '||l_plan_name);
769: retcode := 0;
770: errbuf := null;
771:
772: select plan_name into l_plan_name from msc_apcc_upload where transfer_id=p_transfer_id;

Line 781: errbuf := 'msc_phub_file_pkg.create_plan: '||

777: l_plan_id := msc_manage_plan_partitions.get_plan(
778: l_plan_name, l_return_status, errbuf);
779: if (l_return_status <> FND_API.G_RET_STS_SUCCESS) then
780: retcode := 1;
781: errbuf := 'msc_phub_file_pkg.create_plan: '||
782: 'msc_manage_plan_partitions.get_plan failed:'||
783: l_return_status||':'||errbuf;
784: raise e_create_plan;
785: end if;

Line 789: errbuf := 'msc_phub_file_pkg.create_plan: '||

785: end if;
786:
787: if (l_plan_id is null) then
788: retcode := 1;
789: errbuf := 'msc_phub_file_pkg.create_plan: '||
790: 'l_plan_id is null';
791: raise e_create_plan;
792: end if;
793: */

Line 859: errbuf := 'msc_phub_file_pkg.create_plan: '||sqlerrm;

855: exception
856: when others then
857: if (retcode = 0) then
858: retcode := 3;
859: errbuf := 'msc_phub_file_pkg.create_plan: '||sqlerrm;
860: end if;
861: raise;
862: end create_plan;
863:

Line 869: msc_phub_util.log('msc_phub_file_pkg.cleanup('||p_transfer_id||')');

865: errbuf out nocopy varchar2, retcode out nocopy varchar2,
866: p_transfer_id number)
867: is
868: begin
869: msc_phub_util.log('msc_phub_file_pkg.cleanup('||p_transfer_id||')');
870: msc_phub_pkg.drop_staging_partitions(p_transfer_id, null, null);
871:
872: update msc_apcc_upload_detail set file_data=null where transfer_id=p_transfer_id;
873: commit;

Line 879: errbuf := 'msc_phub_file_pkg.cleanup: '||sqlerrm;

875: exception
876: when others then
877: if (retcode = 0) then
878: retcode := 2;
879: errbuf := 'msc_phub_file_pkg.cleanup: '||sqlerrm;
880: end if;
881: raise;
882: end cleanup;
883:

Line 893: msc_phub_util.log('msc_phub_file_pkg.purge_plan_summary('||p_plan_name||','||p_plan_run_id||')');

889: where transfer_status=status_purging;
890:
891: begin
892: msc_phub_util.log(fnd_message.get_string('MSC','MSC_HUB_PURGE_STARTS'));
893: msc_phub_util.log('msc_phub_file_pkg.purge_plan_summary('||p_plan_name||','||p_plan_run_id||')');
894: retcode := 0;
895: errbuf := null;
896:
897: if (p_plan_name is null and p_plan_run_id is null) then

Line 898: msc_phub_util.log('msc_phub_file_pkg.purge_plan_summary: (p_plan_name is null and p_plan_run_id is null)');

894: retcode := 0;
895: errbuf := null;
896:
897: if (p_plan_name is null and p_plan_run_id is null) then
898: msc_phub_util.log('msc_phub_file_pkg.purge_plan_summary: (p_plan_name is null and p_plan_run_id is null)');
899: return;
900: end if;
901:
902: update msc_apcc_upload

Line 936: end msc_phub_file_pkg;

932: errbuf := fnd_message.get;
933: msc_phub_util.log(errbuf);
934: end purge_plan_summary;
935:
936: end msc_phub_file_pkg;