DBA Data[Home] [Help]

APPS.PA_DISPLAY_PERIOD_MASKS dependencies on GL_PERIODS

Line 8: g_plan_period_start_name gl_periods.period_name%TYPE := NULL;

4: --g_module_name VARCHAR2(100) := 'pa.plsql.PA_DISPLAY_PERIOD_MASKS';
5:
6: --P_PA_DEBUG_MODE varchar2(1) := NVL(FND_PROFILE.value('PA_DEBUG_MODE'), 'N');
7:
8: g_plan_period_start_name gl_periods.period_name%TYPE := NULL;
9: g_plan_period_start_date gl_periods.end_date%TYPE := to_date(NULL);
10: g_plan_period_end_name gl_periods.period_name%TYPE := NULL;
11: g_plan_period_end_date gl_periods.end_date%TYPE := to_date(NULL);
12: g_cpp_start_date gl_periods.start_date%TYPE := to_date(NULL);

Line 9: g_plan_period_start_date gl_periods.end_date%TYPE := to_date(NULL);

5:
6: --P_PA_DEBUG_MODE varchar2(1) := NVL(FND_PROFILE.value('PA_DEBUG_MODE'), 'N');
7:
8: g_plan_period_start_name gl_periods.period_name%TYPE := NULL;
9: g_plan_period_start_date gl_periods.end_date%TYPE := to_date(NULL);
10: g_plan_period_end_name gl_periods.period_name%TYPE := NULL;
11: g_plan_period_end_date gl_periods.end_date%TYPE := to_date(NULL);
12: g_cpp_start_date gl_periods.start_date%TYPE := to_date(NULL);
13: g_cpp_end_date gl_periods.end_date%TYPE := to_date(NULL);

Line 10: g_plan_period_end_name gl_periods.period_name%TYPE := NULL;

6: --P_PA_DEBUG_MODE varchar2(1) := NVL(FND_PROFILE.value('PA_DEBUG_MODE'), 'N');
7:
8: g_plan_period_start_name gl_periods.period_name%TYPE := NULL;
9: g_plan_period_start_date gl_periods.end_date%TYPE := to_date(NULL);
10: g_plan_period_end_name gl_periods.period_name%TYPE := NULL;
11: g_plan_period_end_date gl_periods.end_date%TYPE := to_date(NULL);
12: g_cpp_start_date gl_periods.start_date%TYPE := to_date(NULL);
13: g_cpp_end_date gl_periods.end_date%TYPE := to_date(NULL);
14: --g_tab_deleted boolean := FALSE;

Line 11: g_plan_period_end_date gl_periods.end_date%TYPE := to_date(NULL);

7:
8: g_plan_period_start_name gl_periods.period_name%TYPE := NULL;
9: g_plan_period_start_date gl_periods.end_date%TYPE := to_date(NULL);
10: g_plan_period_end_name gl_periods.period_name%TYPE := NULL;
11: g_plan_period_end_date gl_periods.end_date%TYPE := to_date(NULL);
12: g_cpp_start_date gl_periods.start_date%TYPE := to_date(NULL);
13: g_cpp_end_date gl_periods.end_date%TYPE := to_date(NULL);
14: --g_tab_deleted boolean := FALSE;
15:

Line 12: g_cpp_start_date gl_periods.start_date%TYPE := to_date(NULL);

8: g_plan_period_start_name gl_periods.period_name%TYPE := NULL;
9: g_plan_period_start_date gl_periods.end_date%TYPE := to_date(NULL);
10: g_plan_period_end_name gl_periods.period_name%TYPE := NULL;
11: g_plan_period_end_date gl_periods.end_date%TYPE := to_date(NULL);
12: g_cpp_start_date gl_periods.start_date%TYPE := to_date(NULL);
13: g_cpp_end_date gl_periods.end_date%TYPE := to_date(NULL);
14: --g_tab_deleted boolean := FALSE;
15:
16: -- Bug Fix 3671424.

Line 13: g_cpp_end_date gl_periods.end_date%TYPE := to_date(NULL);

