41: Fetch cur_old_ref_values INTO old_references;
42: IF (cur_old_ref_values%NOTFOUND) AND (p_action NOT IN ('INSERT','VALIDATE_INSERT')) THEN
43: Fnd_Message.Set_Name ('FND', 'FORM_RECORD_DELETED');
44: IGS_GE_MSG_STACK.ADD;
45: App_Exception.Raise_Exception;
46: Close cur_old_ref_values;
47: Return;
48: END IF;
49: Close cur_old_ref_values;
96: v_message_name) = FALSE THEN
97: --raise_application_error(-20000, IGS_GE_GEN_002.GENP_GET_MESSAGE(v_message_num));
98: FND_MESSAGE.SET_NAME('IGS',v_message_name);
99: IGS_GE_MSG_STACK.ADD;
100: APP_EXCEPTION.RAISE_EXCEPTION;
101: END IF;
102: END IF;
103: -- Validate org IGS_PS_UNIT is active and at the local IGS_OR_INSTITUTION.
104: IF p_inserting OR
110: v_message_name) = FALSE THEN
111: --raise_application_error(-20000, IGS_GE_GEN_002.GENP_GET_MESSAGE(v_message_num));
112: FND_MESSAGE.SET_NAME('IGS',v_message_name);
113: IGS_GE_MSG_STACK.ADD;
114: APP_EXCEPTION.RAISE_EXCEPTION;
115: END IF;
116: END IF;
117: -- Validate Attendance Mode closed ind.
118: IF p_inserting OR
122: v_message_name) = FALSE THEN
123: --raise_application_error(-20000, IGS_GE_GEN_002.GENP_GET_MESSAGE(v_message_num));
124: FND_MESSAGE.SET_NAME('IGS',v_message_name);
125: IGS_GE_MSG_STACK.ADD;
126: APP_EXCEPTION.RAISE_EXCEPTION;
127: END IF;
128: END IF;
129: -- Validate Intake target Type closed ind.
130: IF p_inserting OR
134: v_message_name) = FALSE THEN
135: --raise_application_error(-20000, IGS_GE_GEN_002.GENP_GET_MESSAGE(v_message_num));
136: FND_MESSAGE.SET_NAME('IGS',v_message_name);
137: IGS_GE_MSG_STACK.ADD;
138: APP_EXCEPTION.RAISE_EXCEPTION;
139: END IF;
140: END IF;
141: -- Validate override system amount type does not equal the system amount type
142: -- of the intake target type
150: v_message_name) = FALSE THEN
151: --raise_application_error(-20000, IGS_GE_GEN_002.GENP_GET_MESSAGE(v_message_num));
152: FND_MESSAGE.SET_NAME('IGS',v_message_name);
153: IGS_GE_MSG_STACK.ADD;
154: APP_EXCEPTION.RAISE_EXCEPTION;
155: END IF;
156: END IF;
157: -- Validate target and maximum target against amount type
158: IF p_inserting OR
169: v_message_name) = FALSE THEN
170: --raise_application_error(-20000, IGS_GE_GEN_002.GENP_GET_MESSAGE(v_message_num));
171: FND_MESSAGE.SET_NAME('IGS',v_message_name);
172: IGS_GE_MSG_STACK.ADD;
173: APP_EXCEPTION.RAISE_EXCEPTION;
174: END IF;
175: ELSE
176: IF IGS_AD_VAL_SIT.admp_val_trgt_amt(
177: new_references.override_s_amount_type,
180: v_message_name) = FALSE THEN
181: --raise_application_error(-20000, IGS_GE_GEN_002.GENP_GET_MESSAGE(v_message_num));
182: FND_MESSAGE.SET_NAME('IGS',v_message_name);
183: IGS_GE_MSG_STACK.ADD;
184: APP_EXCEPTION.RAISE_EXCEPTION;
185: END IF;
186: END IF;
187: END IF;
188:
201: new_references.attendance_mode
202: )THEN
203: FND_MESSAGE.SET_NAME('FND','FORM_RECORD_DELETED');
204: IGS_GE_MSG_STACK.ADD;
205: APP_EXCEPTION.RAISE_EXCEPTION;
206: END IF;
207: END IF;
208:
209: IF (((old_references.funding_source = new_references.funding_source)) OR
214: new_references.funding_source
215: )THEN
216: FND_MESSAGE.SET_NAME('FND','FORM_RECORD_DELETED');
217: IGS_GE_MSG_STACK.ADD;
218: APP_EXCEPTION.RAISE_EXCEPTION;
219: END IF;
220: END IF;
221:
222: IF (((old_references.submission_yr = new_references.submission_yr) AND
230: new_references.submission_number
231: )THEN
232: FND_MESSAGE.SET_NAME('FND','FORM_RECORD_DELETED');
233: IGS_GE_MSG_STACK.ADD;
234: APP_EXCEPTION.RAISE_EXCEPTION;
235: END IF;
236: END IF;
237:
238: IF (((old_references.intake_target_type = new_references.intake_target_type)) OR
244: 'N'
245: )THEN
246: FND_MESSAGE.SET_NAME('FND','FORM_RECORD_DELETED');
247: IGS_GE_MSG_STACK.ADD;
248: APP_EXCEPTION.RAISE_EXCEPTION;
249: END IF;
250: END IF;
251:
252: IF (((old_references.org_unit_cd = new_references.org_unit_cd) AND
260: new_references.ou_start_dt
261: )THEN
262: FND_MESSAGE.SET_NAME('FND','FORM_RECORD_DELETED');
263: IGS_GE_MSG_STACK.ADD;
264: APP_EXCEPTION.RAISE_EXCEPTION;
265: END IF;
266: END IF;
267:
268: IF (((old_references.override_s_amount_type = new_references.override_s_amount_type)) OR
274: new_references.override_s_amount_type
275: ) THEN
276: Fnd_Message.Set_Name('FND','FORM_RECORD_DELETED');
277: IGS_GE_MSG_STACK.ADD;
278: App_Exception.Raise_Exception;
279: END IF;
280: END IF;
281:
282: END Check_Parent_Existance;
337: IF (cur_rowid%FOUND) THEN
338: Close cur_rowid;
339: Fnd_Message.Set_Name ('IGS', 'IGS_AD_SAFAT_AM_FK');
340: IGS_GE_MSG_STACK.ADD;
341: App_Exception.Raise_Exception;
342: Return;
343: END IF;
344: Close cur_rowid;
345:
363: IF (cur_rowid%FOUND) THEN
364: Close cur_rowid;
365: Fnd_Message.Set_Name ('IGS', 'IGS_AD_SAFAT_FS_FK');
366: IGS_GE_MSG_STACK.ADD;
367: App_Exception.Raise_Exception;
368: Return;
369: END IF;
370:
371: END GET_FK_IGS_FI_FUND_SRC;
390: IF (cur_rowid%FOUND) THEN
391: Close cur_rowid;
392: Fnd_Message.Set_Name ('IGS', 'IGS_AD_SAFAT_GSC_FK');
393: IGS_GE_MSG_STACK.ADD;
394: App_Exception.Raise_Exception;
395: Return;
396: END IF;
397: Close cur_rowid;
398:
416: IF (cur_rowid%FOUND) THEN
417: Close cur_rowid;
418: Fnd_Message.Set_Name ('IGS', 'IGS_AD_SAFAT_ITT_FK');
419: IGS_GE_MSG_STACK.ADD;
420: App_Exception.Raise_Exception;
421: Return;
422: END IF;
423: Close cur_rowid;
424:
444: IF (cur_rowid%FOUND) THEN
445: Close cur_rowid;
446: Fnd_Message.Set_Name ('IGS', 'IGS_AD_SAFAT_OU_FK');
447: IGS_GE_MSG_STACK.ADD;
448: App_Exception.Raise_Exception;
449: Return;
450: END IF;
451: Close cur_rowid;
452:
470: IF (cur_rowid%FOUND) THEN
471: Close cur_rowid;
472: Fnd_Message.Set_Name ('IGS', 'IGS_AD_OVR_AMT_SLV_FK');
473: IGS_GE_MSG_STACK.ADD;
474: App_Exception.Raise_Exception;
475: Return;
476: END IF;
477: Close cur_rowid;
478:
505: IF upper(column_name) = 'TARGET' OR column_name IS NULL THEN
506: IF new_references.target < 00000.000 OR new_references.target > 99999.999 THEN
507: FND_MESSAGE.SET_NAME('IGS','IGS_GE_INVALID_VALUE');
508: IGS_GE_MSG_STACK.ADD;
509: APP_EXCEPTION.RAISE_EXCEPTION;
510: END IF;
511: END IF;
512: IF upper(column_name) = 'MAX_TARGET' OR column_name IS NULL THEN
513: IF new_references.max_target < 00000.000 OR new_references.max_target > 99999.999 THEN
512: IF upper(column_name) = 'MAX_TARGET' OR column_name IS NULL THEN
513: IF new_references.max_target < 00000.000 OR new_references.max_target > 99999.999 THEN
514: FND_MESSAGE.SET_NAME('IGS','IGS_GE_INVALID_VALUE');
515: IGS_GE_MSG_STACK.ADD;
516: APP_EXCEPTION.RAISE_EXCEPTION;
517: END IF;
518: END IF;
519: IF upper(column_name) = 'ACTUAL_ENROLMENT' OR column_name IS NULL THEN
520: IF new_references.actual_enrolment < 00000.000 OR new_references.actual_enrolment > 99999.999 THEN
519: IF upper(column_name) = 'ACTUAL_ENROLMENT' OR column_name IS NULL THEN
520: IF new_references.actual_enrolment < 00000.000 OR new_references.actual_enrolment > 99999.999 THEN
521: FND_MESSAGE.SET_NAME('IGS','IGS_GE_INVALID_VALUE');
522: IGS_GE_MSG_STACK.ADD;
523: APP_EXCEPTION.RAISE_EXCEPTION;
524: END IF;
525: END IF;
526: IF upper(column_name) = 'FUNDING_SOURCE' OR column_name IS NULL THEN
527: IF new_references.funding_source <> UPPER(new_references.funding_source) THEN
526: IF upper(column_name) = 'FUNDING_SOURCE' OR column_name IS NULL THEN
527: IF new_references.funding_source <> UPPER(new_references.funding_source) THEN
528: FND_MESSAGE.SET_NAME('IGS','IGS_GE_INVALID_VALUE');
529: IGS_GE_MSG_STACK.ADD;
530: APP_EXCEPTION.RAISE_EXCEPTION;
531: END IF;
532: END IF;
533: IF upper(column_name) = 'INTAKE_TARGET_TYPE' OR column_name IS NULL THEN
534: IF new_references.intake_target_type <> UPPER(new_references.intake_target_type) THEN
533: IF upper(column_name) = 'INTAKE_TARGET_TYPE' OR column_name IS NULL THEN
534: IF new_references.intake_target_type <> UPPER(new_references.intake_target_type) THEN
535: FND_MESSAGE.SET_NAME('IGS','IGS_GE_INVALID_VALUE');
536: IGS_GE_MSG_STACK.ADD;
537: APP_EXCEPTION.RAISE_EXCEPTION;
538: END IF;
539: END IF;
540: IF upper(column_name) = 'ATTENDANCE_MODE' OR column_name IS NULL THEN
541: IF new_references.attendance_mode <> UPPER(new_references.attendance_mode) THEN
540: IF upper(column_name) = 'ATTENDANCE_MODE' OR column_name IS NULL THEN
541: IF new_references.attendance_mode <> UPPER(new_references.attendance_mode) THEN
542: FND_MESSAGE.SET_NAME('IGS','IGS_GE_INVALID_VALUE');
543: IGS_GE_MSG_STACK.ADD;
544: APP_EXCEPTION.RAISE_EXCEPTION;
545: END IF;
546: END IF;
547: END CHECK_CONSTRAINTS;
548:
605: new_references.intake_target_type
606: )THEN
607: FND_MESSAGE.SET_NAME('IGS','IGS_GE_RECORD_ALREADY_EXISTS');
608: IGS_GE_MSG_STACK.ADD;
609: APP_EXCEPTION.RAISE_EXCEPTION;
610: END IF;
611: Check_Constraints;
612: Check_Parent_Existance;
613: ELSIF (p_action = 'UPDATE') THEN
630: new_references.intake_target_type
631: )THEN
632: FND_MESSAGE.SET_NAME('IGS','IGS_GE_RECORD_ALREADY_EXISTS');
633: IGS_GE_MSG_STACK.ADD;
634: APP_EXCEPTION.RAISE_EXCEPTION;
635: END IF;
636: Check_Constraints;
637: ELSIF (p_action = 'VALIDATE_UPDATE') THEN
638: -- Call all the procedures related to Before Delete.
696: end if;
697: else
698: FND_MESSAGE.SET_NAME( 'FND', 'SYSTEM-INVALID ARGS');
699: IGS_GE_MSG_STACK.ADD;
700: app_exception.raise_exception;
701: end if;
702:
703: Before_DML(p_action =>'INSERT',
704: x_rowid =>X_ROWID,
806: fetch c1 into tlinfo;
807: if (c1%notfound) then
808: fnd_message.set_name('FND', 'FORM_RECORD_DELETED');
809: IGS_GE_MSG_STACK.ADD;
810: app_exception.raise_exception;
811: close c1;
812: return;
813: end if;
814: close c1;
831: null;
832: else
833: fnd_message.set_name('FND', 'FORM_RECORD_CHANGED');
834: IGS_GE_MSG_STACK.ADD;
835: app_exception.raise_exception;
836: end if;
837: return;
838: end LOCK_ROW;
839:
872: end if;
873: else
874: FND_MESSAGE.SET_NAME('FND', 'SYSTEM-INVALID ARGS');
875: IGS_GE_MSG_STACK.ADD;
876: app_exception.raise_exception;
877: end if;
878:
879: Before_DML(p_action =>'UPDATE',
880: x_rowid =>X_ROWID,