DBA Data[Home] [Help]

APPS.GL_CRM_UTILITIES_PKG dependencies on GL_DAILY_RATES

Line 468: FROM gl_daily_rates_interface dri,

464: dct.conversion_type,
465: dri.conversion_rate,
466: NVL(dri.inverse_conversion_rate, 1/conversion_rate) inverse_conversion_rate,
467: dri.mode_flag
468: FROM gl_daily_rates_interface dri,
469: gl_daily_conversion_types dct
470: WHERE mode_flag IN ('I', 'D', 'T', 'N')
471: AND dct.user_conversion_type = dri.user_conversion_type
472: AND dri.batch_number = l_batch_number;

Line 492: /*If the Batch Number is NULL, it'll process only the records with Batch Number NULL records in the GL_DAILY_RATES_INTERFACE Table.*/

488: -- If there is any error, an appropriate error_code will be set.
489: gl_message.func_ent('Daily Rates Import');
490:
491: -- GL_CRM_UTILITIES_PKG.DEBUG_MODE := TRUE;
492: /*If the Batch Number is NULL, it'll process only the records with Batch Number NULL records in the GL_DAILY_RATES_INTERFACE Table.*/
493: /* Updating BATCH_NUMNER '-99999' in the Interface table if Batch Number Parameter is NULL*/
494: IF l_batch_number IS NULL THEN
495: UPDATE gl_daily_rates_interface ri
496: SET ERROR_CODE =

Line 495: UPDATE gl_daily_rates_interface ri

491: -- GL_CRM_UTILITIES_PKG.DEBUG_MODE := TRUE;
492: /*If the Batch Number is NULL, it'll process only the records with Batch Number NULL records in the GL_DAILY_RATES_INTERFACE Table.*/
493: /* Updating BATCH_NUMNER '-99999' in the Interface table if Batch Number Parameter is NULL*/
494: IF l_batch_number IS NULL THEN
495: UPDATE gl_daily_rates_interface ri
496: SET ERROR_CODE =
497: (SELECT DECODE
498: (ct.ROWID,
499: NULL, 'NONEXISTANT_CONVERSION_TYPE',

Line 604: FROM gl_daily_rates_interface ri2,

600: 1),
601: -1, 'EMU_TO_CURRENCY',
602: 0, 'EMU_TO_CURRENCY',
603: ''))))))))))))))))))
604: FROM gl_daily_rates_interface ri2,
605: gl_daily_conversion_types ct,
606: fnd_currencies from_curr,
607: fnd_currencies to_curr
608: WHERE ri2.ROWID = ri.ROWID

Line 616: UPDATE GL_DAILY_RATES_INTERFACE T1

612: ri.batch_number = DECODE(l_batch_number,null,-99999,ri.batch_number)
613: WHERE ri.mode_flag IN('I', 'D', 'T', 'N')
614: AND ri.batch_number is NULL;
615:
616: UPDATE GL_DAILY_RATES_INTERFACE T1
617: SET T1.error_code = 'DUPLICATE_ROWS'
618: WHERE
619: (T1.FROM_CURRENCY,T1.TO_CURRENCY,T1.USER_CONVERSION_TYPE,
620: T1.FROM_CONVERSION_DATE, T1.TO_CONVERSION_DATE)

Line 625: FROM GL_DAILY_RATES_INTERFACE T2

621: IN
622: (
623: SELECT /*+ NO_MERGE */ T2.FROM_CURRENCY,T2.to_CURRENCY,T2.USER_CONVERSION_TYPE,
624: T2.FROM_CONVERSION_DATE, T2.TO_CONVERSION_DATE
625: FROM GL_DAILY_RATES_INTERFACE T2
626: WHERE mode_flag IN ('I', 'D', 'T', 'N')
627: GROUP BY T2.FROM_CURRENCY,T2.TO_CURRENCY,T2.USER_CONVERSION_TYPE,
628: T2.FROM_CONVERSION_DATE, T2.TO_CONVERSION_DATE
629: HAVING count(*) > 1)

Line 637: UPDATE gl_daily_rates_interface ri

633:
634: l_batch_number := '-99999';
635:
636: ELSE
637: UPDATE gl_daily_rates_interface ri
638: SET ERROR_CODE =
639: (SELECT DECODE
640: (ct.ROWID,
641: NULL, 'NONEXISTANT_CONVERSION_TYPE',

Line 746: FROM gl_daily_rates_interface ri2,

742: 1),
743: -1, 'EMU_TO_CURRENCY',
744: 0, 'EMU_TO_CURRENCY',
745: ''))))))))))))))))))
746: FROM gl_daily_rates_interface ri2,
747: gl_daily_conversion_types ct,
748: fnd_currencies from_curr,
749: fnd_currencies to_curr
750: WHERE ri2.ROWID = ri.ROWID

Line 757: UPDATE GL_DAILY_RATES_INTERFACE T1

753: AND to_curr.currency_code(+) = ri2.to_currency)
754: WHERE ri.mode_flag IN('I', 'D', 'T', 'N')
755: AND ri.batch_number = l_batch_number;
756:
757: UPDATE GL_DAILY_RATES_INTERFACE T1
758: SET T1.error_code = 'DUPLICATE_ROWS'
759: WHERE
760: (T1.FROM_CURRENCY,T1.TO_CURRENCY,T1.USER_CONVERSION_TYPE,
761: T1.FROM_CONVERSION_DATE, T1.TO_CONVERSION_DATE)

Line 766: FROM GL_DAILY_RATES_INTERFACE T2

762: IN
763: (
764: SELECT /*+ NO_MERGE */ T2.FROM_CURRENCY,T2.to_CURRENCY,T2.USER_CONVERSION_TYPE,
765: T2.FROM_CONVERSION_DATE, T2.TO_CONVERSION_DATE
766: FROM GL_DAILY_RATES_INTERFACE T2
767: WHERE mode_flag IN ('I', 'D', 'T', 'N')
768: GROUP BY T2.FROM_CURRENCY,T2.TO_CURRENCY,T2.USER_CONVERSION_TYPE,
769: T2.FROM_CONVERSION_DATE, T2.TO_CONVERSION_DATE
770: HAVING count(*) > 1)

Line 781: UPDATE gl_daily_rates_interface

777: -- N - no override GL rates
778: -- T - Treasury Insert (override existing GL rates).
779: /*
780: -- Update mode flag to 'X' for each erroneous row
781: UPDATE gl_daily_rates_interface
782: SET mode_flag = 'X'
783: WHERE mode_flag IN('I', 'D') AND ERROR_CODE IS NOT NULL;
784:
785: -- Update mode flag to 'X' for each erroneous row from Treasury

Line 786: UPDATE gl_daily_rates_interface

782: SET mode_flag = 'X'
783: WHERE mode_flag IN('I', 'D') AND ERROR_CODE IS NOT NULL;
784:
785: -- Update mode flag to 'X' for each erroneous row from Treasury
786: UPDATE gl_daily_rates_interface
787: SET mode_flag = 'F'
788: WHERE mode_flag IN('T', 'N') AND ERROR_CODE IS NOT NULL;
789: */
790:

Line 793: UPDATE gl_daily_rates_interface ri

789: */
790:
791:
792: -- Update mode flag to X/F for each erroneous row
793: UPDATE gl_daily_rates_interface ri
794: SET mode_flag =
795: Decode(mode_flag,'T','F','N','F','I','X','D','X',mode_flag)
796: WHERE (mode_flag IN('T', 'N','I','D') AND batch_number = l_batch_number AND ERROR_CODE IS NOT NULL)
797: OR (mode_flag = 'N'

Line 798: AND (EXISTS (SELECT 1 FROM gl_daily_rates dr,

794: SET mode_flag =
795: Decode(mode_flag,'T','F','N','F','I','X','D','X',mode_flag)
796: WHERE (mode_flag IN('T', 'N','I','D') AND batch_number = l_batch_number AND ERROR_CODE IS NOT NULL)
797: OR (mode_flag = 'N'
798: AND (EXISTS (SELECT 1 FROM gl_daily_rates dr,
799: gl_daily_conversion_types ct
800: WHERE dr.from_currency = ri.from_currency
801: AND dr.to_currency = ri.to_currency
802: AND dr.conversion_type = ct.conversion_type

Line 806: OR EXISTS (SELECT 1 FROM gl_daily_rates dr,

802: AND dr.conversion_type = ct.conversion_type
803: AND ct.user_conversion_type = ri.user_conversion_type
804: AND dr.conversion_date BETWEEN ri.from_conversion_date
805: AND ri.to_conversion_date)
806: OR EXISTS (SELECT 1 FROM gl_daily_rates dr,
807: gl_daily_conversion_types ct
808: WHERE dr.from_currency = ri.to_currency
809: AND dr.to_currency = ri.from_currency
810: AND dr.conversion_type = ct.conversion_type

Line 823: FROM gl_daily_rates_interface

819:
820: BEGIN
821: SELECT 'E'
822: INTO l_return_status
823: FROM gl_daily_rates_interface
824: WHERE mode_flag in ('X','F')
825: AND batch_number = l_batch_number
826: AND ROWNUM < 2;
827:

Line 834: UPDATE gl_daily_rates_interface

830: l_return_status := 'S';
831: END;
832:
833:
834: UPDATE gl_daily_rates_interface
835: SET inverse_conversion_rate = 1 / conversion_rate
836: WHERE inverse_conversion_rate IS NULL AND conversion_rate > 0
837: AND batch_number = l_batch_number;
838:

Line 842: 'Finish Validation on GL_DAILY_RATES_INTERFACE table.');

838:
839: IF DEBUG_MODE THEN
840: fnd_file.put_line
841: (fnd_file.LOG,
842: 'Finish Validation on GL_DAILY_RATES_INTERFACE table.');
843: END IF;
844:
845: SELECT from_currency,
846: to_currency,

Line 877: FROM gl_daily_rates_interface

873: daily_rate_validation_failure.r_type,
874: daily_rate_validation_failure.r_rate,
875: daily_rate_validation_failure.r_inverse_rate,
876: daily_rate_validation_failure.r_error_code
877: FROM gl_daily_rates_interface
878: WHERE mode_flag IN('X', 'F')
879: AND batch_number = l_batch_number;
880:
881: FOR i IN 1 .. daily_rate_validation_failure.r_from_curr.COUNT LOOP

Line 932: --- will run the gl_rate_rates here, which will remove all the gl_daily_rates lines.

928: -- interface table and then run Concurrent Program via SRS
929:
930: -- Check if average balances is used in the system
931:
932: --- will run the gl_rate_rates here, which will remove all the gl_daily_rates lines.
933: fnd_profile.get('GL_CRM_CR_OVERRIDE', golden_rule_flag);
934:
935: IF DEBUG_MODE THEN
936: gl_message.write_log('CRM0004', 1, 'VALUE', golden_rule_flag);

Line 961: FROM gl_daily_rates dr,

957: sys_daily_rate_cannot_delete.r_type,
958: sys_daily_rate_cannot_delete.r_conversion_date,
959: sys_daily_rate_cannot_delete.r_rate,
960: sys_daily_rate_cannot_delete.r_rate_source_code
961: FROM gl_daily_rates dr,
962: gl_daily_conversion_types gldct,
963: gl_row_multipliers rm,
964: gl_daily_conversion_types ct,
965: gl_daily_rates_interface ri

Line 965: gl_daily_rates_interface ri

961: FROM gl_daily_rates dr,
962: gl_daily_conversion_types gldct,
963: gl_row_multipliers rm,
964: gl_daily_conversion_types ct,
965: gl_daily_rates_interface ri
966: WHERE ri.mode_flag = 'D'
967: AND ct.user_conversion_type = ri.user_conversion_type || ''
968: AND rm.multiplier BETWEEN 1 AND (TRUNC(ri.to_conversion_date)
969: - TRUNC(ri.from_conversion_date)

Line 1044: FROM gl_daily_rates dr,

1040: sys_daily_rate_cannot_override.r_type,
1041: sys_daily_rate_cannot_override.r_conversion_date,
1042: sys_daily_rate_cannot_override.r_rate,
1043: sys_daily_rate_cannot_override.r_rate_source_code
1044: FROM gl_daily_rates dr,
1045: gl_daily_conversion_types gldct,
1046: gl_row_multipliers rm,
1047: gl_daily_conversion_types ct,
1048: gl_daily_rates_interface ri

Line 1048: gl_daily_rates_interface ri

1044: FROM gl_daily_rates dr,
1045: gl_daily_conversion_types gldct,
1046: gl_row_multipliers rm,
1047: gl_daily_conversion_types ct,
1048: gl_daily_rates_interface ri
1049: WHERE ct.user_conversion_type = ri.user_conversion_type || ''
1050: AND rm.multiplier BETWEEN 1 AND (TRUNC(ri.to_conversion_date)
1051: - TRUNC(ri.from_conversion_date)
1052: + 1)

Line 1108: UPDATE gl_daily_rates_interface ri

1104:
1105: -- Update used_for_ab_translation = 'Y' if the currency and
1106: -- conversion type is used in average translation in the system
1107: -- R12 Change in the following update
1108: UPDATE gl_daily_rates_interface ri
1109: SET used_for_ab_translation =
1110: ( SELECT nvl(max('Y'), 'N')
1111: FROM gl_daily_conversion_types ct,
1112: gl_ledgers led,

Line 1133: FROM gl_daily_rates_interface

1129: BEGIN
1130:
1131: SELECT 'Y'
1132: INTO l_launch_rate_change
1133: FROM gl_daily_rates_interface
1134: WHERE used_for_ab_translation = 'Y'
1135: AND ROWNUM < 2;
1136:
1137: EXCEPTION

Line 1151: UPDATE gl_daily_rates dr

1147: (fnd_file.LOG,
1148: 'Marking D for rates meant to delete with types used for ab translation');
1149: END IF;
1150:
1151: UPDATE gl_daily_rates dr
1152: SET status_code = 'D'
1153: WHERE ( (dr.rate_source_code IS NULL)
1154: OR ( dr.rate_source_code IN('USER', 'TREASURY')
1155: AND golden_rule_flag <> 'USER')

Line 1167: gl_daily_rates_interface ri

1163: TRUNC(ri.from_conversion_date) + rm.multiplier
1164: - 1
1165: FROM gl_row_multipliers rm,
1166: gl_daily_conversion_types ct,
1167: gl_daily_rates_interface ri
1168: WHERE ri.mode_flag = 'D'
1169: AND ri.batch_number = l_batch_number
1170: AND ri.used_for_ab_translation = 'Y'
1171: AND ct.user_conversion_type =

Line 1186: gl_daily_rates_interface ri

1182: TRUNC(ri.from_conversion_date) + rm.multiplier
1183: - 1
1184: FROM gl_row_multipliers rm,
1185: gl_daily_conversion_types ct,
1186: gl_daily_rates_interface ri
1187: WHERE ri.mode_flag = 'D'
1188: AND ri.batch_number = l_batch_number
1189: AND ri.used_for_ab_translation = 'Y'
1190: AND ct.user_conversion_type =

Line 1200: -- Delete existing rows with conversion rate in GL_DAILY_RATES

1196: (ri.from_conversion_date)
1197: + 1
1198: );
1199:
1200: -- Delete existing rows with conversion rate in GL_DAILY_RATES
1201: IF DEBUG_MODE THEN
1202: fnd_file.put_line(fnd_file.LOG,
1203: SQL%ROWCOUNT || ' rows marked');
1204: fnd_file.put_line

Line 1209: DELETE gl_daily_rates dr

1205: (fnd_file.LOG,
1206: 'Deleting rates meant for insert and for deleted rates with types not used for ab translation');
1207: END IF;
1208:
1209: DELETE gl_daily_rates dr
1210: WHERE ( (dr.rate_source_code IS NULL)
1211: OR ( dr.rate_source_code IN('USER', 'TREASURY')
1212: AND golden_rule_flag <> 'USER')
1213: OR golden_rule_flag = 'USER')

Line 1224: gl_daily_rates_interface ri

1220: TRUNC(ri.from_conversion_date)
1221: + rm.multiplier - 1
1222: FROM gl_row_multipliers rm,
1223: gl_daily_conversion_types ct,
1224: gl_daily_rates_interface ri
1225: WHERE ri.batch_number = l_batch_number
1226: AND ( ri.mode_flag IN('I', 'T')
1227: OR ( ri.mode_flag = 'D'
1228: AND ri.used_for_ab_translation <> 'Y'))

Line 1244: gl_daily_rates_interface ri

1240: TRUNC(ri.from_conversion_date)
1241: + rm.multiplier - 1
1242: FROM gl_row_multipliers rm,
1243: gl_daily_conversion_types ct,
1244: gl_daily_rates_interface ri
1245: WHERE ri.batch_number = l_batch_number
1246: AND ( ri.mode_flag IN('I', 'T')
1247: OR ( ri.mode_flag = 'D'
1248: AND ri.used_for_ab_translation <> 'Y'))

Line 1270: INSERT INTO gl_daily_rates

1266: IF DEBUG_MODE THEN
1267: fnd_file.put_line(fnd_file.LOG, 'Insert all rates.');
1268: END IF;
1269:
1270: INSERT INTO gl_daily_rates
1271: (from_currency, to_currency, conversion_date,
1272: conversion_type, conversion_rate, status_code,
1273: creation_date, created_by, last_update_date,
1274: last_updated_by, last_update_login, CONTEXT,

Line 1294: gl_daily_rates_interface ri

1290: ri.attribute14, ri.attribute15,
1291: DECODE(ri.mode_flag, 'T', 'TREASURY', 'N', 'TREASURY', 'USER')
1292: FROM gl_row_multipliers rm,
1293: gl_daily_conversion_types ct,
1294: gl_daily_rates_interface ri
1295: WHERE ri.mode_flag IN('I', 'T', 'N')
1296: AND ct.user_conversion_type = ri.user_conversion_type || ''
1297: AND rm.multiplier BETWEEN 1
1298: AND TRUNC(ri.to_conversion_date)

Line 1304: FROM gl_daily_rates dr

1300: + 1
1301: AND ri.batch_number = l_batch_number
1302: AND NOT EXISTS(
1303: SELECT 1
1304: FROM gl_daily_rates dr
1305: WHERE dr.from_currency = ri.from_currency
1306: AND dr.to_currency = ri.to_currency
1307: AND dr.conversion_type = ct.conversion_type
1308: AND dr.conversion_date =

Line 1327: gl_daily_rates_interface ri

1323: ri.attribute14, ri.attribute15,
1324: DECODE(ri.mode_flag, 'T', 'TREASURY', 'N', 'TREASURY', 'USER')
1325: FROM gl_row_multipliers rm,
1326: gl_daily_conversion_types ct,
1327: gl_daily_rates_interface ri
1328: WHERE ri.mode_flag IN('I', 'T', 'N')
1329: AND ct.user_conversion_type = ri.user_conversion_type || ''
1330: AND rm.multiplier BETWEEN 1
1331: AND TRUNC(ri.to_conversion_date)

Line 1337: FROM gl_daily_rates dr

1333: + 1
1334: AND ri.batch_number = l_batch_number
1335: AND NOT EXISTS(
1336: SELECT 1
1337: FROM gl_daily_rates dr
1338: WHERE dr.from_currency = ri.to_currency
1339: AND dr.to_currency = ri.from_currency
1340: AND dr.conversion_type = ct.conversion_type
1341: AND dr.conversion_date =

Line 1400: FROM gl_daily_rates_interface

1396:
1397: --- Cross Rates Calculation ---
1398: SELECT COUNT(*)
1399: INTO rows_need_calculation
1400: FROM gl_daily_rates_interface
1401: WHERE mode_flag IN('I', 'D', 'T', 'N')
1402: AND user_conversion_type IN(
1403: SELECT user_conversion_type
1404: FROM gl_daily_conversion_types gct,

Line 1421: -- Delete all valid rows in GL_DAILY_RATES_INTERFACE and do not need

1417: END IF;
1418: END IF;
1419:
1420: IF rows_need_calculation > 0 THEN
1421: -- Delete all valid rows in GL_DAILY_RATES_INTERFACE and do not need
1422: -- crossing rates calculation
1423: DELETE FROM gl_daily_rates_interface
1424: WHERE mode_flag IN('I', 'D', 'T', 'N')
1425: AND batch_number = l_batch_number

Line 1423: DELETE FROM gl_daily_rates_interface

1419:
1420: IF rows_need_calculation > 0 THEN
1421: -- Delete all valid rows in GL_DAILY_RATES_INTERFACE and do not need
1422: -- crossing rates calculation
1423: DELETE FROM gl_daily_rates_interface
1424: WHERE mode_flag IN('I', 'D', 'T', 'N')
1425: AND batch_number = l_batch_number
1426: AND user_conversion_type NOT IN(
1427: SELECT user_conversion_type

Line 1434: -- select all the lines who can be calculate cross rate from the gl_daily_rates table

1430: WHERE gct.conversion_type = gcrs.conversion_type);
1431:
1432: gl_message.func_ent('Cross Rates Calculation');
1433:
1434: -- select all the lines who can be calculate cross rate from the gl_daily_rates table
1435: IF DEBUG_MODE THEN
1436: fnd_file.put_line(fnd_file.LOG, 'Clean gl_cross_rate_temp.');
1437: END IF;
1438:

Line 1470: FROM gl_daily_rates_interface gldri,

1466: glcrs.pivot_currency, gldri.inverse_conversion_rate,
1467: gldri.conversion_rate),
1468: DECODE(gldri.mode_flag, 'D', 'D', 'I'),
1469: gldri.used_for_ab_translation
1470: FROM gl_daily_rates_interface gldri,
1471: gl_daily_conversion_types gldct,
1472: gl_cross_rate_rules glcrs,
1473: gl_cross_rate_rule_dtls glcrsd
1474: WHERE gldri.mode_flag IN('I', 'D', 'T', 'N')

Line 1570: FROM gl_daily_rates gldr,

1566: usr_daily_rate_cannot_delete.r_type,
1567: usr_daily_rate_cannot_delete.r_conversion_date,
1568: usr_daily_rate_cannot_delete.r_rate,
1569: usr_daily_rate_cannot_delete.r_rate_source_code
1570: FROM gl_daily_rates gldr,
1571: gl_daily_conversion_types gldct,
1572: gl_cross_rate_temp glcrt,
1573: gl_row_multipliers glrm
1574: WHERE gldr.conversion_type = gldct.conversion_type

Line 1643: FROM gl_daily_rates gldr,

1639: usr_daily_rate_cannot_override.r_type,
1640: usr_daily_rate_cannot_override.r_conversion_date,
1641: usr_daily_rate_cannot_override.r_rate,
1642: usr_daily_rate_cannot_override.r_rate_source_code
1643: FROM gl_daily_rates gldr,
1644: gl_daily_conversion_types gldct,
1645: gl_cross_rate_temp glcrt,
1646: gl_row_multipliers glrm
1647: WHERE gldr.conversion_type = gldct.conversion_type

Line 1715: -- GL_DAILY_RATES_INTERFACE where mode = 'D',

1711: 'Mark D for Cross Rates');
1712: END IF;
1713:
1714: -- For each row with conversion rate in
1715: -- GL_DAILY_RATES_INTERFACE where mode = 'D',
1716: -- set status_code to 'D' in the corresponding row in GL_DAILY_RATES.
1717: UPDATE gl_daily_rates gldr
1718: SET status_code = 'D'
1719: WHERE ( (gldr.rate_source_code IS NOT NULL

Line 1716: -- set status_code to 'D' in the corresponding row in GL_DAILY_RATES.

1712: END IF;
1713:
1714: -- For each row with conversion rate in
1715: -- GL_DAILY_RATES_INTERFACE where mode = 'D',
1716: -- set status_code to 'D' in the corresponding row in GL_DAILY_RATES.
1717: UPDATE gl_daily_rates gldr
1718: SET status_code = 'D'
1719: WHERE ( (gldr.rate_source_code IS NOT NULL
1720: AND gldr.rate_source_code = 'SYSTEM'

Line 1717: UPDATE gl_daily_rates gldr

1713:
1714: -- For each row with conversion rate in
1715: -- GL_DAILY_RATES_INTERFACE where mode = 'D',
1716: -- set status_code to 'D' in the corresponding row in GL_DAILY_RATES.
1717: UPDATE gl_daily_rates gldr
1718: SET status_code = 'D'
1719: WHERE ( (gldr.rate_source_code IS NOT NULL
1720: AND gldr.rate_source_code = 'SYSTEM'
1721: AND golden_rule_flag <> 'SYSTEM')

Line 1733: gl_daily_rates gldr

1729: TRUNC(glcrt.from_conversion_date)
1730: + glrm.multiplier - 1
1731: FROM gl_row_multipliers glrm,
1732: gl_cross_rate_temp glcrt,
1733: gl_daily_rates gldr
1734: WHERE glcrt.mode_flag = 'D'
1735: AND glcrt.used_for_ab_translation = 'Y'
1736: AND gldr.from_currency = glcrt.from_currency
1737: AND gldr.to_currency = glcrt.to_currency

Line 1755: gl_daily_rates gldr

1751: TRUNC(glcrt.from_conversion_date)
1752: + glrm.multiplier - 1
1753: FROM gl_row_multipliers glrm,
1754: gl_cross_rate_temp glcrt,
1755: gl_daily_rates gldr
1756: WHERE glcrt.mode_flag = 'D'
1757: AND glcrt.used_for_ab_translation = 'Y'
1758: AND gldr.to_currency = glcrt.from_currency
1759: AND gldr.from_currency = glcrt.to_currency

Line 1780: DELETE FROM gl_daily_rates gldr

1776: (fnd_file.LOG,
1777: 'Delete for Cross Rates');
1778: END IF;
1779:
1780: DELETE FROM gl_daily_rates gldr
1781: WHERE ( (gldr.rate_source_code IS NOT NULL
1782: AND gldr.rate_source_code = 'SYSTEM'
1783: AND golden_rule_flag <> 'SYSTEM')
1784: OR golden_rule_flag = 'SYSTEM')

Line 1795: gl_daily_rates gldr

1791: TRUNC(glcrt.from_conversion_date)
1792: + glrm.multiplier - 1
1793: FROM gl_row_multipliers glrm,
1794: gl_cross_rate_temp glcrt,
1795: gl_daily_rates gldr
1796: WHERE ( glcrt.mode_flag in ('I', 'T')
1797: OR ( glcrt.mode_flag = 'D'
1798: AND glcrt.used_for_ab_translation <>
1799: 'Y'))

Line 1820: gl_daily_rates gldr

1816: TRUNC(glcrt.from_conversion_date)
1817: + glrm.multiplier - 1
1818: FROM gl_row_multipliers glrm,
1819: gl_cross_rate_temp glcrt,
1820: gl_daily_rates gldr
1821: WHERE ( glcrt.mode_flag in ('I', 'T')
1822: OR ( glcrt.mode_flag = 'D'
1823: AND glcrt.used_for_ab_translation <>
1824: 'Y'))

Line 1848: AND (EXISTS (SELECT 1 FROM gl_daily_rates dr

1844:
1845: UPDATE gl_cross_rate_temp rt
1846: SET mode_flag = 'F'
1847: WHERE mode_flag = 'N'
1848: AND (EXISTS (SELECT 1 FROM gl_daily_rates dr
1849: WHERE dr.from_currency = rt.from_currency
1850: AND dr.to_currency = rt.to_currency
1851: AND dr.conversion_type = rt.conversion_type
1852: AND dr.conversion_date BETWEEN rt.from_conversion_date

Line 1854: OR EXISTS (SELECT 1 FROM gl_daily_rates dr

1850: AND dr.to_currency = rt.to_currency
1851: AND dr.conversion_type = rt.conversion_type
1852: AND dr.conversion_date BETWEEN rt.from_conversion_date
1853: AND rt.to_conversion_date)
1854: OR EXISTS (SELECT 1 FROM gl_daily_rates dr
1855: WHERE dr.from_currency = rt.to_currency
1856: AND dr.to_currency = rt.from_currency
1857: AND dr.conversion_type = rt.conversion_type
1858: AND dr.conversion_date BETWEEN rt.from_conversion_date

Line 1867: INSERT INTO gl_daily_rates

1863: fnd_file.put_line(fnd_file.LOG,
1864: 'creating all cross rates ....');
1865: END IF;
1866:
1867: INSERT INTO gl_daily_rates
1868: (from_currency, to_currency, conversion_date,
1869: conversion_type, conversion_rate, status_code,
1870: creation_date, created_by, last_update_date,
1871: last_updated_by, last_update_login,

Line 1882: gl_daily_rates gldr

1878: DECODE(glcrt.used_for_ab_translation, 'Y', 'O', 'C'),
1879: SYSDATE, 1, SYSDATE, 1, 1, 'SYSTEM'
1880: FROM gl_row_multipliers glrm,
1881: gl_cross_rate_temp glcrt,
1882: gl_daily_rates gldr
1883: WHERE glcrt.mode_flag in ('I', 'T', 'N')
1884: AND gldr.from_currency = glcrt.pivot_currency
1885: AND gldr.to_currency = glcrt.to_currency
1886: AND gldr.conversion_type = glcrt.conversion_type

Line 1898: FROM gl_daily_rates dr

1894: (glcrt.from_conversion_date)
1895: + 1
1896: AND ( NOT EXISTS(
1897: SELECT 1
1898: FROM gl_daily_rates dr
1899: WHERE dr.from_currency = glcrt.from_currency
1900: AND dr.to_currency = glcrt.to_currency
1901: AND dr.conversion_type =
1902: glcrt.conversion_type

Line 1908: FROM gl_daily_rates dr

1904: TRUNC(glcrt.from_conversion_date)
1905: + glrm.multiplier - 1)
1906: OR NOT EXISTS(
1907: SELECT 1
1908: FROM gl_daily_rates dr
1909: WHERE dr.from_currency = glcrt.to_currency
1910: AND dr.to_currency = glcrt.from_currency
1911: AND dr.conversion_type =
1912: glcrt.conversion_type

Line 1926: gl_daily_rates gldr

1922: DECODE(glcrt.used_for_ab_translation, 'Y', 'O', 'C'),
1923: SYSDATE, 1, SYSDATE, 1, 1, 'SYSTEM'
1924: FROM gl_row_multipliers glrm,
1925: gl_cross_rate_temp glcrt,
1926: gl_daily_rates gldr
1927: WHERE glcrt.mode_flag in ('I', 'T', 'N')
1928: AND gldr.to_currency = glcrt.pivot_currency
1929: AND gldr.from_currency = glcrt.to_currency
1930: AND gldr.conversion_type = glcrt.conversion_type

Line 1942: FROM gl_daily_rates dr

1938: (glcrt.from_conversion_date)
1939: + 1
1940: AND ( NOT EXISTS(
1941: SELECT 1
1942: FROM gl_daily_rates dr
1943: WHERE dr.from_currency = glcrt.from_currency
1944: AND dr.to_currency = glcrt.to_currency
1945: AND dr.conversion_type =
1946: glcrt.conversion_type

Line 1952: FROM gl_daily_rates dr

1948: TRUNC(glcrt.from_conversion_date)
1949: + glrm.multiplier - 1)
1950: OR NOT EXISTS(
1951: SELECT 1
1952: FROM gl_daily_rates dr
1953: WHERE dr.from_currency = glcrt.to_currency
1954: AND dr.to_currency = glcrt.from_currency
1955: AND dr.conversion_type =
1956: glcrt.conversion_type

Line 2005: DELETE FROM gl_daily_rates_interface

2001: END IF;
2002:
2003: ---- End Calculation
2004:
2005: DELETE FROM gl_daily_rates_interface
2006: WHERE mode_flag IN('I', 'D', 'T', 'N')
2007: AND batch_number = l_batch_number;
2008:
2009: -- Launch the Rate Change Program if needed

Line 2043: DELETE FROM gl_daily_rates_interface

2039: ('WARNING',
2040: 'Exceptions occurs, please check the output for details.');
2041: END IF;
2042:
2043: DELETE FROM gl_daily_rates_interface
2044: WHERE mode_flag IN('I', 'D', 'T', 'N')
2045: AND batch_number = l_batch_number;
2046:
2047: --ekey := req_id;