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 1424: from XTR_ROLLOVER_TRANSACTIONS

1420:
1421: if rec.deal_type in ('NI', 'ONC') then
1422: select initial_fair_value
1423: into rec.init_fv
1424: from XTR_ROLLOVER_TRANSACTIONS
1425: where deal_number = rec.deal_no
1426: and transaction_number = rec.trans_no;
1427: elsif rec.deal_type = 'HEDGE' then
1428: rec.init_fv := 0;

Line 2042: from xtr_rollover_transactions

2038: if xtr_get_pre_batchid(rec) = -1 then
2039: -- this is the first one, no previous batch exists
2040: select sum(PRINCIPAL_ADJUST)
2041: into l_in_pri_adjust
2042: from xtr_rollover_transactions
2043: where principal_action = 'INCRSE'
2044: and DEAL_NUMBER = rec.deal_no
2045: and START_DATE <= rec.revldate
2046: and start_date <> (select start_date

Line 2052: from xtr_rollover_transactions

2048: where deal_no = rec.deal_no);
2049:
2050: select sum(PRINCIPAL_ADJUST)
2051: into l_de_pri_adjust
2052: from xtr_rollover_transactions
2053: where principal_action = 'DECRSE'
2054: and DEAL_NUMBER = rec.deal_no
2055: and START_DATE <= rec.revldate
2056: and start_date <> (select maturity_date

Line 2064: from xtr_rollover_transactions

2060: l_pri_adjust := nvl(l_in_pri_adjust,0) - nvl(l_de_pri_adjust,0);
2061: else
2062: select sum(PRINCIPAL_ADJUST)
2063: into l_in_pri_adjust
2064: from xtr_rollover_transactions
2065: where principal_action = 'INCRSE'
2066: and DEAL_NUMBER = rec.deal_no
2067: and START_DATE <= rec.revldate
2068: and START_DATE >= rec.period_start

Line 2075: from xtr_rollover_transactions

2071: where deal_no = rec.deal_no);
2072:
2073: select sum(PRINCIPAL_ADJUST)
2074: into l_de_pri_adjust
2075: from xtr_rollover_transactions
2076: where principal_action = 'DECRSE'
2077: and DEAL_NUMBER = rec.deal_no
2078: and START_DATE <= rec.revldate
2079: and START_DATE >= rec.period_start

Line 2104: from xtr_rollover_transactions

2100: if xtr_get_pre_batchid(rec) = -1 then
2101: -- this is the first one, no previous batch exists
2102: select sum(PRINCIPAL_ADJUST)
2103: into l_in_pri_adjust
2104: from xtr_rollover_transactions
2105: where principal_action = 'INCRSE'
2106: and DEAL_NUMBER = rec.deal_no
2107: and START_DATE <= rec.revldate
2108: and start_date <> (select start_date

Line 2114: from xtr_rollover_transactions

2110: where deal_no = rec.deal_no);
2111:
2112: select sum(PRINCIPAL_ADJUST)
2113: into l_de_pri_adjust
2114: from xtr_rollover_transactions
2115: where principal_action = 'DECRSE'
2116: and DEAL_NUMBER = rec.deal_no
2117: and START_DATE <= rec.revldate
2118: and start_date <> (select maturity_date

Line 2124: from xtr_rollover_transactions

2120: where deal_no = rec.deal_no);
2121:
2122: select sum(pi_amount_received)
2123: into l_recon
2124: from xtr_rollover_transactions
2125: where deal_number = rec.deal_no
2126: and nvl(settle_date,maturity_date) <= rec.revldate;
2127:
2128: select sum(interest)

Line 2130: from xtr_rollover_transactions

2126: and nvl(settle_date,maturity_date) <= rec.revldate;
2127:
2128: select sum(interest)
2129: into l_int
2130: from xtr_rollover_transactions
2131: where deal_number = rec.deal_no
2132: and nvl(settle_date,maturity_date) <= rec.revldate
2133: and nvl(pi_amount_received, 0) <> 0;
2134:

Line 2139: from xtr_rollover_transactions

