113: PROCEDURE get_period_details (p_proc_period_type IN VARCHAR2,
114: p_base_period_type OUT NOCOPY VARCHAR2,
115: p_multiple OUT NOCOPY NUMBER) IS
116: --
117: l_no_periods per_time_period_types.number_per_fiscal_year%type;
118: --
119: l_proc VARCHAR2(100);
120: --
121:
123: l_cached BOOLEAN := false;
124:
125: CURSOR c_get_no_periods IS
126: SELECT number_per_fiscal_year
127: FROM per_time_period_types
128: WHERE period_type = p_proc_period_type;
129:
130: BEGIN
131:
139: --
140:
141: --Let us check the cached table
142:
143: l_iter := g_per_time_period_types_ct.first;
144: WHILE l_iter IS NOT NULL
145: LOOP
146: if (g_per_time_period_types_ct(l_iter).p_proc_period_type = p_proc_period_type)
147: then
142:
143: l_iter := g_per_time_period_types_ct.first;
144: WHILE l_iter IS NOT NULL
145: LOOP
146: if (g_per_time_period_types_ct(l_iter).p_proc_period_type = p_proc_period_type)
147: then
148: l_no_periods := g_per_time_period_types_ct(l_iter).number_per_fiscal_year;
149: l_cached := true;
150: exit;
144: WHILE l_iter IS NOT NULL
145: LOOP
146: if (g_per_time_period_types_ct(l_iter).p_proc_period_type = p_proc_period_type)
147: then
148: l_no_periods := g_per_time_period_types_ct(l_iter).number_per_fiscal_year;
149: l_cached := true;
150: exit;
151: end if;
152: l_iter := g_per_time_period_types_ct.next(l_iter);
148: l_no_periods := g_per_time_period_types_ct(l_iter).number_per_fiscal_year;
149: l_cached := true;
150: exit;
151: end if;
152: l_iter := g_per_time_period_types_ct.next(l_iter);
153: END LOOP;
154:
155:
156: if (not l_cached)
158: OPEN c_get_no_periods;
159: FETCH c_get_no_periods INTO l_no_periods;
160: CLOSE c_get_no_periods;
161:
162: l_iter := nvl(g_per_time_period_types_ct.last,0)+1;
163: g_per_time_period_types_ct(l_iter).p_proc_period_type := p_proc_period_type;
164: g_per_time_period_types_ct(l_iter).number_per_fiscal_year := l_no_periods;
165: end if;
166: --
159: FETCH c_get_no_periods INTO l_no_periods;
160: CLOSE c_get_no_periods;
161:
162: l_iter := nvl(g_per_time_period_types_ct.last,0)+1;
163: g_per_time_period_types_ct(l_iter).p_proc_period_type := p_proc_period_type;
164: g_per_time_period_types_ct(l_iter).number_per_fiscal_year := l_no_periods;
165: end if;
166: --
167: if g_debug then
160: CLOSE c_get_no_periods;
161:
162: l_iter := nvl(g_per_time_period_types_ct.last,0)+1;
163: g_per_time_period_types_ct(l_iter).p_proc_period_type := p_proc_period_type;
164: g_per_time_period_types_ct(l_iter).number_per_fiscal_year := l_no_periods;
165: end if;
166: --
167: if g_debug then
168: hr_utility.set_location(l_proc, 20);