9: g_plan_period_start_date gl_periods.end_date%TYPE := to_date(NULL);
10: g_plan_period_end_name gl_periods.period_name%TYPE := NULL;
11: g_plan_period_end_date gl_periods.end_date%TYPE := to_date(NULL);
12: g_cpp_start_date gl_periods.start_date%TYPE := to_date(NULL);
13: g_cpp_end_date gl_periods.end_date%TYPE := to_date(NULL);
14: --g_tab_deleted boolean := FALSE;
15:
16: -- Bug Fix 3671424.
17: -- Removing the hard coded string proeceeding and succeding in the code

Line 46: -- gl_periods_start_date_csr uses the decode function as follows :

42:
43: l_current_period_start_date DATE; --RETURN value
44:
45: /*
46: -- gl_periods_start_date_csr uses the decode function as follows :
47: -- if time phase code = 'G' then use accounted_period_type
48: -- if time phase code = 'P' then use pa_period_type
49: */
50:

Line 52: CURSOR gl_periods_start_date_csr IS

48: -- if time phase code = 'P' then use pa_period_type
49: */
50:
51:
52: CURSOR gl_periods_start_date_csr IS
53: SELECT gp.start_date
54: ,gp.end_date
55: FROM gl_periods gp
56: WHERE gp.period_name = p_current_planning_period

Line 55: FROM gl_periods gp

51:
52: CURSOR gl_periods_start_date_csr IS
53: SELECT gp.start_date
54: ,gp.end_date
55: FROM gl_periods gp
56: WHERE gp.period_name = p_current_planning_period
57: AND gp.period_set_name = p_period_set_name
58: AND gp.period_type = decode(P_time_phase_code,'G',p_accounted_period_type,'P',P_pa_period_type)
59: AND gp.adjustment_period_flag = 'N';

Line 61: gl_periods_start_date_rec gl_periods_start_date_csr%ROWTYPE;

57: AND gp.period_set_name = p_period_set_name
58: AND gp.period_type = decode(P_time_phase_code,'G',p_accounted_period_type,'P',P_pa_period_type)
59: AND gp.adjustment_period_flag = 'N';
60:
61: gl_periods_start_date_rec gl_periods_start_date_csr%ROWTYPE;
62:
63: BEGIN
64: OPEN gl_periods_start_date_csr;
65: FETCH gl_periods_start_date_csr INTO gl_periods_start_date_rec;

Line 64: OPEN gl_periods_start_date_csr;

60:
61: gl_periods_start_date_rec gl_periods_start_date_csr%ROWTYPE;
62:
63: BEGIN
64: OPEN gl_periods_start_date_csr;
65: FETCH gl_periods_start_date_csr INTO gl_periods_start_date_rec;
66: IF gl_periods_start_date_csr%NOTFOUND THEN
67: NULL;
68: --hr_utility.trace('get_current_period_start_date.gl_periods_start_date_csr does not contain anything! exception');

Line 65: FETCH gl_periods_start_date_csr INTO gl_periods_start_date_rec;

61: gl_periods_start_date_rec gl_periods_start_date_csr%ROWTYPE;
62:
63: BEGIN
64: OPEN gl_periods_start_date_csr;
65: FETCH gl_periods_start_date_csr INTO gl_periods_start_date_rec;
66: IF gl_periods_start_date_csr%NOTFOUND THEN
67: NULL;
68: --hr_utility.trace('get_current_period_start_date.gl_periods_start_date_csr does not contain anything! exception');
69: g_cpp_start_date := NULL;

Line 66: IF gl_periods_start_date_csr%NOTFOUND THEN

62:
63: BEGIN
64: OPEN gl_periods_start_date_csr;
65: FETCH gl_periods_start_date_csr INTO gl_periods_start_date_rec;
66: IF gl_periods_start_date_csr%NOTFOUND THEN
67: NULL;
68: --hr_utility.trace('get_current_period_start_date.gl_periods_start_date_csr does not contain anything! exception');
69: g_cpp_start_date := NULL;
70: g_cpp_end_date := NULL;

