DBA Data[Home] [Help]

APPS.XTR_REVAL_PROCESS_P dependencies on XTR_ROLLOVER_TRANSACTIONS

Line 939: from xtr_rollover_transactions

935:
936: l_close_no := NULL;
937: select trans_closeout_no, ni_profit_loss, initial_fair_value
938: into l_close_no, l_ni_pl, rec.init_fv
939: from xtr_rollover_transactions
940: where deal_number = rec.deal_no
941: and transaction_number = rec.trans_no;
942:
943: if l_close_no is NOT NULL then

Line 968: from XTR_ROLLOVER_TRANSACTIONS

964: select interest_rate
965: into rec.reval_rate
966: from XTR_DEALS
967: where deal_no = (select trans_closeout_no
968: from XTR_ROLLOVER_TRANSACTIONS
969: where deal_number = rec.deal_no
970: and transaction_number = rec.trans_no);
971: else -- The deal is mature. We may calculate realized g/l
972: rel_pl_value := 0;

Line 1144: from XTR_ROLLOVER_TRANSACTIONS

1140: if l_rc = 1 then -- deal is incomplete
1141: rec.trans_no := 1;
1142: select nvl(sum(principal_adjust), 0)
1143: into rec.face_value
1144: from XTR_ROLLOVER_TRANSACTIONS
1145: where deal_number = rec.deal_no
1146: and deal_type = 'ONC'
1147: and transaction_number in (select transaction_number
1148: from XTR_ROLLOVER_TRANSACTIONS

Line 1148: from XTR_ROLLOVER_TRANSACTIONS

1144: from XTR_ROLLOVER_TRANSACTIONS
1145: where deal_number = rec.deal_no
1146: and deal_type = 'ONC'
1147: and transaction_number in (select transaction_number
1148: from XTR_ROLLOVER_TRANSACTIONS
1149: where deal_number = rec.deal_no
1150: and start_date <= rec.revldate
1151: and (cross_ref_to_trans is null));
1152:

Line 1415: from XTR_ROLLOVER_TRANSACTIONS

1411:
1412: if rec.deal_type in ('NI', 'ONC') then
1413: select initial_fair_value
1414: into rec.init_fv
1415: from XTR_ROLLOVER_TRANSACTIONS
1416: where deal_number = rec.deal_no
1417: and transaction_number = rec.trans_no;
1418: elsif rec.deal_type = 'HEDGE' then
1419: rec.init_fv := 0;

Line 2025: from xtr_rollover_transactions

2021: if xtr_get_pre_batchid(rec) = -1 then
2022: -- this is the first one, no previous batch exists
2023: select sum(PRINCIPAL_ADJUST)
2024: into l_in_pri_adjust
2025: from xtr_rollover_transactions
2026: where principal_action = 'INCRSE'
2027: and DEAL_NUMBER = rec.deal_no
2028: and START_DATE <= rec.revldate
2029: and start_date <> (select start_date

Line 2035: from xtr_rollover_transactions

2031: where deal_no = rec.deal_no);
2032:
2033: select sum(PRINCIPAL_ADJUST)
2034: into l_de_pri_adjust
2035: from xtr_rollover_transactions
2036: where principal_action = 'DECRSE'
2037: and DEAL_NUMBER = rec.deal_no
2038: and START_DATE <= rec.revldate
2039: and start_date <> (select maturity_date

Line 2047: from xtr_rollover_transactions

2043: l_pri_adjust := nvl(l_in_pri_adjust,0) - nvl(l_de_pri_adjust,0);
2044: else
2045: select sum(PRINCIPAL_ADJUST)
2046: into l_in_pri_adjust
2047: from xtr_rollover_transactions
2048: where principal_action = 'INCRSE'
2049: and DEAL_NUMBER = rec.deal_no
2050: and START_DATE <= rec.revldate
2051: and START_DATE >= rec.period_start

Line 2058: from xtr_rollover_transactions

2054: where deal_no = rec.deal_no);
2055:
2056: select sum(PRINCIPAL_ADJUST)
2057: into l_de_pri_adjust
2058: from xtr_rollover_transactions
2059: where principal_action = 'DECRSE'
2060: and DEAL_NUMBER = rec.deal_no
2061: and START_DATE <= rec.revldate
2062: and START_DATE >= rec.period_start

Line 2087: from xtr_rollover_transactions

2083: if xtr_get_pre_batchid(rec) = -1 then
2084: -- this is the first one, no previous batch exists
2085: select sum(PRINCIPAL_ADJUST)
2086: into l_in_pri_adjust
2087: from xtr_rollover_transactions
2088: where principal_action = 'INCRSE'
2089: and DEAL_NUMBER = rec.deal_no
2090: and START_DATE <= rec.revldate
2091: and start_date <> (select start_date

Line 2097: from xtr_rollover_transactions

2093: where deal_no = rec.deal_no);
2094:
2095: select sum(PRINCIPAL_ADJUST)
2096: into l_de_pri_adjust
2097: from xtr_rollover_transactions
2098: where principal_action = 'DECRSE'
2099: and DEAL_NUMBER = rec.deal_no
2100: and START_DATE <= rec.revldate
2101: and start_date <> (select maturity_date

Line 2107: from xtr_rollover_transactions

2103: where deal_no = rec.deal_no);
2104:
2105: select sum(pi_amount_received)
2106: into l_recon
2107: from xtr_rollover_transactions
2108: where deal_number = rec.deal_no
2109: and nvl(settle_date,maturity_date) <= rec.revldate;
2110:
2111: select sum(interest)

Line 2113: from xtr_rollover_transactions

2109: and nvl(settle_date,maturity_date) <= rec.revldate;
2110:
2111: select sum(interest)
2112: into l_int
2113: from xtr_rollover_transactions
2114: where deal_number = rec.deal_no
2115: and nvl(settle_date,maturity_date) <= rec.revldate
2116: and nvl(pi_amount_received, 0) <> 0;
2117:

Line 2122: from xtr_rollover_transactions

2118: l_pri_adjust := nvl(l_in_pri_adjust,0) - nvl(l_de_pri_adjust,0) - nvl(l_recon, 0) + nvl(l_int,0);
2119: else
2120: select sum(PRINCIPAL_ADJUST)
2121: into l_in_pri_adjust
2122: from xtr_rollover_transactions
2123: where principal_action = 'INCRSE'
2124: and DEAL_NUMBER = rec.deal_no
2125: and START_DATE <= rec.revldate
2126: and START_DATE >= rec.period_start

Line 2132: from xtr_rollover_transactions

2128: from XTR_DEALS
2129: where deal_no = rec.deal_no);
2130: select sum(PRINCIPAL_ADJUST)
2131: into l_de_pri_adjust
2132: from xtr_rollover_transactions
2133: where principal_action = 'DECRSE'
2134: and DEAL_NUMBER = rec.deal_no
2135: and START_DATE <= rec.revldate
2136: and START_DATE >= rec.period_start

