DBA Data[Home] [Help]

APPS.HRI_TIME_C dependencies on GL_PERIODS

Line 204: insert into HRI_TIME_GL_PERIODS

200: l_updated varchar2(1);
201:
202: begin
203:
204: insert into HRI_TIME_GL_PERIODS
205: (ent_period_id,
206: ent_qtr_id,
207: ent_year_id,
208: sequence,

Line 229: from gl_periods

225: sysdate,
226: g_user_id,
227: g_user_id,
228: g_login_id
229: from gl_periods
230: where period_set_name = g_period_set_name
231: and period_type = g_period_type
232: and adjustment_period_flag='N'
233: and start_date <= p_to_date

Line 260: from HRI_TIME_GL_PERIODS)

256: --sequence,
257: name,
258: start_date,
259: end_date
260: from HRI_TIME_GL_PERIODS)
261: where rownum = 1;
262: EXCEPTION
263: WHEN NO_DATA_FOUND THEN
264: l_updated := 'N';

Line 385: l_period_year gl_periods.period_year%TYPE;

381: l_week_num number;
382: l_p445_num number;
383: l_year_num number;
384: l_day_row number;
385: l_period_year gl_periods.period_year%TYPE;
386: l_quarter_num gl_periods.quarter_num%TYPE;
387: l_period_num gl_periods.period_num%TYPE;
388: l_start_date gl_periods.start_date%TYPE;
389: l_end_date gl_periods.end_date%TYPE;

Line 386: l_quarter_num gl_periods.quarter_num%TYPE;

382: l_p445_num number;
383: l_year_num number;
384: l_day_row number;
385: l_period_year gl_periods.period_year%TYPE;
386: l_quarter_num gl_periods.quarter_num%TYPE;
387: l_period_num gl_periods.period_num%TYPE;
388: l_start_date gl_periods.start_date%TYPE;
389: l_end_date gl_periods.end_date%TYPE;
390: l_quarter_start_date gl_periods.quarter_start_date%TYPE;

Line 387: l_period_num gl_periods.period_num%TYPE;

383: l_year_num number;
384: l_day_row number;
385: l_period_year gl_periods.period_year%TYPE;
386: l_quarter_num gl_periods.quarter_num%TYPE;
387: l_period_num gl_periods.period_num%TYPE;
388: l_start_date gl_periods.start_date%TYPE;
389: l_end_date gl_periods.end_date%TYPE;
390: l_quarter_start_date gl_periods.quarter_start_date%TYPE;
391: l_quarter_end_date gl_periods.quarter_start_date%TYPE;

Line 388: l_start_date gl_periods.start_date%TYPE;

384: l_day_row number;
385: l_period_year gl_periods.period_year%TYPE;
386: l_quarter_num gl_periods.quarter_num%TYPE;
387: l_period_num gl_periods.period_num%TYPE;
388: l_start_date gl_periods.start_date%TYPE;
389: l_end_date gl_periods.end_date%TYPE;
390: l_quarter_start_date gl_periods.quarter_start_date%TYPE;
391: l_quarter_end_date gl_periods.quarter_start_date%TYPE;
392: l_year_start_date gl_periods.year_start_date%TYPE;

Line 389: l_end_date gl_periods.end_date%TYPE;

385: l_period_year gl_periods.period_year%TYPE;
386: l_quarter_num gl_periods.quarter_num%TYPE;
387: l_period_num gl_periods.period_num%TYPE;
388: l_start_date gl_periods.start_date%TYPE;
389: l_end_date gl_periods.end_date%TYPE;
390: l_quarter_start_date gl_periods.quarter_start_date%TYPE;
391: l_quarter_end_date gl_periods.quarter_start_date%TYPE;
392: l_year_start_date gl_periods.year_start_date%TYPE;
393: l_year_end_date gl_periods.year_start_date%TYPE;

Line 390: l_quarter_start_date gl_periods.quarter_start_date%TYPE;

386: l_quarter_num gl_periods.quarter_num%TYPE;
387: l_period_num gl_periods.period_num%TYPE;
388: l_start_date gl_periods.start_date%TYPE;
389: l_end_date gl_periods.end_date%TYPE;
390: l_quarter_start_date gl_periods.quarter_start_date%TYPE;
391: l_quarter_end_date gl_periods.quarter_start_date%TYPE;
392: l_year_start_date gl_periods.year_start_date%TYPE;
393: l_year_end_date gl_periods.year_start_date%TYPE;
394: l_count number;

