DBA Data[Home] [Help]

APPS.XTR_REVAL_PROCESS_P dependencies on XTR_BANK_BALANCES

Line 1256: update XTR_BANK_BALANCES

1252: rec.effective_date := rec.revldate;
1253: r_rd.effective_days := rec.period_end - rec.period_start;
1254: r_rd.amount_type := 'CCYUNRL';
1255: xtr_revl_unreal_log(rec, 0, 0, 0, 0, null, r_rd, retcode);
1256: update XTR_BANK_BALANCES
1257: set first_batch_id = rec.batch_id
1258: where company_code = rec.company_code
1259: and account_number = rec.account_no
1260: and balance_date <= rec.revldate;

Line 2836: /* in xtr_bank_balances for deal type CA */

2832: --------------------------------------------------------
2833: /*******************************************************************/
2834: /* This procedure pass one account no for each company and calculate */
2835: /* (un)realized currency G/L and average exchange rate for the row */
2836: /* in xtr_bank_balances for deal type CA */
2837: /*******************************************************************/
2838: PROCEDURE xtr_revl_ca_curr_gl(
2839: rec IN OUT NOCOPY xtr_revl_rec,
2840: retcode OUT NOCOPY NUMBER) IS

Line 2884: FROM xtr_bank_balances a,

2880: Cursor C_PAIR_BALANCE is
2881: SELECT a.balance_date, nvl(a.balance_cflow,0), a.first_batch_id,
2882: a.interest_rate,
2883: b.balance_date, nvl(b.balance_cflow,0), b.interest_rate
2884: FROM xtr_bank_balances a,
2885: xtr_bank_balances b
2886: Where a.company_code = rec.company_code
2887: and a.company_code = b.company_code
2888: and a.account_number = rec.account_no

Line 2885: xtr_bank_balances b

2881: SELECT a.balance_date, nvl(a.balance_cflow,0), a.first_batch_id,
2882: a.interest_rate,
2883: b.balance_date, nvl(b.balance_cflow,0), b.interest_rate
2884: FROM xtr_bank_balances a,
2885: xtr_bank_balances b
2886: Where a.company_code = rec.company_code
2887: and a.company_code = b.company_code
2888: and a.account_number = rec.account_no
2889: and a.account_number = b.account_number

Line 2894: FROM xtr_bank_balances c

2890: and a.balance_date < b.balance_date
2891: and b.balance_date <= rec.revldate
2892: and a.balance_date =
2893: (SELECT max(c.balance_date)
2894: FROM xtr_bank_balances c
2895: where c.company_code = a.company_code
2896: AND c.account_number = a.account_number
2897: AND c.balance_date < b.balance_date)
2898: and a.last_batch_id is null

Line 2907: From XTR_BANK_BALANCES

