[Home] [Help]
22: dsridhar 24-JUL-2003 Bug No: 3022067, part of change request for UCAS Application Calendar Mapping.
23: Removed calendar fields from the IGS_UC_CYC_DEFAULTS_PKG procedure calls.
24: jchakrab 20-Sep-2005 Modified for 4616246 - If a record with null current/conf cycle is found in
25: IGS_UC_DEFAULTS and no record exists for the current cycle in IGS_UC_TRANSACTIONS
26: a empty record is inserted into IGS_UC_UCAS_CONTROL to be updated later by user
27: anwest 18-JAN-2006 Bug# 4950285 R12 Disable OSS Mandate
28: ***************************************************************/
29:
30: -- Cursor to check if any records exist in IGS_UC_DEFAULTS
76: FROM igs_uc_cyc_defaults ucd
77: WHERE system_code = p_system_code
78: AND ucas_cycle = p_ucas_cycle;
79:
80: -- Cursor to select current cycle details from IGS_UC_UCAS_CONTROL
81: -- Modified for UC315 - UCAS 2006 Support to include FTUG and exclude SWAS
82: CURSOR cur_uc_ucas_control (p_current_cycle igs_uc_defaults.current_cycle%TYPE) IS
83: SELECT uco.rowid, uco.*
84: FROM igs_uc_ucas_control uco
80: -- Cursor to select current cycle details from IGS_UC_UCAS_CONTROL
81: -- Modified for UC315 - UCAS 2006 Support to include FTUG and exclude SWAS
82: CURSOR cur_uc_ucas_control (p_current_cycle igs_uc_defaults.current_cycle%TYPE) IS
83: SELECT uco.rowid, uco.*
84: FROM igs_uc_ucas_control uco
85: WHERE uco.system_code <> 'S'
86: AND ucas_cycle = p_current_cycle;
87:
88: -- Cursor to check if the record exists in IGS_UC_UCAS_CONTROL
84: FROM igs_uc_ucas_control uco
85: WHERE uco.system_code <> 'S'
86: AND ucas_cycle = p_current_cycle;
87:
88: -- Cursor to check if the record exists in IGS_UC_UCAS_CONTROL
89: CURSOR cur_check_ucas_control (p_system_code igs_uc_ucas_control.system_code%TYPE,
90: p_ucas_cycle igs_uc_ucas_control.ucas_cycle%TYPE) IS
91: SELECT 'X'
92: FROM igs_uc_ucas_control ucd
85: WHERE uco.system_code <> 'S'
86: AND ucas_cycle = p_current_cycle;
87:
88: -- Cursor to check if the record exists in IGS_UC_UCAS_CONTROL
89: CURSOR cur_check_ucas_control (p_system_code igs_uc_ucas_control.system_code%TYPE,
90: p_ucas_cycle igs_uc_ucas_control.ucas_cycle%TYPE) IS
91: SELECT 'X'
92: FROM igs_uc_ucas_control ucd
93: WHERE system_code = p_system_code
86: AND ucas_cycle = p_current_cycle;
87:
88: -- Cursor to check if the record exists in IGS_UC_UCAS_CONTROL
89: CURSOR cur_check_ucas_control (p_system_code igs_uc_ucas_control.system_code%TYPE,
90: p_ucas_cycle igs_uc_ucas_control.ucas_cycle%TYPE) IS
91: SELECT 'X'
92: FROM igs_uc_ucas_control ucd
93: WHERE system_code = p_system_code
94: AND ucas_cycle = p_ucas_cycle;
88: -- Cursor to check if the record exists in IGS_UC_UCAS_CONTROL
89: CURSOR cur_check_ucas_control (p_system_code igs_uc_ucas_control.system_code%TYPE,
90: p_ucas_cycle igs_uc_ucas_control.ucas_cycle%TYPE) IS
91: SELECT 'X'
92: FROM igs_uc_ucas_control ucd
93: WHERE system_code = p_system_code
94: AND ucas_cycle = p_ucas_cycle;
95:
96: -- Cursor to select records from IGS_UC_DEFAULTS
109: l_curr_control_exists VARCHAR2(1);
110: l_null_cycles VARCHAR2(1);
111: l_curr_cycle igs_uc_defaults.current_cycle%TYPE;
112: l_conf_cycle igs_uc_defaults.configured_cycle%TYPE;
113: l_appno_first igs_uc_ucas_control.appno_first%TYPE;
114: l_appno_maximum igs_uc_ucas_control.appno_maximum%TYPE;
115:
116: BEGIN
117:
110: l_null_cycles VARCHAR2(1);
111: l_curr_cycle igs_uc_defaults.current_cycle%TYPE;
112: l_conf_cycle igs_uc_defaults.configured_cycle%TYPE;
113: l_appno_first igs_uc_ucas_control.appno_first%TYPE;
114: l_appno_maximum igs_uc_ucas_control.appno_maximum%TYPE;
115:
116: BEGIN
117:
118: --anwest 18-JAN-2006 Bug# 4950285 R12 Disable OSS Mandate
183: fnd_message.set_token('CRNT_CYCLE', l_curr_cycle);
184: fnd_file.put_line(fnd_file.log, fnd_message.get);
185:
186: --jchakrab - Modified for 4616246
187: --Create a record in the IGS_UC_UCAS_CONTROL table if no record exists for l_curr_cycle
188: l_curr_control_exists := NULL;
189: OPEN cur_check_ucas_control(rec_cur_defaults.system_code, l_curr_cycle);
190: FETCH cur_check_ucas_control into l_curr_control_exists;
191: CLOSE cur_check_ucas_control;
191: CLOSE cur_check_ucas_control;
192:
193: IF l_curr_control_exists IS NULL THEN
194: --this is a scenario where the customer is trying to setup UCAS in a fresh-install env
195: --we need to create a empty record in IGS_UC_UCAS_CONTROL which should be updated later by user
196:
197: --derive app-no ranges based on system code and current cycle
198: --FTUG = Y000001 to Y689999, GTTR = Y700001 to Y799999, NMAS = Y800001 to Y899999, Y = entry_year
199: IF rec_cur_defaults.system_code = 'U' THEN
209: l_appno_first := 0;
210: l_appno_maximum := 0;
211: END IF;
212: l_rowid := NULL;
213: igs_uc_ucas_control_pkg.insert_row( x_rowid => l_rowid,
214: x_entry_year => Ltrim(Substr(l_curr_cycle,3,2)),
215: x_time_of_year => NULL,
216: x_time_of_day => NULL,
217: x_routeb_time_of_year => NULL,
246: );
247:
248: fnd_message.set_name('IGS', 'IGS_UC_REC_INSRT');
249: fnd_message.set_token('SYSTEM_CODE', rec_cur_defaults.system_code);
250: fnd_message.set_token('TNAME', 'IGS_UC_UCAS_CONTROL');
251: fnd_file.put_line(fnd_file.log, fnd_message.get);
252: END IF;
253:
254: END IF;
309: END IF;
310:
311: END LOOP;
312:
313: -- Populate records for new cycle in IGS_UC_UCAS_CONTROL from previous cycle.
314: FOR rec_cur_uc_ucas_control IN cur_uc_ucas_control(l_current_cycle)
315: LOOP
316: l_exists := NULL;
317: OPEN cur_check_ucas_control(rec_cur_uc_ucas_control.system_code, l_next_cycle);
318: FETCH cur_check_ucas_control INTO l_exists;
319: CLOSE cur_check_ucas_control;
320: IF l_exists IS NULL THEN
321: l_rowid := NULL;
322: igs_uc_ucas_control_pkg.insert_row( x_rowid => l_rowid,
323: x_entry_year => rec_cur_uc_ucas_control.entry_year + 1,
324: x_time_of_year => NULL,
325: x_time_of_day => NULL,
326: x_routeb_time_of_year => NULL,
355: );
356:
357: fnd_message.set_name('IGS', 'IGS_UC_REC_INSRT');
358: fnd_message.set_token('SYSTEM_CODE', rec_cur_uc_ucas_control.system_code);
359: fnd_message.set_token('TNAME', 'IGS_UC_UCAS_CONTROL');
360: fnd_file.put_line(fnd_file.log, fnd_message.get);
361: END IF;
362: END LOOP;
363: