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 2005/05/05 01:21:06 kvora 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 2005/05/05 01:21:06 kvora 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 818: FROM GL_DAILY_RATES R

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

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

863: -- X_To_Currency To Currency
864: -- X_Conversion_Type Conversion Type
865: --
866: -- Example
867: -- gl_daily_rates.used_in_ledger(...)
868: --
869: -- Notes
870: --
871: FUNCTION Used_In_Ledger( X_From_Currency VARCHAR2,

Line 914: -- It inserts rows into gl_daily_rates_interface.

910: -- Insert_DateRange
911: --
912: -- Purpose
913: -- This procedure is created for Ispeed Daily Rates API.
914: -- It inserts rows into gl_daily_rates_interface.
915: --
916: -- History
917: -- 09-06-00 K Chang Created
918: --

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

916: -- History
917: -- 09-06-00 K Chang Created
918: --
919: -- Arguments
920: -- All the columns of the table GL_DAILY_RATES_INTERFACE
921: --
922: -- Example
923: -- gl_daily_rates_pkg.Insert_DateRage(....);
924: --

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

919: -- Arguments
920: -- All the columns of the table GL_DAILY_RATES_INTERFACE
921: --
922: -- Example
923: -- gl_daily_rates_pkg.Insert_DateRage(....);
924: --
925: -- Notes
926: --
927: PROCEDURE Insert_DateRange(X_From_Currency VARCHAR2,

Line 958: INSERT INTO GL_DAILY_RATES_INTERFACE(

954: X_Used_For_AB_Translation VARCHAR2
955: ) IS
956: BEGIN
957: -- Insert the row with conversion rate
958: INSERT INTO GL_DAILY_RATES_INTERFACE(
959: from_currency,
960: to_currency,
961: from_conversion_date,
962: to_conversion_date,

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

1044: -- X_From_Conversion_Date From Conversion Date
1045: -- X_To_Conversion_Date To Conversion Date
1046: --
1047: -- Example
1048: -- gl_daily_rates_pkg.Validate_DailyRates(....);
1049: --
1050: -- Notes
1051: --
1052: PROCEDURE Validate_DailyRates(X_From_Currency VARCHAR2,

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

1131: WHEN app_exception.application_exception THEN
1132: RAISE;
1133: WHEN OTHERS THEN
1134: fnd_message.set_name('SQLGL', 'GL_UNHANDLED_EXCEPTION');
1135: fnd_message.set_token('PROCEDURE', 'gl_daily_rates.validate_dailyrates');
1136: RAISE;
1137:
1138: END Validate_DailyRates;
1139:

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

1152: -- Arguments
1153: --
1154: --
1155: -- Example
1156: -- gl_daily_rates_pkg.Submit_Conc_Request(....);
1157: --
1158: -- Notes
1159: --
1160: FUNCTION submit_conc_request RETURN NUMBER

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

1189: -- Procedure
1190: -- Upload_Row
1191: --
1192: -- Purpose
1193: -- Inserts or Updates two rows into gl_daily_rates for Ispeed Daily
1194: -- Rates API:
1195: -- one for the original conversion rate ( From Currency -> To Currency )
1196: -- one for the inverse conversion rate ( To Currency -> From Currency )
1197: --

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

1198: -- History
1199: -- 09-21-00 K Chang Created
1200: --
1201: -- Arguments
1202: -- All the columns of the table GL_DAILY_RATES and
1203: -- X_Average_Balances_Used Average Balances Used
1204: -- X_Euro_Currency Currency Code of EURO
1205: --
1206: -- Example

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

1203: -- X_Average_Balances_Used Average Balances Used
1204: -- X_Euro_Currency Currency Code of EURO
1205: --
1206: -- Example
1207: -- gl_daily_rates.Upload_Row(....);
1208: --
1209: -- Notes
1210: --
1211: PROCEDURE Upload_Row(X_Rowid IN OUT NOCOPY VARCHAR2,

Line 1251: from gl_daily_rates

1247:
1248: -- Get the row id
1249: select rowid
1250: into lrowid
1251: from gl_daily_rates
1252: where from_currency = X_From_Currency
1253: and to_currency = X_To_Currency
1254: and conversion_date = X_Conversion_Date
1255: and conversion_type = X_Conversion_Type;

Line 1260: from gl_daily_rates

1256:
1257: -- Get the row id for the inverse conversion rate
1258: select rowid
1259: into invrowid
1260: from gl_daily_rates
1261: where from_currency = X_To_Currency
1262: and to_currency = X_From_Currency
1263: and conversion_date = X_Conversion_Date
1264: and conversion_type = X_Conversion_Type;

Line 1268: GL_DAILY_RATES_PKG.update_row(

1264: and conversion_type = X_Conversion_Type;
1265:
1266: -- Update only if the record exists in the database
1267: --IF ( lrowid IS NOT NULL and invrowid IS NOT NULL) THEN
1268: GL_DAILY_RATES_PKG.update_row(
1269: X_Rowid =>lrowid,
1270: X_Inverse_Rowid =>invrowid,
1271: X_From_Currency =>X_From_Currency,
1272: X_To_Currency =>X_To_Currency,

Line 1305: GL_DAILY_RATES_PKG.insert_row(

1301: );
1302: --END IF;
1303:
1304: EXCEPTION WHEN NO_DATA_FOUND THEN
1305: GL_DAILY_RATES_PKG.insert_row(
1306: X_Rowid =>lrowid,
1307: X_Inverse_Rowid =>invrowid,
1308: X_From_Currency =>X_From_Currency,
1309: X_To_Currency =>X_To_Currency,

Line 1343: END GL_DAILY_RATES_PKG;

1339:
1340:
1341: END Upload_Row;
1342:
1343: END GL_DAILY_RATES_PKG;