DBA Data[Home] [Help]

APPS.MSC_PHUB_BUDGET_PKG dependencies on MSC_PHUB_UTIL

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

3:
4: procedure populate_details(errbuf out nocopy varchar2, retcode out nocopy varchar2,
5: p_plan_id number, p_plan_run_id number)
6: is
7: l_owning_currency_code varchar2(20) := msc_phub_util.get_owning_currency_code(p_plan_run_id);
8: l_enforce_budget_constraints number;
9: l_budget_id number;
10: l_budget_value number;
11:

Line 19: msc_phub_util.log('msc_phub_budget_pkg.populate_details:');

15: l_sr_instance_id number;
16: l_organization_id number;
17:
18: begin
19: msc_phub_util.log('msc_phub_budget_pkg.populate_details:');
20: retcode := 0;
21: errbuf := null;
22:
23: select enforce_budget_constraints, budget_id, budget_value

Line 34: msc_phub_util.log('msc_phub_budget_pkg.populate_details: '||

30: from msc_plan_runs
31: where plan_id=p_plan_id
32: and plan_run_id=p_plan_run_id;
33:
34: msc_phub_util.log('msc_phub_budget_pkg.populate_details: '||
35: 'l_enforce_budget_constraints='||l_enforce_budget_constraints||
36: ',l_budget_id='||l_budget_id||
37: ',l_budget_value='||l_budget_value);
38:

Line 40: msc_phub_util.log('msc_phub_budget_pkg.populate_details: l_enforce_budget_constraints<>1');

36: ',l_budget_id='||l_budget_id||
37: ',l_budget_value='||l_budget_value);
38:
39: if (nvl(l_enforce_budget_constraints,2) <> 1) then
40: msc_phub_util.log('msc_phub_budget_pkg.populate_details: l_enforce_budget_constraints<>1');
41: return;
42: end if;
43:
44: if (l_budget_id is null and l_budget_value is null) then

Line 45: msc_phub_util.log('msc_phub_budget_pkg.populate_details: l_budget_id is null and budget_value is null');

41: return;
42: end if;
43:
44: if (l_budget_id is null and l_budget_value is null) then
45: msc_phub_util.log('msc_phub_budget_pkg.populate_details: l_budget_id is null and budget_value is null');
46: return;
47: end if;
48:
49: if (l_budget_id > 0) then

Line 170: msc_phub_util.log('msc_phub_budget_pkg.populate_details: msc_budgets_f, rowcount='||sql%rowcount);

166: where mcc.from_currency(+)=currency_code
167: and mcc.calendar_date(+)=l_plan_start_date
168: and mcc.to_currency(+)=fnd_profile.value('MSC_HUB_CUR_CODE_RPT');
169: end if;
170: msc_phub_util.log('msc_phub_budget_pkg.populate_details: msc_budgets_f, rowcount='||sql%rowcount);
171: commit;
172:
173: exception
174: when others then

Line 175: msc_phub_util.log('msc_phub_budget_pkg.populate_details.exception: '||sqlerrm);

171: commit;
172:
173: exception
174: when others then
175: msc_phub_util.log('msc_phub_budget_pkg.populate_details.exception: '||sqlerrm);
176: errbuf := msc_phub_util.get_planning_hub_message('MSC_HUB_POPULATE_ERROR')||':'||sqlerrm;
177: retcode := 2;
178: end populate_details;
179:

Line 176: errbuf := msc_phub_util.get_planning_hub_message('MSC_HUB_POPULATE_ERROR')||':'||sqlerrm;

172:
173: exception
174: when others then
175: msc_phub_util.log('msc_phub_budget_pkg.populate_details.exception: '||sqlerrm);
176: errbuf := msc_phub_util.get_planning_hub_message('MSC_HUB_POPULATE_ERROR')||':'||sqlerrm;
177: retcode := 2;
178: end populate_details;
179:
180: procedure export_budgets_f (

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

182: p_st_transaction_id number, p_plan_run_id number,
183: p_dblink varchar2, p_source_version varchar2)
184: is
185: l_sql varchar2(5000);
186: l_suffix varchar2(32) := msc_phub_util.suffix(p_dblink);
187: l_apps_schema varchar2(30) := msc_phub_util.apps_schema;
188: begin
189: msc_phub_util.log('msc_phub_budget_pkg.export_budgets_f');
190: retcode := 0;

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

183: p_dblink varchar2, p_source_version varchar2)
184: is
185: l_sql varchar2(5000);
186: l_suffix varchar2(32) := msc_phub_util.suffix(p_dblink);
187: l_apps_schema varchar2(30) := msc_phub_util.apps_schema;
188: begin
189: msc_phub_util.log('msc_phub_budget_pkg.export_budgets_f');
190: retcode := 0;
191: errbuf := null;

Line 189: msc_phub_util.log('msc_phub_budget_pkg.export_budgets_f');

185: l_sql varchar2(5000);
186: l_suffix varchar2(32) := msc_phub_util.suffix(p_dblink);
187: l_apps_schema varchar2(30) := msc_phub_util.apps_schema;
188: begin
189: msc_phub_util.log('msc_phub_budget_pkg.export_budgets_f');
190: retcode := 0;
191: errbuf := null;
192:
193: delete from msc_st_budgets_f where st_transaction_id=p_st_transaction_id;

Line 246: msc_phub_util.log('msc_phub_budget_pkg.export_budgets_f: complete, retcode='||retcode);