Line 2143: from xtr_rollover_transactions

2139: where deal_no = rec.deal_no);
2140:
2141: select sum(pi_amount_received)
2142: into l_recon
2143: from xtr_rollover_transactions
2144: where deal_number = rec.deal_no
2145: and nvl(settle_date,maturity_date) <= rec.revldate
2146: and nvl(settle_date,maturity_date) >= rec.period_start;
2147:

Line 2150: from xtr_rollover_transactions

2146: and nvl(settle_date,maturity_date) >= rec.period_start;
2147:
2148: select sum(interest)
2149: into l_int
2150: from xtr_rollover_transactions
2151: where deal_number = rec.deal_no
2152: and nvl(settle_date,maturity_date) <= rec.revldate
2153: and nvl(settle_date,maturity_date) >= rec.period_start
2154: and nvl(pi_amount_received, 0) <> 0;

Line 2553: from xtr_rollover_transactions a,

2549: Select a.start_date, a.transaction_number, a.principal_adjust,
2550: a.principal_action, a.balance_out, a.first_reval_batch_id,
2551: b.start_date, b.transaction_number, b.principal_adjust,
2552: b.principal_action, b.balance_out
2553: from xtr_rollover_transactions a,
2554: xtr_rollover_transactions b
2555: where a.deal_number = rec.deal_no
2556: and a.deal_number = b.deal_number
2557: and a.start_date < b.start_date

Line 2554: xtr_rollover_transactions b

2550: a.principal_action, a.balance_out, a.first_reval_batch_id,
2551: b.start_date, b.transaction_number, b.principal_adjust,
2552: b.principal_action, b.balance_out
2553: from xtr_rollover_transactions a,
2554: xtr_rollover_transactions b
2555: where a.deal_number = rec.deal_no
2556: and a.deal_number = b.deal_number
2557: and a.start_date < b.start_date
2558: and b.start_date <= rec.revldate