2135: l_pri_adjust := nvl(l_in_pri_adjust,0) - nvl(l_de_pri_adjust,0) - nvl(l_recon, 0) + nvl(l_int,0);
2136: else
2137: select sum(PRINCIPAL_ADJUST)
2138: into l_in_pri_adjust
2139: from xtr_rollover_transactions
2140: where principal_action = 'INCRSE'
2141: and DEAL_NUMBER = rec.deal_no
2142: and START_DATE <= rec.revldate
2143: and START_DATE >= rec.period_start

Line 2149: from xtr_rollover_transactions

2145: from XTR_DEALS
2146: where deal_no = rec.deal_no);
2147: select sum(PRINCIPAL_ADJUST)
2148: into l_de_pri_adjust
2149: from xtr_rollover_transactions
2150: where principal_action = 'DECRSE'
2151: and DEAL_NUMBER = rec.deal_no
2152: and START_DATE <= rec.revldate
2153: and START_DATE >= rec.period_start

Line 2160: from xtr_rollover_transactions

2156: where deal_no = rec.deal_no);
2157:
2158: select sum(pi_amount_received)
2159: into l_recon
2160: from xtr_rollover_transactions
2161: where deal_number = rec.deal_no
2162: and nvl(settle_date,maturity_date) <= rec.revldate
2163: and nvl(settle_date,maturity_date) >= rec.period_start;
2164:

Line 2167: from xtr_rollover_transactions

2163: and nvl(settle_date,maturity_date) >= rec.period_start;
2164:
2165: select sum(interest)
2166: into l_int
2167: from xtr_rollover_transactions
2168: where deal_number = rec.deal_no
2169: and nvl(settle_date,maturity_date) <= rec.revldate
2170: and nvl(settle_date,maturity_date) >= rec.period_start
2171: and nvl(pi_amount_received, 0) <> 0;

Line 2570: from xtr_rollover_transactions a,

2566: Select a.start_date, a.transaction_number, a.principal_adjust,
2567: a.principal_action, a.balance_out, a.first_reval_batch_id,
2568: b.start_date, b.transaction_number, b.principal_adjust,
2569: b.principal_action, b.balance_out
2570: from xtr_rollover_transactions a,
2571: xtr_rollover_transactions b
2572: where a.deal_number = rec.deal_no
2573: and a.deal_number = b.deal_number
2574: and a.start_date < b.start_date

Line 2571: xtr_rollover_transactions b

2567: a.principal_action, a.balance_out, a.first_reval_batch_id,
2568: b.start_date, b.transaction_number, b.principal_adjust,
2569: b.principal_action, b.balance_out
2570: from xtr_rollover_transactions a,
2571: xtr_rollover_transactions b
2572: where a.deal_number = rec.deal_no
2573: and a.deal_number = b.deal_number
2574: and a.start_date < b.start_date
2575: and b.start_date <= rec.revldate

Line 2580: from xtr_rollover_transactions c

2576: and nvl(a.principal_adjust, 0) <> 0
2577: and nvl(b.principal_adjust, 0) <> 0
2578: and a.start_date =
2579: (select max(c.start_date)
2580: from xtr_rollover_transactions c
2581: where c.deal_number = a.deal_number
2582: and nvl(c.principal_adjust,0) <> 0
2583: and c.start_date < b.start_date)
2584: and a.last_reval_batch_id is null

Line 2591: from XTR_ROLLOVER_TRANSACTIONS

2587:
2588: Cursor C_LAST_PRIN_ADJ is
2589: select start_date, transaction_number, principal_adjust, principal_action,
2590: balance_out, first_reval_batch_id
2591: from XTR_ROLLOVER_TRANSACTIONS
2592: where deal_number = rec.deal_no
2593: and nvl(principal_adjust, 0) <> 0
2594: and start_date <= rec.revldate
2595: order by start_date desc, transaction_number desc;

Line 2663: from xtr_rollover_transactions