Line 68: --hr_utility.trace('get_current_period_start_date.gl_periods_start_date_csr does not contain anything! exception');

64: OPEN gl_periods_start_date_csr;
65: FETCH gl_periods_start_date_csr INTO gl_periods_start_date_rec;
66: IF gl_periods_start_date_csr%NOTFOUND THEN
67: NULL;
68: --hr_utility.trace('get_current_period_start_date.gl_periods_start_date_csr does not contain anything! exception');
69: g_cpp_start_date := NULL;
70: g_cpp_end_date := NULL;
71: ELSE
72: l_current_period_start_date := gl_periods_start_date_rec.start_date;

Line 72: l_current_period_start_date := gl_periods_start_date_rec.start_date;

68: --hr_utility.trace('get_current_period_start_date.gl_periods_start_date_csr does not contain anything! exception');
69: g_cpp_start_date := NULL;
70: g_cpp_end_date := NULL;
71: ELSE
72: l_current_period_start_date := gl_periods_start_date_rec.start_date;
73:
74: g_cpp_start_date := gl_periods_start_date_rec.start_date;
75: g_cpp_end_date := gl_periods_start_date_rec.end_date;
76:

Line 74: g_cpp_start_date := gl_periods_start_date_rec.start_date;

70: g_cpp_end_date := NULL;
71: ELSE
72: l_current_period_start_date := gl_periods_start_date_rec.start_date;
73:
74: g_cpp_start_date := gl_periods_start_date_rec.start_date;
75: g_cpp_end_date := gl_periods_start_date_rec.end_date;
76:
77: --hr_utility.trace('g_cpp_start_date := '||to_char(g_cpp_start_date));
78: --hr_utility.trace('g_cpp_end_date := '||to_char(g_cpp_end_date));

Line 75: g_cpp_end_date := gl_periods_start_date_rec.end_date;

71: ELSE
72: l_current_period_start_date := gl_periods_start_date_rec.start_date;
73:
74: g_cpp_start_date := gl_periods_start_date_rec.start_date;
75: g_cpp_end_date := gl_periods_start_date_rec.end_date;
76:
77: --hr_utility.trace('g_cpp_start_date := '||to_char(g_cpp_start_date));
78: --hr_utility.trace('g_cpp_end_date := '||to_char(g_cpp_end_date));
79:

Line 81: CLOSE gl_periods_start_date_csr;

77: --hr_utility.trace('g_cpp_start_date := '||to_char(g_cpp_start_date));
78: --hr_utility.trace('g_cpp_end_date := '||to_char(g_cpp_end_date));
79:
80: END IF;
81: CLOSE gl_periods_start_date_csr;
82:
83: RETURN l_current_period_start_date;
84:
85: END get_current_period_start_date;

Line 102: FROM gl_periods gp

98:
99: CURSOR plan_period_end_csr IS
100: SELECT gp.end_date
101: ,gp.period_name
102: FROM gl_periods gp
103: WHERE p_planning_end_date BETWEEN gp.start_date AND gp.end_date
104: AND gp.period_set_name = p_period_set_name
105: AND gp.period_type = decode(P_time_phase_code,'G',p_accounted_period_type,'P',P_pa_period_type)
106: AND gp.adjustment_period_flag = 'N';

Line 143: FROM gl_periods gp

139:
140: CURSOR plan_period_start_csr IS
141: SELECT gp.start_date
142: ,gp.period_name
143: FROM gl_periods gp
144: WHERE p_planning_start_date BETWEEN gp.start_date AND gp.end_date
145: AND gp.period_set_name = p_period_set_name
146: AND gp.period_type = decode(P_time_phase_code,'G',p_accounted_period_type,'P',P_pa_period_type)
147: AND gp.adjustment_period_flag = 'N';

Line 174: -- before anchor date records from gl_periods

