DBA Data[Home] [Help]

APPS.XTR_HEDGE_PROCESS_P dependencies on XTR_HEDGE_RETRO_TESTS

Line 96: from xtr_hedge_retro_tests T1

92: and reclass_date < p_date;
93:
94: cursor cum_eff is
95: select eff_cum_gain_loss_amt
96: from xtr_hedge_retro_tests T1
97: where hedge_attribute_id = p_hedge_no
98: and result_date = (select max(result_date) from xtr_hedge_retro_tests T2
99: where T1.hedge_attribute_id = T2.hedge_attribute_id
100: and result_code is not null);

Line 98: and result_date = (select max(result_date) from xtr_hedge_retro_tests T2

94: cursor cum_eff is
95: select eff_cum_gain_loss_amt
96: from xtr_hedge_retro_tests T1
97: where hedge_attribute_id = p_hedge_no
98: and result_date = (select max(result_date) from xtr_hedge_retro_tests T2
99: where T1.hedge_attribute_id = T2.hedge_attribute_id
100: and result_code is not null);
101:
102: -- Unit Test Change: Added "and result_code is not null" condition

Line 122: from xtr_hedge_retro_tests

118:
119: cursor get_cumu(p_hedge_no in number, p_batch_id in number) is
120: select item_cum_gain_loss_amt, inst_cum_gain_loss_amt, eff_cum_gain_loss_amt,
121: ineff_cum_gain_loss_amt, excluded_cum_gain_loss_amt
122: from xtr_hedge_retro_tests
123: where hedge_attribute_id = p_hedge_no
124: and result_date = (select max(result_date) from xtr_hedge_retro_tests r
125: where r. hedge_attribute_id = p_hedge_no
126: and r.batch_id <= p_batch_id);

Line 124: and result_date = (select max(result_date) from xtr_hedge_retro_tests r

120: select item_cum_gain_loss_amt, inst_cum_gain_loss_amt, eff_cum_gain_loss_amt,
121: ineff_cum_gain_loss_amt, excluded_cum_gain_loss_amt
122: from xtr_hedge_retro_tests
123: where hedge_attribute_id = p_hedge_no
124: and result_date = (select max(result_date) from xtr_hedge_retro_tests r
125: where r. hedge_attribute_id = p_hedge_no
126: and r.batch_id <= p_batch_id);
127:
128:

Line 223: LOG_MSG('event', 'updating xtr_hedge_retro_tests...');

219: set cur_pct_allocation = round(pct_allocation * (l_rem_hedge_amt - l_rec_hdg_amt)/l_orig_hedge_amt,2),
220: cur_reference_amt = round(reference_amount * (l_rem_hedge_amt - l_rec_hdg_amt)/l_orig_hedge_amt, l_round)
221: where hedge_attribute_id = p_hedge_no;
222:
223: LOG_MSG('event', 'updating xtr_hedge_retro_tests...');
224:
225: update xtr_hedge_retro_tests
226: set reclass_gain_loss_amt = nvl(l_rec_gl_amt,0)
227: where hedge_attribute_id = p_hedge_no

Line 225: update xtr_hedge_retro_tests

221: where hedge_attribute_id = p_hedge_no;
222:
223: LOG_MSG('event', 'updating xtr_hedge_retro_tests...');
224:
225: update xtr_hedge_retro_tests
226: set reclass_gain_loss_amt = nvl(l_rec_gl_amt,0)
227: where hedge_attribute_id = p_hedge_no
228: and result_date = p_date;
229:

Line 231: LOG_MSG('event', 'updated xtr_hedge_retro_tests sucessfully!');

227: where hedge_attribute_id = p_hedge_no
228: and result_date = p_date;
229:
230: if sql%found then
231: LOG_MSG('event', 'updated xtr_hedge_retro_tests sucessfully!');
232: else
233: LOG_MSG('event', 'could not update xtr_hedge_retro_tests. The hedge already matured.');
234:
235: open get_cumu(p_hedge_no, p_batch_id);

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

229:
230: if sql%found then
231: LOG_MSG('event', 'updated xtr_hedge_retro_tests sucessfully!');
232: else
233: LOG_MSG('event', 'could not update xtr_hedge_retro_tests. The hedge already matured.');
234:
235: open get_cumu(p_hedge_no, p_batch_id);
236: fetch get_cumu into l_item_prv_cum, l_inst_prv_cum, l_eff_prv_cum,
237: l_ineff_prv_cum, l_excl_prv_cum;

Line 242: select xtr_hedge_retro_tests_s.nextval into l_retro_test_id from dual;

238: close get_cumu;
239:
240: LOG_MSG('l_amount_type = '||l_amount_type);
241:
242: select xtr_hedge_retro_tests_s.nextval into l_retro_test_id from dual;
243:
244: insert into xtr_hedge_retro_tests
245: (HEDGE_RETRO_TEST_ID, COMPANY_CODE, HEDGE_ATTRIBUTE_ID, RESULT_CODE,
246: BATCH_ID, RESULT_DATE,CREATED_BY, CREATION_DATE, LAST_UPDATED_BY,

Line 244: insert into xtr_hedge_retro_tests

240: LOG_MSG('l_amount_type = '||l_amount_type);
241:
242: select xtr_hedge_retro_tests_s.nextval into l_retro_test_id from dual;
243:
244: insert into xtr_hedge_retro_tests
245: (HEDGE_RETRO_TEST_ID, COMPANY_CODE, HEDGE_ATTRIBUTE_ID, RESULT_CODE,
246: BATCH_ID, RESULT_DATE,CREATED_BY, CREATION_DATE, LAST_UPDATED_BY,
247: LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,PROGRAM_ID, PROGRAM_LOGIN_ID,
248: PROGRAM_APPLICATION_ID, REQUEST_ID, COMPLETE_FLAG,GAIN_LOSS_CCY,

Line 1003: from xtr_hedge_retro_tests

999: --------------------------------------------------------*/
1000: cursor get_cumu(p_hedge_no in number, p_batch_id in number) is
1001: select item_cum_gain_loss_amt, inst_cum_gain_loss_amt, eff_cum_gain_loss_amt,
1002: ineff_cum_gain_loss_amt, excluded_cum_gain_loss_amt
1003: from xtr_hedge_retro_tests
1004: where hedge_attribute_id = p_hedge_no
1005: and result_date = (select max(result_date) from xtr_hedge_retro_tests r
1006: where r. hedge_attribute_id = p_hedge_no
1007: and r.batch_id <= p_batch_id);

Line 1005: and result_date = (select max(result_date) from xtr_hedge_retro_tests r

1001: select item_cum_gain_loss_amt, inst_cum_gain_loss_amt, eff_cum_gain_loss_amt,
1002: ineff_cum_gain_loss_amt, excluded_cum_gain_loss_amt
1003: from xtr_hedge_retro_tests
1004: where hedge_attribute_id = p_hedge_no
1005: and result_date = (select max(result_date) from xtr_hedge_retro_tests r
1006: where r. hedge_attribute_id = p_hedge_no
1007: and r.batch_id <= p_batch_id);
1008:
1009:

Line 1012: from xtr_hedge_retro_tests

1008:
1009:
1010: cursor get_result(p_hedge_no in number, p_batch_id in number) is
1011: select result_code, pct_effective
1012: from xtr_hedge_retro_tests
1013: where hedge_attribute_id = p_hedge_no
1014: and batch_id = p_batch_id;
1015:
1016: /*-------------------------------------------------------

Line 1124: from xtr_hedge_retro_tests

1120: where hedge_attribute_id = p_hedge_no;
1121:
1122: cursor retro(p_hedge_no in number) is
1123: select pct_effective
1124: from xtr_hedge_retro_tests
1125: where batch_id = p_batch_id
1126: and hedge_attribute_id = p_hedge_no;
1127:
1128:

Line 1352: select xtr_hedge_retro_tests_s.nextval into l_retro_test_id from dual;

1348:
1349: /* This implies, not called from the form, but done
1350: as part of retro calcualtion for the first time */
1351:
1352: select xtr_hedge_retro_tests_s.nextval into l_retro_test_id from dual;
1353:
1354: insert into xtr_hedge_retro_tests
1355: (HEDGE_RETRO_TEST_ID, COMPANY_CODE, HEDGE_ATTRIBUTE_ID, RESULT_CODE,
1356: BATCH_ID, RESULT_DATE,CREATED_BY, CREATION_DATE, LAST_UPDATED_BY,

Line 1354: insert into xtr_hedge_retro_tests

1350: as part of retro calcualtion for the first time */
1351:
1352: select xtr_hedge_retro_tests_s.nextval into l_retro_test_id from dual;
1353:
1354: insert into xtr_hedge_retro_tests
1355: (HEDGE_RETRO_TEST_ID, COMPANY_CODE, HEDGE_ATTRIBUTE_ID, RESULT_CODE,
1356: BATCH_ID, RESULT_DATE,CREATED_BY, CREATION_DATE, LAST_UPDATED_BY,
1357: LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,PROGRAM_ID, PROGRAM_LOGIN_ID,
1358: PROGRAM_APPLICATION_ID, REQUEST_ID, COMPLETE_FLAG,GAIN_LOSS_CCY,

Line 1393: select xtr_hedge_retro_tests_s.nextval into l_retro_test_id from dual;

1389: LOG_MSG('l_ineff_prd' , l_ineff_prd);
1390:
1391: l_ineff_cum:= nvl(l_ineff_prv_cum,0) + nvl(l_ineff_prd,0);
1392:
1393: select xtr_hedge_retro_tests_s.nextval into l_retro_test_id from dual;
1394:
1395: LOG_MSG('event', 'inserting NON-MANUAL test - part of retro calculations');
1396:
1397: insert into xtr_hedge_retro_tests

Line 1397: insert into xtr_hedge_retro_tests

1393: select xtr_hedge_retro_tests_s.nextval into l_retro_test_id from dual;
1394:
1395: LOG_MSG('event', 'inserting NON-MANUAL test - part of retro calculations');
1396:
1397: insert into xtr_hedge_retro_tests
1398: (HEDGE_RETRO_TEST_ID, COMPANY_CODE, HEDGE_ATTRIBUTE_ID, RESULT_CODE,
1399: BATCH_ID, RESULT_DATE,CREATED_BY, CREATION_DATE, LAST_UPDATED_BY,
1400: LAST_UPDATE_DATE, LAST_UPDATE_LOGIN,PROGRAM_ID, PROGRAM_LOGIN_ID,
1401: PROGRAM_APPLICATION_ID, REQUEST_ID, COMPLETE_FLAG, GAIN_LOSS_CCY,

Line 1419: LOG_MSG('status', 'INSERT sucessful for xtr_hedge_retro_tests');

1415: --------------------------------------------------------*/
1416:
1417: if sql%found then
1418: if (l_test_method <> 'MANUAL') then
1419: LOG_MSG('status', 'INSERT sucessful for xtr_hedge_retro_tests');
1420:
1421: open deal_count(hdg_rec.hedge_no);
1422: fetch deal_count into l_deal_count, l_deal_total;
1423: close deal_count;

Line 1479: else -- did not insert record into xtr_hedge_retro_tests

1475:
1476: end loop;
1477: end if; -- end if for (l_test_method <> 'MANUAL') condition
1478:
1479: else -- did not insert record into xtr_hedge_retro_tests
1480:
1481: LOG_MSG('status', 'INSERT failed for xtr_hedge_retro_tests');
1482:
1483: end if;

Line 1481: LOG_MSG('status', 'INSERT failed for xtr_hedge_retro_tests');

1477: end if; -- end if for (l_test_method <> 'MANUAL') condition
1478:
1479: else -- did not insert record into xtr_hedge_retro_tests
1480:
1481: LOG_MSG('status', 'INSERT failed for xtr_hedge_retro_tests');
1482:
1483: end if;
1484:
1485: end if; --end if for if l_test_method = 'MANUAL' condition