DBA Data[Home] [Help]

APPS.GL_PERIODS_PKG dependencies on GL_PERIODS

Line 1: PACKAGE BODY gl_periods_pkg AS

1: PACKAGE BODY gl_periods_pkg AS
2: /* $Header: gliprdeb.pls 120.8 2006/12/06 06:44:34 spala ship $ */
3:
4: --
5: -- PRIVATE FUNCTIONS

Line 68: FROM gl_periods

64: INTO does_exist
65: FROM dual
66: WHERE EXISTS
67: (SELECT 'still max'
68: FROM gl_periods
69: WHERE period_type = per_type
70: AND adjustment_period_flag = 'N'
71: AND end_date - start_date + 1 = max_len
72: AND rowid <> row_id);

Line 86: FROM gl_periods per

82: SET pt.max_regular_period_length =
83: (SELECT decode(call_mode,
84: 'D',max(end_date - start_date) + 1,
85: 'U',greatest(new_len, nvl(max(end_date-start_date)+1,0)))
86: FROM gl_periods per
87: WHERE per.adjustment_period_flag = 'N'
88: AND per.period_type = per_type
89: AND per.rowid <> row_id)
90: WHERE pt.period_type = per_type;

Line 278: FROM GL_PERIODS gp

274: period_num NUMBER,
275: row_id VARCHAR2) IS
276: CURSOR chk_duplicates IS
277: SELECT 'Duplicate'
278: FROM GL_PERIODS gp
279: WHERE gp.period_set_name =
280: check_unique_num.calendar_name
281: AND gp.period_type = check_unique_num.period_type
282: AND gp.period_year = check_unique_num.period_year

Line 315: FROM GL_PERIODS gp

311: period_name VARCHAR2,
312: row_id VARCHAR2) IS
313: CURSOR chk_duplicates IS
314: SELECT 'Duplicate'
315: FROM GL_PERIODS gp
316: WHERE gp.period_name = check_unique_name.period_name
317: AND gp.period_set_name =
318: check_unique_name.calendar_name
319: AND ( row_id IS NULL

Line 356: FROM gl_periods per

352: DECLARE
353: CURSOR get_data IS
354: SELECT per.period_set_name, per.period_type,
355: per.period_name, per.period_year
356: FROM gl_periods per
357: WHERE per.rowid = row_id;
358: BEGIN
359: OPEN get_data;
360: FETCH get_data INTO calendar_name, period_type, period_name, period_year;

Line 503: FROM GL_PERIODS

499: X_Description VARCHAR2
500: ) RETURN BOOLEAN IS
501: CURSOR C IS
502: SELECT *
503: FROM GL_PERIODS
504: WHERE rowid = X_Rowid
505: FOR UPDATE of Period_Set_Name NOWAIT;
506: Recinfo C%ROWTYPE;
507: BEGIN

Line 561: FROM GL_PERIODS

557: row_id VARCHAR2
558: ) RETURN BOOLEAN IS
559: CURSOR check_overlaps IS
560: SELECT 'Overlapping'
561: FROM GL_PERIODS
562: WHERE period_set_name = x_period_set_name
563: AND period_type = x_period_type
564: AND start_date <= x_end_date
565: AND end_date >= x_start_date

Line 624: FROM GL_PERIODS

620: BEGIN
621:
622: SELECT creation_date, rowid
623: INTO v_creation_date, v_rowid
624: FROM GL_PERIODS
625: WHERE period_set_name = X_Period_Set_Name
626: AND period_name = X_Period_Name;
627:
628: IF ( X_OWNER = 'SEED' ) THEN

