DBA Data[Home] [Help]

APPS.XTR_HEDGE_PROCESS_P dependencies on XTR_DEAL_RETRO_TESTS

Line 131: from xtr_deal_retro_tests

127:
128:
129: cursor get_prev_ineff(p_hedge_no in number, p_deal_no in number) is
130: select eff_cum_gain_loss_amt, ineff_cum_gain_loss_amt, excluded_prd_gain_loss_amt
131: from xtr_deal_retro_tests
132: where hedge_attribute_id = p_hedge_no
133: and deal_number = p_deal_no
134: and result_date = (select max(result_date) from xtr_deal_retro_tests r
135: where r. hedge_attribute_id = p_hedge_no

Line 134: and result_date = (select max(result_date) from xtr_deal_retro_tests r

130: select eff_cum_gain_loss_amt, ineff_cum_gain_loss_amt, excluded_prd_gain_loss_amt
131: from xtr_deal_retro_tests
132: where hedge_attribute_id = p_hedge_no
133: and deal_number = p_deal_no
134: and result_date = (select max(result_date) from xtr_deal_retro_tests r
135: where r. hedge_attribute_id = p_hedge_no
136: and r.deal_number = p_deal_no
137: and r.batch_id <= p_batch_id);
138:

Line 272: LOG_MSG('event', 'updating xtr_deal_retro_tests...');

268: LOG_MSG('l_deal_count', l_deal_count);
269:
270: for r in get_deals loop
271:
272: LOG_MSG('event', 'updating xtr_deal_retro_tests...');
273:
274: update xtr_deal_retro_tests
275: set reclass_gain_loss_amt = nvl(l_rec_gl_amt,0) * round(r.alloc_ref_amt/l_deal_total, l_round)
276: where hedge_attribute_id = p_hedge_no

Line 274: update xtr_deal_retro_tests

270: for r in get_deals loop
271:
272: LOG_MSG('event', 'updating xtr_deal_retro_tests...');
273:
274: update xtr_deal_retro_tests
275: set reclass_gain_loss_amt = nvl(l_rec_gl_amt,0) * round(r.alloc_ref_amt/l_deal_total, l_round)
276: where hedge_attribute_id = p_hedge_no
277: and deal_number = r.deal_no
278: and result_date = p_date;

Line 282: LOG_MSG('event', 'updated xtr_deal_retro_tests sucessfully!');

278: and result_date = p_date;
279:
280: if sql%found then
281:
282: LOG_MSG('event', 'updated xtr_deal_retro_tests sucessfully!');
283:
284: else
285:
286: LOG_MSG('event', 'could not update xtr_deal_retro_tests. The hedge already matured.');

Line 286: LOG_MSG('event', 'could not update xtr_deal_retro_tests. The hedge already matured.');

282: LOG_MSG('event', 'updated xtr_deal_retro_tests sucessfully!');
283:
284: else
285:
286: LOG_MSG('event', 'could not update xtr_deal_retro_tests. The hedge already matured.');
287:
288: open get_prev_ineff(p_hedge_no, r.deal_no);
289: fetch get_prev_ineff into l_hd_eff_prv_cum, l_hd_ineff_prv_cum, l_hd_excl_prv_cum;
290: close get_prev_ineff;

Line 294: insert into xtr_deal_retro_tests

290: close get_prev_ineff;
291:
292: LOG_MSG('l_amount_type = '||l_amount_type);
293:
294: insert into xtr_deal_retro_tests
295: (DEAL_RETRO_TEST_ID,
296: HEDGE_RETRO_TEST_ID,
297: BATCH_ID,
298: HEDGE_ATTRIBUTE_ID,

Line 320: xtr_deal_retro_tests_s.nextval,

316: EXCLUDED_CUM_GAIN_LOSS_AMT,
317: RESULT_DATE
318: )
319: values (
320: xtr_deal_retro_tests_s.nextval,
321: l_retro_test_id,
322: p_batch_id,
323: p_hedge_no,
324: fnd_global.user_id,

Line 383: from xtr_deal_retro_tests d

379: cursor cur_dnm(p_batch_id in number) is
380: select deal_number, amount_type, result_date,
381: nvl(sum(eff_prd_gain_loss_amt),0) eff_prd_gain_loss_amt,
382: nvl(sum(reclass_gain_loss_amt),0) reclass_gain_loss_amt
383: from xtr_deal_retro_tests d
384: where d.batch_id = p_batch_id
385: and d.hedge_attribute_id in (select hedge_attribute_id
386: from xtr_hedge_attributes ha, xtr_hedge_strategies hs
387: where ha.strategy_code = hs.strategy_code

Line 394: from xtr_deal_retro_tests

390: order by deal_number, amount_type, result_date;
391:
392: cursor prv_reclass (p_deal_no in number) is
393: select nvl(sum(reclass_gain_loss_amt),0)
394: from xtr_deal_retro_tests
395: where deal_number = p_deal_no
396: and result_date <= l_temp_date;
397:
398: CURSOR reval (p_amount_type in varchar2, p_reval_id in number) is

Line 417: select 'Y' from xtr_deal_retro_tests

413: and realized_flag = 'Y'
414: and period_to = p_date;
415:
416: cursor deal_rbtd (p_deal_no in number, p_date in DATE) is
417: select 'Y' from xtr_deal_retro_tests
418: where deal_number = p_deal_no
419: and nvl(reclass_gain_loss_amt,0) <> 0
420: and result_date < p_date;
421:

Line 424: select 'Y' from xtr_deal_retro_tests

420: and result_date < p_date;
421:
422: /* Not proabably needed
423: cursor deal_rotd (p_deal_no in number, p_date in DATE) is
424: select 'Y' from xtr_deal_retro_tests
425: where deal_no = p_deal_no
426: and nvl(reclass_gain_loss_amt,0) <> 0
427: and result_date = p_date;
428: */

Line 1023: from xtr_deal_retro_tests

1019: --------------------------------------------------------*/
1020:
1021: cursor get_dist_deals(p_batch_id in number) is
1022: select distinct deal_number
1023: from xtr_deal_retro_tests
1024: where batch_id = p_batch_id;
1025:
1026: cursor get_deal_retro(p_batch_id in number) is
1027: select deal_number, hedge_attribute_id, hedge_retro_test_id,deal_retro_test_id,

Line 1029: from xtr_deal_retro_tests

1025:
1026: cursor get_deal_retro(p_batch_id in number) is
1027: select deal_number, hedge_attribute_id, hedge_retro_test_id,deal_retro_test_id,
1028: ineff_cum_gain_loss_amt
1029: from xtr_deal_retro_tests
1030: where batch_id = p_batch_id;
1031:
1032: /*-------------------------------------------------------
1033: get deal level cum ineffective amt for previous

Line 1038: from xtr_deal_retro_tests

1034: batch
1035: --------------------------------------------------------*/
1036: cursor get_prev_ineff(p_hedge_no in number, p_deal_no in number) is
1037: select eff_cum_gain_loss_amt, ineff_cum_gain_loss_amt
1038: from xtr_deal_retro_tests
1039: where hedge_attribute_id = p_hedge_no
1040: and deal_number = p_deal_no
1041: and result_date = (select max(result_date) from xtr_deal_retro_tests r
1042: where r. hedge_attribute_id = p_hedge_no

Line 1041: and result_date = (select max(result_date) from xtr_deal_retro_tests r

1037: select eff_cum_gain_loss_amt, ineff_cum_gain_loss_amt
1038: from xtr_deal_retro_tests
1039: where hedge_attribute_id = p_hedge_no
1040: and deal_number = p_deal_no
1041: and result_date = (select max(result_date) from xtr_deal_retro_tests r
1042: where r. hedge_attribute_id = p_hedge_no
1043: and r.deal_number = p_deal_no
1044: and r.batch_id <= p_batch_id);
1045:

Line 1052: from xtr_deal_retro_tests

1048: amounts for this hedge/batch id combination
1049: --------------------------------------------------------*/
1050: cursor get_tot_eff(p_deal_no in number, p_hedge_retro_test_id in number) is
1051: select sum(eff_prd_gain_loss_amt)
1052: from xtr_deal_retro_tests
1053: where deal_number = p_deal_no
1054: and hedge_retro_test_id = p_hedge_retro_test_id
1055: group by deal_number, hedge_retro_test_id;
1056:

Line 1450: insert into xtr_deal_retro_tests

1446: open get_prev_ineff(hdg_rec.hedge_no, deal_rec.deal_no);
1447: fetch get_prev_ineff into l_hd_eff_prv_cum, l_hd_ineff_prv_cum ;
1448: close get_prev_ineff;
1449:
1450: insert into xtr_deal_retro_tests
1451: (DEAL_RETRO_TEST_ID, HEDGE_RETRO_TEST_ID, BATCH_ID, HEDGE_ATTRIBUTE_ID, CREATED_BY, CREATION_DATE,
1452: LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN, PROGRAM_ID, PROGRAM_LOGIN_ID,
1453: PROGRAM_APPLICATION_ID, REQUEST_ID, DEAL_NUMBER, AMOUNT_TYPE,
1454: EFF_PRD_GAIN_LOSS_AMT, INEFF_PRD_GAIN_LOSS_AMT, EXCLUDED_PRD_GAIN_LOSS_AMT,

Line 1458: values (xtr_deal_retro_tests_s.nextval, l_retro_test_id, p_batch_id, hdg_rec.hedge_no,

1454: EFF_PRD_GAIN_LOSS_AMT, INEFF_PRD_GAIN_LOSS_AMT, EXCLUDED_PRD_GAIN_LOSS_AMT,
1455: RECLASS_GAIN_LOSS_AMT, EFF_CUM_GAIN_LOSS_AMT, INEFF_CUM_GAIN_LOSS_AMT,
1456: EXCLUDED_CUM_GAIN_LOSS_AMT, RESULT_DATE)
1457:
1458: values (xtr_deal_retro_tests_s.nextval, l_retro_test_id, p_batch_id, hdg_rec.hedge_no,
1459: fnd_global.user_id, sysdate, fnd_global.user_id, sysdate, fnd_global.login_id,
1460: fnd_global.conc_program_id, fnd_global.conc_login_id, fnd_global.prog_appl_id,
1461: fnd_global.conc_request_id, deal_rec.deal_no, l_amount_type,
1462: round(l_eff_prd * (deal_rec.alloc_ref_amt/l_deal_total), l_round),

Line 1471: LOG_MSG('status', 'INSERT successful for xtr_deal_retro_tests');

1467: round(l_excl_cum * (deal_rec.alloc_ref_amt/l_deal_total), l_round), hdg_rec.period_to
1468: );
1469:
1470: if sql%found then
1471: LOG_MSG('status', 'INSERT successful for xtr_deal_retro_tests');
1472: else
1473: LOG_MSG('status', 'INSERT failed for xtr_deal_retro_tests');
1474: end if;
1475:

Line 1473: LOG_MSG('status', 'INSERT failed for xtr_deal_retro_tests');

1469:
1470: if sql%found then
1471: LOG_MSG('status', 'INSERT successful for xtr_deal_retro_tests');
1472: else
1473: LOG_MSG('status', 'INSERT failed for xtr_deal_retro_tests');
1474: end if;
1475:
1476: end loop;
1477: end if; -- end if for (l_test_method <> 'MANUAL') condition