2659: l_pre_balance_out := l_balance_out0;
2660: else
2661: select average_exchange_rate -- Get previous transaction's average rate
2662: into l_pre_avg_rate
2663: from xtr_rollover_transactions
2664: where deal_number = rec.deal_no
2665: and average_exchange_rate is NOT NULL -- bug 4598526
2666: and (start_date, maturity_date) = (select max(start_date),max(maturity_date) -- bug 5598286
2667: from xtr_rollover_transactions

Line 2667: from xtr_rollover_transactions

2663: from xtr_rollover_transactions
2664: where deal_number = rec.deal_no
2665: and average_exchange_rate is NOT NULL -- bug 4598526
2666: and (start_date, maturity_date) = (select max(start_date),max(maturity_date) -- bug 5598286
2667: from xtr_rollover_transactions
2668: where deal_number = rec.deal_no
2669: and nvl(principal_adjust, 0) <> 0
2670: and start_date < l_start_date0
2671: and average_exchange_rate is NOT NULL);

Line 2675: from xtr_rollover_transactions

2671: and average_exchange_rate is NOT NULL);
2672:
2673: select balance_out -- Get previous transaction's outstandin balance
2674: into l_pre_balance_out
2675: from xtr_rollover_transactions
2676: where deal_number = rec.deal_no
2677: and nvl(principal_adjust, 0) <> 0 -- bug 4598526
2678: and (start_date,maturity_date) = (select max(start_date),max(maturity_date) -- bug 5598286
2679: from xtr_rollover_transactions

Line 2679: from xtr_rollover_transactions

2675: from xtr_rollover_transactions
2676: where deal_number = rec.deal_no
2677: and nvl(principal_adjust, 0) <> 0 -- bug 4598526
2678: and (start_date,maturity_date) = (select max(start_date),max(maturity_date) -- bug 5598286
2679: from xtr_rollover_transactions
2680: where deal_number = rec.deal_no
2681: and nvl(principal_adjust, 0) <> 0
2682: and start_date < l_start_date0);
2683: end if;

Line 2702: Update XTR_ROLLOVER_TRANSACTIONS

2698: l_sum_rel_curr_gl := round((nvl(l_sum_rel_curr_gl, 0) + nvl(l_rel_curr_gl, 0)),l_round);
2699: end if;
2700: end if;
2701:
2702: Update XTR_ROLLOVER_TRANSACTIONS
2703: set first_reval_batch_id = nvl(first_reval_batch_id, l_first_batch_id),
2704: last_reval_batch_id = nvl(last_reval_batch_id, l_last_batch_id),
2705: currency_exchange_rate = nvl(currency_exchange_rate, l_trans_ex_rate0),
2706: average_exchange_rate = nvl(average_exchange_rate, l_avg_rate)

Line 2756: from xtr_rollover_transactions

2752: -- RCGL
2753: if l_trans_no0 <> 1 then
2754: select average_exchange_rate -- Get previous transaction's average rate
2755: into l_pre_avg_rate
2756: from xtr_rollover_transactions
2757: where deal_number = rec.deal_no
2758: and average_exchange_rate is NOT NULL -- bug 4598526
2759: and (start_date, maturity_date) = (select max(start_date), max(maturity_date) -- bug 5598286
2760: from xtr_rollover_transactions

Line 2760: from xtr_rollover_transactions

2756: from xtr_rollover_transactions
2757: where deal_number = rec.deal_no
2758: and average_exchange_rate is NOT NULL -- bug 4598526
2759: and (start_date, maturity_date) = (select max(start_date), max(maturity_date) -- bug 5598286
2760: from xtr_rollover_transactions
2761: where deal_number = rec.deal_no
2762: and nvl(principal_adjust, 0) <> 0
2763: and start_date < l_start_date0
2764: and average_exchange_rate is NOT NULL);

Line 2768: from xtr_rollover_transactions

2764: and average_exchange_rate is NOT NULL);
2765:
2766: select balance_out -- Get previous transaction's outstandin balance
2767: into l_pre_balance_out
2768: from xtr_rollover_transactions
2769: where deal_number = rec.deal_no
2770: and nvl(principal_adjust, 0) <> 0 -- bug 4598526
2771: and (start_date, maturity_date) = (select max(start_date),max(maturity_date) -- bug 5598286
2772: from xtr_rollover_transactions

Line 2772: from xtr_rollover_transactions

2768: from xtr_rollover_transactions
2769: where deal_number = rec.deal_no
2770: and nvl(principal_adjust, 0) <> 0 -- bug 4598526
2771: and (start_date, maturity_date) = (select max(start_date),max(maturity_date) -- bug 5598286
2772: from xtr_rollover_transactions
2773: where deal_number = rec.deal_no
2774: and nvl(principal_adjust, 0) <> 0
2775: and start_date < l_start_date0);
2776: end if;

Line 2797: Update XTR_ROLLOVER_TRANSACTIONS

2793: end if;
2794: rel_currency_gl := l_sum_rel_curr_gl;
2795: unrel_currency_gl := l_sum_unrel_curr_gl;
2796:
2797: Update XTR_ROLLOVER_TRANSACTIONS
2798: set first_reval_batch_id = nvl(first_reval_batch_id, l_first_batch_id),
2799: currency_exchange_rate = nvl(currency_exchange_rate, l_trans_ex_rate0),
2800: average_exchange_rate = nvl(average_exchange_rate, l_avg_rate)
2801: where deal_number = rec.deal_no

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

3784: -----------------------------------------------------------------
3785: /*******************************************************************/
3786: /* This procedure pass one deal no for each company and calculate */
3787: /* (un)realized currency G/L and average exchange rate for the row */
3788: /* in xtr_rollover_transactions for deal type ONC */
3789: /*******************************************************************/
3790: PROCEDURE xtr_revl_onc_curr_gl(
3791: rec IN OUT NOCOPY xtr_revl_rec,
3792: retcode OUT NOCOPY NUMBER) IS

Line 3833: from XTR_ROLLOVER_TRANSACTIONS R,

3829: r.maturity_date, r.balance_out, r.repay_amount,
3830: r.first_reval_batch_id, r.interest_rate,
3831: r.average_exchange_rate, r.cross_ref_to_trans, r.product_type,
3832: r.currency_exchange_rate, r.accum_int_action, r.accum_interest_bf --bug 2895074
3833: from XTR_ROLLOVER_TRANSACTIONS R,
3834: XTR_COMPANY_PARAMETERS CP
3835: where r.deal_number = rec.deal_no
3836: and cp.company_code = r.company_code
3837: and cp.parameter_code = 'ACCNT_TSDTM'

Line 3847: from XTR_ROLLOVER_TRANSACTIONS

3843:
3844: cursor c_trans_avg_rate is
3845: select balance_out, currency_exchange_rate,
3846: average_exchange_rate --bug 3041100
3847: from XTR_ROLLOVER_TRANSACTIONS
3848: where deal_number = rec.deal_no
3849: and cross_ref_to_trans = rec.trans_no;
3850:
3851: Cursor CHK_LOCK_ROLL is

Line 3853: from XTR_ROLLOVER_TRANSACTIONS

3849: and cross_ref_to_trans = rec.trans_no;
3850:
3851: Cursor CHK_LOCK_ROLL is
3852: select rowid
3853: from XTR_ROLLOVER_TRANSACTIONS
3854: Where DEAL_NUMBER = rec.deal_no
3855: And TRANSACTION_NUMBER = rec.trans_no
3856: And DEAL_TYPE = 'ONC'
3857: for update of FIRST_REVAL_BATCH_ID NOWAIT;

Line 3904: from xtr_rollover_transactions

3900: l_unrel_start_date := rec.start_date;
3901:
3902: select count(*)
3903: into l_dummy
3904: from xtr_rollover_transactions
3905: where deal_number = rec.deal_no
3906: and cross_ref_to_trans = rec.trans_no;
3907:
3908: if l_dummy > 1 then

Line 3937: from XTR_ROLLOVER_TRANSACTIONS

3933: elsif l_dummy = 1 then
3934: -- the transaction the result of reneg of previous transaction
3935: select nvl(average_exchange_rate,currency_exchange_rate),balance_out
3936: into l_pre_avg_rate, l_pre_balance
3937: from XTR_ROLLOVER_TRANSACTIONS
3938: where deal_number = rec.deal_no
3939: and cross_ref_to_trans = rec.trans_no;
3940: --begin bug 2895074, 2961502
3941: if nvl(l_repay_amount,0)<0 then --ONC Principal Increase Case

Line 4029: from XTR_ROLLOVER_TRANSACTIONS

4025:
4026: -- Insert a realized G/L row into XTR_REVALUATION_DETAILS table
4027: select min(start_date)
4028: into l_rel_start_date
4029: from XTR_ROLLOVER_TRANSACTIONS
4030: where cross_ref_to_trans = rec.trans_no;
4031:
4032: rec.period_start := l_rel_start_date;
4033: rec.period_end := rec.start_date;

Line 4045: Update XTR_ROLLOVER_TRANSACTIONS

4041: Open CHK_LOCK_ROLL;
4042: Fetch CHK_LOCK_ROLL into l_rowid;
4043: if CHK_LOCK_ROLL%FOUND then
4044: close CHK_LOCK_ROLL;
4045: Update XTR_ROLLOVER_TRANSACTIONS
4046: Set FIRST_REVAL_BATCH_ID = nvl(l_trans_first_batch, FIRST_REVAL_BATCH_ID),
4047: LAST_REVAL_BATCH_ID = nvl(l_trans_last_batch, LAST_REVAL_BATCH_ID),
4048: CURRENCY_EXCHANGE_RATE = nvl(CURRENCY_EXCHANGE_RATE, l_trans_gl_rate),
4049: AVERAGE_EXCHANGE_RATE = nvl(AVERAGE_EXCHANGE_RATE, l_trans_avg_rate)

Line 4155: from XTR_ROLLOVER_TRANSACTIONS

4151: if l_found = false then
4152: if rec.deal_type in ('NI', 'ONC') then
4153: select initial_fair_value
4154: into p_fair_value
4155: from XTR_ROLLOVER_TRANSACTIONS
4156: where deal_number = rec.deal_no
4157: and transaction_number = rec.trans_no;
4158: else
4159: select initial_fair_value

Line 4179: from xtr_rollover_transactions

4175:
4176: if l_found = false then
4177: select interest
4178: into p_ni_disc_amt
4179: from xtr_rollover_transactions
4180: where deal_number = rec.deal_no
4181: and transaction_number = rec.trans_no;
4182: end if;
4183: end if;

Line 4278: from xtr_rollover_transactions

4274: select decode(l_inclu_cost, 'N', (BALANCE_OUT - INTEREST),
4275: (BALANCE_OUT - INTEREST + nvl(BROKERAGE_AMOUNT, 0))),
4276: deal_subtype
4277: into init_fv, l_deal_subtype
4278: from xtr_rollover_transactions
4279: where DEAL_NUMBER = rec.deal_no
4280: and TRANSACTION_NUMBER = rec.trans_no;
4281:
4282: if l_deal_subtype in ('SHORT', 'ISSUE') then

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

4381: )
4382: IS
4383: --
4384: -- Purpose: This Procedure inserts the INITIAL_FAIR_VALUE into the
4385: -- tables XTR_DEALS or XTR_ROLLOVER_TRANSACTIONS or others depending
4386: -- on the Deal Type.This will be callled from the forms either after
4387: -- the POST-DATA-BASE-COMMIT Trigger or POST-INSERT Triggers or other
4388: -- appropriate triggers.
4389: -- This procedure uses xtr_reval_process_p.xtr_init_fv() for getting

Line 4432: update xtr_rollover_transactions set initial_fair_value = fv

4428: company_code = p_company_code;
4429: End If;
4430: Elsif p_deal_type in ('NI') then
4431: If p_transaction_no is NOT NULL then
4432: update xtr_rollover_transactions set initial_fair_value = fv
4433: where deal_number = p_deal_no and
4434: deal_type = p_deal_type and
4435: transaction_number = p_transaction_no and
4436: company_code = p_company_code;

Line 4438: update xtr_rollover_transactions set initial_fair_value = fv

4434: deal_type = p_deal_type and
4435: transaction_number = p_transaction_no and
4436: company_code = p_company_code;
4437: Else
4438: update xtr_rollover_transactions set initial_fair_value = fv
4439: where ((deal_number = p_deal_no) or (trans_closeout_no = p_deal_no)) and
4440: deal_type = p_deal_type and
4441: company_code = p_company_code;
4442: End if;

Line 4445: -- Also insert ALL_IN_RATE to xtr_rollover_transactions table

4441: company_code = p_company_code;
4442: End if;
4443:
4444: /* AW Bug 2184427
4445: -- Also insert ALL_IN_RATE to xtr_rollover_transactions table
4446: select PARAMETER_VALUE_CODE
4447: into l_inclu_cost
4448: from XTR_COMPANY_PARAMETERS
4449: where company_code = p_company_code

Line 4460: xtr_rollover_transactions RT

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

Line 4482: from xtr_deals D, xtr_rollover_transactions RT

4478: select rt.balance_out, nvl(rt.brokerage_amount, 0), d.year_calc_type,
4479: d.calc_basis, rt.start_date, rt.maturity_date
4480: into l_face_value, l_brk_amt, l_year_calc_type, l_disc_yield,
4481: l_start_date, l_end_date
4482: from xtr_deals D, xtr_rollover_transactions RT
4483: where D.deal_no = p_deal_no
4484: and D.deal_no = RT.deal_number
4485: and RT.transaction_number = p_transaction_no;
4486:

Line 4502: from xtr_rollover_transactions

4498: else
4499:
4500: select interest_rate
4501: into l_all_in_rate
4502: from xtr_rollover_transactions
4503: where deal_number = p_deal_no
4504: and transaction_number = p_transaction_no;
4505:
4506: end if;

Line 4512: from xtr_rollover_transactions

4508: else -- not including cost
4509:
4510: select interest_rate
4511: into l_all_in_rate
4512: from xtr_rollover_transactions
4513: where deal_number = p_deal_no
4514: and transaction_number = p_transaction_no;
4515:
4516: end if;

Line 4520: update xtr_rollover_transactions

4516: end if;
4517: */
4518:
4519: If p_transaction_no is NOT NULL then
4520: update xtr_rollover_transactions
4521: set all_in_rate = l_all_in_rate
4522: where deal_number = p_deal_no and
4523: deal_type = p_deal_type and
4524: transaction_number = p_transaction_no and

Line 4527: update xtr_rollover_transactions

4523: deal_type = p_deal_type and
4524: transaction_number = p_transaction_no and
4525: company_code = p_company_code;
4526: Else
4527: update xtr_rollover_transactions
4528: set all_in_rate = l_all_in_rate
4529: where ((deal_number = p_deal_no) or (trans_closeout_no = p_deal_no)) and
4530: deal_type = p_deal_type and
4531: company_code = p_company_code;

Line 4536: update xtr_rollover_transactions set initial_fair_value = fv

4532: End if;
4533:
4534: Elsif p_deal_type in ('ONC') then
4535: If p_transaction_no is NOT NULL then
4536: update xtr_rollover_transactions set initial_fair_value = fv
4537: where deal_number = p_deal_no and
4538: deal_type = p_deal_type and
4539: transaction_number = p_transaction_no and
4540: company_code = p_company_code;

Line 4542: update xtr_rollover_transactions set initial_fair_value = fv

4538: deal_type = p_deal_type and
4539: transaction_number = p_transaction_no and
4540: company_code = p_company_code;
4541: Else
4542: update xtr_rollover_transactions set initial_fair_value = fv
4543: where deal_number = p_deal_no and
4544: deal_type = p_deal_type and
4545: company_code = p_company_code;
4546: End If;

Line 4595: from XTR_ROLLOVER_TRANSACTIONS R

4591: /*********** TMM ending FV **********************/
4592: if rec.deal_type = 'TMM' then
4593: select R.BALANCE_OUT_BF
4594: into end_fv
4595: from XTR_ROLLOVER_TRANSACTIONS R
4596: where deal_number = rec.deal_no
4597: and transaction_number =
4598: (select max(transaction_number)
4599: from xtr_rollover_transactions

Line 4599: from xtr_rollover_transactions

4595: from XTR_ROLLOVER_TRANSACTIONS R
4596: where deal_number = rec.deal_no
4597: and transaction_number =
4598: (select max(transaction_number)
4599: from xtr_rollover_transactions
4600: where deal_number = rec.deal_no);
4601:
4602: if rec.deal_subtype = 'FUND' then
4603: end_fv := end_fv * (-1);

Line 4803: /* XTR_ROLLOVER_TRANSACTIONS table */

4799: /* FRA, IRO, IRS, and TMM */
4800: /* For FRA and IRO, start_date and maturity_date come from */
4801: /* XTR_DEALS table. */
4802: /* For TMM and IRS, start_date and maturity_date come from */
4803: /* XTR_ROLLOVER_TRANSACTIONS table */
4804: /****************************************************************/
4805: PROCEDURE xtr_revl_getprice_fwd(
4806: rec IN xtr_revl_rec, has_transno IN BOOLEAN,
4807: fwd_rate OUT NOCOPY NUMBER) IS

Line 4829: from xtr_rollover_transactions

4825:
4826: -- for deal_type = TMM and IRS, we need to calculate in transacation level
4827: cursor c_roll is
4828: select START_DATE, MATURITY_DATE
4829: from xtr_rollover_transactions
4830: where DEAL_NUMBER = rec.deal_no and TRANSACTION_NUMBER =
4831: rec.trans_no;
4832:
4833: begin

Line 7185: from xtr_rollover_transactions

7181:
7182: -- select BALANCE_OUT - INTEREST
7183: select BALANCE_OUT
7184: into l_parcel_amt
7185: from xtr_rollover_transactions
7186: where DEAL_NUMBER = rec.deal_no and
7187: TRANSACTION_NUMBER = rec.trans_no;
7188:
7189: select MARGIN, CALC_BASIS

Line 8214: from xtr_rollover_transactions

8210: cursor c_roll is
8211: select TRANSACTION_NUMBER, START_DATE, MATURITY_DATE, PRINCIPAL_ACTION,
8212: INTEREST_RATE, INTEREST_SETTLED, PRINCIPAL_ADJUST, ACCUM_INTEREST,
8213: BALANCE_OUT, SETTLE_TERM_INTEREST, INTEREST, INTEREST_REFUND, SETTLE_DATE
8214: from xtr_rollover_transactions
8215: where DEAL_NUMBER = rec.deal_no
8216: and maturity_date >= rec.revldate
8217: order by start_date, transaction_number asc;
8218:

Line 8236: from xtr_rollover_transactions

8232:
8233: -- determine the last record's transaction number
8234: select max(transaction_number)
8235: into l_last_rec_trans
8236: from xtr_rollover_transactions
8237: where DEAL_NUMBER=rec.deal_no
8238: and START_DATE = MATURITY_DATE;
8239:
8240: for l_tmp in c_roll loop

Line 9359: from xtr_rollover_transactions

9355: cursor c_roll is
9356: select TRANSACTION_NUMBER, START_DATE, MATURITY_DATE, PRINCIPAL_ACTION,
9357: INTEREST_RATE, INTEREST_SETTLED, PRINCIPAL_ADJUST, ACCUM_INTEREST,
9358: BALANCE_OUT, SETTLE_TERM_INTEREST, INTEREST, SETTLE_DATE
9359: from xtr_rollover_transactions
9360: where DEAL_NUMBER = rec.deal_no
9361: and maturity_date >= rec.revldate
9362: order by transaction_number asc;
9363:

Line 9378: from XTR_ROLLOVER_TRANSACTIONS_V

9374: where deal_no = rec.deal_no;
9375:
9376: select max(transaction_number)
9377: into l_max_trans_no
9378: from XTR_ROLLOVER_TRANSACTIONS_V
9379: where deal_number = rec.deal_no
9380: and start_date = l_deal_begin_date;
9381:
9382: l_market_set := rec.MARKET_DATA_SET;

Line 9678: from xtr_rollover_transactions, xtr_deals

9674: where currency = rec.reval_ccy;
9675:
9676: select all_in_rate, rounding_type
9677: into l_all_in_rate, l_rounding_type -- 5130446
9678: from xtr_rollover_transactions, xtr_deals
9679: where deal_number = rec.deal_no
9680: and deal_number= deal_no
9681: and transaction_number = rec.trans_no;
9682:

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

9834:
9835: --------------------------------------------------------
9836: /*****************************************************************/
9837: /* This procedure insert unrealized values into xtr_revaluation_details table*/
9838: /* Also update xtr_deals and xtr_rollover_transactions, */
9839: /* xtr_bank_balance, xtr_intergroup_transfers */
9840: /******************************************************************/
9841: PROCEDURE xtr_revl_unreal_log(
9842: rec IN xtr_revl_rec,

Line 9870: from XTR_ROLLOVER_TRANSACTIONS

9866: for update of FIRST_REVAL_BATCH_ID NOWAIT;
9867:
9868: Cursor CHK_LOCK_ROLL is
9869: select rowid
9870: from XTR_ROLLOVER_TRANSACTIONS
9871: Where DEAL_NUMBER = rec.deal_no
9872: And TRANSACTION_NUMBER = rec.trans_no
9873: And DEAL_TYPE = 'NI'
9874: And FIRST_REVAL_BATCH_ID is null

Line 9978: Update XTR_ROLLOVER_TRANSACTIONS

9974:
9975: Open CHK_LOCK_ROLL;
9976: Fetch CHK_LOCK_ROLL into l_deal_rowid;
9977: if CHK_LOCK_ROLL%FOUND then
9978: Update XTR_ROLLOVER_TRANSACTIONS
9979: Set FIRST_REVAL_BATCH_ID = rec.batch_id,
9980: CURRENCY_EXCHANGE_RATE = rec.deal_ex_rate_one
9981: Where rowid = l_deal_rowid;
9982: close CHK_LOCK_ROLL;

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

10037:
10038: --------------------------------------------------------------------
10039: /*****************************************************************/
10040: /* This procedure insert realized values into xtr_revaluation_details table*/
10041: /* Also update xtr_deals and xtr_rollover_transactions, */
10042: /* xtr_bank_balance, xtr_intergroup_transfers */
10043: /******************************************************************/
10044: PROCEDURE xtr_revl_real_log (
10045: rec IN xtr_revl_rec,

Line 10071: from XTR_ROLLOVER_TRANSACTIONS

10067: for update of FIRST_REVAL_BATCH_ID NOWAIT;
10068:
10069: Cursor CHK_LOCK_ROLL is
10070: select rowid
10071: from XTR_ROLLOVER_TRANSACTIONS
10072: Where DEAL_NUMBER = rec.deal_no
10073: And TRANSACTION_NUMBER = rec.trans_no
10074: And DEAL_TYPE = 'NI'
10075: for update of FIRST_REVAL_BATCH_ID NOWAIT;

Line 10161: Update XTR_ROLLOVER_TRANSACTIONS

10157: Open CHK_LOCK_ROLL;
10158: Fetch CHK_LOCK_ROLL into l_deal_rowid;
10159: if CHK_LOCK_ROLL%FOUND then
10160: close CHK_LOCK_ROLL;
10161: Update XTR_ROLLOVER_TRANSACTIONS
10162: Set LAST_REVAL_BATCH_ID = rec.batch_id
10163: Where rowid = l_deal_rowid;
10164: else
10165: Close CHK_LOCK_ROLL;

Line 10333: from XTR_ROLLOVER_TRANSACTIONS

10329: and first_reval_batch_id <> rec.batch_id;
10330:
10331: cursor C_FIRST_ROLL is
10332: select 'Y'
10333: from XTR_ROLLOVER_TRANSACTIONS
10334: where deal_number = rec.deal_no
10335: and transaction_number = rec.trans_no
10336: and deal_type in ('NI', 'ONC')
10337: and first_reval_batch_id is NOT NULL