170: /* get_period_mask_start() returns the min from_anchor_start from pa_period_mask_details
171: -- it will not return rows that have an from_anchor_start with -99999 or 99999
172: -- these are flags for preceeding and suceeding buckets
173: -- this function is called from get_periods to populate the pl/sql table with the
174: -- before anchor date records from gl_periods
175: */
176: FUNCTION get_period_mask_start( p_period_mask_id IN pa_period_mask_details.period_mask_id%TYPE) RETURN NUMBER
177: IS
178:

Line 213: -- after anchor date records from gl_periods

209: /* get_period_mask_end() returns the max from_anchor_end from pa_period_mask_details
210: -- it will not return rows that have an from_anchor_start with -99999 or 99999
211: -- these are flags for preceeding and suceeding buckets
212: -- this function is called from get_periods to populate the pl/sql table with the
213: -- after anchor date records from gl_periods
214: */
215: FUNCTION get_period_mask_end ( p_period_mask_id IN pa_period_mask_details.period_mask_id%TYPE) RETURN NUMBER
216: IS
217:

Line 253: -- it populates the periods_tab pl/sql table with rows of data from gl_periods

249:
250:
251: /*
252: -- get_periods() is the main function of this package
253: -- it populates the periods_tab pl/sql table with rows of data from gl_periods
254: -- within the masks start and end periods
255: -- it will also set the global variables g_preceeding_end and g_suceeding_start
256: -- these will be used for the proceeding buckets end period and suceeding buckets start period
257: -- get_periods will return 1 if it populates periods_tab pl/sql table successfully

Line 277: -- get_current_period_start_date(),get_gl_periods_before_csr,get_gl_periods_after_csr

273:
274:
275: /*
276: -- get_name_and_type_csr is used to select the parameters needed for
277: -- get_current_period_start_date(),get_gl_periods_before_csr,get_gl_periods_after_csr
278: -- get_current_period_start_date() must return a start date for get_gl_periods_before_csr
279: -- and get_gl_periods_after_csr to run
280: -- period_set_name and accounted_period_type exist in table gl_set_of_books
281: -- current_planning_period and period_mask_id exist in table pa_budget_versions

Line 278: -- get_current_period_start_date() must return a start date for get_gl_periods_before_csr

274:
275: /*
276: -- get_name_and_type_csr is used to select the parameters needed for
277: -- get_current_period_start_date(),get_gl_periods_before_csr,get_gl_periods_after_csr
278: -- get_current_period_start_date() must return a start date for get_gl_periods_before_csr
279: -- and get_gl_periods_after_csr to run
280: -- period_set_name and accounted_period_type exist in table gl_set_of_books
281: -- current_planning_period and period_mask_id exist in table pa_budget_versions
282: -- pa_period_type exists in pa_implementations_all

Line 279: -- and get_gl_periods_after_csr to run

275: /*
276: -- get_name_and_type_csr is used to select the parameters needed for
277: -- get_current_period_start_date(),get_gl_periods_before_csr,get_gl_periods_after_csr
278: -- get_current_period_start_date() must return a start date for get_gl_periods_before_csr
279: -- and get_gl_periods_after_csr to run
280: -- period_set_name and accounted_period_type exist in table gl_set_of_books
281: -- current_planning_period and period_mask_id exist in table pa_budget_versions
282: -- pa_period_type exists in pa_implementations_all
283: -- to find the time phase code decode is used

Line 323: -- get_gl_periods_before_csr returns all rows from gl_periods

319:
320: get_name_and_type_rec get_name_and_type_csr%ROWTYPE;
321:
322: /*
323: -- get_gl_periods_before_csr returns all rows from gl_periods
324: -- before or equal to current planning period start date
325: -- get_gl_periods_before_csr uses the decode function use the correct period type GL and PA periods
326: -- G = 'GL' and P = 'PA'
327: */

Line 325: -- get_gl_periods_before_csr uses the decode function use the correct period type GL and PA periods

321:
322: /*
323: -- get_gl_periods_before_csr returns all rows from gl_periods
324: -- before or equal to current planning period start date
325: -- get_gl_periods_before_csr uses the decode function use the correct period type GL and PA periods
326: -- G = 'GL' and P = 'PA'
327: */
328:
329: -- Bug Fix 3663107.

Line 335: -- Due to the where conditions in the cursor to restrict the gl periods before the

331: -- where condition in this cursos.
332: -- Consider the scenario where Current Planning Period is prior to the planning
333: -- Start Date.
334: -- Current Planning Period is JAN-03 and Planning Start Date is 02-MAR-03.
335: -- Due to the where conditions in the cursor to restrict the gl periods before the
336: -- current planning period and falling between the planning dates is not
337: -- returning any values thus resulting into the wrong mask.
338: --
339: -- Need to remove the where condition which assumes that the current planning

Line 360: CURSOR get_gl_periods_before_csr IS

356: -- pp.end_date <= pp.planning_end_date)))
357:
358: -- End of Fix for Bug 3663107.
359:
360: CURSOR get_gl_periods_before_csr IS
361: SELECT *
362: FROM gl_periods gp
363: WHERE gp.period_set_name = l_period_set_name
364: AND gp.period_type = decode(l_time_phase_code,'G',l_accounted_period_type,

Line 362: FROM gl_periods gp

358: -- End of Fix for Bug 3663107.
359:
360: CURSOR get_gl_periods_before_csr IS
361: SELECT *
362: FROM gl_periods gp
363: WHERE gp.period_set_name = l_period_set_name
364: AND gp.period_type = decode(l_time_phase_code,'G',l_accounted_period_type,
365: 'P',l_pa_period_type)
366: AND gp.start_date <= l_cpp_start_date

Line 381: -- get_gl_periods_after_csr returns all rows from gl_periods

377: -- AND l_cpp_start_date between g_plan_period_start_date and g_plan_period_end_datE
378: ORDER BY gp.start_date DESC;
379:
380: /*
381: -- get_gl_periods_after_csr returns all rows from gl_periods
382: -- after current planning period start date
383: -- get_gl_periods_before_csr uses the decode function use the correct period type GL and PA periods
384: -- G = 'GL' and P = 'PA'
385: */

Line 383: -- get_gl_periods_before_csr uses the decode function use the correct period type GL and PA periods

379:
380: /*
381: -- get_gl_periods_after_csr returns all rows from gl_periods
382: -- after current planning period start date
383: -- get_gl_periods_before_csr uses the decode function use the correct period type GL and PA periods
384: -- G = 'GL' and P = 'PA'
385: */
386: -- Bug Fix 3663107.
387: -- The display mask is not forming properly. This is happening because of the

Line 392: -- Due to the where conditions in the cursor to restrict the gl periods after the

388: -- where condition in this cursos.
389: -- Consider the scenario where Current Planning Period is after/between the planning
390: -- Start Date/dates.
391: -- Current Planning Period is APR-03 and Planning Dates are 02-MAR-03 to 31-DEC-03.
392: -- Due to the where conditions in the cursor to restrict the gl periods after the
393: -- current planning period and falling between the planning dates is not
394: -- returning proper values and resulting into the wrong mask.
395: --
396: -- Need to remove the where condition which assumes that the current planning

Line 415: CURSOR get_gl_periods_after_csr IS

411: -- pp.end_date <= pp.planning_end_date)))
412:
413: -- End of Fix for Bug 3663107.
414:
415: CURSOR get_gl_periods_after_csr IS
416: SELECT *
417: FROM gl_periods gp
418: WHERE gp.period_set_name = l_period_set_name
419: AND gp.period_type = decode(l_time_phase_code,'G',l_accounted_period_type,

Line 417: FROM gl_periods gp

413: -- End of Fix for Bug 3663107.
414:
415: CURSOR get_gl_periods_after_csr IS
416: SELECT *
417: FROM gl_periods gp
418: WHERE gp.period_set_name = l_period_set_name
419: AND gp.period_type = decode(l_time_phase_code,'G',l_accounted_period_type,
420: 'P',l_pa_period_type)
421: AND gp.start_date > l_cpp_start_date

Line 601: FOR rec IN get_gl_periods_before_csr

597: END IF;
598: -----------------BEFORE RECORDS -------------
599: l_count := 0;
600:
601: FOR rec IN get_gl_periods_before_csr
602: LOOP
603: IF l_count >= g_get_mask_start THEN
604: periods_tab(l_count) := rec;
605: l_count := l_count - 1;

Line 613: FOR rec in get_gl_periods_after_csr

609: END LOOP;
610:
611: ---------------AFTER RECORDS -----------------------
612: l_count := 0;
613: FOR rec in get_gl_periods_after_csr
614: LOOP
615: l_count := l_count + 1;
616: IF l_count <= g_get_mask_end THEN
617: periods_tab(l_count) := rec;

Line 691: l_min_start_period gl_periods.period_name%TYPE;

687: -- are used by the start_period, end_period, start_date, and end_date functions
688: */
689: FUNCTION get_min_start_period RETURN VARCHAR2
690: IS
691: l_min_start_period gl_periods.period_name%TYPE;
692:
693: BEGIN
694: l_min_start_period := periods_tab(periods_tab.FIRST).period_name;
695: --hr_utility.trace('l_min_start_period :='||l_min_start_period);

Line 704: l_max_start_period gl_periods.period_name%TYPE;

700:
701:
702: FUNCTION get_max_end_period RETURN VARCHAR2
703: IS
704: l_max_start_period gl_periods.period_name%TYPE;
705:
706: BEGIN
707: l_max_start_period := periods_tab(periods_tab.LAST).period_name;
708: --hr_utility.trace('l_max_start_period :='||l_max_start_period);

Line 748: -- THe gl periods period name is only 15 chars long where

744: FUNCTION start_period ( p_from_anchor_position IN pa_period_mask_details.from_anchor_position%TYPE ) RETURN VARCHAR2
745: IS
746:
747: -- Bug 3671424.
748: -- THe gl periods period name is only 15 chars long where
749: -- as our local variable may need to store a string preceeding
750: -- periods or succeeding periods.
751: -- so making it longer than 15 by changing it to lookups meaning %type.
752:

Line 753: --l_start_period gl_periods.period_name%TYPE;

749: -- as our local variable may need to store a string preceeding
750: -- periods or succeeding periods.
751: -- so making it longer than 15 by changing it to lookups meaning %type.
752:
753: --l_start_period gl_periods.period_name%TYPE;
754: l_start_period pa_lookups.meaning%TYPE;
755:
756: CURSOR get_period_mask_details_csr IS
757: SELECT from_anchor_start

Line 823: -- THe gl periods period name is only 15 chars long where

819: FUNCTION end_period ( p_from_anchor_position IN pa_period_mask_details.from_anchor_position%TYPE ) RETURN VARCHAR2
820: IS
821:
822: -- Bug 3671424.
823: -- THe gl periods period name is only 15 chars long where
824: -- as our local variable may need to store a string preceeding
825: -- periods or succeeding periods.
826: -- so making it longer than 15 by changing it to lookups meaning %type.
827:

Line 829: --l_end_period gl_periods.period_name%TYPE;

825: -- periods or succeeding periods.
826: -- so making it longer than 15 by changing it to lookups meaning %type.
827:
828:
829: --l_end_period gl_periods.period_name%TYPE;
830: l_end_period pa_lookups.meaning%TYPE;
831:
832: CURSOR get_period_mask_details_csr IS
833: SELECT from_anchor_start

Line 1104: SELECT DISTINCT(period_name) into l_curr_plan_period FROM gl_periods where period_name=p_current_planning_period;

1100: end if;
1101: -- Fix for Bug 4898791
1102: BEGIN
1103: l_curr_plan_period := null;
1104: SELECT DISTINCT(period_name) into l_curr_plan_period FROM gl_periods where period_name=p_current_planning_period;
1105: exception
1106: when no_data_found
1107: then
1108: X_Return_Status := Fnd_Api.G_Ret_Sts_Error;