DBA Data[Home] [Help]

APPS.GL_DAILY_RATES_PKG dependencies on GL_DAILY_RATES

Line 1: PACKAGE BODY GL_DAILY_RATES_PKG as

1: PACKAGE BODY GL_DAILY_RATES_PKG as
2: /* $Header: glirtdyb.pls 120.10.12020000.2 2012/08/28 21:01:06 phmullap ship $ */
3: --
4: -- Package
5: -- gl_daily_rates_pkg

Line 5: -- gl_daily_rates_pkg

1: PACKAGE BODY GL_DAILY_RATES_PKG as
2: /* $Header: glirtdyb.pls 120.10.12020000.2 2012/08/28 21:01:06 phmullap ship $ */
3: --
4: -- Package
5: -- gl_daily_rates_pkg
6: -- Purpose
7: -- To contain validation and insertion routines for gl_daily_rates
8: -- History
9: -- 07-29-97 W Wong Created

Line 7: -- To contain validation and insertion routines for gl_daily_rates

3: --
4: -- Package
5: -- gl_daily_rates_pkg
6: -- Purpose
7: -- To contain validation and insertion routines for gl_daily_rates
8: -- History
9: -- 07-29-97 W Wong Created
10:
11: --

Line 16: -- Inserts two rows into gl_daily_rates:

12: -- Procedure
13: -- Insert_Row
14: --
15: -- Purpose
16: -- Inserts two rows into gl_daily_rates:
17: -- one for the original conversion rate ( From Currency -> To Currency )
18: -- one for the inverse conversion rate ( To Currency -> From Currency )
19: --
20: -- History

Line 24: -- All the columns of the table GL_DAILY_RATES and

20: -- History
21: -- 07-29-97 W Wong Created
22: --
23: -- Arguments
24: -- All the columns of the table GL_DAILY_RATES and
25: -- X_Average_Balances_Used Average Balances Used
26: -- X_Euro_Currency Currency Code of EURO
27: --
28: -- Example

Line 29: -- gl_daily_rates.Insert_Row(....);

25: -- X_Average_Balances_Used Average Balances Used
26: -- X_Euro_Currency Currency Code of EURO
27: --
28: -- Example
29: -- gl_daily_rates.Insert_Row(....);
30: --
31: -- Notes
32: --
33: PROCEDURE Insert_Row(X_Rowid IN OUT NOCOPY VARCHAR2,

Line 66: CURSOR C IS SELECT rowid FROM GL_DAILY_RATES

62: X_Attribute15 VARCHAR2,
63: X_Average_Balances_Used VARCHAR2,
64: X_Euro_Currency VARCHAR2
65: ) IS
66: CURSOR C IS SELECT rowid FROM GL_DAILY_RATES
67: WHERE from_currency = X_From_Currency
68: AND to_currency = X_To_Currency
69: AND conversion_date = X_Conversion_Date
70: AND conversion_type = X_Conversion_Type;

Line 72: CURSOR Inverse_C IS SELECT rowid FROM GL_DAILY_RATES

68: AND to_currency = X_To_Currency
69: AND conversion_date = X_Conversion_Date
70: AND conversion_type = X_Conversion_Type;
71:
72: CURSOR Inverse_C IS SELECT rowid FROM GL_DAILY_RATES
73: WHERE from_currency = X_To_Currency
74: AND to_currency = X_From_Currency
75: AND conversion_date = X_Conversion_Date
76: AND conversion_type = X_Conversion_Type;