242: ' and mai.instance_id(+)=f.category_instance_id';
243:
244: execute immediate l_sql using p_st_transaction_id, p_plan_run_id;
245: commit;
246: msc_phub_util.log('msc_phub_budget_pkg.export_budgets_f: complete, retcode='||retcode);
247:
248: exception
249: when others then
250: retcode := 2;

Line 252: msc_phub_util.log(errbuf);

248: exception
249: when others then
250: retcode := 2;
251: errbuf := 'msc_phub_budget_pkg.export_budgets_f: '||sqlerrm;
252: msc_phub_util.log(errbuf);
253: end export_budgets_f;
254:
255: procedure import_budgets_f (
256: errbuf out nocopy varchar2, retcode out nocopy varchar2,

Line 265: msc_phub_util.log('msc_phub_budget_pkg.import_budgets_f');

261: l_staging_table varchar2(30) := 'msc_st_budgets_f';
262: l_fact_table varchar2(30) := 'msc_budgets_f';
263: l_result number := 0;
264: begin
265: msc_phub_util.log('msc_phub_budget_pkg.import_budgets_f');
266: retcode := 0;
267: errbuf := null;
268:
269: l_result := l_result + msc_phub_util.prepare_fact_dates(

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

265: msc_phub_util.log('msc_phub_budget_pkg.import_budgets_f');
266: retcode := 0;
267: errbuf := null;
268:
269: l_result := l_result + msc_phub_util.prepare_fact_dates(
270: l_fact_table, 1, null, p_plan_id, p_plan_run_id,
271: p_upload_mode, p_overwrite_after_date);
272:
273: l_result := l_result + msc_phub_util.decode_organization_key(

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

269: l_result := l_result + msc_phub_util.prepare_fact_dates(
270: l_fact_table, 1, null, p_plan_id, p_plan_run_id,
271: p_upload_mode, p_overwrite_after_date);
272:
273: l_result := l_result + msc_phub_util.decode_organization_key(
274: l_staging_table, p_st_transaction_id, p_def_instance_code,
275: 'sr_instance_id', 'organization_id', 'organization_code');
276:
277: l_result := l_result + msc_phub_util.decode_category_key(

Line 277: l_result := l_result + msc_phub_util.decode_category_key(

273: l_result := l_result + msc_phub_util.decode_organization_key(
274: l_staging_table, p_st_transaction_id, p_def_instance_code,
275: 'sr_instance_id', 'organization_id', 'organization_code');
276:
277: l_result := l_result + msc_phub_util.decode_category_key(
278: l_staging_table, p_st_transaction_id);
279:
280: if (p_upload_mode = msc_phub_util.upload_replace) then
281: msc_phub_util.log('msc_phub_budget_pkg.import_budgets_f: purge msc_budgets_f');

Line 280: if (p_upload_mode = msc_phub_util.upload_replace) then

276:
277: l_result := l_result + msc_phub_util.decode_category_key(
278: l_staging_table, p_st_transaction_id);
279:
280: if (p_upload_mode = msc_phub_util.upload_replace) then
281: msc_phub_util.log('msc_phub_budget_pkg.import_budgets_f: purge msc_budgets_f');
282:
283: delete from msc_budgets_f
284: where plan_id=p_plan_id and plan_run_id=p_plan_run_id;

Line 281: msc_phub_util.log('msc_phub_budget_pkg.import_budgets_f: purge msc_budgets_f');

277: l_result := l_result + msc_phub_util.decode_category_key(
278: l_staging_table, p_st_transaction_id);
279:
280: if (p_upload_mode = msc_phub_util.upload_replace) then
281: msc_phub_util.log('msc_phub_budget_pkg.import_budgets_f: purge msc_budgets_f');
282:
283: delete from msc_budgets_f
284: where plan_id=p_plan_id and plan_run_id=p_plan_run_id;
285: commit;

Line 288: msc_phub_util.log('msc_phub_budget_pkg.import_budgets_f: insert into msc_budgets_f');

284: where plan_id=p_plan_id and plan_run_id=p_plan_run_id;
285: commit;
286: end if;
287:
288: msc_phub_util.log('msc_phub_budget_pkg.import_budgets_f: insert into msc_budgets_f');
289: insert into msc_budgets_f (
290: plan_id,
291: plan_run_id,
292: sr_instance_id,

Line 319: msc_phub_util.log('msc_phub_budget_pkg.import_budgets_f: inserted='||sql%rowcount);

315: fnd_global.user_id, sysdate, fnd_global.login_id
316: from msc_st_budgets_f
317: where st_transaction_id=p_st_transaction_id and error_code=0;
318:
319: msc_phub_util.log('msc_phub_budget_pkg.import_budgets_f: inserted='||sql%rowcount);
320: commit;
321:
322: if (l_result > 0) then
323: retcode := -1;

Line 326: msc_phub_util.log('msc_phub_budget_pkg.import_budgets_f: complete, retcode='||retcode);

322: if (l_result > 0) then
323: retcode := -1;
324: end if;
325:
326: msc_phub_util.log('msc_phub_budget_pkg.import_budgets_f: complete, retcode='||retcode);
327:
328: exception
329: when others then
330: retcode := 2;

Line 332: msc_phub_util.log(errbuf);

328: exception
329: when others then
330: retcode := 2;
331: errbuf := 'msc_phub_budget_pkg.import_budgets_f: '||sqlerrm;
332: msc_phub_util.log(errbuf);
333: end import_budgets_f;
334:
335: end msc_phub_budget_pkg;