Line 2563: from xtr_rollover_transactions c

2559: and nvl(a.principal_adjust, 0) <> 0
2560: and nvl(b.principal_adjust, 0) <> 0
2561: and a.start_date =
2562: (select max(c.start_date)
2563: from xtr_rollover_transactions c
2564: where c.deal_number = a.deal_number
2565: and nvl(c.principal_adjust,0) <> 0
2566: and c.start_date < b.start_date)
2567: and a.last_reval_batch_id is null

Line 2574: from XTR_ROLLOVER_TRANSACTIONS

2570:
2571: Cursor C_LAST_PRIN_ADJ is
2572: select start_date, transaction_number, principal_adjust, principal_action,
2573: balance_out, first_reval_batch_id
2574: from XTR_ROLLOVER_TRANSACTIONS
2575: where deal_number = rec.deal_no
2576: and nvl(principal_adjust, 0) <> 0
2577: and start_date <= rec.revldate
2578: order by start_date desc, transaction_number desc;

Line 2646: from xtr_rollover_transactions

2642: l_pre_balance_out := l_balance_out0;
2643: else
2644: select average_exchange_rate -- Get previous transaction's average rate
2645: into l_pre_avg_rate
2646: from xtr_rollover_transactions
2647: where deal_number = rec.deal_no
2648: and average_exchange_rate is NOT NULL -- bug 4598526
2649: and (start_date, maturity_date) = (select max(start_date),max(maturity_date) -- bug 5598286
2650: from xtr_rollover_transactions

Line 2650: from xtr_rollover_transactions

2646: from xtr_rollover_transactions
2647: where deal_number = rec.deal_no
2648: and average_exchange_rate is NOT NULL -- bug 4598526
2649: and (start_date, maturity_date) = (select max(start_date),max(maturity_date) -- bug 5598286
2650: from xtr_rollover_transactions
2651: where deal_number = rec.deal_no
2652: and nvl(principal_adjust, 0) <> 0
2653: and start_date < l_start_date0
2654: and average_exchange_rate is NOT NULL);

Line 2658: from xtr_rollover_transactions

2654: and average_exchange_rate is NOT NULL);
2655:
2656: select balance_out -- Get previous transaction's outstandin balance
2657: into l_pre_balance_out
2658: from xtr_rollover_transactions
2659: where deal_number = rec.deal_no
2660: and nvl(principal_adjust, 0) <> 0 -- bug 4598526
2661: and (start_date,maturity_date) = (select max(start_date),max(maturity_date) -- bug 5598286
2662: from xtr_rollover_transactions

Line 2662: from xtr_rollover_transactions

2658: from xtr_rollover_transactions
2659: where deal_number = rec.deal_no
2660: and nvl(principal_adjust, 0) <> 0 -- bug 4598526
2661: and (start_date,maturity_date) = (select max(start_date),max(maturity_date) -- bug 5598286
2662: from xtr_rollover_transactions
2663: where deal_number = rec.deal_no
2664: and nvl(principal_adjust, 0) <> 0
2665: and start_date < l_start_date0);
2666: end if;

Line 2685: Update XTR_ROLLOVER_TRANSACTIONS

2681: l_sum_rel_curr_gl := round((nvl(l_sum_rel_curr_gl, 0) + nvl(l_rel_curr_gl, 0)),l_round);
2682: end if;
2683: end if;
2684:
2685: Update XTR_ROLLOVER_TRANSACTIONS
2686: set first_reval_batch_id = nvl(first_reval_batch_id, l_first_batch_id),
2687: last_reval_batch_id = nvl(last_reval_batch_id, l_last_batch_id),
2688: currency_exchange_rate = nvl(currency_exchange_rate, l_trans_ex_rate0),
2689: average_exchange_rate = nvl(average_exchange_rate, l_avg_rate)

Line 2739: from xtr_rollover_transactions

2735: -- RCGL
2736: if l_trans_no0 <> 1 then
2737: select average_exchange_rate -- Get previous transaction's average rate
2738: into l_pre_avg_rate
2739: from xtr_rollover_transactions
2740: where deal_number = rec.deal_no
2741: and average_exchange_rate is NOT NULL -- bug 4598526
2742: and (start_date, maturity_date) = (select max(start_date), max(maturity_date) -- bug 5598286
2743: from xtr_rollover_transactions

Line 2743: from xtr_rollover_transactions

2739: from xtr_rollover_transactions
2740: where deal_number = rec.deal_no
2741: and average_exchange_rate is NOT NULL -- bug 4598526
2742: and (start_date, maturity_date) = (select max(start_date), max(maturity_date) -- bug 5598286
2743: from xtr_rollover_transactions
2744: where deal_number = rec.deal_no
2745: and nvl(principal_adjust, 0) <> 0
2746: and start_date < l_start_date0
2747: and average_exchange_rate is NOT NULL);

Line 2751: from xtr_rollover_transactions

2747: and average_exchange_rate is NOT NULL);
2748:
2749: select balance_out -- Get previous transaction's outstandin balance
2750: into l_pre_balance_out
2751: from xtr_rollover_transactions
2752: where deal_number = rec.deal_no
2753: and nvl(principal_adjust, 0) <> 0 -- bug 4598526
2754: and (start_date, maturity_date) = (select max(start_date),max(maturity_date) -- bug 5598286
2755: from xtr_rollover_transactions

Line 2755: from xtr_rollover_transactions

2751: from xtr_rollover_transactions
2752: where deal_number = rec.deal_no
2753: and nvl(principal_adjust, 0) <> 0 -- bug 4598526
2754: and (start_date, maturity_date) = (select max(start_date),max(maturity_date) -- bug 5598286
2755: from xtr_rollover_transactions
2756: where deal_number = rec.deal_no
2757: and nvl(principal_adjust, 0) <> 0
2758: and start_date < l_start_date0);
2759: end if;

Line 2780: Update XTR_ROLLOVER_TRANSACTIONS

2776: end if;
2777: rel_currency_gl := l_sum_rel_curr_gl;
2778: unrel_currency_gl := l_sum_unrel_curr_gl;
2779:
2780: Update XTR_ROLLOVER_TRANSACTIONS
2781: set first_reval_batch_id = nvl(first_reval_batch_id, l_first_batch_id),
2782: currency_exchange_rate = nvl(currency_exchange_rate, l_trans_ex_rate0),
2783: average_exchange_rate = nvl(average_exchange_rate, l_avg_rate)
2784: where deal_number = rec.deal_no

Line 3771: /* in xtr_rollover_transactions for deal type ONC */

3767: -----------------------------------------------------------------
3768: /*******************************************************************/
3769: /* This procedure pass one deal no for each company and calculate */
3770: /* (un)realized currency G/L and average exchange rate for the row */
3771: /* in xtr_rollover_transactions for deal type ONC */
3772: /*******************************************************************/
3773: PROCEDURE xtr_revl_onc_curr_gl(
3774: rec IN OUT NOCOPY xtr_revl_rec,
3775: retcode OUT NOCOPY NUMBER) IS

Line 3816: from XTR_ROLLOVER_TRANSACTIONS R,

3812: r.maturity_date, r.balance_out, r.repay_amount,
3813: r.first_reval_batch_id, r.interest_rate,
3814: r.average_exchange_rate, r.cross_ref_to_trans, r.product_type,
3815: r.currency_exchange_rate, r.accum_int_action, r.accum_interest_bf --bug 2895074
3816: from XTR_ROLLOVER_TRANSACTIONS R,
3817: XTR_COMPANY_PARAMETERS CP
3818: where r.deal_number = rec.deal_no
3819: and cp.company_code = r.company_code
3820: and cp.parameter_code = 'ACCNT_TSDTM'

Line 3830: from XTR_ROLLOVER_TRANSACTIONS

3826:
3827: cursor c_trans_avg_rate is
3828: select balance_out, currency_exchange_rate,
3829: average_exchange_rate --bug 3041100
3830: from XTR_ROLLOVER_TRANSACTIONS
3831: where deal_number = rec.deal_no
3832: and cross_ref_to_trans = rec.trans_no;
3833:
3834: Cursor CHK_LOCK_ROLL is

Line 3836: from XTR_ROLLOVER_TRANSACTIONS

3832: and cross_ref_to_trans = rec.trans_no;
3833:
3834: Cursor CHK_LOCK_ROLL is
3835: select rowid
3836: from XTR_ROLLOVER_TRANSACTIONS
3837: Where DEAL_NUMBER = rec.deal_no
3838: And TRANSACTION_NUMBER = rec.trans_no
3839: And DEAL_TYPE = 'ONC'
3840: for update of FIRST_REVAL_BATCH_ID NOWAIT;

Line 3887: from xtr_rollover_transactions

3883: l_unrel_start_date := rec.start_date;
3884:
3885: select count(*)
3886: into l_dummy
3887: from xtr_rollover_transactions
3888: where deal_number = rec.deal_no
3889: and cross_ref_to_trans = rec.trans_no;
3890:
3891: if l_dummy > 1 then

Line 3920: from XTR_ROLLOVER_TRANSACTIONS

3916: elsif l_dummy = 1 then
3917: -- the transaction the result of reneg of previous transaction
3918: select nvl(average_exchange_rate,currency_exchange_rate),balance_out
3919: into l_pre_avg_rate, l_pre_balance
3920: from XTR_ROLLOVER_TRANSACTIONS
3921: where deal_number = rec.deal_no
3922: and cross_ref_to_trans = rec.trans_no;
3923: --begin bug 2895074, 2961502
3924: if nvl(l_repay_amount,0)<0 then --ONC Principal Increase Case

Line 4012: from XTR_ROLLOVER_TRANSACTIONS

4008:
4009: -- Insert a realized G/L row into XTR_REVALUATION_DETAILS table
4010: select min(start_date)
4011: into l_rel_start_date
4012: from XTR_ROLLOVER_TRANSACTIONS
4013: where cross_ref_to_trans = rec.trans_no;
4014:
4015: rec.period_start := l_rel_start_date;
4016: rec.period_end := rec.start_date;

Line 4028: Update XTR_ROLLOVER_TRANSACTIONS

4024: Open CHK_LOCK_ROLL;
4025: Fetch CHK_LOCK_ROLL into l_rowid;
4026: if CHK_LOCK_ROLL%FOUND then
4027: close CHK_LOCK_ROLL;
4028: Update XTR_ROLLOVER_TRANSACTIONS
4029: Set FIRST_REVAL_BATCH_ID = nvl(l_trans_first_batch, FIRST_REVAL_BATCH_ID),
4030: LAST_REVAL_BATCH_ID = nvl(l_trans_last_batch, LAST_REVAL_BATCH_ID),
4031: CURRENCY_EXCHANGE_RATE = nvl(CURRENCY_EXCHANGE_RATE, l_trans_gl_rate),
4032: AVERAGE_EXCHANGE_RATE = nvl(AVERAGE_EXCHANGE_RATE, l_trans_avg_rate)

Line 4138: from XTR_ROLLOVER_TRANSACTIONS

4134: if l_found = false then
4135: if rec.deal_type in ('NI', 'ONC') then
4136: select initial_fair_value
4137: into p_fair_value
4138: from XTR_ROLLOVER_TRANSACTIONS
4139: where deal_number = rec.deal_no
4140: and transaction_number = rec.trans_no;
4141: else
4142: select initial_fair_value

Line 4162: from xtr_rollover_transactions

4158:
4159: if l_found = false then
4160: select interest
4161: into p_ni_disc_amt
4162: from xtr_rollover_transactions
4163: where deal_number = rec.deal_no
4164: and transaction_number = rec.trans_no;
4165: end if;
4166: end if;

Line 4261: from xtr_rollover_transactions

4257: select decode(l_inclu_cost, 'N', (BALANCE_OUT - INTEREST),
4258: (BALANCE_OUT - INTEREST + nvl(BROKERAGE_AMOUNT, 0))),
4259: deal_subtype
4260: into init_fv, l_deal_subtype
4261: from xtr_rollover_transactions
4262: where DEAL_NUMBER = rec.deal_no
4263: and TRANSACTION_NUMBER = rec.trans_no;
4264:
4265: if l_deal_subtype in ('SHORT', 'ISSUE') then

Line 4368: -- tables XTR_DEALS or XTR_ROLLOVER_TRANSACTIONS or others depending

4364: )
4365: IS
4366: --
4367: -- Purpose: This Procedure inserts the INITIAL_FAIR_VALUE into the
4368: -- tables XTR_DEALS or XTR_ROLLOVER_TRANSACTIONS or others depending
4369: -- on the Deal Type.This will be callled from the forms either after
4370: -- the POST-DATA-BASE-COMMIT Trigger or POST-INSERT Triggers or other
4371: -- appropriate triggers.
4372: -- This procedure uses xtr_reval_process_p.xtr_init_fv() for getting

Line 4415: update xtr_rollover_transactions set initial_fair_value = fv

4411: company_code = p_company_code;
4412: End If;
4413: Elsif p_deal_type in ('NI') then
4414: If p_transaction_no is NOT NULL then
4415: update xtr_rollover_transactions set initial_fair_value = fv
4416: where deal_number = p_deal_no and
4417: deal_type = p_deal_type and
4418: transaction_number = p_transaction_no and
4419: company_code = p_company_code;

Line 4421: update xtr_rollover_transactions set initial_fair_value = fv

4417: deal_type = p_deal_type and
4418: transaction_number = p_transaction_no and
4419: company_code = p_company_code;
4420: Else
4421: update xtr_rollover_transactions set initial_fair_value = fv
4422: where ((deal_number = p_deal_no) or (trans_closeout_no = p_deal_no)) and
4423: deal_type = p_deal_type and
4424: company_code = p_company_code;
4425: End if;

Line 4428: -- Also insert ALL_IN_RATE to xtr_rollover_transactions table

4424: company_code = p_company_code;
4425: End if;
4426:
4427: /* AW Bug 2184427
4428: -- Also insert ALL_IN_RATE to xtr_rollover_transactions table
4429: select PARAMETER_VALUE_CODE
4430: into l_inclu_cost
4431: from XTR_COMPANY_PARAMETERS
4432: where company_code = p_company_code

Line 4443: xtr_rollover_transactions RT

4439: select rt.balance_out, nvl(rt.brokerage_amount, 0), d.year_calc_type,
4440: d.calc_basis, rt.start_date, rt.maturity_date
4441: into l_face_value, l_brk_amt, l_year_calc_type, l_disc_yield, l_start_date, l_end_date
4442: from xtr_deals D,
4443: xtr_rollover_transactions RT
4444: where D.deal_no = p_deal_no
4445: and D.deal_no = RT.deal_number
4446: and RT.transaction_number = p_transaction_no;
4447:

Line 4465: from xtr_deals D, xtr_rollover_transactions RT

4461: select rt.balance_out, nvl(rt.brokerage_amount, 0), d.year_calc_type,
4462: d.calc_basis, rt.start_date, rt.maturity_date
4463: into l_face_value, l_brk_amt, l_year_calc_type, l_disc_yield,
4464: l_start_date, l_end_date
4465: from xtr_deals D, xtr_rollover_transactions RT
4466: where D.deal_no = p_deal_no
4467: and D.deal_no = RT.deal_number
4468: and RT.transaction_number = p_transaction_no;
4469:

Line 4485: from xtr_rollover_transactions

4481: else
4482:
4483: select interest_rate
4484: into l_all_in_rate
4485: from xtr_rollover_transactions
4486: where deal_number = p_deal_no
4487: and transaction_number = p_transaction_no;
4488:
4489: end if;

Line 4495: from xtr_rollover_transactions

4491: else -- not including cost
4492:
4493: select interest_rate
4494: into l_all_in_rate
4495: from xtr_rollover_transactions
4496: where deal_number = p_deal_no
4497: and transaction_number = p_transaction_no;
4498:
4499: end if;

Line 4503: update xtr_rollover_transactions

4499: end if;
4500: */
4501:
4502: If p_transaction_no is NOT NULL then
4503: update xtr_rollover_transactions
4504: set all_in_rate = l_all_in_rate
4505: where deal_number = p_deal_no and
4506: deal_type = p_deal_type and
4507: transaction_number = p_transaction_no and

Line 4510: update xtr_rollover_transactions

4506: deal_type = p_deal_type and
4507: transaction_number = p_transaction_no and
4508: company_code = p_company_code;
4509: Else
4510: update xtr_rollover_transactions
4511: set all_in_rate = l_all_in_rate
4512: where ((deal_number = p_deal_no) or (trans_closeout_no = p_deal_no)) and
4513: deal_type = p_deal_type and
4514: company_code = p_company_code;

Line 4519: update xtr_rollover_transactions set initial_fair_value = fv

4515: End if;
4516:
4517: Elsif p_deal_type in ('ONC') then
4518: If p_transaction_no is NOT NULL then
4519: update xtr_rollover_transactions set initial_fair_value = fv
4520: where deal_number = p_deal_no and
4521: deal_type = p_deal_type and
4522: transaction_number = p_transaction_no and
4523: company_code = p_company_code;

Line 4525: update xtr_rollover_transactions set initial_fair_value = fv

4521: deal_type = p_deal_type and
4522: transaction_number = p_transaction_no and
4523: company_code = p_company_code;
4524: Else
4525: update xtr_rollover_transactions set initial_fair_value = fv
4526: where deal_number = p_deal_no and
4527: deal_type = p_deal_type and
4528: company_code = p_company_code;
4529: End If;

Line 4578: from XTR_ROLLOVER_TRANSACTIONS R

4574: /*********** TMM ending FV **********************/
4575: if rec.deal_type = 'TMM' then
4576: select R.BALANCE_OUT_BF
4577: into end_fv
4578: from XTR_ROLLOVER_TRANSACTIONS R
4579: where deal_number = rec.deal_no
4580: and transaction_number =
4581: (select max(transaction_number)
4582: from xtr_rollover_transactions

Line 4582: from xtr_rollover_transactions

4578: from XTR_ROLLOVER_TRANSACTIONS R
4579: where deal_number = rec.deal_no
4580: and transaction_number =
4581: (select max(transaction_number)
4582: from xtr_rollover_transactions
4583: where deal_number = rec.deal_no);
4584:
4585: if rec.deal_subtype = 'FUND' then
4586: end_fv := end_fv * (-1);

Line 4786: /* XTR_ROLLOVER_TRANSACTIONS table */

4782: /* FRA, IRO, IRS, and TMM */
4783: /* For FRA and IRO, start_date and maturity_date come from */
4784: /* XTR_DEALS table. */
4785: /* For TMM and IRS, start_date and maturity_date come from */
4786: /* XTR_ROLLOVER_TRANSACTIONS table */
4787: /****************************************************************/
4788: PROCEDURE xtr_revl_getprice_fwd(
4789: rec IN xtr_revl_rec, has_transno IN BOOLEAN,
4790: fwd_rate OUT NOCOPY NUMBER) IS

Line 4812: from xtr_rollover_transactions

4808:
4809: -- for deal_type = TMM and IRS, we need to calculate in transacation level
4810: cursor c_roll is
4811: select START_DATE, MATURITY_DATE
4812: from xtr_rollover_transactions
4813: where DEAL_NUMBER = rec.deal_no and TRANSACTION_NUMBER =
4814: rec.trans_no;
4815:
4816: begin

Line 7166: from xtr_rollover_transactions

7162:
7163: -- select BALANCE_OUT - INTEREST
7164: select BALANCE_OUT
7165: into l_parcel_amt
7166: from xtr_rollover_transactions
7167: where DEAL_NUMBER = rec.deal_no and
7168: TRANSACTION_NUMBER = rec.trans_no;
7169:
7170: select MARGIN, CALC_BASIS

Line 8195: from xtr_rollover_transactions

8191: cursor c_roll is
8192: select TRANSACTION_NUMBER, START_DATE, MATURITY_DATE, PRINCIPAL_ACTION,
8193: INTEREST_RATE, INTEREST_SETTLED, PRINCIPAL_ADJUST, ACCUM_INTEREST,
8194: BALANCE_OUT, SETTLE_TERM_INTEREST, INTEREST, INTEREST_REFUND, SETTLE_DATE
8195: from xtr_rollover_transactions
8196: where DEAL_NUMBER = rec.deal_no
8197: and maturity_date >= rec.revldate
8198: order by start_date, transaction_number asc;
8199:

Line 8217: from xtr_rollover_transactions

8213:
8214: -- determine the last record's transaction number
8215: select max(transaction_number)
8216: into l_last_rec_trans
8217: from xtr_rollover_transactions
8218: where DEAL_NUMBER=rec.deal_no
8219: and START_DATE = MATURITY_DATE;
8220:
8221: for l_tmp in c_roll loop

Line 9340: from xtr_rollover_transactions

9336: cursor c_roll is
9337: select TRANSACTION_NUMBER, START_DATE, MATURITY_DATE, PRINCIPAL_ACTION,
9338: INTEREST_RATE, INTEREST_SETTLED, PRINCIPAL_ADJUST, ACCUM_INTEREST,
9339: BALANCE_OUT, SETTLE_TERM_INTEREST, INTEREST, SETTLE_DATE
9340: from xtr_rollover_transactions
9341: where DEAL_NUMBER = rec.deal_no
9342: and maturity_date >= rec.revldate
9343: order by transaction_number asc;
9344:

Line 9359: from XTR_ROLLOVER_TRANSACTIONS_V

9355: where deal_no = rec.deal_no;
9356:
9357: select max(transaction_number)
9358: into l_max_trans_no
9359: from XTR_ROLLOVER_TRANSACTIONS_V
9360: where deal_number = rec.deal_no
9361: and start_date = l_deal_begin_date;
9362:
9363: l_market_set := rec.MARKET_DATA_SET;

Line 9659: from xtr_rollover_transactions, xtr_deals

9655: where currency = rec.reval_ccy;
9656:
9657: select all_in_rate, rounding_type
9658: into l_all_in_rate, l_rounding_type -- 5130446
9659: from xtr_rollover_transactions, xtr_deals
9660: where deal_number = rec.deal_no
9661: and deal_number= deal_no
9662: and transaction_number = rec.trans_no;
9663:

Line 9819: /* Also update xtr_deals and xtr_rollover_transactions, */

9815:
9816: --------------------------------------------------------
9817: /*****************************************************************/
9818: /* This procedure insert unrealized values into xtr_revaluation_details table*/
9819: /* Also update xtr_deals and xtr_rollover_transactions, */
9820: /* xtr_bank_balance, xtr_intergroup_transfers */
9821: /******************************************************************/
9822: PROCEDURE xtr_revl_unreal_log(
9823: rec IN xtr_revl_rec,

Line 9851: from XTR_ROLLOVER_TRANSACTIONS

9847: for update of FIRST_REVAL_BATCH_ID NOWAIT;
9848:
9849: Cursor CHK_LOCK_ROLL is
9850: select rowid
9851: from XTR_ROLLOVER_TRANSACTIONS
9852: Where DEAL_NUMBER = rec.deal_no
9853: And TRANSACTION_NUMBER = rec.trans_no
9854: And DEAL_TYPE = 'NI'
9855: And FIRST_REVAL_BATCH_ID is null

Line 9959: Update XTR_ROLLOVER_TRANSACTIONS

9955:
9956: Open CHK_LOCK_ROLL;
9957: Fetch CHK_LOCK_ROLL into l_deal_rowid;
9958: if CHK_LOCK_ROLL%FOUND then
9959: Update XTR_ROLLOVER_TRANSACTIONS
9960: Set FIRST_REVAL_BATCH_ID = rec.batch_id,
9961: CURRENCY_EXCHANGE_RATE = rec.deal_ex_rate_one
9962: Where rowid = l_deal_rowid;
9963: close CHK_LOCK_ROLL;

Line 10022: /* Also update xtr_deals and xtr_rollover_transactions, */

10018:
10019: --------------------------------------------------------------------
10020: /*****************************************************************/
10021: /* This procedure insert realized values into xtr_revaluation_details table*/
10022: /* Also update xtr_deals and xtr_rollover_transactions, */
10023: /* xtr_bank_balance, xtr_intergroup_transfers */
10024: /******************************************************************/
10025: PROCEDURE xtr_revl_real_log (
10026: rec IN xtr_revl_rec,

Line 10052: from XTR_ROLLOVER_TRANSACTIONS

10048: for update of FIRST_REVAL_BATCH_ID NOWAIT;
10049:
10050: Cursor CHK_LOCK_ROLL is
10051: select rowid
10052: from XTR_ROLLOVER_TRANSACTIONS
10053: Where DEAL_NUMBER = rec.deal_no
10054: And TRANSACTION_NUMBER = rec.trans_no
10055: And DEAL_TYPE = 'NI'
10056: for update of FIRST_REVAL_BATCH_ID NOWAIT;

Line 10142: Update XTR_ROLLOVER_TRANSACTIONS

10138: Open CHK_LOCK_ROLL;
10139: Fetch CHK_LOCK_ROLL into l_deal_rowid;
10140: if CHK_LOCK_ROLL%FOUND then
10141: close CHK_LOCK_ROLL;
10142: Update XTR_ROLLOVER_TRANSACTIONS
10143: Set LAST_REVAL_BATCH_ID = rec.batch_id
10144: Where rowid = l_deal_rowid;
10145: else
10146: Close CHK_LOCK_ROLL;

Line 10314: from XTR_ROLLOVER_TRANSACTIONS

10310: and first_reval_batch_id <> rec.batch_id;
10311:
10312: cursor C_FIRST_ROLL is
10313: select 'Y'
10314: from XTR_ROLLOVER_TRANSACTIONS
10315: where deal_number = rec.deal_no
10316: and transaction_number = rec.trans_no
10317: and deal_type in ('NI', 'ONC')
10318: and first_reval_batch_id is NOT NULL