Line 391: l_quarter_end_date gl_periods.quarter_start_date%TYPE;

387: l_period_num gl_periods.period_num%TYPE;
388: l_start_date gl_periods.start_date%TYPE;
389: l_end_date gl_periods.end_date%TYPE;
390: l_quarter_start_date gl_periods.quarter_start_date%TYPE;
391: l_quarter_end_date gl_periods.quarter_start_date%TYPE;
392: l_year_start_date gl_periods.year_start_date%TYPE;
393: l_year_end_date gl_periods.year_start_date%TYPE;
394: l_count number;
395:

Line 392: l_year_start_date gl_periods.year_start_date%TYPE;

388: l_start_date gl_periods.start_date%TYPE;
389: l_end_date gl_periods.end_date%TYPE;
390: l_quarter_start_date gl_periods.quarter_start_date%TYPE;
391: l_quarter_end_date gl_periods.quarter_start_date%TYPE;
392: l_year_start_date gl_periods.year_start_date%TYPE;
393: l_year_end_date gl_periods.year_start_date%TYPE;
394: l_count number;
395:
396: cursor ent_period_cur (day date) is

Line 393: l_year_end_date gl_periods.year_start_date%TYPE;

389: l_end_date gl_periods.end_date%TYPE;
390: l_quarter_start_date gl_periods.quarter_start_date%TYPE;
391: l_quarter_end_date gl_periods.quarter_start_date%TYPE;
392: l_year_start_date gl_periods.year_start_date%TYPE;
393: l_year_end_date gl_periods.year_start_date%TYPE;
394: l_count number;
395:
396: cursor ent_period_cur (day date) is
397: select period_year, quarter_num, period_num, start_date, end_date, quarter_start_date, year_start_date

Line 398: from gl_periods

394: l_count number;
395:
396: cursor ent_period_cur (day date) is
397: select period_year, quarter_num, period_num, start_date, end_date, quarter_start_date, year_start_date
398: from gl_periods
399: where adjustment_period_flag='N'
400: and period_set_name=g_period_set_name
401: and period_type=g_period_type
402: and day between start_date and end_date;

Line 441: from gl_periods

437: l_p445_num := get_period_num(l_week_num);
438: l_year_num := to_char(l_day-g_week_offset,'iyyy');
439:
440: select max(end_date) into l_quarter_end_date
441: from gl_periods
442: where period_set_name=g_period_set_name
443: and period_type=g_period_type
444: and adjustment_period_flag='N'
445: and period_year=l_period_year

Line 449: from gl_periods

445: and period_year=l_period_year
446: and quarter_num=l_quarter_num;
447:
448: select max(end_date) into l_year_end_date
449: from gl_periods
450: where period_set_name=g_period_set_name
451: and period_type=g_period_type
452: and adjustment_period_flag='N'
453: and period_year=l_period_year;

Line 631: l_period_year gl_periods.period_year%TYPE;

627: l_week_num number;
628: l_p445_num number;
629: l_year_num number;
630: l_day_row number;
631: l_period_year gl_periods.period_year%TYPE;
632: l_quarter_num gl_periods.quarter_num%TYPE;
633: l_period_num gl_periods.period_num%TYPE;
634: l_start_date gl_periods.start_date%TYPE;
635: l_quarter_start_date gl_periods.quarter_start_date%TYPE;

Line 632: l_quarter_num gl_periods.quarter_num%TYPE;

628: l_p445_num number;
629: l_year_num number;
630: l_day_row number;
631: l_period_year gl_periods.period_year%TYPE;
632: l_quarter_num gl_periods.quarter_num%TYPE;
633: l_period_num gl_periods.period_num%TYPE;
634: l_start_date gl_periods.start_date%TYPE;
635: l_quarter_start_date gl_periods.quarter_start_date%TYPE;
636: l_year_start_date gl_periods.year_start_date%TYPE;

Line 633: l_period_num gl_periods.period_num%TYPE;