Line 85: IF ( GL_DAILY_RATES_PKG.Used_In_Ledger( X_From_Currency,

81: -- Set the status code to 'O' if the X_To_Currency and X_Conversion_Type is
82: -- used in ledgers.
83: -- Set status code to 'C' otherwise.
84: --
85: IF ( GL_DAILY_RATES_PKG.Used_In_Ledger( X_From_Currency,
86: X_To_Currency,
87: X_Conversion_Type,
88: X_Euro_Currency,
89: X_Conversion_Date )) THEN

Line 97: INSERT INTO GL_DAILY_RATES(

93: X_Status_Code := 'C';
94: END IF;
95:
96: -- Insert the row with conversion rate
97: INSERT INTO GL_DAILY_RATES(
98: from_currency,
99: to_currency,
100: conversion_date,
101: conversion_type,

Line 164: INSERT INTO GL_DAILY_RATES(

160: end if;
161: CLOSE C;
162:
163: -- Insert the row with new inverse conversion rate
164: INSERT INTO GL_DAILY_RATES(
165: from_currency,
166: to_currency,
167: conversion_date,
168: conversion_type,

Line 265: -- Locks a pair of rows in gl_daily_rates

261: -- Procedure
262: -- Lock_Row
263: --
264: -- Purpose
265: -- Locks a pair of rows in gl_daily_rates
266: --
267: -- History
268: -- 07-29-97 W Wong Created
269: --

Line 271: -- All the columns of the table GL_DAILY_RATES

267: -- History
268: -- 07-29-97 W Wong Created
269: --
270: -- Arguments
271: -- All the columns of the table GL_DAILY_RATES
272: --
273: -- Example
274: -- gl_daily_rates.Lock_Row(....);
275: --

Line 274: -- gl_daily_rates.Lock_Row(....);

270: -- Arguments
271: -- All the columns of the table GL_DAILY_RATES
272: --
273: -- Example
274: -- gl_daily_rates.Lock_Row(....);
275: --
276: -- Notes
277: --
278: PROCEDURE Lock_Row(X_Rowid VARCHAR2,

Line 312: FROM GL_DAILY_RATES

308: ) IS
309:
310: CURSOR C IS
311: SELECT *
312: FROM GL_DAILY_RATES
313: WHERE rowid = X_Rowid
314: FOR UPDATE of from_currency NOWAIT;
315: Recinfo C%ROWTYPE;
316:

Line 319: FROM GL_DAILY_RATES

315: Recinfo C%ROWTYPE;
316:
317: CURSOR Inverse_C IS
318: SELECT *
319: FROM GL_DAILY_RATES
320: WHERE rowid = X_Inverse_Rowid
321: FOR UPDATE of from_currency NOWAIT;
322: Inverse_Recinfo Inverse_C%ROWTYPE;
323:

Line 499: -- Updates a pair of rows in gl_daily_rates.

495: --
496: -- Update_Row
497: --
498: -- Purpose
499: -- Updates a pair of rows in gl_daily_rates.
500: --
501: -- History
502: -- 07-29-97 W Wong Created
503: --

Line 505: -- All the columns of the table GL_DAILY_RATES and

501: -- History
502: -- 07-29-97 W Wong Created
503: --
504: -- Arguments
505: -- All the columns of the table GL_DAILY_RATES and
506: -- X_Average_Balances_Used Average Balances Used
507: -- X_Euro_Currency Currency Code of EURO
508: --
509: -- Example

Line 510: -- gl_daily_rates.Update_Row(....);

506: -- X_Average_Balances_Used Average Balances Used
507: -- X_Euro_Currency Currency Code of EURO
508: --
509: -- Example
510: -- gl_daily_rates.Update_Row(....);
511: --
512: -- Notes
513: --
514: PROCEDURE Update_Row(X_Rowid VARCHAR2,

Line 552: IF ( GL_DAILY_RATES_PKG.Used_In_Ledger( X_From_Currency,

548: BEGIN
549: -- Set the status code to 'O' if the X_To_Currency and X_Conversion_Type is
550: -- used in ledgers.
551: IF ( X_Status_Code <> 'O' ) THEN
552: IF ( GL_DAILY_RATES_PKG.Used_In_Ledger( X_From_Currency,
553: X_To_Currency,
554: X_Conversion_Type,
555: X_Euro_Currency,
556: X_Conversion_Date )) THEN

Line 568: UPDATE GL_DAILY_RATES

564: X_Status_Code := 'O';
565: END IF;
566:
567: -- Update conversion information for the row with conversion rate
568: UPDATE GL_DAILY_RATES
569: SET
570: from_currency = X_From_Currency,
571: to_currency = X_To_Currency,
572: conversion_date = X_Conversion_Date,

Line 602: UPDATE GL_DAILY_RATES

598: RAISE NO_DATA_FOUND;
599: end if;
600:
601: -- Update conversion information for the row with inverse conversion rate
602: UPDATE GL_DAILY_RATES
603: SET
604: from_currency = X_To_Currency,
605: to_currency = X_From_Currency,
606: conversion_date = X_Conversion_Date,

Line 672: -- Deletes a row from gl_daily_rates

668: --
669: -- Delete_Row
670: --
671: -- Purpose
672: -- Deletes a row from gl_daily_rates
673: --
674: -- History
675: -- 07-29-97 W Wong Created
676: --

Line 687: -- gl_daily_rates.delete_row('...');

683: -- X_Average_Balances_Used Average Balance Used Flag
684: -- X_Euro_Currency Currency code of the Euro currency
685: --
686: -- Example
687: -- gl_daily_rates.delete_row('...');
688: --
689: -- Notes
690: --
691: PROCEDURE Delete_Row(X_Rowid VARCHAR2,

Line 706: IF ( GL_DAILY_RATES_PKG.Used_In_Ledger( X_From_Currency,

702: BEGIN
703: -- Set the status code to 'D' if the X_To_Currency and X_Conversion_Type is
704: -- used in ledgers.
705: IF ( X_Status_Code <> 'O' ) THEN
706: IF ( GL_DAILY_RATES_PKG.Used_In_Ledger( X_From_Currency,
707: X_To_Currency,
708: X_Conversion_Type,
709: X_Euro_Currency,
710: X_Conversion_Date )) THEN

Line 720: -- Delete or update GL_DAILY_RATES table according to the status code

716: ELSE
717: X_Status_Code := 'D';
718: END IF;
719:
720: -- Delete or update GL_DAILY_RATES table according to the status code
721: IF (X_Status_Code <> 'D') THEN
722: -- Delete the original row and its corresponding row with the
723: -- inverse conversion rate
724: DELETE FROM GL_DAILY_RATES

Line 724: DELETE FROM GL_DAILY_RATES

720: -- Delete or update GL_DAILY_RATES table according to the status code
721: IF (X_Status_Code <> 'D') THEN
722: -- Delete the original row and its corresponding row with the
723: -- inverse conversion rate
724: DELETE FROM GL_DAILY_RATES
725: WHERE rowid IN (X_Rowid, X_Inverse_Rowid);
726:
727: ELSE
728: -- Update the original row and its corresponding row with the

Line 730: UPDATE GL_DAILY_RATES

726:
727: ELSE
728: -- Update the original row and its corresponding row with the
729: -- inverse conversion rate
730: UPDATE GL_DAILY_RATES
731: SET
732: status_code = 'D'
733: WHERE rowid IN (X_Rowid, X_Inverse_Rowid);
734: END IF;

Line 762: -- two rows with the same primary keys exist in GL_DAILY_RATES

758: WHEN NO_DATA_FOUND THEN
759: null;
760: -- The following exception will catch the condition when a row
761: -- which was deleted earlier is reinserted and deleted again. Since
762: -- two rows with the same primary keys exist in GL_DAILY_RATES
763: -- we need to delete this row. The Rate Change program will
764: -- outdate the corresponding rows in GL_DAILY_BALANCES since it will
765: -- process the existing duplicate row with the same accounting date and
766: -- the currency code.

Line 768: DELETE FROM GL_DAILY_RATES

764: -- outdate the corresponding rows in GL_DAILY_BALANCES since it will
765: -- process the existing duplicate row with the same accounting date and
766: -- the currency code.
767: WHEN DUP_VAL_ON_INDEX THEN
768: DELETE FROM GL_DAILY_RATES
769: WHERE rowid = X_Rowid;
770: DELETE FROM GL_DAILY_RATES
771: WHERE rowid = X_Inverse_Rowid;
772: WHEN OTHERS THEN

Line 770: DELETE FROM GL_DAILY_RATES

766: -- the currency code.
767: WHEN DUP_VAL_ON_INDEX THEN
768: DELETE FROM GL_DAILY_RATES
769: WHERE rowid = X_Rowid;
770: DELETE FROM GL_DAILY_RATES
771: WHERE rowid = X_Inverse_Rowid;
772: WHEN OTHERS THEN
773: fnd_message.set_name('SQLGL', 'GL_UNHANDLED_EXCEPTION');
774: fnd_message.set_token('PROCEDURE', 'gl_daily_rates.delete_row');

Line 774: fnd_message.set_token('PROCEDURE', 'gl_daily_rates.delete_row');

770: DELETE FROM GL_DAILY_RATES
771: WHERE rowid = X_Inverse_Rowid;
772: WHEN OTHERS THEN
773: fnd_message.set_name('SQLGL', 'GL_UNHANDLED_EXCEPTION');
774: fnd_message.set_token('PROCEDURE', 'gl_daily_rates.delete_row');
775: RAISE;
776:
777: END Delete_Row;
778:

Line 785: -- Checks to make sure that gl_daily_rates is unique.

781: -- Procedure
782: -- Check_Unique
783: --
784: -- Purpose
785: -- Checks to make sure that gl_daily_rates is unique.
786: --
787: -- History
788: -- 07-29-97 W Wong Created
789: --

Line 798: -- gl_daily_rates.check_unique(...);

794: -- X_Conversion_Date Conversion Date
795: -- X_Conversion_Type Conversion Type
796: --
797: -- Example
798: -- gl_daily_rates.check_unique(...);
799: --
800: -- Notes
801: --
802: PROCEDURE Check_Unique(X_Rowid VARCHAR2,

Line 819: FROM GL_DAILY_RATES R

815: SELECT 1
816: INTO dummy
817: FROM dual D
818: WHERE NOT EXISTS ( SELECT 1
819: FROM GL_DAILY_RATES R
820: WHERE R.from_currency = X_From_Currency
821: AND R.to_currency = X_To_Currency
822: AND R.conversion_date = X_Conversion_Date
823: AND R.conversion_type = X_Conversion_Type

Line 830: FROM GL_DAILY_RATES R

826:
827: EXCEPTION
828: WHEN NO_DATA_FOUND THEN
829: SELECT R.status_code into status
830: FROM GL_DAILY_RATES R
831: WHERE R.from_currency = X_From_Currency
832: AND R.to_currency = X_To_Currency
833: AND R.conversion_date = X_Conversion_Date
834: AND R.conversion_type = X_Conversion_Type

Line 881: -- gl_daily_rates.used_in_ledger(...)

877: -- X_To_Currency To Currency
878: -- X_Conversion_Type Conversion Type
879: --
880: -- Example
881: -- gl_daily_rates.used_in_ledger(...)
882: --
883: -- Notes
884: --
885: FUNCTION Used_In_Ledger( X_From_Currency VARCHAR2,

Line 928: -- It inserts rows into gl_daily_rates_interface.

924: -- Insert_DateRange
925: --
926: -- Purpose
927: -- This procedure is created for Ispeed Daily Rates API.
928: -- It inserts rows into gl_daily_rates_interface.
929: --
930: -- History
931: -- 09-06-00 K Chang Created
932: --

Line 934: -- All the columns of the table GL_DAILY_RATES_INTERFACE

930: -- History
931: -- 09-06-00 K Chang Created
932: --
933: -- Arguments
934: -- All the columns of the table GL_DAILY_RATES_INTERFACE
935: --
936: -- Example
937: -- gl_daily_rates_pkg.Insert_DateRage(....);
938: --

Line 937: -- gl_daily_rates_pkg.Insert_DateRage(....);

933: -- Arguments
934: -- All the columns of the table GL_DAILY_RATES_INTERFACE
935: --
936: -- Example
937: -- gl_daily_rates_pkg.Insert_DateRage(....);
938: --
939: -- Notes
940: --
941: PROCEDURE Insert_DateRange(X_From_Currency VARCHAR2,

Line 972: INSERT INTO GL_DAILY_RATES_INTERFACE(

968: X_Used_For_AB_Translation VARCHAR2
969: ) IS
970: BEGIN
971: -- Insert the row with conversion rate
972: INSERT INTO GL_DAILY_RATES_INTERFACE(
973: from_currency,
974: to_currency,
975: from_conversion_date,
976: to_conversion_date,

Line 1062: -- gl_daily_rates_pkg.Validate_DailyRates(....);

1058: -- X_From_Conversion_Date From Conversion Date
1059: -- X_To_Conversion_Date To Conversion Date
1060: --
1061: -- Example
1062: -- gl_daily_rates_pkg.Validate_DailyRates(....);
1063: --
1064: -- Notes
1065: --
1066: PROCEDURE Validate_DailyRates(X_From_Currency VARCHAR2,

Line 1149: fnd_message.set_token('PROCEDURE', 'gl_daily_rates.validate_dailyrates');

1145: WHEN app_exception.application_exception THEN
1146: RAISE;
1147: WHEN OTHERS THEN
1148: fnd_message.set_name('SQLGL', 'GL_UNHANDLED_EXCEPTION');
1149: fnd_message.set_token('PROCEDURE', 'gl_daily_rates.validate_dailyrates');
1150: RAISE;
1151:
1152: END Validate_DailyRates;
1153:

Line 1170: -- gl_daily_rates_pkg.Submit_Conc_Request(....);

1166: -- Arguments
1167: --
1168: --
1169: -- Example
1170: -- gl_daily_rates_pkg.Submit_Conc_Request(....);
1171: --
1172: -- Notes
1173: --
1174: FUNCTION submit_conc_request RETURN NUMBER

Line 1207: -- Inserts or Updates two rows into gl_daily_rates for Ispeed Daily

1203: -- Procedure
1204: -- Upload_Row
1205: --
1206: -- Purpose
1207: -- Inserts or Updates two rows into gl_daily_rates for Ispeed Daily
1208: -- Rates API:
1209: -- one for the original conversion rate ( From Currency -> To Currency )
1210: -- one for the inverse conversion rate ( To Currency -> From Currency )
1211: --

Line 1216: -- All the columns of the table GL_DAILY_RATES and

1212: -- History
1213: -- 09-21-00 K Chang Created
1214: --
1215: -- Arguments
1216: -- All the columns of the table GL_DAILY_RATES and
1217: -- X_Average_Balances_Used Average Balances Used
1218: -- X_Euro_Currency Currency Code of EURO
1219: --
1220: -- Example

Line 1221: -- gl_daily_rates.Upload_Row(....);

1217: -- X_Average_Balances_Used Average Balances Used
1218: -- X_Euro_Currency Currency Code of EURO
1219: --
1220: -- Example
1221: -- gl_daily_rates.Upload_Row(....);
1222: --
1223: -- Notes
1224: --
1225: PROCEDURE Upload_Row(X_Rowid IN OUT NOCOPY VARCHAR2,

Line 1265: from gl_daily_rates

1261:
1262: -- Get the row id
1263: select rowid
1264: into lrowid
1265: from gl_daily_rates
1266: where from_currency = X_From_Currency
1267: and to_currency = X_To_Currency
1268: and conversion_date = X_Conversion_Date
1269: and conversion_type = X_Conversion_Type;

Line 1274: from gl_daily_rates

1270:
1271: -- Get the row id for the inverse conversion rate
1272: select rowid
1273: into invrowid
1274: from gl_daily_rates
1275: where from_currency = X_To_Currency
1276: and to_currency = X_From_Currency
1277: and conversion_date = X_Conversion_Date
1278: and conversion_type = X_Conversion_Type;

Line 1282: GL_DAILY_RATES_PKG.update_row(

1278: and conversion_type = X_Conversion_Type;
1279:
1280: -- Update only if the record exists in the database
1281: --IF ( lrowid IS NOT NULL and invrowid IS NOT NULL) THEN
1282: GL_DAILY_RATES_PKG.update_row(
1283: X_Rowid =>lrowid,
1284: X_Inverse_Rowid =>invrowid,
1285: X_From_Currency =>X_From_Currency,
1286: X_To_Currency =>X_To_Currency,

Line 1319: GL_DAILY_RATES_PKG.insert_row(

1315: );
1316: --END IF;
1317:
1318: EXCEPTION WHEN NO_DATA_FOUND THEN
1319: GL_DAILY_RATES_PKG.insert_row(
1320: X_Rowid =>lrowid,
1321: X_Inverse_Rowid =>invrowid,
1322: X_From_Currency =>X_From_Currency,
1323: X_To_Currency =>X_To_Currency,

Line 1357: END GL_DAILY_RATES_PKG;

1353:
1354:
1355: END Upload_Row;
1356:
1357: END GL_DAILY_RATES_PKG;