Line 629: gl_periods_pkg.Update_Row (

625: WHERE period_set_name = X_Period_Set_Name
626: AND period_name = X_Period_Name;
627:
628: IF ( X_OWNER = 'SEED' ) THEN
629: gl_periods_pkg.Update_Row (
630: X_Rowid => v_rowid ,
631: X_Period_Set_Name => X_Period_Set_Name,
632: X_Period_Name => X_Period_Name,
633: X_Last_Update_Date => sysdate,

Line 660: gl_periods_pkg.Insert_Row (

656:
657: EXCEPTION
658: WHEN NO_DATA_FOUND THEN
659:
660: gl_periods_pkg.Insert_Row (
661: X_Rowid => v_rowid ,
662: X_Period_Set_Name => X_Period_Set_Name,
663: X_Period_Name => X_Period_Name,
664: X_Last_Update_Date => sysdate,

Line 721: CURSOR C IS SELECT rowid FROM GL_PERIODS

717: X_Attribute8 VARCHAR2,
718: X_Context VARCHAR2,
719: X_Adjustment_Period_Flag VARCHAR2
720: ) IS
721: CURSOR C IS SELECT rowid FROM GL_PERIODS
722: WHERE period_set_name = X_Period_Set_Name
723: AND period_name = X_Period_Name;
724:
725:

Line 787: INSERT INTO GL_PERIODS(

783: X_Last_Updated_By,
784: X_Last_Update_Login
785: );
786:
787: INSERT INTO GL_PERIODS(
788: period_set_name,
789: period_name,
790: last_update_date,
791: last_updated_by,

Line 896: FROM GL_PERIODS

892: X_Adjustment_Period_Flag VARCHAR2
893: ) IS
894: CURSOR C IS
895: SELECT *
896: FROM GL_PERIODS
897: WHERE rowid = X_Rowid
898: FOR UPDATE of Period_Set_Name NOWAIT;
899: Recinfo C%ROWTYPE;
900: BEGIN

Line 1005: FROM gl_periods

1001: ) IS
1002: CURSOR get_old_name IS
1003: SELECT period_name, start_date, end_date, period_year, quarter_num,
1004: adjustment_period_flag
1005: FROM gl_periods
1006: WHERE rowid = X_rowid;
1007:
1008: X_period_name_old VARCHAR2(15);
1009: x_start_date_old DATE;

Line 1020: IF (gl_periods_pkg.period_changed(X_Rowid,

1016:
1017: BEGIN
1018:
1019: -- Make sure you are allowed to change this period
1020: IF (gl_periods_pkg.period_changed(X_Rowid,
1021: X_Period_Set_Name,
1022: X_Period_Name,
1023: X_Start_Date,
1024: X_End_Date,

Line 1031: IF (gl_periods_pkg.check_period_used(X_Rowid)) THEN

1027: X_Period_Num,
1028: X_Quarter_Num,
1029: X_Entered_Period_Name,
1030: X_Description)) THEN
1031: IF (gl_periods_pkg.check_period_used(X_Rowid)) THEN
1032: fnd_message.set_name('SQLGL', 'GL_CALENDAR_PERIOD_IN_USE');
1033: app_exception.raise_exception;
1034: END IF;
1035: END IF;

Line 1103: UPDATE GL_PERIODS

1099: x_period_name_old, x_start_date_old);
1100: END IF;
1101: END IF;
1102:
1103: UPDATE GL_PERIODS
1104: SET
1105:
1106: period_set_name = X_Period_Set_Name,
1107: period_name = X_Period_Name,

Line 1181: FROM gl_periods

1177: SELECT period_name, period_set_name,
1178: start_date,period_year, quarter_num, period_type,
1179: adjustment_period_flag, end_date, period_num,
1180: last_updated_by,last_update_login
1181: FROM gl_periods
1182: WHERE rowid = X_rowid;
1183:
1184: X_period_name_old VARCHAR2(15);
1185: X_period_set_name VARCHAR2(15);

Line 1213: IF (gl_periods_pkg.check_period_used(X_Rowid)) THEN

1209: end if;
1210: CLOSE get_old_name;
1211:
1212: -- Make sure the period has never been used
1213: IF (gl_periods_pkg.check_period_used(X_Rowid)) THEN
1214: fnd_message.set_name('SQLGL', 'GL_CALENDAR_PERIOD_IN_USE');
1215: app_exception.raise_exception;
1216: END IF;
1217:

Line 1228: DELETE FROM GL_PERIODS

1224: fix_ar_periods('D', X_Period_Set_Name, X_Period_Type, NULL, NULL, NULL,
1225: x_period_name_old, x_start_date_old);
1226: END IF;
1227:
1228: DELETE FROM GL_PERIODS
1229: WHERE rowid = X_Rowid;
1230:
1231: if (SQL%NOTFOUND) then
1232: RAISE NO_DATA_FOUND;

Line 1282: -- Maintain quarter_start_date in GL_PERIODS and GL_PERIOD_STATUSES tables

1278: --x_quarter_start_date DATE;
1279:
1280: BEGIN
1281:
1282: -- Maintain quarter_start_date in GL_PERIODS and GL_PERIOD_STATUSES tables
1283: -- in Insert_row call to this procedure should be put before actual insert in the tables
1284: -- in Delete_Row call to this procedure should be put after actual update/delete
1285:
1286: -- For quarter_start_date get existing_quarter_start_date:

Line 1289: FROM gl_periods

1285:
1286: -- For quarter_start_date get existing_quarter_start_date:
1287: SELECT min(start_date)
1288: INTO existing_quarter_start_date
1289: FROM gl_periods
1290: WHERE
1291: period_set_name = x_period_set_name
1292: AND period_type = x_period_type
1293: AND period_year = x_period_year

Line 1308: UPDATE gl_periods

1304: END IF;
1305: END IF;
1306:
1307:
1308: UPDATE gl_periods
1309: SET quarter_start_date = x_quarter_start_date
1310: WHERE
1311: period_set_name = x_period_set_name
1312: AND quarter_num = x_quarter_num

Line 1344: --Maintain year_start_date in GL_PERIODS and GL_PERIOD_STATUSES tables

1340: --x_year_start_date DATE;
1341:
1342: BEGIN
1343:
1344: --Maintain year_start_date in GL_PERIODS and GL_PERIOD_STATUSES tables
1345:
1346: -- For year_start_date get existing_year_start_date:
1347: SELECT min(start_date)
1348: INTO existing_year_start_date

Line 1349: FROM gl_periods

1345:
1346: -- For year_start_date get existing_year_start_date:
1347: SELECT min(start_date)
1348: INTO existing_year_start_date
1349: FROM gl_periods
1350: WHERE
1351: period_set_name = x_period_set_name
1352: AND period_type = x_period_type
1353: AND period_year = x_period_year;

Line 1366: UPDATE gl_periods

1362: x_year_start_date := x_start_date;
1363: END IF;
1364: END IF;
1365:
1366: UPDATE gl_periods
1367: SET year_start_date = x_year_start_date
1368: WHERE
1369: period_set_name = x_period_set_name
1370: AND period_type = x_period_type

Line 1417: 'gl_periods_pkg.period_set_with_AB');

1413: EXCEPTION
1414: WHEN OTHERS THEN
1415: fnd_message.set_name('SQLGL', 'GL_UNHANDLED_EXCEPTION');
1416: fnd_message.set_token('PROCEDURE',
1417: 'gl_periods_pkg.period_set_with_AB');
1418: RAISE;
1419:
1420: END period_set_with_AB;
1421:

Line 1485: -- and year_start_date columns in the GL_PERIODS and GL_PERIOD_STATUSES

1481: x_LAST_UPDATE_LOGIN
1482: );
1483:
1484: -- the following is logic for maintaining the quarter_start_date
1485: -- and year_start_date columns in the GL_PERIODS and GL_PERIOD_STATUSES
1486: -- IF the year has changed:
1487: -- do 1.(maintain_year_start_date) and
1488: -- 2.(maintain_quarter_start_date) for:
1489: -- new year

Line 1635: GL_PERIODS_PKG.check_unique_num(calendar_name => Y_Period_Set_Name,

1631: v_number_per_fiscal_year NUMBER;
1632:
1633: BEGIN
1634: -- Check Unique Combination
1635: GL_PERIODS_PKG.check_unique_num(calendar_name => Y_Period_Set_Name,
1636: period_type => Y_Period_Type,
1637: period_year => Y_Period_Year,
1638: period_num => Y_Period_Num,
1639: row_id => Y_Rowid);

Line 1679: GL_PERIODS_PKG.Insert_Row(Y_Rowid,

1675: app_exception.raise_exception;
1676: END IF;
1677:
1678: -- Call the forms table handler.
1679: GL_PERIODS_PKG.Insert_Row(Y_Rowid,
1680: Y_Period_Set_Name,
1681: Y_Period_Name,
1682: Y_Last_Update_Date,
1683: Y_Last_Updated_By,

Line 1712: fnd_message.set_token('PROCEDURE', 'GL_PERIODS_PKG.Insert_Period');

1708: WHEN app_exceptions.application_exception THEN
1709: RAISE;
1710: WHEN OTHERS THEN
1711: fnd_message.set_name('SQLGL', 'GL_UNHANDLED_EXCEPTION');
1712: fnd_message.set_token('PROCEDURE', 'GL_PERIODS_PKG.Insert_Period');
1713: RAISE;
1714: END Insert_Period;
1715:
1716: PROCEDURE Update_Period(Y_Rowid IN OUT NOCOPY VARCHAR2,

Line 1752: FROM gl_periods

1748: quarter_num,
1749: entered_period_name,
1750: adjustment_period_flag,
1751: rowid
1752: FROM gl_periods
1753: WHERE period_set_name = Y_Period_Set_Name
1754: AND period_name = Y_Period_Name;
1755:
1756: CURSOR check_period_num IS

Line 1790: IF (GL_PERIODS_PKG.check_period_used(Y_Rowid)) THEN

1786: -- Check if the period has been used. If the period has been used,
1787: -- the period year, quarter number, period number, start date,
1788: -- end date, entered period name, and the adjustment flag fields
1789: -- cannot be updated.
1790: IF (GL_PERIODS_PKG.check_period_used(Y_Rowid)) THEN
1791: v_period_used_flag := 'Y';
1792: ELSE
1793: v_period_used_flag := 'N';
1794: END IF;

Line 1821: GL_PERIODS_PKG.check_unique_num(calendar_name => Y_Period_Set_Name,

1817: app_exception.raise_exception;
1818: END IF;
1819:
1820: -- Check Unique Combination.
1821: GL_PERIODS_PKG.check_unique_num(calendar_name => Y_Period_Set_Name,
1822: period_type => Y_Period_Type,
1823: period_year => Y_Period_Year,
1824: period_num => Y_Period_Num,
1825: row_id => Y_Rowid);

Line 1864: GL_PERIODS_PKG.Update_Row(Y_Rowid,

1860: app_exception.raise_exception;
1861: END IF;
1862:
1863: -- Call the forms table handler.
1864: GL_PERIODS_PKG.Update_Row(Y_Rowid,
1865: Y_Period_Set_Name,
1866: Y_Period_Name,
1867: Y_Last_Update_Date,
1868: Y_Last_Updated_By,

Line 1895: fnd_message.set_token('PROCEDURE', 'GL_PERIODS_PKG.Update_Period');

1891: WHEN app_exceptions.application_exception THEN
1892: RAISE;
1893: WHEN OTHERS THEN
1894: fnd_message.set_name('SQLGL', 'GL_UNHANDLED_EXCEPTION');
1895: fnd_message.set_token('PROCEDURE', 'GL_PERIODS_PKG.Update_Period');
1896: RAISE;
1897: END Update_Period;
1898:
1899: END gl_periods_pkg;

Line 1899: END gl_periods_pkg;

1895: fnd_message.set_token('PROCEDURE', 'GL_PERIODS_PKG.Update_Period');
1896: RAISE;
1897: END Update_Period;
1898:
1899: END gl_periods_pkg;