4: /*
5: * Procedure to cache the Organization ID for U1 screen
6: */
7:
8: l_debug varchar2(1) := NVL(FND_PROFILE.value('PA_DEBUG_MODE'), 'N');
9:
10: PROCEDURE SetU1OrganizationID (
11: p_organization_id IN NUMBER
12: )
113:
114: /*
115: * To Initialize the error stack
116: */
117: PA_DEBUG.Set_Curr_Function(
118: p_function => 'Get_Util_Ac_Parm',
119: p_process => 'PLSQL',
120: p_write_file => 'LOG',
121: p_debug_mode => p_debug_mode);
119: p_process => 'PLSQL',
120: p_write_file => 'LOG',
121: p_debug_mode => p_debug_mode);
122:
123: PA_DEBUG.g_err_stage := 'Process : Actuals Summarization';
124: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage
125: , p_write_mode => 1
126: , p_write_file => 'OUT');
127:
120: p_write_file => 'LOG',
121: p_debug_mode => p_debug_mode);
122:
123: PA_DEBUG.g_err_stage := 'Process : Actuals Summarization';
124: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage
125: , p_write_mode => 1
126: , p_write_file => 'OUT');
127:
128:
142: * Depending on Products Installed, Run Actuals
143: * Concurrent Processes
144: */
145: IF l_debug ='Y'THEN -- bug 2674619
146: PA_DEBUG.g_err_stage := 'Arguments';
147: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
148: PA_DEBUG.g_err_stage := '---------';
149: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
150:
143: * Concurrent Processes
144: */
145: IF l_debug ='Y'THEN -- bug 2674619
146: PA_DEBUG.g_err_stage := 'Arguments';
147: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
148: PA_DEBUG.g_err_stage := '---------';
149: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
150:
151: PA_DEBUG.g_err_stage := 'p_ac_start_date : '||p_ac_start_date;
144: */
145: IF l_debug ='Y'THEN -- bug 2674619
146: PA_DEBUG.g_err_stage := 'Arguments';
147: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
148: PA_DEBUG.g_err_stage := '---------';
149: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
150:
151: PA_DEBUG.g_err_stage := 'p_ac_start_date : '||p_ac_start_date;
152: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
145: IF l_debug ='Y'THEN -- bug 2674619
146: PA_DEBUG.g_err_stage := 'Arguments';
147: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
148: PA_DEBUG.g_err_stage := '---------';
149: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
150:
151: PA_DEBUG.g_err_stage := 'p_ac_start_date : '||p_ac_start_date;
152: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
153: PA_DEBUG.g_err_stage := 'p_ac_end_date : '||p_ac_end_date;
147: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
148: PA_DEBUG.g_err_stage := '---------';
149: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
150:
151: PA_DEBUG.g_err_stage := 'p_ac_start_date : '||p_ac_start_date;
152: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
153: PA_DEBUG.g_err_stage := 'p_ac_end_date : '||p_ac_end_date;
154: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
155: PA_DEBUG.g_err_stage := 'p_fc_start_date : '||p_fc_start_date;
148: PA_DEBUG.g_err_stage := '---------';
149: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
150:
151: PA_DEBUG.g_err_stage := 'p_ac_start_date : '||p_ac_start_date;
152: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
153: PA_DEBUG.g_err_stage := 'p_ac_end_date : '||p_ac_end_date;
154: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
155: PA_DEBUG.g_err_stage := 'p_fc_start_date : '||p_fc_start_date;
156: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
149: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
150:
151: PA_DEBUG.g_err_stage := 'p_ac_start_date : '||p_ac_start_date;
152: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
153: PA_DEBUG.g_err_stage := 'p_ac_end_date : '||p_ac_end_date;
154: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
155: PA_DEBUG.g_err_stage := 'p_fc_start_date : '||p_fc_start_date;
156: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
157: PA_DEBUG.g_err_stage := 'p_fc_end_date : '||p_fc_end_date;
150:
151: PA_DEBUG.g_err_stage := 'p_ac_start_date : '||p_ac_start_date;
152: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
153: PA_DEBUG.g_err_stage := 'p_ac_end_date : '||p_ac_end_date;
154: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
155: PA_DEBUG.g_err_stage := 'p_fc_start_date : '||p_fc_start_date;
156: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
157: PA_DEBUG.g_err_stage := 'p_fc_end_date : '||p_fc_end_date;
158: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
151: PA_DEBUG.g_err_stage := 'p_ac_start_date : '||p_ac_start_date;
152: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
153: PA_DEBUG.g_err_stage := 'p_ac_end_date : '||p_ac_end_date;
154: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
155: PA_DEBUG.g_err_stage := 'p_fc_start_date : '||p_fc_start_date;
156: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
157: PA_DEBUG.g_err_stage := 'p_fc_end_date : '||p_fc_end_date;
158: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
159: PA_DEBUG.g_err_stage := 'p_org_rollup_method : '||p_org_rollup_method;
152: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
153: PA_DEBUG.g_err_stage := 'p_ac_end_date : '||p_ac_end_date;
154: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
155: PA_DEBUG.g_err_stage := 'p_fc_start_date : '||p_fc_start_date;
156: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
157: PA_DEBUG.g_err_stage := 'p_fc_end_date : '||p_fc_end_date;
158: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
159: PA_DEBUG.g_err_stage := 'p_org_rollup_method : '||p_org_rollup_method;
160: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
153: PA_DEBUG.g_err_stage := 'p_ac_end_date : '||p_ac_end_date;
154: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
155: PA_DEBUG.g_err_stage := 'p_fc_start_date : '||p_fc_start_date;
156: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
157: PA_DEBUG.g_err_stage := 'p_fc_end_date : '||p_fc_end_date;
158: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
159: PA_DEBUG.g_err_stage := 'p_org_rollup_method : '||p_org_rollup_method;
160: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
161: PA_DEBUG.g_err_stage := 'p_debug_mode : '||p_debug_mode;
154: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
155: PA_DEBUG.g_err_stage := 'p_fc_start_date : '||p_fc_start_date;
156: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
157: PA_DEBUG.g_err_stage := 'p_fc_end_date : '||p_fc_end_date;
158: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
159: PA_DEBUG.g_err_stage := 'p_org_rollup_method : '||p_org_rollup_method;
160: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
161: PA_DEBUG.g_err_stage := 'p_debug_mode : '||p_debug_mode;
162: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
155: PA_DEBUG.g_err_stage := 'p_fc_start_date : '||p_fc_start_date;
156: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
157: PA_DEBUG.g_err_stage := 'p_fc_end_date : '||p_fc_end_date;
158: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
159: PA_DEBUG.g_err_stage := 'p_org_rollup_method : '||p_org_rollup_method;
160: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
161: PA_DEBUG.g_err_stage := 'p_debug_mode : '||p_debug_mode;
162: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
163: END IF;
156: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
157: PA_DEBUG.g_err_stage := 'p_fc_end_date : '||p_fc_end_date;
158: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
159: PA_DEBUG.g_err_stage := 'p_org_rollup_method : '||p_org_rollup_method;
160: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
161: PA_DEBUG.g_err_stage := 'p_debug_mode : '||p_debug_mode;
162: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
163: END IF;
164:
157: PA_DEBUG.g_err_stage := 'p_fc_end_date : '||p_fc_end_date;
158: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
159: PA_DEBUG.g_err_stage := 'p_org_rollup_method : '||p_org_rollup_method;
160: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
161: PA_DEBUG.g_err_stage := 'p_debug_mode : '||p_debug_mode;
162: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
163: END IF;
164:
165: /*
158: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
159: PA_DEBUG.g_err_stage := 'p_org_rollup_method : '||p_org_rollup_method;
160: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
161: PA_DEBUG.g_err_stage := 'p_debug_mode : '||p_debug_mode;
162: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
163: END IF;
164:
165: /*
166: * Write messages to the concurrent OUT file
167: */
168:
169: FND_MESSAGE.Set_Name('PA','PA_UTIL_ACT_FROM_DATE');
170: l_fnd_msg := p_ac_start_date||' : '||FND_MESSAGE.Get;
171: PA_DEBUG.Log_Message(p_message => l_fnd_msg
172: , p_write_mode => 1
173: , p_write_file => 'OUT'
174: );
175: FND_MESSAGE.Set_Name('PA','PA_UTIL_ACT_THRU_DATE');
173: , p_write_file => 'OUT'
174: );
175: FND_MESSAGE.Set_Name('PA','PA_UTIL_ACT_THRU_DATE');
176: l_fnd_msg := p_ac_end_date||' : '||FND_MESSAGE.Get;
177: PA_DEBUG.Log_Message(p_message => l_fnd_msg
178: , p_write_mode => 1
179: , p_write_file => 'OUT'
180: );
181: FND_MESSAGE.Set_Name('PA','PA_UTIL_ORGZ_ROLLUP_METHOD');
179: , p_write_file => 'OUT'
180: );
181: FND_MESSAGE.Set_Name('PA','PA_UTIL_ORGZ_ROLLUP_METHOD');
182: l_fnd_msg := p_org_rollup_method||' : '||FND_MESSAGE.Get;
183: PA_DEBUG.Log_Message(p_message => l_fnd_msg
184: , p_write_mode => 1
185: , p_write_file => 'OUT'
186: );
187: FND_MESSAGE.Set_Name('PA','PA_UTIL_FETCH_SIZE');
185: , p_write_file => 'OUT'
186: );
187: FND_MESSAGE.Set_Name('PA','PA_UTIL_FETCH_SIZE');
188: l_fnd_msg := PA_REP_UTIL_GLOB.G_util_fetch_size||' : '||FND_MESSAGE.Get;
189: PA_DEBUG.Log_Message(p_message => l_fnd_msg
190: , p_write_mode => 1
191: , p_write_file => 'OUT'
192: );
193: FND_MESSAGE.Set_Name('PA','PA_UTIL_SUCCESSFUL_RUN');
191: , p_write_file => 'OUT'
192: );
193: FND_MESSAGE.Set_Name('PA','PA_UTIL_SUCCESSFUL_RUN');
194: l_fnd_msg := FND_MESSAGE.Get;
195: PA_DEBUG.Log_Message(p_message => l_fnd_msg
196: , p_write_mode => 1
197: , p_write_file => 'OUT'
198: );
199: IF l_debug ='Y'THEN -- bug 2674619
196: , p_write_mode => 1
197: , p_write_file => 'OUT'
198: );
199: IF l_debug ='Y'THEN -- bug 2674619
200: PA_DEBUG.g_err_stage := 'Messages';
201: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
202: PA_DEBUG.g_err_stage := '--------';
203: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
204:
197: , p_write_file => 'OUT'
198: );
199: IF l_debug ='Y'THEN -- bug 2674619
200: PA_DEBUG.g_err_stage := 'Messages';
201: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
202: PA_DEBUG.g_err_stage := '--------';
203: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
204:
205: PA_DEBUG.g_err_stage := '50 : Inside PA_REP_UTIL_GLOB.get_util_ac_parm';
198: );
199: IF l_debug ='Y'THEN -- bug 2674619
200: PA_DEBUG.g_err_stage := 'Messages';
201: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
202: PA_DEBUG.g_err_stage := '--------';
203: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
204:
205: PA_DEBUG.g_err_stage := '50 : Inside PA_REP_UTIL_GLOB.get_util_ac_parm';
206: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
199: IF l_debug ='Y'THEN -- bug 2674619
200: PA_DEBUG.g_err_stage := 'Messages';
201: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
202: PA_DEBUG.g_err_stage := '--------';
203: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
204:
205: PA_DEBUG.g_err_stage := '50 : Inside PA_REP_UTIL_GLOB.get_util_ac_parm';
206: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
207: END IF;
201: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
202: PA_DEBUG.g_err_stage := '--------';
203: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
204:
205: PA_DEBUG.g_err_stage := '50 : Inside PA_REP_UTIL_GLOB.get_util_ac_parm';
206: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
207: END IF;
208:
209: IF TRUNC(TO_DATE(p_ac_start_date,'YYYY/MM/DD HH24:MI:SS')) >
202: PA_DEBUG.g_err_stage := '--------';
203: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
204:
205: PA_DEBUG.g_err_stage := '50 : Inside PA_REP_UTIL_GLOB.get_util_ac_parm';
206: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
207: END IF;
208:
209: IF TRUNC(TO_DATE(p_ac_start_date,'YYYY/MM/DD HH24:MI:SS')) >
210: TRUNC(TO_DATE(p_ac_end_date, 'YYYY/MM/DD HH24:MI:SS')) THEN
210: TRUNC(TO_DATE(p_ac_end_date, 'YYYY/MM/DD HH24:MI:SS')) THEN
211: retcode := 2;
212: errbuf := 'The Given Date Range is Invalid';
213: IF l_debug ='Y'THEN -- bug 2674619
214: PA_DEBUG.g_err_stage := '100 : The Given Date Range is Invalid';
215: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
216: END IF;
217:
218: FND_MESSAGE.Set_Name('PA','PA_UTIL_INVALID_DATE_RANGE');
211: retcode := 2;
212: errbuf := 'The Given Date Range is Invalid';
213: IF l_debug ='Y'THEN -- bug 2674619
214: PA_DEBUG.g_err_stage := '100 : The Given Date Range is Invalid';
215: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
216: END IF;
217:
218: FND_MESSAGE.Set_Name('PA','PA_UTIL_INVALID_DATE_RANGE');
219: l_fnd_msg := FND_MESSAGE.Get;
216: END IF;
217:
218: FND_MESSAGE.Set_Name('PA','PA_UTIL_INVALID_DATE_RANGE');
219: l_fnd_msg := FND_MESSAGE.Get;
220: PA_DEBUG.Log_Message(p_message => l_fnd_msg
221: , p_write_mode => 1
222: , p_write_file => 'OUT');
223: PA_Debug.Reset_Curr_Function;
224: RETURN;
219: l_fnd_msg := FND_MESSAGE.Get;
220: PA_DEBUG.Log_Message(p_message => l_fnd_msg
221: , p_write_mode => 1
222: , p_write_file => 'OUT');
223: PA_Debug.Reset_Curr_Function;
224: RETURN;
225: END IF;
226: IF l_debug ='Y'THEN -- bug 2674619
227: PA_DEBUG.g_err_stage := '150 : Before Calling PA_REP_UTIL_GLOB.Get_Util_Prc_Switch';
223: PA_Debug.Reset_Curr_Function;
224: RETURN;
225: END IF;
226: IF l_debug ='Y'THEN -- bug 2674619
227: PA_DEBUG.g_err_stage := '150 : Before Calling PA_REP_UTIL_GLOB.Get_Util_Prc_Switch';
228: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
229: END IF;
230:
231: Get_Util_Prc_Switch (
224: RETURN;
225: END IF;
226: IF l_debug ='Y'THEN -- bug 2674619
227: PA_DEBUG.g_err_stage := '150 : Before Calling PA_REP_UTIL_GLOB.Get_Util_Prc_Switch';
228: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
229: END IF;
230:
231: Get_Util_Prc_Switch (
232: x_prc_switch => l_prc_switch
234: ,x_return_status => l_retcode
235: );
236:
237: IF l_debug ='Y'THEN -- bug 2674619
238: PA_DEBUG.g_err_stage := '200 : After Calling PA_REP_UTIL_GLOB.Get_Util_Prc_Switch';
239: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
240: END IF;
241:
242: IF ( l_prc_switch = 'A' OR l_prc_switch = 'B') THEN
235: );
236:
237: IF l_debug ='Y'THEN -- bug 2674619
238: PA_DEBUG.g_err_stage := '200 : After Calling PA_REP_UTIL_GLOB.Get_Util_Prc_Switch';
239: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
240: END IF;
241:
242: IF ( l_prc_switch = 'A' OR l_prc_switch = 'B') THEN
243: IF l_debug ='Y'THEN -- bug 2674619
240: END IF;
241:
242: IF ( l_prc_switch = 'A' OR l_prc_switch = 'B') THEN
243: IF l_debug ='Y'THEN -- bug 2674619
244: PA_DEBUG.g_err_stage := '250 : Before calling PA_REP_UTIL_GLOB.initialize_util_cache';
245: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
246: END IF;
247:
248: PA_REP_UTIL_GLOB.initialize_util_cache(
241:
242: IF ( l_prc_switch = 'A' OR l_prc_switch = 'B') THEN
243: IF l_debug ='Y'THEN -- bug 2674619
244: PA_DEBUG.g_err_stage := '250 : Before calling PA_REP_UTIL_GLOB.initialize_util_cache';
245: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
246: END IF;
247:
248: PA_REP_UTIL_GLOB.initialize_util_cache(
249: p_ac_start_date => TRUNC(TO_DATE(p_ac_start_date,'YYYY/MM/DD HH24:MI:SS'))
253: ,p_org_rollup_method => p_org_rollup_method
254: ,p_debug_mode => p_debug_mode
255: );
256: IF l_debug ='Y'THEN -- bug 2674619
257: PA_DEBUG.g_err_stage := '300 : After calling PA_REP_UTIL_GLOB.initialize_util_cache';
258: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
259: END IF;
260: /*
261: * Bug 1810528
254: ,p_debug_mode => p_debug_mode
255: );
256: IF l_debug ='Y'THEN -- bug 2674619
257: PA_DEBUG.g_err_stage := '300 : After calling PA_REP_UTIL_GLOB.initialize_util_cache';
258: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
259: END IF;
260: /*
261: * Bug 1810528
262: * The checking of the last_update_date of pa_org_hierarchy_denorm is
270: AND ORG_HIERARCHY_VERSION_ID = pa_rep_util_glob.G_implementation_details.G_org_structure_version_id
271: ;
272:
273: IF l_debug ='Y'THEN -- bug 2674619
274: PA_DEBUG.g_err_stage := '310 : Max Last_Update_Date of pa_org_hierarchy_denorm before the run is <'||l_orghier_date_before||'>';
275: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
276:
277: PA_DEBUG.g_err_stage := '350 : Before calling PA_REP_UTIL_GLOB.Get_Effective_Start_Period_Num';
278: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
271: ;
272:
273: IF l_debug ='Y'THEN -- bug 2674619
274: PA_DEBUG.g_err_stage := '310 : Max Last_Update_Date of pa_org_hierarchy_denorm before the run is <'||l_orghier_date_before||'>';
275: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
276:
277: PA_DEBUG.g_err_stage := '350 : Before calling PA_REP_UTIL_GLOB.Get_Effective_Start_Period_Num';
278: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
279: END IF;
273: IF l_debug ='Y'THEN -- bug 2674619
274: PA_DEBUG.g_err_stage := '310 : Max Last_Update_Date of pa_org_hierarchy_denorm before the run is <'||l_orghier_date_before||'>';
275: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
276:
277: PA_DEBUG.g_err_stage := '350 : Before calling PA_REP_UTIL_GLOB.Get_Effective_Start_Period_Num';
278: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
279: END IF;
280:
281: IF pa_rep_util_glob.G_input_parameters.G_org_rollup_method = 'R' THEN
274: PA_DEBUG.g_err_stage := '310 : Max Last_Update_Date of pa_org_hierarchy_denorm before the run is <'||l_orghier_date_before||'>';
275: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
276:
277: PA_DEBUG.g_err_stage := '350 : Before calling PA_REP_UTIL_GLOB.Get_Effective_Start_Period_Num';
278: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
279: END IF;
280:
281: IF pa_rep_util_glob.G_input_parameters.G_org_rollup_method = 'R' THEN
282: IF pa_rep_util_glob.G_util_option_details.G_pa_period_flag = 'Y' THEN
293: );
294: IF l_retcode = '2' THEN
295: retcode := '2';
296: IF l_debug ='Y'THEN -- bug 2674619
297: PA_DEBUG.g_err_stage := '400 : There is no matching PA period for the given Start Date';
298: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
299: END IF;
300: FND_MESSAGE.Set_Name('PA','PA_UTIL_INVALID_START_DATE_PA');
301: l_fnd_msg := FND_MESSAGE.Get;
294: IF l_retcode = '2' THEN
295: retcode := '2';
296: IF l_debug ='Y'THEN -- bug 2674619
297: PA_DEBUG.g_err_stage := '400 : There is no matching PA period for the given Start Date';
298: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
299: END IF;
300: FND_MESSAGE.Set_Name('PA','PA_UTIL_INVALID_START_DATE_PA');
301: l_fnd_msg := FND_MESSAGE.Get;
302: PA_DEBUG.Log_Message(p_message => l_fnd_msg
298: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
299: END IF;
300: FND_MESSAGE.Set_Name('PA','PA_UTIL_INVALID_START_DATE_PA');
301: l_fnd_msg := FND_MESSAGE.Get;
302: PA_DEBUG.Log_Message(p_message => l_fnd_msg
303: , p_write_mode => 1
304: , p_write_file => 'OUT');
305: PA_Debug.Reset_Curr_Function;
306: RETURN;
301: l_fnd_msg := FND_MESSAGE.Get;
302: PA_DEBUG.Log_Message(p_message => l_fnd_msg
303: , p_write_mode => 1
304: , p_write_file => 'OUT');
305: PA_Debug.Reset_Curr_Function;
306: RETURN;
307: ELSE
308: IF l_debug ='Y'THEN -- bug 2674619
309: PA_DEBUG.g_err_stage := '400 : Eff pd Num-PA '||to_char(l_effect_start_period_num);
305: PA_Debug.Reset_Curr_Function;
306: RETURN;
307: ELSE
308: IF l_debug ='Y'THEN -- bug 2674619
309: PA_DEBUG.g_err_stage := '400 : Eff pd Num-PA '||to_char(l_effect_start_period_num);
310: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
311: END IF;
312: PA_REP_UTIL_GLOB.G_eff_ac_start_pa_period_num := l_effect_start_period_num;
313: END IF;
306: RETURN;
307: ELSE
308: IF l_debug ='Y'THEN -- bug 2674619
309: PA_DEBUG.g_err_stage := '400 : Eff pd Num-PA '||to_char(l_effect_start_period_num);
310: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
311: END IF;
312: PA_REP_UTIL_GLOB.G_eff_ac_start_pa_period_num := l_effect_start_period_num;
313: END IF;
314: END IF;
326: );
327: IF l_retcode = '2' THEN
328: retcode := '2';
329: IF l_debug ='Y'THEN -- bug 2674619
330: PA_DEBUG.g_err_stage := '450 : There is no matching GL period for the given Start Date';
331: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
332: END IF;
333: FND_MESSAGE.Set_Name('PA','PA_UTIL_INVALID_START_DATE_GL');
334: l_fnd_msg := FND_MESSAGE.Get;
327: IF l_retcode = '2' THEN
328: retcode := '2';
329: IF l_debug ='Y'THEN -- bug 2674619
330: PA_DEBUG.g_err_stage := '450 : There is no matching GL period for the given Start Date';
331: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
332: END IF;
333: FND_MESSAGE.Set_Name('PA','PA_UTIL_INVALID_START_DATE_GL');
334: l_fnd_msg := FND_MESSAGE.Get;
335: PA_DEBUG.Log_Message(p_message => l_fnd_msg
331: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
332: END IF;
333: FND_MESSAGE.Set_Name('PA','PA_UTIL_INVALID_START_DATE_GL');
334: l_fnd_msg := FND_MESSAGE.Get;
335: PA_DEBUG.Log_Message(p_message => l_fnd_msg
336: , p_write_mode => 1
337: , p_write_file => 'OUT');
338: PA_Debug.Reset_Curr_Function;
339: RETURN;
334: l_fnd_msg := FND_MESSAGE.Get;
335: PA_DEBUG.Log_Message(p_message => l_fnd_msg
336: , p_write_mode => 1
337: , p_write_file => 'OUT');
338: PA_Debug.Reset_Curr_Function;
339: RETURN;
340: ELSE
341: IF l_debug ='Y'THEN -- bug 2674619
342: PA_DEBUG.g_err_stage := '500 : Eff pd Num-GL '||to_char(l_effect_start_period_num);
338: PA_Debug.Reset_Curr_Function;
339: RETURN;
340: ELSE
341: IF l_debug ='Y'THEN -- bug 2674619
342: PA_DEBUG.g_err_stage := '500 : Eff pd Num-GL '||to_char(l_effect_start_period_num);
343: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
344: END IF;
345: PA_REP_UTIL_GLOB.G_eff_ac_start_gl_period_num := l_effect_start_period_num;
346: END IF;
339: RETURN;
340: ELSE
341: IF l_debug ='Y'THEN -- bug 2674619
342: PA_DEBUG.g_err_stage := '500 : Eff pd Num-GL '||to_char(l_effect_start_period_num);
343: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
344: END IF;
345: PA_REP_UTIL_GLOB.G_eff_ac_start_gl_period_num := l_effect_start_period_num;
346: END IF;
347: END IF;
346: END IF;
347: END IF;
348: END IF;
349: IF l_debug ='Y'THEN -- bug 2674619
350: PA_DEBUG.g_err_stage := '550 : After calling PA_REP_UTIL_GLOB.Get_Effective_Start_Period_Num';
351: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
352:
353: PA_DEBUG.g_err_stage := '600 : Before calling PA_SUMMARIZE_ACTUAL_UTIL_PVT.summarize_actual_util';
354: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
347: END IF;
348: END IF;
349: IF l_debug ='Y'THEN -- bug 2674619
350: PA_DEBUG.g_err_stage := '550 : After calling PA_REP_UTIL_GLOB.Get_Effective_Start_Period_Num';
351: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
352:
353: PA_DEBUG.g_err_stage := '600 : Before calling PA_SUMMARIZE_ACTUAL_UTIL_PVT.summarize_actual_util';
354: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
355: END IF;
349: IF l_debug ='Y'THEN -- bug 2674619
350: PA_DEBUG.g_err_stage := '550 : After calling PA_REP_UTIL_GLOB.Get_Effective_Start_Period_Num';
351: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
352:
353: PA_DEBUG.g_err_stage := '600 : Before calling PA_SUMMARIZE_ACTUAL_UTIL_PVT.summarize_actual_util';
354: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
355: END IF;
356:
357: PA_SUMMARIZE_ACTUAL_UTIL_PVT.summarize_actual_util;
350: PA_DEBUG.g_err_stage := '550 : After calling PA_REP_UTIL_GLOB.Get_Effective_Start_Period_Num';
351: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
352:
353: PA_DEBUG.g_err_stage := '600 : Before calling PA_SUMMARIZE_ACTUAL_UTIL_PVT.summarize_actual_util';
354: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
355: END IF;
356:
357: PA_SUMMARIZE_ACTUAL_UTIL_PVT.summarize_actual_util;
358: IF l_debug ='Y'THEN -- bug 2674619
355: END IF;
356:
357: PA_SUMMARIZE_ACTUAL_UTIL_PVT.summarize_actual_util;
358: IF l_debug ='Y'THEN -- bug 2674619
359: PA_DEBUG.g_err_stage := '650 : After calling PA_SUMMARIZE_ACTUAL_UTIL_PVT.summarize_actual_util';
360: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
361: END IF;
362: ELSE
363: IF l_debug ='Y'THEN -- bug 2674619
356:
357: PA_SUMMARIZE_ACTUAL_UTIL_PVT.summarize_actual_util;
358: IF l_debug ='Y'THEN -- bug 2674619
359: PA_DEBUG.g_err_stage := '650 : After calling PA_SUMMARIZE_ACTUAL_UTIL_PVT.summarize_actual_util';
360: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
361: END IF;
362: ELSE
363: IF l_debug ='Y'THEN -- bug 2674619
364: PA_DEBUG.g_err_stage := '700 : Oracle Projects Not Installed .. Not Running Acutals';
360: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
361: END IF;
362: ELSE
363: IF l_debug ='Y'THEN -- bug 2674619
364: PA_DEBUG.g_err_stage := '700 : Oracle Projects Not Installed .. Not Running Acutals';
365: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
366: END IF;
367: FND_MESSAGE.Set_Name('PA','PA_UTIL_PA_NOT_INSTALLED');
368: l_fnd_msg := FND_MESSAGE.Get;
361: END IF;
362: ELSE
363: IF l_debug ='Y'THEN -- bug 2674619
364: PA_DEBUG.g_err_stage := '700 : Oracle Projects Not Installed .. Not Running Acutals';
365: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
366: END IF;
367: FND_MESSAGE.Set_Name('PA','PA_UTIL_PA_NOT_INSTALLED');
368: l_fnd_msg := FND_MESSAGE.Get;
369: PA_DEBUG.Log_Message(p_message => l_fnd_msg
365: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
366: END IF;
367: FND_MESSAGE.Set_Name('PA','PA_UTIL_PA_NOT_INSTALLED');
368: l_fnd_msg := FND_MESSAGE.Get;
369: PA_DEBUG.Log_Message(p_message => l_fnd_msg
370: , p_write_mode => 1
371: , p_write_file => 'OUT');
372: PA_Debug.Reset_Curr_Function;
373: RETURN;
368: l_fnd_msg := FND_MESSAGE.Get;
369: PA_DEBUG.Log_Message(p_message => l_fnd_msg
370: , p_write_mode => 1
371: , p_write_file => 'OUT');
372: PA_Debug.Reset_Curr_Function;
373: RETURN;
374: END IF;
375:
376: /*
386:
387: IF ( l_orghier_date_after > l_orghier_date_before) then
388: FND_MESSAGE.Set_Name('PA','PA_UTIL_ORGZ_HIER_CHANGE');
389: l_fnd_msg := FND_MESSAGE.Get;
390: PA_DEBUG.Log_Message(p_message => l_fnd_msg);
391: PA_DEBUG.Log_Message(p_message => l_fnd_msg
392: , p_write_mode => 1
393: , p_write_file => 'OUT'
394: );
387: IF ( l_orghier_date_after > l_orghier_date_before) then
388: FND_MESSAGE.Set_Name('PA','PA_UTIL_ORGZ_HIER_CHANGE');
389: l_fnd_msg := FND_MESSAGE.Get;
390: PA_DEBUG.Log_Message(p_message => l_fnd_msg);
391: PA_DEBUG.Log_Message(p_message => l_fnd_msg
392: , p_write_mode => 1
393: , p_write_file => 'OUT'
394: );
395: ELSE
394: );
395: ELSE
396: FND_MESSAGE.Set_Name('PA','PA_UTIL_SUCCESSFUL_RUN');
397: l_fnd_msg := FND_MESSAGE.Get;
398: PA_DEBUG.Log_Message(p_message => l_fnd_msg);
399: PA_DEBUG.Log_Message(p_message => l_fnd_msg
400: , p_write_mode => 1
401: , p_write_file => 'OUT'
402: );
395: ELSE
396: FND_MESSAGE.Set_Name('PA','PA_UTIL_SUCCESSFUL_RUN');
397: l_fnd_msg := FND_MESSAGE.Get;
398: PA_DEBUG.Log_Message(p_message => l_fnd_msg);
399: PA_DEBUG.Log_Message(p_message => l_fnd_msg
400: , p_write_mode => 1
401: , p_write_file => 'OUT'
402: );
403: END IF;
401: , p_write_file => 'OUT'
402: );
403: END IF;
404: IF l_debug ='Y'THEN -- bug 2674619
405: PA_DEBUG.g_err_stage := '310 : Max Last_Update_Date of pa_org_hierarchy_denorm after the run is <'||l_orghier_date_after||'>';
406: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
407:
408: PA_DEBUG.g_err_stage := '750 : Exiting PA_REP_UTIL_GLOB.get_util_ac_parm';
409: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
402: );
403: END IF;
404: IF l_debug ='Y'THEN -- bug 2674619
405: PA_DEBUG.g_err_stage := '310 : Max Last_Update_Date of pa_org_hierarchy_denorm after the run is <'||l_orghier_date_after||'>';
406: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
407:
408: PA_DEBUG.g_err_stage := '750 : Exiting PA_REP_UTIL_GLOB.get_util_ac_parm';
409: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
410: END IF;
404: IF l_debug ='Y'THEN -- bug 2674619
405: PA_DEBUG.g_err_stage := '310 : Max Last_Update_Date of pa_org_hierarchy_denorm after the run is <'||l_orghier_date_after||'>';
406: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
407:
408: PA_DEBUG.g_err_stage := '750 : Exiting PA_REP_UTIL_GLOB.get_util_ac_parm';
409: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
410: END IF;
411:
412: PA_Debug.Reset_Curr_Function;
405: PA_DEBUG.g_err_stage := '310 : Max Last_Update_Date of pa_org_hierarchy_denorm after the run is <'||l_orghier_date_after||'>';
406: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
407:
408: PA_DEBUG.g_err_stage := '750 : Exiting PA_REP_UTIL_GLOB.get_util_ac_parm';
409: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
410: END IF;
411:
412: PA_Debug.Reset_Curr_Function;
413: EXCEPTION
408: PA_DEBUG.g_err_stage := '750 : Exiting PA_REP_UTIL_GLOB.get_util_ac_parm';
409: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
410: END IF;
411:
412: PA_Debug.Reset_Curr_Function;
413: EXCEPTION
414: WHEN OTHERS THEN
415: retcode := 2;
416: errbuf := SUBSTR(SQLERRM,1,240);
413: EXCEPTION
414: WHEN OTHERS THEN
415: retcode := 2;
416: errbuf := SUBSTR(SQLERRM,1,240);
417: PA_DEBUG.Log_Message( SQLERRM);
418: PA_DEBUG.Log_Message(PA_DEBUG.g_err_stack);
419: PA_DEBUG.Log_Message(p_message => SQLERRM
420: , p_write_mode => 1
421: , p_write_file => 'OUT'
414: WHEN OTHERS THEN
415: retcode := 2;
416: errbuf := SUBSTR(SQLERRM,1,240);
417: PA_DEBUG.Log_Message( SQLERRM);
418: PA_DEBUG.Log_Message(PA_DEBUG.g_err_stack);
419: PA_DEBUG.Log_Message(p_message => SQLERRM
420: , p_write_mode => 1
421: , p_write_file => 'OUT'
422: );
415: retcode := 2;
416: errbuf := SUBSTR(SQLERRM,1,240);
417: PA_DEBUG.Log_Message( SQLERRM);
418: PA_DEBUG.Log_Message(PA_DEBUG.g_err_stack);
419: PA_DEBUG.Log_Message(p_message => SQLERRM
420: , p_write_mode => 1
421: , p_write_file => 'OUT'
422: );
423: /*
423: /*
424: * Set the excetption Message and the stack
425: */
426: FND_MSG_PUB.add_exc_msg ( p_pkg_name => 'PA_REP_UTIL_GLOB.get_util_ac_parm'
427: ,p_procedure_name => PA_DEBUG.G_Err_Stack );
428: RAISE;
429:
430: END Get_Util_Ac_Parm;
431: /*
456: /*
457: * Set the debug mode
458: */
459:
460: PA_DEBUG.Set_Curr_Function(
461: p_function => 'Get_Util_Fc_Parm',
462: p_process => 'PLSQL',
463: p_write_file => 'LOG',
464: p_debug_mode => p_debug_mode);
462: p_process => 'PLSQL',
463: p_write_file => 'LOG',
464: p_debug_mode => p_debug_mode);
465:
466: PA_DEBUG.g_err_stage := 'Process : Forecast Summarization';
467: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage
468: , p_write_mode => 1
469: , p_write_file => 'OUT');
470:
463: p_write_file => 'LOG',
464: p_debug_mode => p_debug_mode);
465:
466: PA_DEBUG.g_err_stage := 'Process : Forecast Summarization';
467: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage
468: , p_write_mode => 1
469: , p_write_file => 'OUT');
470:
471:
484: * Depending on Products Installed, Run Forecasts
485: * Concurrent Processes
486: */
487: IF l_debug ='Y'THEN -- bug 2674619
488: PA_DEBUG.g_err_stage := 'Arguments';
489: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
490: PA_DEBUG.g_err_stage := '---------';
491: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
492:
485: * Concurrent Processes
486: */
487: IF l_debug ='Y'THEN -- bug 2674619
488: PA_DEBUG.g_err_stage := 'Arguments';
489: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
490: PA_DEBUG.g_err_stage := '---------';
491: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
492:
493: PA_DEBUG.g_err_stage := 'p_ac_start_date : '||p_ac_start_date;
486: */
487: IF l_debug ='Y'THEN -- bug 2674619
488: PA_DEBUG.g_err_stage := 'Arguments';
489: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
490: PA_DEBUG.g_err_stage := '---------';
491: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
492:
493: PA_DEBUG.g_err_stage := 'p_ac_start_date : '||p_ac_start_date;
494: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
487: IF l_debug ='Y'THEN -- bug 2674619
488: PA_DEBUG.g_err_stage := 'Arguments';
489: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
490: PA_DEBUG.g_err_stage := '---------';
491: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
492:
493: PA_DEBUG.g_err_stage := 'p_ac_start_date : '||p_ac_start_date;
494: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
495: PA_DEBUG.g_err_stage := 'p_ac_end_date : '||p_ac_end_date;
489: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
490: PA_DEBUG.g_err_stage := '---------';
491: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
492:
493: PA_DEBUG.g_err_stage := 'p_ac_start_date : '||p_ac_start_date;
494: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
495: PA_DEBUG.g_err_stage := 'p_ac_end_date : '||p_ac_end_date;
496: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
497: PA_DEBUG.g_err_stage := 'p_fc_start_date : '||p_fc_start_date;
490: PA_DEBUG.g_err_stage := '---------';
491: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
492:
493: PA_DEBUG.g_err_stage := 'p_ac_start_date : '||p_ac_start_date;
494: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
495: PA_DEBUG.g_err_stage := 'p_ac_end_date : '||p_ac_end_date;
496: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
497: PA_DEBUG.g_err_stage := 'p_fc_start_date : '||p_fc_start_date;
498: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
491: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
492:
493: PA_DEBUG.g_err_stage := 'p_ac_start_date : '||p_ac_start_date;
494: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
495: PA_DEBUG.g_err_stage := 'p_ac_end_date : '||p_ac_end_date;
496: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
497: PA_DEBUG.g_err_stage := 'p_fc_start_date : '||p_fc_start_date;
498: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
499: PA_DEBUG.g_err_stage := 'p_fc_end_date : '||p_fc_end_date;
492:
493: PA_DEBUG.g_err_stage := 'p_ac_start_date : '||p_ac_start_date;
494: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
495: PA_DEBUG.g_err_stage := 'p_ac_end_date : '||p_ac_end_date;
496: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
497: PA_DEBUG.g_err_stage := 'p_fc_start_date : '||p_fc_start_date;
498: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
499: PA_DEBUG.g_err_stage := 'p_fc_end_date : '||p_fc_end_date;
500: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
493: PA_DEBUG.g_err_stage := 'p_ac_start_date : '||p_ac_start_date;
494: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
495: PA_DEBUG.g_err_stage := 'p_ac_end_date : '||p_ac_end_date;
496: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
497: PA_DEBUG.g_err_stage := 'p_fc_start_date : '||p_fc_start_date;
498: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
499: PA_DEBUG.g_err_stage := 'p_fc_end_date : '||p_fc_end_date;
500: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
501: PA_DEBUG.g_err_stage := 'p_org_rollup_method : '||p_org_rollup_method;
494: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
495: PA_DEBUG.g_err_stage := 'p_ac_end_date : '||p_ac_end_date;
496: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
497: PA_DEBUG.g_err_stage := 'p_fc_start_date : '||p_fc_start_date;
498: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
499: PA_DEBUG.g_err_stage := 'p_fc_end_date : '||p_fc_end_date;
500: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
501: PA_DEBUG.g_err_stage := 'p_org_rollup_method : '||p_org_rollup_method;
502: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
495: PA_DEBUG.g_err_stage := 'p_ac_end_date : '||p_ac_end_date;
496: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
497: PA_DEBUG.g_err_stage := 'p_fc_start_date : '||p_fc_start_date;
498: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
499: PA_DEBUG.g_err_stage := 'p_fc_end_date : '||p_fc_end_date;
500: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
501: PA_DEBUG.g_err_stage := 'p_org_rollup_method : '||p_org_rollup_method;
502: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
503: PA_DEBUG.g_err_stage := 'p_debug_mode : '||p_debug_mode;
496: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
497: PA_DEBUG.g_err_stage := 'p_fc_start_date : '||p_fc_start_date;
498: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
499: PA_DEBUG.g_err_stage := 'p_fc_end_date : '||p_fc_end_date;
500: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
501: PA_DEBUG.g_err_stage := 'p_org_rollup_method : '||p_org_rollup_method;
502: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
503: PA_DEBUG.g_err_stage := 'p_debug_mode : '||p_debug_mode;
504: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
497: PA_DEBUG.g_err_stage := 'p_fc_start_date : '||p_fc_start_date;
498: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
499: PA_DEBUG.g_err_stage := 'p_fc_end_date : '||p_fc_end_date;
500: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
501: PA_DEBUG.g_err_stage := 'p_org_rollup_method : '||p_org_rollup_method;
502: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
503: PA_DEBUG.g_err_stage := 'p_debug_mode : '||p_debug_mode;
504: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
505: END IF;
498: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
499: PA_DEBUG.g_err_stage := 'p_fc_end_date : '||p_fc_end_date;
500: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
501: PA_DEBUG.g_err_stage := 'p_org_rollup_method : '||p_org_rollup_method;
502: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
503: PA_DEBUG.g_err_stage := 'p_debug_mode : '||p_debug_mode;
504: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
505: END IF;
506:
499: PA_DEBUG.g_err_stage := 'p_fc_end_date : '||p_fc_end_date;
500: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
501: PA_DEBUG.g_err_stage := 'p_org_rollup_method : '||p_org_rollup_method;
502: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
503: PA_DEBUG.g_err_stage := 'p_debug_mode : '||p_debug_mode;
504: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
505: END IF;
506:
507: /*
500: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
501: PA_DEBUG.g_err_stage := 'p_org_rollup_method : '||p_org_rollup_method;
502: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
503: PA_DEBUG.g_err_stage := 'p_debug_mode : '||p_debug_mode;
504: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
505: END IF;
506:
507: /*
508: * Write messages to the concurrent OUT file
509: */
510:
511: FND_MESSAGE.Set_Name('PA','PA_UTIL_FCT_FROM_DATE');
512: l_fnd_msg := p_fc_start_date||' : '||FND_MESSAGE.Get;
513: PA_DEBUG.Log_Message(p_message => l_fnd_msg
514: , p_write_mode => 1
515: , p_write_file => 'OUT'
516: );
517: FND_MESSAGE.Set_Name('PA','PA_UTIL_FCT_THRU_DATE');
515: , p_write_file => 'OUT'
516: );
517: FND_MESSAGE.Set_Name('PA','PA_UTIL_FCT_THRU_DATE');
518: l_fnd_msg := p_fc_end_date||' : '||FND_MESSAGE.Get;
519: PA_DEBUG.Log_Message(p_message => l_fnd_msg
520: , p_write_mode => 1
521: , p_write_file => 'OUT'
522: );
523: FND_MESSAGE.Set_Name('PA','PA_UTIL_ORGZ_ROLLUP_METHOD');
521: , p_write_file => 'OUT'
522: );
523: FND_MESSAGE.Set_Name('PA','PA_UTIL_ORGZ_ROLLUP_METHOD');
524: l_fnd_msg := p_org_rollup_method||' : '||FND_MESSAGE.Get;
525: PA_DEBUG.Log_Message(p_message => l_fnd_msg
526: , p_write_mode => 1
527: , p_write_file => 'OUT'
528: );
529: FND_MESSAGE.Set_Name('PA','PA_UTIL_FETCH_SIZE');
527: , p_write_file => 'OUT'
528: );
529: FND_MESSAGE.Set_Name('PA','PA_UTIL_FETCH_SIZE');
530: l_fnd_msg := PA_REP_UTIL_GLOB.G_util_fetch_size||' : '||FND_MESSAGE.Get;
531: PA_DEBUG.Log_Message(p_message => l_fnd_msg
532: , p_write_mode => 1
533: , p_write_file => 'OUT'
534: );
535: FND_MESSAGE.Set_Name('PA','PA_UTIL_SUCCESSFUL_RUN');
533: , p_write_file => 'OUT'
534: );
535: FND_MESSAGE.Set_Name('PA','PA_UTIL_SUCCESSFUL_RUN');
536: l_fnd_msg := FND_MESSAGE.Get;
537: PA_DEBUG.Log_Message(p_message => l_fnd_msg
538: , p_write_mode => 1
539: , p_write_file => 'OUT'
540: );
541:
539: , p_write_file => 'OUT'
540: );
541:
542: IF l_debug ='Y'THEN -- bug 2674619
543: PA_DEBUG.g_err_stage := 'Messages';
544: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
545: PA_DEBUG.g_err_stage := '--------';
546: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
547:
540: );
541:
542: IF l_debug ='Y'THEN -- bug 2674619
543: PA_DEBUG.g_err_stage := 'Messages';
544: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
545: PA_DEBUG.g_err_stage := '--------';
546: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
547:
548: PA_DEBUG.g_err_stage := '50 : Inside PA_REP_UTIL_GLOB.get_util_fc_parm';
541:
542: IF l_debug ='Y'THEN -- bug 2674619
543: PA_DEBUG.g_err_stage := 'Messages';
544: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
545: PA_DEBUG.g_err_stage := '--------';
546: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
547:
548: PA_DEBUG.g_err_stage := '50 : Inside PA_REP_UTIL_GLOB.get_util_fc_parm';
549: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
542: IF l_debug ='Y'THEN -- bug 2674619
543: PA_DEBUG.g_err_stage := 'Messages';
544: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
545: PA_DEBUG.g_err_stage := '--------';
546: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
547:
548: PA_DEBUG.g_err_stage := '50 : Inside PA_REP_UTIL_GLOB.get_util_fc_parm';
549: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
550: END IF;
544: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
545: PA_DEBUG.g_err_stage := '--------';
546: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
547:
548: PA_DEBUG.g_err_stage := '50 : Inside PA_REP_UTIL_GLOB.get_util_fc_parm';
549: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
550: END IF;
551:
552: IF TRUNC(TO_DATE(p_fc_start_date,'YYYY/MM/DD HH24:MI:SS')) >
545: PA_DEBUG.g_err_stage := '--------';
546: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
547:
548: PA_DEBUG.g_err_stage := '50 : Inside PA_REP_UTIL_GLOB.get_util_fc_parm';
549: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
550: END IF;
551:
552: IF TRUNC(TO_DATE(p_fc_start_date,'YYYY/MM/DD HH24:MI:SS')) >
553: TRUNC(TO_DATE(p_fc_end_date, 'YYYY/MM/DD HH24:MI:SS')) THEN
553: TRUNC(TO_DATE(p_fc_end_date, 'YYYY/MM/DD HH24:MI:SS')) THEN
554: retcode := 2;
555: errbuf := 'The Given Date Range is Invalid';
556: IF l_debug ='Y'THEN -- bug 2674619
557: PA_DEBUG.g_err_stage := '100 : The Given Date Range is Invalid';
558: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
559: END IF;
560: FND_MESSAGE.Set_Name('PA','PA_UTIL_INVALID_DATE_RANGE');
561: l_fnd_msg := FND_MESSAGE.Get;
554: retcode := 2;
555: errbuf := 'The Given Date Range is Invalid';
556: IF l_debug ='Y'THEN -- bug 2674619
557: PA_DEBUG.g_err_stage := '100 : The Given Date Range is Invalid';
558: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
559: END IF;
560: FND_MESSAGE.Set_Name('PA','PA_UTIL_INVALID_DATE_RANGE');
561: l_fnd_msg := FND_MESSAGE.Get;
562: PA_DEBUG.Log_Message(p_message => l_fnd_msg
558: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
559: END IF;
560: FND_MESSAGE.Set_Name('PA','PA_UTIL_INVALID_DATE_RANGE');
561: l_fnd_msg := FND_MESSAGE.Get;
562: PA_DEBUG.Log_Message(p_message => l_fnd_msg
563: , p_write_mode => 1
564: , p_write_file => 'OUT');
565: PA_Debug.Reset_Curr_Function;
566: RETURN;
561: l_fnd_msg := FND_MESSAGE.Get;
562: PA_DEBUG.Log_Message(p_message => l_fnd_msg
563: , p_write_mode => 1
564: , p_write_file => 'OUT');
565: PA_Debug.Reset_Curr_Function;
566: RETURN;
567: END IF;
568: IF l_debug ='Y'THEN -- bug 2674619
569:
566: RETURN;
567: END IF;
568: IF l_debug ='Y'THEN -- bug 2674619
569:
570: PA_DEBUG.g_err_stage := '100 : Before Calling PA_REP_UTIL_GLOB.Get_Util_Prc_Switch';
571: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
572: END IF;
573: Get_Util_Prc_Switch (
574: x_prc_switch => l_prc_switch
567: END IF;
568: IF l_debug ='Y'THEN -- bug 2674619
569:
570: PA_DEBUG.g_err_stage := '100 : Before Calling PA_REP_UTIL_GLOB.Get_Util_Prc_Switch';
571: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
572: END IF;
573: Get_Util_Prc_Switch (
574: x_prc_switch => l_prc_switch
575: ,x_msg_data => l_errbuf
575: ,x_msg_data => l_errbuf
576: ,x_return_status => l_retcode
577: );
578: IF l_debug ='Y'THEN -- bug 2674619
579: PA_DEBUG.g_err_stage := '150 : After Calling PA_REP_UTIL_GLOB.Get_Util_Prc_Switch';
580: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
581: END IF;
582:
583: IF ( l_prc_switch = 'F' OR l_prc_switch = 'B') THEN
576: ,x_return_status => l_retcode
577: );
578: IF l_debug ='Y'THEN -- bug 2674619
579: PA_DEBUG.g_err_stage := '150 : After Calling PA_REP_UTIL_GLOB.Get_Util_Prc_Switch';
580: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
581: END IF;
582:
583: IF ( l_prc_switch = 'F' OR l_prc_switch = 'B') THEN
584: IF l_debug ='Y'THEN -- bug 2674619
581: END IF;
582:
583: IF ( l_prc_switch = 'F' OR l_prc_switch = 'B') THEN
584: IF l_debug ='Y'THEN -- bug 2674619
585: PA_DEBUG.g_err_stage := '200 : Before calling PA_REP_UTIL_GLOB.initialize_util_cache';
586: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
587: END IF;
588:
589: PA_REP_UTIL_GLOB.initialize_util_cache(
582:
583: IF ( l_prc_switch = 'F' OR l_prc_switch = 'B') THEN
584: IF l_debug ='Y'THEN -- bug 2674619
585: PA_DEBUG.g_err_stage := '200 : Before calling PA_REP_UTIL_GLOB.initialize_util_cache';
586: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
587: END IF;
588:
589: PA_REP_UTIL_GLOB.initialize_util_cache(
590: p_ac_start_date => TRUNC(TO_DATE(p_ac_start_date,'YYYY/MM/DD HH24:MI:SS'))
594: ,p_org_rollup_method => p_org_rollup_method
595: ,p_debug_mode => p_debug_mode
596: );
597: IF l_debug ='Y'THEN -- bug 2674619
598: PA_DEBUG.g_err_stage := '250 : After calling PA_REP_UTIL_GLOB.initialize_util_cache';
599: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
600: END IF;
601:
602: /*
595: ,p_debug_mode => p_debug_mode
596: );
597: IF l_debug ='Y'THEN -- bug 2674619
598: PA_DEBUG.g_err_stage := '250 : After calling PA_REP_UTIL_GLOB.initialize_util_cache';
599: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
600: END IF;
601:
602: /*
603: * Bug 1810528
612: AND ORG_HIERARCHY_VERSION_ID = pa_rep_util_glob.G_implementation_details.
613: G_org_structure_version_id
614: ;
615: IF l_debug ='Y'THEN -- bug 2674619
616: PA_DEBUG.g_err_stage := '300 : Max Last_Update_Date of pa_org_hierarchy_denorm before the run is <'||l_orghier_date_before||'>';
617: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
618: PA_DEBUG.g_err_stage := '330 : Before calling PA_REP_UTIL_GLOB.Get_Effective_Start_Period_Num';
619: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
620: END IF;
613: G_org_structure_version_id
614: ;
615: IF l_debug ='Y'THEN -- bug 2674619
616: PA_DEBUG.g_err_stage := '300 : Max Last_Update_Date of pa_org_hierarchy_denorm before the run is <'||l_orghier_date_before||'>';
617: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
618: PA_DEBUG.g_err_stage := '330 : Before calling PA_REP_UTIL_GLOB.Get_Effective_Start_Period_Num';
619: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
620: END IF;
621:
614: ;
615: IF l_debug ='Y'THEN -- bug 2674619
616: PA_DEBUG.g_err_stage := '300 : Max Last_Update_Date of pa_org_hierarchy_denorm before the run is <'||l_orghier_date_before||'>';
617: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
618: PA_DEBUG.g_err_stage := '330 : Before calling PA_REP_UTIL_GLOB.Get_Effective_Start_Period_Num';
619: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
620: END IF;
621:
622: IF pa_rep_util_glob.G_input_parameters.G_org_rollup_method = 'R' THEN
615: IF l_debug ='Y'THEN -- bug 2674619
616: PA_DEBUG.g_err_stage := '300 : Max Last_Update_Date of pa_org_hierarchy_denorm before the run is <'||l_orghier_date_before||'>';
617: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
618: PA_DEBUG.g_err_stage := '330 : Before calling PA_REP_UTIL_GLOB.Get_Effective_Start_Period_Num';
619: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
620: END IF;
621:
622: IF pa_rep_util_glob.G_input_parameters.G_org_rollup_method = 'R' THEN
623: IF pa_rep_util_glob.G_util_option_details.G_pa_period_flag = 'Y' THEN
634: );
635: IF l_retcode = '2' THEN
636: retcode := '2';
637: IF l_debug ='Y'THEN -- bug 2674619
638: PA_DEBUG.g_err_stage := '350 : There is no matching PA period for the given Start Date';
639: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
640: END IF;
641: FND_MESSAGE.Set_Name('PA','PA_UTIL_INVALID_START_DATE_PA');
642: l_fnd_msg := FND_MESSAGE.Get;
635: IF l_retcode = '2' THEN
636: retcode := '2';
637: IF l_debug ='Y'THEN -- bug 2674619
638: PA_DEBUG.g_err_stage := '350 : There is no matching PA period for the given Start Date';
639: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
640: END IF;
641: FND_MESSAGE.Set_Name('PA','PA_UTIL_INVALID_START_DATE_PA');
642: l_fnd_msg := FND_MESSAGE.Get;
643: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage
639: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
640: END IF;
641: FND_MESSAGE.Set_Name('PA','PA_UTIL_INVALID_START_DATE_PA');
642: l_fnd_msg := FND_MESSAGE.Get;
643: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage
644: , p_write_mode => 1
645: , p_write_file => 'OUT');
646: PA_Debug.Reset_Curr_Function;
647: RETURN;
642: l_fnd_msg := FND_MESSAGE.Get;
643: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage
644: , p_write_mode => 1
645: , p_write_file => 'OUT');
646: PA_Debug.Reset_Curr_Function;
647: RETURN;
648: ELSE
649: IF l_debug ='Y'THEN -- bug 2674619
650: PA_DEBUG.g_err_stage := '350 : Eff pd Num-PA '||to_char(l_effect_start_period_num);
646: PA_Debug.Reset_Curr_Function;
647: RETURN;
648: ELSE
649: IF l_debug ='Y'THEN -- bug 2674619
650: PA_DEBUG.g_err_stage := '350 : Eff pd Num-PA '||to_char(l_effect_start_period_num);
651: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
652: END IF;
653: PA_REP_UTIL_GLOB.G_eff_fc_start_pa_period_num := l_effect_start_period_num;
654: END IF;
647: RETURN;
648: ELSE
649: IF l_debug ='Y'THEN -- bug 2674619
650: PA_DEBUG.g_err_stage := '350 : Eff pd Num-PA '||to_char(l_effect_start_period_num);
651: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
652: END IF;
653: PA_REP_UTIL_GLOB.G_eff_fc_start_pa_period_num := l_effect_start_period_num;
654: END IF;
655: END IF;
667: );
668: IF l_retcode = '2' THEN
669: retcode := '2';
670: IF l_debug ='Y'THEN -- bug 2674619
671: PA_DEBUG.g_err_stage := '400 : There is no matching GL period for the given Start Date';
672: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
673: END IF;
674: FND_MESSAGE.Set_Name('PA','PA_UTIL_INVALID_START_DATE_GL');
675: l_fnd_msg := FND_MESSAGE.Get;
668: IF l_retcode = '2' THEN
669: retcode := '2';
670: IF l_debug ='Y'THEN -- bug 2674619
671: PA_DEBUG.g_err_stage := '400 : There is no matching GL period for the given Start Date';
672: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
673: END IF;
674: FND_MESSAGE.Set_Name('PA','PA_UTIL_INVALID_START_DATE_GL');
675: l_fnd_msg := FND_MESSAGE.Get;
676: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage
672: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
673: END IF;
674: FND_MESSAGE.Set_Name('PA','PA_UTIL_INVALID_START_DATE_GL');
675: l_fnd_msg := FND_MESSAGE.Get;
676: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage
677: , p_write_mode => 1
678: , p_write_file => 'OUT');
679: PA_Debug.Reset_Curr_Function;
680: RETURN;
675: l_fnd_msg := FND_MESSAGE.Get;
676: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage
677: , p_write_mode => 1
678: , p_write_file => 'OUT');
679: PA_Debug.Reset_Curr_Function;
680: RETURN;
681: ELSE
682: IF l_debug ='Y'THEN -- bug 2674619
683:
680: RETURN;
681: ELSE
682: IF l_debug ='Y'THEN -- bug 2674619
683:
684: PA_DEBUG.g_err_stage := '400 : Eff pd Num-GL '||to_char(l_effect_start_period_num);
685: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
686: END IF;
687: PA_REP_UTIL_GLOB.G_eff_fc_start_gl_period_num := l_effect_start_period_num;
688: END IF;
681: ELSE
682: IF l_debug ='Y'THEN -- bug 2674619
683:
684: PA_DEBUG.g_err_stage := '400 : Eff pd Num-GL '||to_char(l_effect_start_period_num);
685: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
686: END IF;
687: PA_REP_UTIL_GLOB.G_eff_fc_start_gl_period_num := l_effect_start_period_num;
688: END IF;
689: END IF;
689: END IF;
690: END IF;
691:
692: IF l_debug ='Y'THEN -- bug 2674619
693: PA_DEBUG.g_err_stage := '450 : After calling PA_REP_UTIL_GLOB.Get_Effective_Start_Period_Num';
694: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
695: PA_DEBUG.g_err_stage := '500 : Before calling PA_SUMMARIZE_FORECAST_UTIL_PVT.summarize_forecast_util';
696: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
697: END IF;
690: END IF;
691:
692: IF l_debug ='Y'THEN -- bug 2674619
693: PA_DEBUG.g_err_stage := '450 : After calling PA_REP_UTIL_GLOB.Get_Effective_Start_Period_Num';
694: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
695: PA_DEBUG.g_err_stage := '500 : Before calling PA_SUMMARIZE_FORECAST_UTIL_PVT.summarize_forecast_util';
696: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
697: END IF;
698:
691:
692: IF l_debug ='Y'THEN -- bug 2674619
693: PA_DEBUG.g_err_stage := '450 : After calling PA_REP_UTIL_GLOB.Get_Effective_Start_Period_Num';
694: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
695: PA_DEBUG.g_err_stage := '500 : Before calling PA_SUMMARIZE_FORECAST_UTIL_PVT.summarize_forecast_util';
696: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
697: END IF;
698:
699: PA_SUMMARIZE_FORECAST_UTIL_PVT.summarize_forecast_util;
692: IF l_debug ='Y'THEN -- bug 2674619
693: PA_DEBUG.g_err_stage := '450 : After calling PA_REP_UTIL_GLOB.Get_Effective_Start_Period_Num';
694: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
695: PA_DEBUG.g_err_stage := '500 : Before calling PA_SUMMARIZE_FORECAST_UTIL_PVT.summarize_forecast_util';
696: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
697: END IF;
698:
699: PA_SUMMARIZE_FORECAST_UTIL_PVT.summarize_forecast_util;
700: IF l_debug ='Y'THEN -- bug 2674619
697: END IF;
698:
699: PA_SUMMARIZE_FORECAST_UTIL_PVT.summarize_forecast_util;
700: IF l_debug ='Y'THEN -- bug 2674619
701: PA_DEBUG.g_err_stage := '550 : After calling PA_SUMMARIZE_FORECAST_UTIL_PVT.summarize_forecast_util';
702: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
703: END IF;
704: ELSE
705: IF l_debug ='Y'THEN -- bug 2674619
698:
699: PA_SUMMARIZE_FORECAST_UTIL_PVT.summarize_forecast_util;
700: IF l_debug ='Y'THEN -- bug 2674619
701: PA_DEBUG.g_err_stage := '550 : After calling PA_SUMMARIZE_FORECAST_UTIL_PVT.summarize_forecast_util';
702: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
703: END IF;
704: ELSE
705: IF l_debug ='Y'THEN -- bug 2674619
706:
703: END IF;
704: ELSE
705: IF l_debug ='Y'THEN -- bug 2674619
706:
707: PA_DEBUG.g_err_stage := '400 : Oracle PRM Not Installed ... Not Running Forecast';
708: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
709: END IF;
710: FND_MESSAGE.Set_Name('PA','PA_UTIL_PRM_NOT_INSTALLED');
711: l_fnd_msg := FND_MESSAGE.Get;
704: ELSE
705: IF l_debug ='Y'THEN -- bug 2674619
706:
707: PA_DEBUG.g_err_stage := '400 : Oracle PRM Not Installed ... Not Running Forecast';
708: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
709: END IF;
710: FND_MESSAGE.Set_Name('PA','PA_UTIL_PRM_NOT_INSTALLED');
711: l_fnd_msg := FND_MESSAGE.Get;
712: PA_DEBUG.Log_Message(p_message => l_fnd_msg
708: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
709: END IF;
710: FND_MESSAGE.Set_Name('PA','PA_UTIL_PRM_NOT_INSTALLED');
711: l_fnd_msg := FND_MESSAGE.Get;
712: PA_DEBUG.Log_Message(p_message => l_fnd_msg
713: , p_write_mode => 1
714: , p_write_file => 'OUT');
715: PA_DEBUG.Reset_Curr_Function;
716: RETURN;
711: l_fnd_msg := FND_MESSAGE.Get;
712: PA_DEBUG.Log_Message(p_message => l_fnd_msg
713: , p_write_mode => 1
714: , p_write_file => 'OUT');
715: PA_DEBUG.Reset_Curr_Function;
716: RETURN;
717: END IF;
718:
719: /*
729:
730: IF ( l_orghier_date_after > l_orghier_date_before) then
731: FND_MESSAGE.Set_Name('PA','PA_UTIL_ORGZ_HIER_CHANGE');
732: l_fnd_msg := FND_MESSAGE.Get;
733: PA_DEBUG.Log_Message(p_message => l_fnd_msg);
734: PA_DEBUG.Log_Message(p_message => l_fnd_msg
735: , p_write_mode => 1
736: , p_write_file => 'OUT'
737: );
730: IF ( l_orghier_date_after > l_orghier_date_before) then
731: FND_MESSAGE.Set_Name('PA','PA_UTIL_ORGZ_HIER_CHANGE');
732: l_fnd_msg := FND_MESSAGE.Get;
733: PA_DEBUG.Log_Message(p_message => l_fnd_msg);
734: PA_DEBUG.Log_Message(p_message => l_fnd_msg
735: , p_write_mode => 1
736: , p_write_file => 'OUT'
737: );
738: ELSE
737: );
738: ELSE
739: FND_MESSAGE.Set_Name('PA','PA_UTIL_SUCCESSFUL_RUN');
740: l_fnd_msg := FND_MESSAGE.Get;
741: PA_DEBUG.Log_Message(p_message => l_fnd_msg);
742: PA_DEBUG.Log_Message(p_message => l_fnd_msg
743: , p_write_mode => 1
744: , p_write_file => 'OUT'
745: );
738: ELSE
739: FND_MESSAGE.Set_Name('PA','PA_UTIL_SUCCESSFUL_RUN');
740: l_fnd_msg := FND_MESSAGE.Get;
741: PA_DEBUG.Log_Message(p_message => l_fnd_msg);
742: PA_DEBUG.Log_Message(p_message => l_fnd_msg
743: , p_write_mode => 1
744: , p_write_file => 'OUT'
745: );
746: END IF;
744: , p_write_file => 'OUT'
745: );
746: END IF;
747: IF l_debug ='Y'THEN -- bug 2674619
748: PA_DEBUG.g_err_stage := '310 : Max Last_Update_Date of pa_org_hierarchy_denorm after the run is <'||l_orghier_date_after||'>';
749: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
750:
751: PA_DEBUG.g_err_stage := '650 : Exiting PA_REP_UTIL_GLOB.get_util_fc_parm';
752: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
745: );
746: END IF;
747: IF l_debug ='Y'THEN -- bug 2674619
748: PA_DEBUG.g_err_stage := '310 : Max Last_Update_Date of pa_org_hierarchy_denorm after the run is <'||l_orghier_date_after||'>';
749: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
750:
751: PA_DEBUG.g_err_stage := '650 : Exiting PA_REP_UTIL_GLOB.get_util_fc_parm';
752: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
753: END IF;
747: IF l_debug ='Y'THEN -- bug 2674619
748: PA_DEBUG.g_err_stage := '310 : Max Last_Update_Date of pa_org_hierarchy_denorm after the run is <'||l_orghier_date_after||'>';
749: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
750:
751: PA_DEBUG.g_err_stage := '650 : Exiting PA_REP_UTIL_GLOB.get_util_fc_parm';
752: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
753: END IF;
754: PA_DEBUG.Reset_Curr_Function;
755: EXCEPTION
748: PA_DEBUG.g_err_stage := '310 : Max Last_Update_Date of pa_org_hierarchy_denorm after the run is <'||l_orghier_date_after||'>';
749: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
750:
751: PA_DEBUG.g_err_stage := '650 : Exiting PA_REP_UTIL_GLOB.get_util_fc_parm';
752: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
753: END IF;
754: PA_DEBUG.Reset_Curr_Function;
755: EXCEPTION
756: WHEN OTHERS THEN
750:
751: PA_DEBUG.g_err_stage := '650 : Exiting PA_REP_UTIL_GLOB.get_util_fc_parm';
752: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
753: END IF;
754: PA_DEBUG.Reset_Curr_Function;
755: EXCEPTION
756: WHEN OTHERS THEN
757:
758: retcode := 2;
756: WHEN OTHERS THEN
757:
758: retcode := 2;
759: errbuf := SUBSTR(SQLERRM,1,240);
760: PA_DEBUG.Log_Message( SQLERRM);
761: PA_DEBUG.Log_Message(PA_DEBUG.g_err_stack);
762: PA_DEBUG.Log_Message(p_message => SQLERRM
763: , p_write_mode => 1
764: , p_write_file => 'OUT'
757:
758: retcode := 2;
759: errbuf := SUBSTR(SQLERRM,1,240);
760: PA_DEBUG.Log_Message( SQLERRM);
761: PA_DEBUG.Log_Message(PA_DEBUG.g_err_stack);
762: PA_DEBUG.Log_Message(p_message => SQLERRM
763: , p_write_mode => 1
764: , p_write_file => 'OUT'
765: );
758: retcode := 2;
759: errbuf := SUBSTR(SQLERRM,1,240);
760: PA_DEBUG.Log_Message( SQLERRM);
761: PA_DEBUG.Log_Message(PA_DEBUG.g_err_stack);
762: PA_DEBUG.Log_Message(p_message => SQLERRM
763: , p_write_mode => 1
764: , p_write_file => 'OUT'
765: );
766: /*
767: * Set the excetption Message and the stack
768: */
769: FND_MSG_PUB.add_exc_msg (
770: p_pkg_name => 'PA_REP_UTIL_GLOB.get_util_fc_parm'
771: ,p_procedure_name => PA_DEBUG.G_Err_Stack
772: );
773: RAISE;
774:
775: END Get_Util_Fc_Parm;
783: l_pa_installed BOOLEAN;
784: l_prm_installed VARCHAR2(2);
785: BEGIN
786:
787: PA_DEBUG.Set_Curr_Function( p_function => 'Get_Util_Prc_Switch');
788: IF l_debug ='Y'THEN -- bug 2674619
789: PA_DEBUG.g_err_stage := '50 : Entering PA_REP_UTIL_GLOB.Get_Util_Prc_Switch';
790: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
791: END IF;
785: BEGIN
786:
787: PA_DEBUG.Set_Curr_Function( p_function => 'Get_Util_Prc_Switch');
788: IF l_debug ='Y'THEN -- bug 2674619
789: PA_DEBUG.g_err_stage := '50 : Entering PA_REP_UTIL_GLOB.Get_Util_Prc_Switch';
790: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
791: END IF;
792: /*
793: * assume success
786:
787: PA_DEBUG.Set_Curr_Function( p_function => 'Get_Util_Prc_Switch');
788: IF l_debug ='Y'THEN -- bug 2674619
789: PA_DEBUG.g_err_stage := '50 : Entering PA_REP_UTIL_GLOB.Get_Util_Prc_Switch';
790: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
791: END IF;
792: /*
793: * assume success
794: */
809: */
810: x_prc_switch := 'X';
811: END IF;
812: IF l_debug ='Y'THEN -- bug 2674619
813: PA_DEBUG.g_err_stage := '100 : X_PRC_SWITCH Value : '||x_prc_switch;
814: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
815:
816: -- PA_DEBUG.init_err_stack('PA_REP_UTIL_GLOB.Get_Util_Prc_Switch');
817: PA_DEBUG.g_err_stage := '150 : Exiting PA_REP_UTIL_GLOB.Get_Util_Prc_Switch';
810: x_prc_switch := 'X';
811: END IF;
812: IF l_debug ='Y'THEN -- bug 2674619
813: PA_DEBUG.g_err_stage := '100 : X_PRC_SWITCH Value : '||x_prc_switch;
814: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
815:
816: -- PA_DEBUG.init_err_stack('PA_REP_UTIL_GLOB.Get_Util_Prc_Switch');
817: PA_DEBUG.g_err_stage := '150 : Exiting PA_REP_UTIL_GLOB.Get_Util_Prc_Switch';
818: END IF;
812: IF l_debug ='Y'THEN -- bug 2674619
813: PA_DEBUG.g_err_stage := '100 : X_PRC_SWITCH Value : '||x_prc_switch;
814: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
815:
816: -- PA_DEBUG.init_err_stack('PA_REP_UTIL_GLOB.Get_Util_Prc_Switch');
817: PA_DEBUG.g_err_stage := '150 : Exiting PA_REP_UTIL_GLOB.Get_Util_Prc_Switch';
818: END IF;
819: PA_DEBUG.Reset_Curr_Function;
820:
813: PA_DEBUG.g_err_stage := '100 : X_PRC_SWITCH Value : '||x_prc_switch;
814: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
815:
816: -- PA_DEBUG.init_err_stack('PA_REP_UTIL_GLOB.Get_Util_Prc_Switch');
817: PA_DEBUG.g_err_stage := '150 : Exiting PA_REP_UTIL_GLOB.Get_Util_Prc_Switch';
818: END IF;
819: PA_DEBUG.Reset_Curr_Function;
820:
821: EXCEPTION
815:
816: -- PA_DEBUG.init_err_stack('PA_REP_UTIL_GLOB.Get_Util_Prc_Switch');
817: PA_DEBUG.g_err_stage := '150 : Exiting PA_REP_UTIL_GLOB.Get_Util_Prc_Switch';
818: END IF;
819: PA_DEBUG.Reset_Curr_Function;
820:
821: EXCEPTION
822: WHEN OTHERS THEN
823: x_return_status := 2;
821: EXCEPTION
822: WHEN OTHERS THEN
823: x_return_status := 2;
824: x_msg_data := SUBSTR(SQLERRM,1,240);
825: PA_DEBUG.Log_Message( SQLERRM);
826: PA_DEBUG.Log_Message(PA_DEBUG.g_err_stack);
827: RAISE;
828: END Get_Util_Prc_Switch;
829:
822: WHEN OTHERS THEN
823: x_return_status := 2;
824: x_msg_data := SUBSTR(SQLERRM,1,240);
825: PA_DEBUG.Log_Message( SQLERRM);
826: PA_DEBUG.Log_Message(PA_DEBUG.g_err_stack);
827: RAISE;
828: END Get_Util_Prc_Switch;
829:
830: PROCEDURE initialize_util_cache(
836: ,p_debug_mode IN VARCHAR2
837: )
838: IS
839: BEGIN
840: PA_DEBUG.Set_Curr_Function( p_function => 'Initialize_Util_Cache');
841: IF l_debug ='Y'THEN -- bug 2674619
842: PA_DEBUG.g_err_stage := '50 : Entering PA_REP_UTIL_GLOB.initialize_util_cache';
843: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
844: END IF;
838: IS
839: BEGIN
840: PA_DEBUG.Set_Curr_Function( p_function => 'Initialize_Util_Cache');
841: IF l_debug ='Y'THEN -- bug 2674619
842: PA_DEBUG.g_err_stage := '50 : Entering PA_REP_UTIL_GLOB.initialize_util_cache';
843: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
844: END IF;
845: /*
846: * Initialize the Global variables with the user specified
839: BEGIN
840: PA_DEBUG.Set_Curr_Function( p_function => 'Initialize_Util_Cache');
841: IF l_debug ='Y'THEN -- bug 2674619
842: PA_DEBUG.g_err_stage := '50 : Entering PA_REP_UTIL_GLOB.initialize_util_cache';
843: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
844: END IF;
845: /*
846: * Initialize the Global variables with the user specified
847: * input parameters.
863: TO_DATE('31-12-4712','DD-MM-YYYY'));
864: G_input_parameters.G_org_rollup_method := p_org_rollup_method;
865: G_input_parameters.G_debug_mode := p_debug_mode;
866: IF l_debug ='Y'THEN -- bug 2674619
867: PA_DEBUG.g_err_stage := '100 : Exiting PA_REP_UTIL_GLOB.initialize_util_cache';
868: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
869: PA_DEBUG.Reset_Curr_Function;
870: END IF;
871: EXCEPTION
864: G_input_parameters.G_org_rollup_method := p_org_rollup_method;
865: G_input_parameters.G_debug_mode := p_debug_mode;
866: IF l_debug ='Y'THEN -- bug 2674619
867: PA_DEBUG.g_err_stage := '100 : Exiting PA_REP_UTIL_GLOB.initialize_util_cache';
868: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
869: PA_DEBUG.Reset_Curr_Function;
870: END IF;
871: EXCEPTION
872: WHEN OTHERS THEN
865: G_input_parameters.G_debug_mode := p_debug_mode;
866: IF l_debug ='Y'THEN -- bug 2674619
867: PA_DEBUG.g_err_stage := '100 : Exiting PA_REP_UTIL_GLOB.initialize_util_cache';
868: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
869: PA_DEBUG.Reset_Curr_Function;
870: END IF;
871: EXCEPTION
872: WHEN OTHERS THEN
873: PA_DEBUG.Log_Message( SQLERRM);
869: PA_DEBUG.Reset_Curr_Function;
870: END IF;
871: EXCEPTION
872: WHEN OTHERS THEN
873: PA_DEBUG.Log_Message( SQLERRM);
874: PA_DEBUG.Log_Message(PA_DEBUG.g_err_stack);
875: RAISE;
876: END initialize_util_cache;
877:
870: END IF;
871: EXCEPTION
872: WHEN OTHERS THEN
873: PA_DEBUG.Log_Message( SQLERRM);
874: PA_DEBUG.Log_Message(PA_DEBUG.g_err_stack);
875: RAISE;
876: END initialize_util_cache;
877:
878: PROCEDURE Get_Effective_Start_Period_Num( errbuf OUT NOCOPY VARCHAR2
885: IS
886: BEGIN
887: retcode := 0;
888:
889: PA_DEBUG.Set_Curr_Function( p_function => 'Get_Effective_Start_Period_Num');
890: IF l_debug ='Y'THEN -- bug 2674619
891:
892: PA_DEBUG.g_err_stage := '50 : Entering PA_REP_UTIL_GLOB.Get_Effective_Start_Period_Num';
893: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
888:
889: PA_DEBUG.Set_Curr_Function( p_function => 'Get_Effective_Start_Period_Num');
890: IF l_debug ='Y'THEN -- bug 2674619
891:
892: PA_DEBUG.g_err_stage := '50 : Entering PA_REP_UTIL_GLOB.Get_Effective_Start_Period_Num';
893: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
894: END IF;
895:
896: SELECT (g.period_year*10000) + g.period_num
889: PA_DEBUG.Set_Curr_Function( p_function => 'Get_Effective_Start_Period_Num');
890: IF l_debug ='Y'THEN -- bug 2674619
891:
892: PA_DEBUG.g_err_stage := '50 : Entering PA_REP_UTIL_GLOB.Get_Effective_Start_Period_Num';
893: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
894: END IF;
895:
896: SELECT (g.period_year*10000) + g.period_num
897: INTO effective_start_period_num
905: -- AND map.period_set_name = G_implementation_details.G_period_set_name;
906: AND map.period_set_name = p_period_set_name; --bug 3434019
907:
908: IF l_debug ='Y'THEN -- bug 2674619
909: PA_DEBUG.g_err_stage := '100 : Exiting PA_REP_UTIL_GLOB.Get_Effective_Start_Period_Num';
910: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
911: END IF;
912: EXCEPTION
913: WHEN NO_DATA_FOUND THEN
906: AND map.period_set_name = p_period_set_name; --bug 3434019
907:
908: IF l_debug ='Y'THEN -- bug 2674619
909: PA_DEBUG.g_err_stage := '100 : Exiting PA_REP_UTIL_GLOB.Get_Effective_Start_Period_Num';
910: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
911: END IF;
912: EXCEPTION
913: WHEN NO_DATA_FOUND THEN
914: retcode := 2;
925: */
926: PROCEDURE initialize_amt_type_id_cache
927: IS
928: BEGIN
929: PA_DEBUG.Set_Curr_Function( p_function => 'Initialize_Amt_Type_Id_Cache');
930: IF l_debug ='Y'THEN -- bug 2674619
931: PA_DEBUG.g_err_stage := '50 : Entering PA_REP_UTIL_GLOB.initialize_amt_type_id_cache';
932: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
933: END IF;
927: IS
928: BEGIN
929: PA_DEBUG.Set_Curr_Function( p_function => 'Initialize_Amt_Type_Id_Cache');
930: IF l_debug ='Y'THEN -- bug 2674619
931: PA_DEBUG.g_err_stage := '50 : Entering PA_REP_UTIL_GLOB.initialize_amt_type_id_cache';
932: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
933: END IF;
934: /*
935: * Initialize the amount type_id variables with their
928: BEGIN
929: PA_DEBUG.Set_Curr_Function( p_function => 'Initialize_Amt_Type_Id_Cache');
930: IF l_debug ='Y'THEN -- bug 2674619
931: PA_DEBUG.g_err_stage := '50 : Entering PA_REP_UTIL_GLOB.initialize_amt_type_id_cache';
932: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
933: END IF;
934: /*
935: * Initialize the amount type_id variables with their
936: * corresponding values.
980: G_amt_type_details.G_org_tot_headcount_id := 39;
981: G_amt_type_details.G_org_tot_empheadcount_id := 40;
982: G_amt_type_details.G_quantity_id := 41;
983: IF l_debug ='Y'THEN -- bug 2674619
984: PA_DEBUG.g_err_stage := '100 : Exiting PA_REP_UTIL_GLOB.initialize_amt_type_id_cache';
985: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
986: END IF;
987: PA_DEBUG.Reset_Curr_Function;
988:
981: G_amt_type_details.G_org_tot_empheadcount_id := 40;
982: G_amt_type_details.G_quantity_id := 41;
983: IF l_debug ='Y'THEN -- bug 2674619
984: PA_DEBUG.g_err_stage := '100 : Exiting PA_REP_UTIL_GLOB.initialize_amt_type_id_cache';
985: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
986: END IF;
987: PA_DEBUG.Reset_Curr_Function;
988:
989: EXCEPTION
983: IF l_debug ='Y'THEN -- bug 2674619
984: PA_DEBUG.g_err_stage := '100 : Exiting PA_REP_UTIL_GLOB.initialize_amt_type_id_cache';
985: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
986: END IF;
987: PA_DEBUG.Reset_Curr_Function;
988:
989: EXCEPTION
990: WHEN OTHERS THEN
991: PA_DEBUG.Log_Message( SQLERRM);
987: PA_DEBUG.Reset_Curr_Function;
988:
989: EXCEPTION
990: WHEN OTHERS THEN
991: PA_DEBUG.Log_Message( SQLERRM);
992: PA_DEBUG.Log_Message(PA_DEBUG.g_err_stack);
993: RAISE;
994: END initialize_amt_type_id_cache;
995:
988:
989: EXCEPTION
990: WHEN OTHERS THEN
991: PA_DEBUG.Log_Message( SQLERRM);
992: PA_DEBUG.Log_Message(PA_DEBUG.g_err_stack);
993: RAISE;
994: END initialize_amt_type_id_cache;
995:
996: PROCEDURE SetU3PeriodType(p_period_type IN pa_implementations.pa_period_type%TYPE)
1047: */
1048: PROCEDURE auto_util_cache
1049: IS
1050: BEGIN
1051: PA_DEBUG.Set_Curr_Function( p_function => 'Auto_Util_Cache');
1052: IF l_debug ='Y'THEN -- bug 2674619
1053: PA_DEBUG.g_err_stage := '50 : Entering PA_REP_UTIL_GLOB.auto_util_cache';
1054: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
1055: END IF;
1049: IS
1050: BEGIN
1051: PA_DEBUG.Set_Curr_Function( p_function => 'Auto_Util_Cache');
1052: IF l_debug ='Y'THEN -- bug 2674619
1053: PA_DEBUG.g_err_stage := '50 : Entering PA_REP_UTIL_GLOB.auto_util_cache';
1054: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
1055: END IF;
1056:
1057: /*
1050: BEGIN
1051: PA_DEBUG.Set_Curr_Function( p_function => 'Auto_Util_Cache');
1052: IF l_debug ='Y'THEN -- bug 2674619
1053: PA_DEBUG.g_err_stage := '50 : Entering PA_REP_UTIL_GLOB.auto_util_cache';
1054: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
1055: END IF;
1056:
1057: /*
1058: * Assigning Constant values for variables supposed to
1101: /*
1102: * Populate the Global variable for the Fetch Size.
1103: */
1104: IF l_debug ='Y'THEN -- bug 2674619
1105: PA_DEBUG.g_err_stage := '100 : Before Accessing FND_PROFILE values';
1106: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
1107: END IF;
1108:
1109: --IF (FND_PROFILE.VALUE('PA_NUM_TXN_SUMM_PER_SET')) IS NOT NULL THEN
1102: * Populate the Global variable for the Fetch Size.
1103: */
1104: IF l_debug ='Y'THEN -- bug 2674619
1105: PA_DEBUG.g_err_stage := '100 : Before Accessing FND_PROFILE values';
1106: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
1107: END IF;
1108:
1109: --IF (FND_PROFILE.VALUE('PA_NUM_TXN_SUMM_PER_SET')) IS NOT NULL THEN
1110: -- G_util_fetch_size := FND_PROFILE.VALUE('PA_NUM_TXN_SUMM_PER_SET');
1121:
1122: G_util_option_details.G_util_calc_method := FND_PROFILE.VALUE('PA_RES_UTIL_DEF_CALC_METHOD');
1123:
1124: IF l_debug ='Y'THEN -- bug 2674619
1125: PA_DEBUG.g_err_stage := '150 : After Accessing FND_PROFILE values';
1126: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
1127: END IF;
1128:
1129: /*
1122: G_util_option_details.G_util_calc_method := FND_PROFILE.VALUE('PA_RES_UTIL_DEF_CALC_METHOD');
1123:
1124: IF l_debug ='Y'THEN -- bug 2674619
1125: PA_DEBUG.g_err_stage := '150 : After Accessing FND_PROFILE values';
1126: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
1127: END IF;
1128:
1129: /*
1130: * Populate the Global record for the Implementation Details.
1129: /*
1130: * Populate the Global record for the Implementation Details.
1131: */
1132: IF l_debug ='Y'THEN -- bug 2674619
1133: PA_DEBUG.g_err_stage := '200 : Before Selecting Implementation Details';
1134: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
1135: END IF;
1136:
1137: SELECT NVL(imp.org_id,-99)
1130: * Populate the Global record for the Implementation Details.
1131: */
1132: IF l_debug ='Y'THEN -- bug 2674619
1133: PA_DEBUG.g_err_stage := '200 : Before Selecting Implementation Details';
1134: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
1135: END IF;
1136:
1137: SELECT NVL(imp.org_id,-99)
1138: ,imp.org_structure_version_id
1152: ,gl_sets_of_books sob
1153: WHERE sob.set_of_books_id = imp.set_of_books_id ;
1154:
1155: IF l_debug ='Y'THEN -- bug 2674619
1156: PA_DEBUG.g_err_stage := '250 : After Selecting Implementation Details';
1157: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
1158: END IF;
1159:
1160: /*
1153: WHERE sob.set_of_books_id = imp.set_of_books_id ;
1154:
1155: IF l_debug ='Y'THEN -- bug 2674619
1156: PA_DEBUG.g_err_stage := '250 : After Selecting Implementation Details';
1157: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
1158: END IF;
1159:
1160: /*
1161: * Populate the Global record for the Utilization Options
1162: * details.
1163: * pa_utilization_options is assumed to have ONLY ONE record.
1164: */
1165: IF l_debug ='Y'THEN -- bug 2674619
1166: PA_DEBUG.g_err_stage := '300 : Before Setting the Global variables for all Period flags';
1167: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
1168: END IF;
1169:
1170: SELECT pa_period_flag
1163: * pa_utilization_options is assumed to have ONLY ONE record.
1164: */
1165: IF l_debug ='Y'THEN -- bug 2674619
1166: PA_DEBUG.g_err_stage := '300 : Before Setting the Global variables for all Period flags';
1167: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
1168: END IF;
1169:
1170: SELECT pa_period_flag
1171: ,gl_period_flag
1179: ,G_util_option_details.G_actuals_thru_date
1180: FROM pa_utilization_options;
1181:
1182: IF l_debug ='Y'THEN -- bug 2674619
1183: PA_DEBUG.g_err_stage := '350 : After Setting the Global variables for all Period flags';
1184: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
1185: END IF;
1186:
1187: /*
1180: FROM pa_utilization_options;
1181:
1182: IF l_debug ='Y'THEN -- bug 2674619
1183: PA_DEBUG.g_err_stage := '350 : After Setting the Global variables for all Period flags';
1184: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
1185: END IF;
1186:
1187: /*
1188: * Populate the Global record for the last run details
1188: * Populate the Global record for the last run details
1189: * pa_utilization_options is assumed to have ONLY ONE record.
1190: */
1191: IF l_debug ='Y'THEN -- bug 2674619
1192: PA_DEBUG.g_err_stage := '360 : Before Setting the Global variables for last run details';
1193: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
1194: END IF;
1195:
1196: SELECT actuals_last_run_date
1189: * pa_utilization_options is assumed to have ONLY ONE record.
1190: */
1191: IF l_debug ='Y'THEN -- bug 2674619
1192: PA_DEBUG.g_err_stage := '360 : Before Setting the Global variables for last run details';
1193: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
1194: END IF;
1195:
1196: SELECT actuals_last_run_date
1197: ,forecast_last_run_date
1198: INTO G_last_run_when.G_ac_last_run_date
1199: ,G_last_run_when.G_fc_last_run_date
1200: FROM pa_utilization_options;
1201: IF l_debug ='Y'THEN -- bug 2674619
1202: PA_DEBUG.g_err_stage := '370 : After Setting the Global variables for last run details';
1203: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
1204: END IF;
1205:
1206:
1199: ,G_last_run_when.G_fc_last_run_date
1200: FROM pa_utilization_options;
1201: IF l_debug ='Y'THEN -- bug 2674619
1202: PA_DEBUG.g_err_stage := '370 : After Setting the Global variables for last run details';
1203: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
1204: END IF;
1205:
1206:
1207:
1208: /*
1209: * Call the Procedure to initialize amount_type_ids.
1210: */
1211: IF l_debug ='Y'THEN -- bug 2674619
1212: PA_DEBUG.g_err_stage := '400 : Before calling initialize_amt_type_id_cache';
1213: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
1214: END IF;
1215:
1216: PA_REP_UTIL_GLOB.initialize_amt_type_id_cache;
1209: * Call the Procedure to initialize amount_type_ids.
1210: */
1211: IF l_debug ='Y'THEN -- bug 2674619
1212: PA_DEBUG.g_err_stage := '400 : Before calling initialize_amt_type_id_cache';
1213: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
1214: END IF;
1215:
1216: PA_REP_UTIL_GLOB.initialize_amt_type_id_cache;
1217: IF l_debug ='Y'THEN -- bug 2674619
1214: END IF;
1215:
1216: PA_REP_UTIL_GLOB.initialize_amt_type_id_cache;
1217: IF l_debug ='Y'THEN -- bug 2674619
1218: PA_DEBUG.g_err_stage := '450 : After calling initialize_amt_type_id_cache';
1219: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
1220:
1221: PA_DEBUG.g_err_stage := '500 : Exiting PA_REP_UTIL_GLOB.auto_util_cache';
1222: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
1215:
1216: PA_REP_UTIL_GLOB.initialize_amt_type_id_cache;
1217: IF l_debug ='Y'THEN -- bug 2674619
1218: PA_DEBUG.g_err_stage := '450 : After calling initialize_amt_type_id_cache';
1219: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
1220:
1221: PA_DEBUG.g_err_stage := '500 : Exiting PA_REP_UTIL_GLOB.auto_util_cache';
1222: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
1223: END IF;
1217: IF l_debug ='Y'THEN -- bug 2674619
1218: PA_DEBUG.g_err_stage := '450 : After calling initialize_amt_type_id_cache';
1219: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
1220:
1221: PA_DEBUG.g_err_stage := '500 : Exiting PA_REP_UTIL_GLOB.auto_util_cache';
1222: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
1223: END IF;
1224: PA_DEBUG.Reset_Curr_Function;
1225: EXCEPTION
1218: PA_DEBUG.g_err_stage := '450 : After calling initialize_amt_type_id_cache';
1219: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
1220:
1221: PA_DEBUG.g_err_stage := '500 : Exiting PA_REP_UTIL_GLOB.auto_util_cache';
1222: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
1223: END IF;
1224: PA_DEBUG.Reset_Curr_Function;
1225: EXCEPTION
1226: WHEN OTHERS THEN
1220:
1221: PA_DEBUG.g_err_stage := '500 : Exiting PA_REP_UTIL_GLOB.auto_util_cache';
1222: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
1223: END IF;
1224: PA_DEBUG.Reset_Curr_Function;
1225: EXCEPTION
1226: WHEN OTHERS THEN
1227: RAISE;
1228: END auto_util_cache;
1474: l_gl_period_set_name gl_sets_of_books.period_set_name%TYPE; -- bug 3434019
1475: l_pa_period_set_name gl_sets_of_books.period_set_name%TYPE; -- bug 3434019
1476: BEGIN
1477:
1478: PA_DEBUG.Set_Curr_Function( p_function => 'Update_Util_Cache');
1479: IF l_debug ='Y'THEN -- bug 2674619
1480: PA_DEBUG.g_err_stage := '50 : Entering PA_REP_UTIL_GLOB.update_util_cache';
1481: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
1482:
1476: BEGIN
1477:
1478: PA_DEBUG.Set_Curr_Function( p_function => 'Update_Util_Cache');
1479: IF l_debug ='Y'THEN -- bug 2674619
1480: PA_DEBUG.g_err_stage := '50 : Entering PA_REP_UTIL_GLOB.update_util_cache';
1481: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
1482:
1483: PA_DEBUG.g_err_stage := '100 : Before Accessing FND_PROFILE values';
1484: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
1477:
1478: PA_DEBUG.Set_Curr_Function( p_function => 'Update_Util_Cache');
1479: IF l_debug ='Y'THEN -- bug 2674619
1480: PA_DEBUG.g_err_stage := '50 : Entering PA_REP_UTIL_GLOB.update_util_cache';
1481: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
1482:
1483: PA_DEBUG.g_err_stage := '100 : Before Accessing FND_PROFILE values';
1484: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
1485: END IF;
1479: IF l_debug ='Y'THEN -- bug 2674619
1480: PA_DEBUG.g_err_stage := '50 : Entering PA_REP_UTIL_GLOB.update_util_cache';
1481: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
1482:
1483: PA_DEBUG.g_err_stage := '100 : Before Accessing FND_PROFILE values';
1484: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
1485: END IF;
1486:
1487: l_global_week_start_day := FND_PROFILE.VALUE('PA_GLOBAL_WEEK_START_DAY');
1480: PA_DEBUG.g_err_stage := '50 : Entering PA_REP_UTIL_GLOB.update_util_cache';
1481: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
1482:
1483: PA_DEBUG.g_err_stage := '100 : Before Accessing FND_PROFILE values';
1484: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
1485: END IF;
1486:
1487: l_global_week_start_day := FND_PROFILE.VALUE('PA_GLOBAL_WEEK_START_DAY');
1488: l_util_calc_method := FND_PROFILE.VALUE('PA_RES_UTIL_DEF_CALC_METHOD');
1487: l_global_week_start_day := FND_PROFILE.VALUE('PA_GLOBAL_WEEK_START_DAY');
1488: l_util_calc_method := FND_PROFILE.VALUE('PA_RES_UTIL_DEF_CALC_METHOD');
1489:
1490: IF l_debug ='Y'THEN -- bug 2674619
1491: PA_DEBUG.g_err_stage := '150 : After Accessing FND_PROFILE values';
1492: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
1493:
1494: PA_DEBUG.g_err_stage := '200 : Before Selecting Implementation Details';
1495: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
1488: l_util_calc_method := FND_PROFILE.VALUE('PA_RES_UTIL_DEF_CALC_METHOD');
1489:
1490: IF l_debug ='Y'THEN -- bug 2674619
1491: PA_DEBUG.g_err_stage := '150 : After Accessing FND_PROFILE values';
1492: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
1493:
1494: PA_DEBUG.g_err_stage := '200 : Before Selecting Implementation Details';
1495: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
1496: END IF;
1490: IF l_debug ='Y'THEN -- bug 2674619
1491: PA_DEBUG.g_err_stage := '150 : After Accessing FND_PROFILE values';
1492: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
1493:
1494: PA_DEBUG.g_err_stage := '200 : Before Selecting Implementation Details';
1495: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
1496: END IF;
1497:
1498: SELECT NVL(imp.org_id,-99)
1491: PA_DEBUG.g_err_stage := '150 : After Accessing FND_PROFILE values';
1492: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
1493:
1494: PA_DEBUG.g_err_stage := '200 : Before Selecting Implementation Details';
1495: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
1496: END IF;
1497:
1498: SELECT NVL(imp.org_id,-99)
1499: ,imp.org_structure_version_id
1514: ,gl_sets_of_books sob
1515: WHERE sob.set_of_books_id = imp.set_of_books_id ;
1516:
1517: IF l_debug ='Y'THEN -- bug 2674619
1518: PA_DEBUG.g_err_stage := '250 : After Selecting Implementation Details';
1519: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
1520: END IF;
1521:
1522: /* This condition is made so that unnecessary processing is avoided. As
1515: WHERE sob.set_of_books_id = imp.set_of_books_id ;
1516:
1517: IF l_debug ='Y'THEN -- bug 2674619
1518: PA_DEBUG.g_err_stage := '250 : After Selecting Implementation Details';
1519: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
1520: END IF;
1521:
1522: /* This condition is made so that unnecessary processing is avoided. As
1523: the global variables are already initialzed through the procedure
1602: * details. Populate the Global record for the last run details
1603: * pa_utilization_options is assumed to have ONLY ONE record.
1604: */
1605: IF l_debug ='Y'THEN -- bug 2674619
1606: PA_DEBUG.g_err_stage := '300 : Before Setting the Global variables for all Period flags and for last run details';
1607: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
1608: END IF;
1609:
1610: SELECT pa_period_flag
1603: * pa_utilization_options is assumed to have ONLY ONE record.
1604: */
1605: IF l_debug ='Y'THEN -- bug 2674619
1606: PA_DEBUG.g_err_stage := '300 : Before Setting the Global variables for all Period flags and for last run details';
1607: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
1608: END IF;
1609:
1610: SELECT pa_period_flag
1611: ,gl_period_flag
1622: ,G_last_run_when.G_ac_last_run_date
1623: ,G_last_run_when.G_fc_last_run_date
1624: FROM pa_utilization_options;
1625: IF l_debug ='Y'THEN -- bug 2674619
1626: PA_DEBUG.g_err_stage := '350 : After Setting the Global variables for all Period flags and for last run details';
1627: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
1628: END IF;
1629:
1630:
1623: ,G_last_run_when.G_fc_last_run_date
1624: FROM pa_utilization_options;
1625: IF l_debug ='Y'THEN -- bug 2674619
1626: PA_DEBUG.g_err_stage := '350 : After Setting the Global variables for all Period flags and for last run details';
1627: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
1628: END IF;
1629:
1630:
1631:
1632: /*
1633: * Call the Procedure to initialize amount_type_ids.
1634: */
1635: IF l_debug ='Y'THEN -- bug 2674619
1636: PA_DEBUG.g_err_stage := '400 : Before calling initialize_amt_type_id_cache';
1637: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
1638: END IF;
1639:
1640: PA_REP_UTIL_GLOB.initialize_amt_type_id_cache;
1633: * Call the Procedure to initialize amount_type_ids.
1634: */
1635: IF l_debug ='Y'THEN -- bug 2674619
1636: PA_DEBUG.g_err_stage := '400 : Before calling initialize_amt_type_id_cache';
1637: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
1638: END IF;
1639:
1640: PA_REP_UTIL_GLOB.initialize_amt_type_id_cache;
1641: IF l_debug ='Y'THEN -- bug 2674619
1638: END IF;
1639:
1640: PA_REP_UTIL_GLOB.initialize_amt_type_id_cache;
1641: IF l_debug ='Y'THEN -- bug 2674619
1642: PA_DEBUG.g_err_stage := '450 : After calling initialize_amt_type_id_cache';
1643: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
1644: END IF;
1645: END IF;
1646:
1639:
1640: PA_REP_UTIL_GLOB.initialize_amt_type_id_cache;
1641: IF l_debug ='Y'THEN -- bug 2674619
1642: PA_DEBUG.g_err_stage := '450 : After calling initialize_amt_type_id_cache';
1643: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
1644: END IF;
1645: END IF;
1646:
1647: IF l_debug ='Y'THEN -- bug 2674619
1644: END IF;
1645: END IF;
1646:
1647: IF l_debug ='Y'THEN -- bug 2674619
1648: PA_DEBUG.g_err_stage := '500 : Exiting PA_REP_UTIL_GLOB.update_util_cache';
1649: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
1650: END IF;
1651: PA_DEBUG.Reset_Curr_Function;
1652:
1645: END IF;
1646:
1647: IF l_debug ='Y'THEN -- bug 2674619
1648: PA_DEBUG.g_err_stage := '500 : Exiting PA_REP_UTIL_GLOB.update_util_cache';
1649: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
1650: END IF;
1651: PA_DEBUG.Reset_Curr_Function;
1652:
1653: EXCEPTION
1647: IF l_debug ='Y'THEN -- bug 2674619
1648: PA_DEBUG.g_err_stage := '500 : Exiting PA_REP_UTIL_GLOB.update_util_cache';
1649: PA_DEBUG.Log_Message(p_message => PA_DEBUG.g_err_stage);
1650: END IF;
1651: PA_DEBUG.Reset_Curr_Function;
1652:
1653: EXCEPTION
1654: WHEN OTHERS THEN
1655: RAISE;