2903: -- select last eligible row of the account to calculate UCGL
2904: ------------------------------------------------------------
2905: Cursor C_LAST_BALANCE is
2906: Select balance_date, nvl(balance_cflow,0), first_batch_id, interest_rate
2907: From XTR_BANK_BALANCES
2908: Where company_code = rec.company_code
2909: and account_number = rec.account_no
2910: and balance_date =
2911: (select max(effective_date)

Line 2924: FROM xtr_bank_balances

2920: -- Select the last balance's average exchange rate
2921: --------------------------------------------------
2922: CURSOR c_last_ca_avg_rate IS
2923: SELECT average_exchange_rate
2924: FROM xtr_bank_balances
2925: WHERE company_code = rec.company_code
2926: AND account_number = rec.account_no
2927: AND first_batch_id = l_pre_batch_id
2928: ORDER BY balance_date desc;

Line 3139: -- Update the first record of the pair in XTR_BANK_BALANCES table

3135: l_avg_rate := l_avg_rate0;
3136: end if;
3137:
3138: ----------------------------------------------------------------------
3139: -- Update the first record of the pair in XTR_BANK_BALANCES table
3140: ----------------------------------------------------------------------
3141: update XTR_BANK_BALANCES
3142: set first_batch_id = nvl(first_batch_id, l_first_batch_id),
3143: last_batch_id = nvl(last_batch_id, l_last_batch_id),

Line 3141: update XTR_BANK_BALANCES

3137:
3138: ----------------------------------------------------------------------
3139: -- Update the first record of the pair in XTR_BANK_BALANCES table
3140: ----------------------------------------------------------------------
3141: update XTR_BANK_BALANCES
3142: set first_batch_id = nvl(first_batch_id, l_first_batch_id),
3143: last_batch_id = nvl(last_batch_id, l_last_batch_id),
3144: exchange_rate = nvl(exchange_rate, l_ex_rate0),
3145: average_exchange_rate = nvl(average_exchange_rate, l_avg_rate0)

Line 3151: -- Update the second record of the pair in XTR_BANK_BALANCES table

3147: and account_number = rec.account_no
3148: and balance_date = l_bal_date0;
3149:
3150: ----------------------------------------------------------------------
3151: -- Update the second record of the pair in XTR_BANK_BALANCES table
3152: ----------------------------------------------------------------------
3153: update XTR_BANK_BALANCES
3154: set average_exchange_rate = l_avg_rate
3155: where company_code = rec.company_code

Line 3153: update XTR_BANK_BALANCES

3149:
3150: ----------------------------------------------------------------------
3151: -- Update the second record of the pair in XTR_BANK_BALANCES table
3152: ----------------------------------------------------------------------
3153: update XTR_BANK_BALANCES
3154: set average_exchange_rate = l_avg_rate
3155: where company_code = rec.company_code
3156: and account_number = rec.account_no
3157: and balance_date = l_bal_date1;

Line 3239: -- Update the last row into XTR_BANK_BALANCES table

3235: xtr_risk_debug_pkg.dlog('l_unrel_cur_gl', l_unrel_cur_gl);
3236: xtr_risk_debug_pkg.dpop('CA_LAST_UNREL');
3237:
3238: ----------------------------------------------------------------------
3239: -- Update the last row into XTR_BANK_BALANCES table
3240: ----------------------------------------------------------------------
3241: update XTR_BANK_BALANCES
3242: set first_batch_id = nvl(first_batch_id, l_first_batch_id),
3243: exchange_rate = nvl(exchange_rate, l_ex_rate0),

Line 3241: update XTR_BANK_BALANCES

3237:
3238: ----------------------------------------------------------------------
3239: -- Update the last row into XTR_BANK_BALANCES table
3240: ----------------------------------------------------------------------
3241: update XTR_BANK_BALANCES
3242: set first_batch_id = nvl(first_batch_id, l_first_batch_id),
3243: exchange_rate = nvl(exchange_rate, l_ex_rate0),
3244: average_exchange_rate = nvl(average_exchange_rate, l_avg_rate0)
3245: where company_code = rec.company_code

Line 4335: from XTR_BANK_BALANCES_V

4331: elsif rec.deal_type = 'CA' then
4332: -- CA's FV is for reference only. We don't take it to calculate G/L.
4333: select STATEMENT_BALANCE
4334: into init_fv
4335: from XTR_BANK_BALANCES_V
4336: where company_code = rec.company_code
4337: and account_number = rec.account_no
4338: and BALANCE_DATE <= rec.revldate;
4339: end if;

Line 10296: /* first_batch_id is stored in xtr_bank_balances and xtr_intergroup */

10292: /********************************************************************/
10293: /* This procedure determine whether the deal is reval at first time. */
10294: /* If it's the first time, return TRUE, else return FALSE */
10295: /* NOTE: this procedure is not working for CA and IG because the */
10296: /* first_batch_id is stored in xtr_bank_balances and xtr_intergroup */
10297: /* table. Since these two deals do not call procedure. So no worry */
10298: /* We may enhance later */
10299: /*********************************************************************/
10300: PROCEDURE xtr_first_reval(