DBA Data[Home] [Help]

APPS.MSC_PHUB_FILE_PKG dependencies on MSC_PHUB_UTIL

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 44: select source_plan_run_id, source_dblink, nvl(source_version, msc_phub_util.g_version)

40:
41: retcode := 0;
42: errbuf := null;
43:
44: select source_plan_run_id, source_dblink, nvl(source_version, msc_phub_util.g_version)
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:

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 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 167: msc_phub_util.log(errbuf);

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:
170: end prepare_transfer_tables_ui;
171:

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 249: nvl(p_source_version, msc_phub_util.g_version),

245: p_upload_mode,
246: p_directory,
247: p_source_plan_run_id,
248: p_source_dblink,
249: nvl(p_source_version, msc_phub_util.g_version),
250: status_transfering,
251: p_plan_name,
252: p_plan_type,
253: p_plan_description,

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 276: and initial_verion<=nvl(p_source_version, msc_phub_util.g_version);

272: fnd_global.user_id, sysdate, fnd_global.user_id, sysdate, fnd_global.login_id
273: from
274: (select rownum fact_type, entity_name, initial_verion from table(msc_phub_pkg.meta_info))
275: where decode(fact_type,4,p_include_ods,p_include_pds)=1
276: and initial_verion<=nvl(p_source_version, msc_phub_util.g_version);
277: commit;
278:
279: return l_transfer_id;
280: end prepare_transfer_tables;

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 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 393: msc_phub_util.log(errbuf);

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;
397:

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 414: if (l_upload_mode = msc_phub_util.upload_create_purge_prev) then

410: into l_upload_mode, l_plan_id, l_plan_run_id
411: from msc_apcc_upload
412: where transfer_id=p_transfer_id;
413:
414: if (l_upload_mode = msc_phub_util.upload_create_purge_prev) then
415: l_keep_previous := msc_phub_pkg.sys_no;
416: end if;
417:
418: if (l_plan_id is not null) then

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 552: if (l_upload_mode = msc_phub_util.upload_create or

548: if (nvl(p_validate_only, msc_phub_pkg.sys_yes) = msc_phub_pkg.sys_yes) then
549: return;
550: end if;
551:
552: if (l_upload_mode = msc_phub_util.upload_create or
553: l_upload_mode = msc_phub_util.upload_create_purge_prev) then
554: l_plan_run_id := msc_phub_pkg.create_plan_run(null, null, msc_phub_pkg.sys_no, l_pi);
555: else
556: update msc_plan_runs

Line 553: l_upload_mode = msc_phub_util.upload_create_purge_prev) then

549: return;
550: end if;
551:
552: if (l_upload_mode = msc_phub_util.upload_create or
553: l_upload_mode = msc_phub_util.upload_create_purge_prev) then
554: l_plan_run_id := msc_phub_pkg.create_plan_run(null, null, msc_phub_pkg.sys_no, l_pi);
555: else
556: update msc_plan_runs
557: set plan_description = nvl(l_pi.plan_description, plan_description),

Line 571: if (l_upload_mode = msc_phub_util.upload_replace or

567: set plan_id=l_pi.plan_id, plan_run_id=l_plan_run_id
568: where transfer_id=p_transfer_id;
569: commit;
570: else
571: if (l_upload_mode = msc_phub_util.upload_replace or
572: l_upload_mode = msc_phub_util.upload_create or
573: l_upload_mode = msc_phub_util.upload_create_purge_prev) then
574:
575: if (l_pi.plan_type = 10) then

Line 572: l_upload_mode = msc_phub_util.upload_create or

568: where transfer_id=p_transfer_id;
569: commit;
570: else
571: if (l_upload_mode = msc_phub_util.upload_replace or
572: l_upload_mode = msc_phub_util.upload_create or
573: l_upload_mode = msc_phub_util.upload_create_purge_prev) then
574:
575: if (l_pi.plan_type = 10) then
576: if (nvl(p_validate_only, msc_phub_pkg.sys_yes) = msc_phub_pkg.sys_yes) then

Line 573: l_upload_mode = msc_phub_util.upload_create_purge_prev) then

569: commit;
570: else
571: if (l_upload_mode = msc_phub_util.upload_replace or
572: l_upload_mode = msc_phub_util.upload_create or
573: l_upload_mode = msc_phub_util.upload_create_purge_prev) then
574:
575: if (l_pi.plan_type = 10) then
576: if (nvl(p_validate_only, msc_phub_pkg.sys_yes) = msc_phub_pkg.sys_yes) then
577: return;

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 648: msc_phub_util.log(errbuf);

644: retcode := 2;
645: fnd_message.set_name('MSC', 'MSC_APCC_UPLOAD_MODE_E01');
646: fnd_message.set_token('PLAN', l_pi.plan_name);
647: errbuf := fnd_message.get;
648: msc_phub_util.log(errbuf);
649: return;
650: end if;
651: end if;
652:

Line 659: msc_phub_util.log(errbuf);

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:
662: procedure import_table(
663: errbuf out nocopy varchar2, retcode out nocopy varchar2,

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 728: if (l_upload_mode <> msc_phub_util.upload_append and

724: 'l_upload_mode='||l_upload_mode||','||
725: 'l_overwrite_after_date='||l_overwrite_after_date||','||
726: 'l_def_instance_code='||l_def_instance_code);
727:
728: if (l_upload_mode <> msc_phub_util.upload_append and
729: l_upload_mode <> msc_phub_util.upload_replace and
730: l_upload_mode <> msc_phub_util.upload_create and
731: l_upload_mode <> msc_phub_util.upload_create_purge_prev) then
732: retcode := 2;

Line 729: l_upload_mode <> msc_phub_util.upload_replace and

725: 'l_overwrite_after_date='||l_overwrite_after_date||','||
726: 'l_def_instance_code='||l_def_instance_code);
727:
728: if (l_upload_mode <> msc_phub_util.upload_append and
729: l_upload_mode <> msc_phub_util.upload_replace and
730: l_upload_mode <> msc_phub_util.upload_create and
731: l_upload_mode <> msc_phub_util.upload_create_purge_prev) then
732: retcode := 2;
733: fnd_message.set_name('MSC', 'MSC_APCC_MISSING_PARAMETER');

Line 730: l_upload_mode <> msc_phub_util.upload_create and

726: 'l_def_instance_code='||l_def_instance_code);
727:
728: if (l_upload_mode <> msc_phub_util.upload_append and
729: l_upload_mode <> msc_phub_util.upload_replace and
730: l_upload_mode <> msc_phub_util.upload_create and
731: l_upload_mode <> msc_phub_util.upload_create_purge_prev) then
732: retcode := 2;
733: fnd_message.set_name('MSC', 'MSC_APCC_MISSING_PARAMETER');
734: fnd_message.set_token('PARAM', 'Upload Mode');

Line 731: l_upload_mode <> msc_phub_util.upload_create_purge_prev) then

727:
728: if (l_upload_mode <> msc_phub_util.upload_append and
729: l_upload_mode <> msc_phub_util.upload_replace and
730: l_upload_mode <> msc_phub_util.upload_create and
731: l_upload_mode <> msc_phub_util.upload_create_purge_prev) then
732: retcode := 2;
733: fnd_message.set_name('MSC', 'MSC_APCC_MISSING_PARAMETER');
734: fnd_message.set_token('PARAM', 'Upload Mode');
735: errbuf := fnd_message.get;

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 757: msc_phub_util.log(errbuf);

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:
760: function create_plan(errbuf out nocopy varchar2, retcode out nocopy varchar2,
761: p_transfer_id number) return number

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 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 892: msc_phub_util.log(fnd_message.get_string('MSC','MSC_HUB_PURGE_STARTS'));

888: from msc_apcc_upload
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:

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 926: msc_phub_util.log(fnd_message.get_string('MSC','MSC_HUB_PURGE_ENDS'));

922: delete from msc_apcc_upload where transfer_status=status_purging;
923: commit;
924:
925: msc_phub_pkg.purge_details(p_plan_name, p_plan_run_id);
926: msc_phub_util.log(fnd_message.get_string('MSC','MSC_HUB_PURGE_ENDS'));
927:
928: exception
929: when others then
930: fnd_message.set_name('MSC', 'MSC_HUB_PURGE_ERROR');

Line 933: msc_phub_util.log(errbuf);

929: when others then
930: fnd_message.set_name('MSC', 'MSC_HUB_PURGE_ERROR');
931: retcode := 2;
932: errbuf := fnd_message.get;
933: msc_phub_util.log(errbuf);
934: end purge_plan_summary;
935:
936: end msc_phub_file_pkg;