629: l_year_num number;
630: l_day_row number;
631: l_period_year gl_periods.period_year%TYPE;
632: l_quarter_num gl_periods.quarter_num%TYPE;
633: l_period_num gl_periods.period_num%TYPE;
634: l_start_date gl_periods.start_date%TYPE;
635: l_quarter_start_date gl_periods.quarter_start_date%TYPE;
636: l_year_start_date gl_periods.year_start_date%TYPE;
637:

Line 634: l_start_date gl_periods.start_date%TYPE;

630: l_day_row number;
631: l_period_year gl_periods.period_year%TYPE;
632: l_quarter_num gl_periods.quarter_num%TYPE;
633: l_period_num gl_periods.period_num%TYPE;
634: l_start_date gl_periods.start_date%TYPE;
635: l_quarter_start_date gl_periods.quarter_start_date%TYPE;
636: l_year_start_date gl_periods.year_start_date%TYPE;
637:
638: cursor ent_period_cur (day date) is

Line 635: l_quarter_start_date gl_periods.quarter_start_date%TYPE;

631: l_period_year gl_periods.period_year%TYPE;
632: l_quarter_num gl_periods.quarter_num%TYPE;
633: l_period_num gl_periods.period_num%TYPE;
634: l_start_date gl_periods.start_date%TYPE;
635: l_quarter_start_date gl_periods.quarter_start_date%TYPE;
636: l_year_start_date gl_periods.year_start_date%TYPE;
637:
638: cursor ent_period_cur (day date) is
639: select period_year, quarter_num, period_num, start_date, quarter_start_date, year_start_date

Line 636: l_year_start_date gl_periods.year_start_date%TYPE;

632: l_quarter_num gl_periods.quarter_num%TYPE;
633: l_period_num gl_periods.period_num%TYPE;
634: l_start_date gl_periods.start_date%TYPE;
635: l_quarter_start_date gl_periods.quarter_start_date%TYPE;
636: l_year_start_date gl_periods.year_start_date%TYPE;
637:
638: cursor ent_period_cur (day date) is
639: select period_year, quarter_num, period_num, start_date, quarter_start_date, year_start_date
640: from gl_periods

Line 640: from gl_periods

636: l_year_start_date gl_periods.year_start_date%TYPE;
637:
638: cursor ent_period_cur (day date) is
639: select period_year, quarter_num, period_num, start_date, quarter_start_date, year_start_date
640: from gl_periods
641: where adjustment_period_flag='N'
642: and period_set_name=g_period_set_name
643: and period_type=g_period_type
644: and day between start_date and end_date;

Line 1490: select period_year into l_period_year from gl_periods

1486:
1487: IF g_load_mode = 'INIT' THEN
1488: --If it is initial load the first year should not be populated for the prior_year_ent_period_id column
1489: --Used a decode for the same
1490: select period_year into l_period_year from gl_periods
1491: where l_from_date between start_date and end_date
1492: and period_set_name = g_period_set_name
1493: and period_type = g_period_type
1494: and adjustment_period_flag='N';

Line 1498: select period_year into l_period_year from gl_periods

1494: and adjustment_period_flag='N';
1495:
1496: ELSE
1497: --Incremental run
1498: select period_year into l_period_year from gl_periods
1499: where (select nvl(min(start_date), l_from_date) from HRI_time_ent_period) between start_date and end_date
1500: and period_set_name = g_period_set_name
1501: and period_type = g_period_type
1502: and adjustment_period_flag='N';

Line 1542: from gl_periods

1538: sysdate,
1539: g_user_id,
1540: g_user_id,
1541: g_login_id
1542: from gl_periods
1543: where period_set_name = g_period_set_name
1544: and period_type = g_period_type
1545: and adjustment_period_flag='N'
1546: and start_date <= l_to_date

Line 1673: select period_year into l_period_year from gl_periods

1669:
1670: IF g_load_mode = 'INIT' THEN
1671: --If it is initial load the first year should not be populated for the prior_year_ent_period_id column
1672: --Used a decode for the same
1673: select period_year into l_period_year from gl_periods
1674: where l_from_date between start_date and end_date
1675: and period_set_name = g_period_set_name
1676: and period_type = g_period_type
1677: and adjustment_period_flag='N';

Line 1681: select period_year into l_period_year from gl_periods

1677: and adjustment_period_flag='N';
1678:
1679: ELSE
1680: --Incremental run
1681: select period_year into l_period_year from gl_periods
1682: where (select nvl(min(start_date), l_from_date) from HRI_time_ent_qtr) between start_date and end_date
1683: and period_set_name = g_period_set_name
1684: and period_type = g_period_type
1685: and adjustment_period_flag='N';

Line 1723: from gl_periods glp,

1719: sysdate,
1720: g_user_id,
1721: g_user_id,
1722: g_login_id
1723: from gl_periods glp,
1724: (select period_year||quarter_num ent_qtr_pk_key, min(start_date) start_date, max(end_date) end_date
1725: from gl_periods
1726: where period_set_name=g_period_set_name
1727: and period_type=g_period_type

Line 1725: from gl_periods

1721: g_user_id,
1722: g_login_id
1723: from gl_periods glp,
1724: (select period_year||quarter_num ent_qtr_pk_key, min(start_date) start_date, max(end_date) end_date
1725: from gl_periods
1726: where period_set_name=g_period_set_name
1727: and period_type=g_period_type
1728: and adjustment_period_flag='N'
1729: group by period_year||quarter_num) gl2

Line 1825: select period_year into l_period_year from gl_periods

1821:
1822: IF g_load_mode = 'INIT' THEN
1823: --If it is initial load the first year should not be populated for the prior_year_ent_period_id column
1824: --Used a decode for the same
1825: select period_year into l_period_year from gl_periods
1826: where l_from_date between start_date and end_date
1827: and period_set_name = g_period_set_name
1828: and period_type = g_period_type
1829: and adjustment_period_flag='N';

Line 1833: select period_year into l_period_year from gl_periods where (select nvl(min(start_date), l_from_date) from HRI_time_ent_year)

1829: and adjustment_period_flag='N';
1830:
1831: ELSE
1832: --Incremental run
1833: select period_year into l_period_year from gl_periods where (select nvl(min(start_date), l_from_date) from HRI_time_ent_year)
1834: between start_date and end_date
1835: and period_set_name = g_period_set_name
1836: and period_type = g_period_type
1837: and adjustment_period_flag='N';

Line 1850: from gl_periods

1846:
1847: -- Bug 5624487
1848: delete from HRI_TIME_ENT_YEAR where ent_year_id in
1849: (select period_year
1850: from gl_periods
1851: where period_set_name = g_period_set_name
1852: and period_type = g_period_type
1853: and adjustment_period_flag='N'
1854: and start_date <= l_to_date

Line 1888: from gl_periods glp,

1884: sysdate last_update_date,
1885: g_user_id last_updated_by,
1886: g_user_id created_by,
1887: g_login_id last_update_login
1888: from gl_periods glp,
1889: (select period_year period_year, min(start_date) start_date, max(end_date) end_date
1890: from gl_periods
1891: where period_set_name=g_period_set_name
1892: and period_type=g_period_type

Line 1890: from gl_periods

1886: g_user_id created_by,
1887: g_login_id last_update_login
1888: from gl_periods glp,
1889: (select period_year period_year, min(start_date) start_date, max(end_date) end_date
1890: from gl_periods
1891: where period_set_name=g_period_set_name
1892: and period_type=g_period_type
1893: and adjustment_period_flag='N'
1894: and end_date <= l_end_date

Line 1987: gl_periods glp

1983: , glp.period_name
1984: , glp.start_date
1985: , glp.end_date
1986: from
1987: gl_periods glp
1988: , HRI_time_cal_name cal_name
1989: where glp.adjustment_period_flag = 'N'
1990: and glp.period_set_name = cal_name.period_set_name
1991: and glp.period_type = cal_name.period_type

Line 2026: gl_periods glp

2022: , glp.period_name
2023: , glp.start_date
2024: , glp.end_date
2025: from
2026: gl_periods glp
2027: , HRI_time_cal_name cal_name
2028: where glp.adjustment_period_flag = 'N'
2029: and glp.period_set_name = cal_name.period_set_name
2030: and glp.period_type = cal_name.period_type

Line 2101: from gl_periods glp, HRI_time_cal_name cal_name

2097: sysdate,
2098: g_user_id,
2099: g_user_id,
2100: g_login_id
2101: from gl_periods glp, HRI_time_cal_name cal_name
2102: where glp.adjustment_period_flag='N'
2103: and glp.period_set_name=cal_name.period_set_name
2104: and glp.period_type=cal_name.period_type;
2105:

Line 2152: gl_periods glp

2148: , to_char(glp.quarter_num)||', '||to_char(glp.period_year)
2149: , min(gl2.start_date)
2150: , max(gl2.end_date)
2151: from
2152: gl_periods glp
2153: , HRI_time_cal_name cal_name
2154: , (select period_set_name
2155: , period_type
2156: , period_year

Line 2161: gl_periods

2157: , quarter_num
2158: , min(start_date) start_date
2159: , max(end_date) end_date
2160: from
2161: gl_periods
2162: where adjustment_period_flag='N'
2163: group by
2164: period_set_name
2165: , period_type

Line 2215: gl_periods glp

2211: , to_char(glp.quarter_num)||', '||to_char(glp.period_year)
2212: , min(gl2.start_date)
2213: , max(gl2.end_date)
2214: from
2215: gl_periods glp
2216: , HRI_time_cal_name cal_name
2217: , (select period_set_name
2218: , period_type
2219: , period_year

Line 2224: gl_periods

2220: , quarter_num
2221: , min(start_date) start_date
2222: , max(end_date) end_date
2223: from
2224: gl_periods
2225: where adjustment_period_flag = 'N'
2226: group by
2227: period_set_name
2228: , period_type

Line 2300: from gl_periods glp, HRI_time_cal_name cal_name,

2296: sysdate,
2297: g_user_id,
2298: g_user_id,
2299: g_login_id
2300: from gl_periods glp, HRI_time_cal_name cal_name,
2301: (select period_set_name, period_type, period_year, quarter_num, min(start_date) start_date, max(end_date) end_date
2302: from gl_periods
2303: where adjustment_period_flag='N'
2304: group by period_set_name, period_type, period_year, quarter_num) gl2

Line 2302: from gl_periods

2298: g_user_id,
2299: g_login_id
2300: from gl_periods glp, HRI_time_cal_name cal_name,
2301: (select period_set_name, period_type, period_year, quarter_num, min(start_date) start_date, max(end_date) end_date
2302: from gl_periods
2303: where adjustment_period_flag='N'
2304: group by period_set_name, period_type, period_year, quarter_num) gl2
2305: where glp.adjustment_period_flag='N'
2306: and glp.period_set_name=cal_name.period_set_name

Line 2363: gl_periods glp

2359: , to_char(glp.period_year)
2360: , min(gl2.start_date)
2361: , max(gl2.end_date)
2362: from
2363: gl_periods glp
2364: , HRI_time_cal_name cal_name
2365: , (select period_set_name
2366: , period_type
2367: , period_year

Line 2371: gl_periods

2367: , period_year
2368: , min(start_date) start_date
2369: , max(end_date) end_date
2370: from
2371: gl_periods
2372: where adjustment_period_flag='N'
2373: group by
2374: period_set_name
2375: , period_type

Line 2417: gl_periods glp

2413: , to_char(glp.period_year)
2414: , min(gl2.start_date)
2415: , max(gl2.end_date)
2416: from
2417: gl_periods glp
2418: , HRI_time_cal_name cal_name
2419: , (select period_set_name
2420: , period_type
2421: , period_year

Line 2425: gl_periods

2421: , period_year
2422: , min(start_date) start_date
2423: , max(end_date) end_date
2424: from
2425: gl_periods
2426: where adjustment_period_flag = 'N'
2427: group by
2428: period_set_name
2429: , period_type

Line 2494: from gl_periods glp, HRI_time_cal_name cal_name,

2490: sysdate,
2491: g_user_id,
2492: g_user_id,
2493: g_login_id
2494: from gl_periods glp, HRI_time_cal_name cal_name,
2495: (select period_set_name, period_type, period_year, min(start_date) start_date, max(end_date) end_date
2496: from gl_periods
2497: where adjustment_period_flag='N'
2498: group by period_set_name, period_type, period_year) gl2

Line 2496: from gl_periods

2492: g_user_id,
2493: g_login_id
2494: from gl_periods glp, HRI_time_cal_name cal_name,
2495: (select period_set_name, period_type, period_year, min(start_date) start_date, max(end_date) end_date
2496: from gl_periods
2497: where adjustment_period_flag='N'
2498: group by period_set_name, period_type, period_year) gl2
2499: where glp.adjustment_period_flag='N'
2500: and glp.period_set_name=cal_name.period_set_name

Line 2648: truncate_table('HRI_TIME_GL_PERIODS');

2644: -- This is necessary because once initial load is over, there can be some changes in the already defined calendar
2645: -- which may result in a calendar not complying with the no. of days range allowed (365 +/- 14)
2646:
2647: IF l_validated = 'Y' THEN
2648: truncate_table('HRI_TIME_GL_PERIODS');
2649: l_period_updated := period_updated(l_min_date, l_max_date);
2650: IF (l_period_updated = 'Y' and p_load_mode <> 'INIT') THEN
2651: l_start_date := l_min_date;
2652: END IF; --l_period_updated

Line 2657: from gl_periods a

2653: END if; --l_validated
2654:
2655: begin
2656: select period_year into l_year
2657: from gl_periods a
2658: where a.period_set_name = g_period_set_name
2659: and a.period_type = g_period_type
2660: and a.adjustment_period_flag = 'N'
2661: and l_start_date between a.start_date and a.end_date;

Line 2669: from gl_periods a

2665: raise G_ENT_CALENDAR_NOT_FOUND;
2666: end;
2667:
2668: select min(a.start_date), max(end_date) into l_min_start_date, l_max_end_date
2669: from gl_periods a
2670: where a.period_set_name = g_period_set_name
2671: and a.period_type = g_period_type
2672: and a.adjustment_period_flag = 'N'
2673: and a.period_year = l_year;

Line 2693: from gl_periods a

2689:
2690: l_year := l_year + 1;
2691:
2692: select min(a.start_date), max(end_date) into l_min_start_date, l_max_end_date
2693: from gl_periods a
2694: where a.period_set_name = g_period_set_name
2695: and a.period_type = g_period_type
2696: and a.adjustment_period_flag = 'N'
2697: and a.period_year = l_year;

Line 2744: --truncate_table('HRI_TIME_GL_PERIODS');

2740: HRI_util.put_line('LOAD : '||'l_validated='||l_validated);
2741: HRI_util.put_line('');
2742: end if;
2743: if l_validated = 'Y' then
2744: --truncate_table('HRI_TIME_GL_PERIODS');
2745: --l_period_updated := period_updated(l_min_date, l_max_date);
2746: if g_debug_flag = 'Y' then
2747: HRI_util.put_line('LOAD : '||'l_period_updated='||l_period_updated);
2748: HRI_util.put_line('');

Line 2773: from gl_periods

2769: -- we compare the latest end date defined in GL and the latest end date in HRI_time_day
2770: -- to determine if there is new gl period added or not
2771: select max(end_date)
2772: into l_max_gl_date
2773: from gl_periods
2774: where period_set_name = g_period_set_name
2775: and period_type = g_period_type
2776: and adjustment_period_flag='N';
2777:

Line 3242: FROM gl_periods glp

3238:
3239: cursor new_cal is
3240: SELECT inline_view.period_set_name, inline_view.period_type, MAX(gp.creation_date)
3241: FROM ( SELECT DISTINCT glp.period_set_name , glp.period_type
3242: FROM gl_periods glp
3243: MINUS
3244: SELECT DISTINCT cal.period_set_name, cal.period_type
3245: FROM HRI_time_cal_name cal
3246: ) inline_view,

Line 3247: gl_periods gp

3243: MINUS
3244: SELECT DISTINCT cal.period_set_name, cal.period_type
3245: FROM HRI_time_cal_name cal
3246: ) inline_view,
3247: gl_periods gp
3248: WHERE inline_view.period_set_name = gp.period_set_name
3249: and inline_view.period_type = gp.period_type
3250:
3251: GROUP BY inline_view.period_set_name, inline_view.period_type

Line 4207: from gl_periods

4203: begin
4204:
4205: select max(end_date)
4206: into l_return_date
4207: from gl_periods
4208: where adjustment_period_flag = 'N'
4209: and period_set_name = l_period_set_name
4210: and period_type = l_period_type;
4211: