DBA Data[Home] [Help]

APPS.XTR_EXP_SUMM_P dependencies on XTR_COST_OF_FUNDS

Line 996: from XTR_cost_of_funds

992: l_interest number;
993: --
994: cursor get_prv_row is
995: select as_at_date
996: from XTR_cost_of_funds
997: where as_at_date < l_date
998: order by as_at_date desc;
999: --
1000: l_prv_date date;

Line 1005: from XTR_cost_of_funds

1001: l_ins_date date;
1002: --
1003: cursor chk_exits is
1004: select 1
1005: from XTR_cost_of_funds
1006: where as_at_date = l_date;
1007: --
1008: l_dummy number;
1009: --

Line 1061: delete from XTR_cost_of_funds

1057: -- delete COF if already exits
1058: open chk_exits;
1059: fetch chk_exits into l_dummy;
1060: if chk_exits%FOUND then
1061: delete from XTR_cost_of_funds
1062: where as_at_date = l_date;
1063: end if;
1064: close chk_exits;
1065:

Line 1076: insert into XTR_COST_OF_FUNDS

1072: close get_prv_row;
1073: l_ins_date :=l_prv_date+1;
1074: WHILE TRUE LOOP
1075: if l_ins_date<=l_date-1 then
1076: insert into XTR_COST_OF_FUNDS
1077: (AS_AT_DATE,COMPANY_CODE,CURRENCY,DEAL_TYPE,AVG_INTEREST_RATE,
1078: CONTRA_CCY,CURRENCY_COMBINATION,DEAL_SUBTYPE,
1079: GROSS_PRINCIPAL,HCE_GROSS_PRINCIPAL,INTEREST,HCE_INTEREST,
1080: NO_OF_DAYS,NO_OF_DEALS,PARTY_CODE, PORTFOLIO_CODE,PRODUCT_TYPE,

Line 1087: from XTR_COST_OF_FUNDS where as_at_date=l_prv_date;

1083: CONTRA_CCY,CURRENCY_COMBINATION,DEAL_SUBTYPE,
1084: GROSS_PRINCIPAL,HCE_GROSS_PRINCIPAL,INTEREST,HCE_INTEREST,
1085: NO_OF_DAYS,NO_OF_DEALS,PARTY_CODE, PORTFOLIO_CODE,PRODUCT_TYPE,
1086: WEIGHTED_AVG_PRINCIPAL,ACCOUNT_NO,trunc(l_run_date)
1087: from XTR_COST_OF_FUNDS where as_at_date=l_prv_date;
1088: elsif l_ins_date=l_date then
1089: insert into XTR_COST_OF_FUNDS
1090: (AS_AT_DATE,COMPANY_CODE,CURRENCY,DEAL_TYPE,AVG_INTEREST_RATE,
1091: CONTRA_CCY,CURRENCY_COMBINATION,DEAL_SUBTYPE,

Line 1089: insert into XTR_COST_OF_FUNDS

1085: NO_OF_DAYS,NO_OF_DEALS,PARTY_CODE, PORTFOLIO_CODE,PRODUCT_TYPE,
1086: WEIGHTED_AVG_PRINCIPAL,ACCOUNT_NO,trunc(l_run_date)
1087: from XTR_COST_OF_FUNDS where as_at_date=l_prv_date;
1088: elsif l_ins_date=l_date then
1089: insert into XTR_COST_OF_FUNDS
1090: (AS_AT_DATE,COMPANY_CODE,CURRENCY,DEAL_TYPE,AVG_INTEREST_RATE,
1091: CONTRA_CCY,CURRENCY_COMBINATION,DEAL_SUBTYPE,
1092: GROSS_PRINCIPAL,HCE_GROSS_PRINCIPAL,INTEREST,HCE_INTEREST,
1093: NO_OF_DAYS,NO_OF_DEALS,PARTY_CODE, PORTFOLIO_CODE,PRODUCT_TYPE,

Line 1100: from XTR_COST_OF_FUNDS where as_at_date=l_prv_date;

1096: CONTRA_CCY,CURRENCY_COMBINATION,DEAL_SUBTYPE,
1097: 0,0,0,0,
1098: 1,0,PARTY_CODE, PORTFOLIO_CODE,PRODUCT_TYPE,
1099: 0,ACCOUNT_NO,l_run_date
1100: from XTR_COST_OF_FUNDS where as_at_date=l_prv_date;
1101: end if;
1102: l_ins_date :=l_ins_date+1;
1103: if l_ins_date >=l_date then
1104: exit;

Line 1121: update XTR_cost_of_funds

1117: fetch get_hce_rate into l_hce_rate,l_year_basis;
1118: close get_hce_rate;
1119: exit WHEN get_ca_row%NOTFOUND;
1120:
1121: update XTR_cost_of_funds
1122: set AVG_INTEREST_RATE = round(bal.transaction_rate,5),
1123: GROSS_PRINCIPAL = round(bal.amount,0),
1124: HCE_GROSS_PRINCIPAL = round(bal.amount/l_hce_rate,0),
1125: WEIGHTED_AVG_PRINCIPAL = round(bal.amount*bal.transaction_rate/100,0),

Line 1140: update XTR_cost_of_funds

1136: and nvl(party_code,'@#@')=nvl(bal.limit_party,'@#@');
1137:
1138: ---- for today's
1139:
1140: update XTR_cost_of_funds
1141: set AVG_INTEREST_RATE = round(bal.transaction_rate,5),
1142: GROSS_PRINCIPAL = round(bal.amount,0),
1143: HCE_GROSS_PRINCIPAL = round(bal.amount/l_hce_rate,0),
1144: WEIGHTED_AVG_PRINCIPAL = round(bal.amount*bal.transaction_rate/100,0),

Line 1157: insert into XTR_COST_OF_FUNDS

1153: and nvl(portfolio_code,'@#@')=nvl(bal.portfolio_code,'@#@')
1154: and nvl(product_type,'@#@')=nvl(bal.product_type,'@#@')
1155: and nvl(party_code,'@#@')=nvl(bal.limit_party,'@#@');
1156: if SQL%NOTFOUND then
1157: insert into XTR_COST_OF_FUNDS
1158: (AS_AT_DATE,COMPANY_CODE,CURRENCY,DEAL_TYPE,AVG_INTEREST_RATE,
1159: CONTRA_CCY,CURRENCY_COMBINATION,DEAL_SUBTYPE,
1160: GROSS_PRINCIPAL,HCE_GROSS_PRINCIPAL,INTEREST,NO_OF_DAYS,NO_OF_DEALS,PARTY_CODE,
1161: PORTFOLIO_CODE,PRODUCT_TYPE,WEIGHTED_AVG_PRINCIPAL,ACCOUNT_NO,CREATED_ON)

Line 1219: update XTR_cost_of_funds

1215: end if;
1216: end if;
1217: end if;
1218: --
1219: update XTR_cost_of_funds
1220: set AVG_INTEREST_RATE = l_avg_rate,
1221: GROSS_PRINCIPAL = cof.gross_principal,
1222: HCE_GROSS_PRINCIPAL = round(cof.GROSS_PRINCIPAL/l_hce_rate,0),
1223: WEIGHTED_AVG_PRINCIPAL = cof.weighted_amt,

Line 1239: insert into XTR_COST_OF_FUNDS

1235: and nvl(portfolio_code,'@#@')=nvl(cof.portfolio_code,'@#@')
1236: and nvl(product_type,'@#@')=nvl(cof.product_type,'@#@')
1237: and nvl(party_code,'@#@')=nvl(cof.limit_party,'@#@');
1238: if SQL%NOTFOUND then
1239: insert into XTR_COST_OF_FUNDS
1240: (AS_AT_DATE,COMPANY_CODE,CURRENCY,DEAL_TYPE,AVG_INTEREST_RATE,
1241: CONTRA_CCY,CURRENCY_COMBINATION,DEAL_SUBTYPE,
1242: GROSS_PRINCIPAL,HCE_GROSS_PRINCIPAL,INTEREST,HCE_INTEREST,
1243: NO_OF_DAYS,NO_OF_DEALS,PARTY_CODE, PORTFOLIO_CODE,PRODUCT_TYPE,

Line 1277: from XTR_COST_OF_FUNDS

1273:
1274: ---
1275: cursor GET_DIST_DATE is
1276: select DISTINCT AS_AT_DATE
1277: from XTR_COST_OF_FUNDS
1278: where AS_AT_DATE >= L_REF_DATE
1279: and (DEAL_TYPE in('ONC','CA') or AS_AT_DATE < L_AMOUNT_DATE)
1280: ORDER BY AS_AT_DATE ASC;
1281:

Line 1288: from XTR_COST_OF_FUNDS

1284: cursor DET is
1285: select GROSS_PRINCIPAL,
1286: GROSS_PRINCIPAL * AVG_INTEREST_RATE / decode(DEAL_TYPE,'FX',1,'FXO',1,100),
1287: NO_OF_DAYS,ROWID
1288: from XTR_COST_OF_FUNDS
1289: where AS_AT_DATE = l_dist_date
1290: and DEAL_TYPE = L_DEAL_TYPE
1291: and COMPANY_CODE = L_COMPANY_CODE
1292: and CURRENCY = L_CURRENCY

Line 1303: from XTR_COST_OF_FUNDS

1299: and nvl(ACCOUNT_NO,'%') = nvl(L_ACCOUNT,'%');
1300: --
1301: cursor get_prv_date is
1302: select AS_AT_DATE
1303: from XTR_COST_OF_FUNDS
1304: where AS_AT_DATE <= L_REF_DATE
1305: order by as_at_date desc;
1306:
1307: --

Line 1310: from XTR_COST_OF_FUNDS

1306:
1307: --
1308: cursor get_nxt_date is
1309: select AS_AT_DATE
1310: from XTR_COST_OF_FUNDS
1311: where AS_AT_DATE > L_REF_DATE
1312: order by as_at_date asc;
1313: l_nxt_date date;
1314: --

Line 1327: from XTR_cost_of_funds

1323: l_prv_date date;
1324:
1325: cursor get_cof_row is
1326: select rowid row_id,deal_type,currency,gross_principal,avg_interest_rate
1327: from XTR_cost_of_funds
1328: where as_at_date = l_prv_date;
1329:
1330: cursor get_no_of_days is
1331: select decode(AS_AT_DATE,L_REF_DATE,no_of_days,as_at_date - L_REF_DATE)

Line 1332: from XTR_COST_OF_FUNDS

1328: where as_at_date = l_prv_date;
1329:
1330: cursor get_no_of_days is
1331: select decode(AS_AT_DATE,L_REF_DATE,no_of_days,as_at_date - L_REF_DATE)
1332: from XTR_COST_OF_FUNDS
1333: where AS_AT_DATE >= L_REF_DATE
1334: order by AS_AT_DATE;
1335:
1336: cursor get_prv_row is

Line 1338: from XTR_COST_OF_FUNDS

1334: order by AS_AT_DATE;
1335:
1336: cursor get_prv_row is
1337: select AS_AT_DATE,CURRENCY,DEAL_TYPE,GROSS_PRINCIPAL,AVG_INTEREST_RATE,ROWID
1338: from XTR_COST_OF_FUNDS
1339: where AS_AT_DATE = L_REF_DATE
1340: and (DEAL_TYPE in('ONC','CA') or AS_AT_DATE < L_AMOUNT_DATE)
1341: and DEAL_TYPE = L_DEAL_TYPE
1342: and COMPANY_CODE = L_COMPANY_CODE

Line 1411: update XTR_cost_of_funds

1407: l_no_of_days :=L_REF_DATE-l_prv_date;
1408: c_no_of_days :=l_nxt_date-l_REF_DATE;
1409: --
1410: for c in get_cof_row loop
1411: update XTR_cost_of_funds
1412: set no_of_days =l_no_of_days
1413: where rowid=c.row_id;
1414: --
1415: if c.deal_type in('ONC','CA','IG','NI','TMM','BOND','DEB','IRS','CMF') then

Line 1432: update XTR_cost_of_funds

1428: c_interest :=null;
1429: c_interest_hce :=null;
1430: end if;
1431:
1432: update XTR_cost_of_funds
1433: set interest = l_interest,
1434: hce_interest = l_interest_hce,
1435: no_of_days =l_no_of_days
1436: where rowid = c.row_id;

Line 1438: insert into XTR_COST_OF_FUNDS

1434: hce_interest = l_interest_hce,
1435: no_of_days =l_no_of_days
1436: where rowid = c.row_id;
1437:
1438: insert into XTR_COST_OF_FUNDS
1439: (as_at_date,company_code,currency,deal_type,
1440: deal_subtype,party_code,portfolio_code,product_type,
1441: gross_principal,hce_gross_principal,
1442: weighted_avg_principal,avg_interest_rate,interest,

Line 1451: from XTR_cost_of_funds

1447: gross_principal,hce_gross_principal,
1448: weighted_avg_principal,avg_interest_rate,c_interest,
1449: c_interest_hce,c_no_of_days,no_of_deals,contra_ccy,
1450: currency_combination,account_no,L_REF_DATE
1451: from XTR_cost_of_funds
1452: where rowid = c.row_id;
1453: end loop;
1454:
1455: end if;

Line 1476: insert into XTR_COST_OF_FUNDS

1472:
1473: open get_prv_row;
1474: fetch get_prv_row into l_as_at_date,p_ccy,p_deal_type,l_gross,p_avg_rate,l_rowid;
1475: if get_prv_row%NOTFOUND then
1476: insert into XTR_COST_OF_FUNDS
1477: (as_at_date,company_code,currency,deal_type,
1478: deal_subtype,party_code,portfolio_code,product_type,
1479: gross_principal,hce_gross_principal,
1480: weighted_avg_principal,avg_interest_rate,interest,

Line 1535: delete from XTR_COST_OF_FUNDS

1531:
1532: -- insert / update record
1533: /*
1534: if nvl(l_gross,0)=0 then
1535: delete from XTR_COST_OF_FUNDS
1536: where rowid=l_rowid;
1537: else
1538: */
1539: update XTR_COST_OF_FUNDS

Line 1539: update XTR_COST_OF_FUNDS

1535: delete from XTR_COST_OF_FUNDS
1536: where rowid=l_rowid;
1537: else
1538: */
1539: update XTR_COST_OF_FUNDS
1540: set GROSS_PRINCIPAL = round(l_gross,0),
1541: HCE_GROSS_PRINCIPAL = round(l_gross_hce,0),
1542: AVG_INTEREST_RATE = round(l_rate,5),
1543: HCE_INTEREST = round(l_interest_hce,2),

Line 1550: insert into XTR_COST_OF_FUNDS

1546: NO_OF_DEALS=nvl(NO_OF_DEALS,0)+L_ACTION_INDIC
1547: where rowid=l_rowid;
1548: if SQL%NOTFOUND then
1549: -- insert new row
1550: insert into XTR_COST_OF_FUNDS
1551: (as_at_date,company_code,currency,deal_type,
1552: deal_subtype,party_code,portfolio_code,product_type,
1553: gross_principal,hce_gross_principal,
1554: weighted_avg_principal,avg_interest_rate,interest,