46: IF ((cur_old_ref_values%NOTFOUND) AND (p_action NOT IN ('INSERT', 'VALIDATE_INSERT'))) THEN
47: CLOSE cur_old_ref_values;
48: fnd_message.set_name ('FND', 'FORM_RECORD_DELETED');
49: igs_ge_msg_stack.add;
50: app_exception.raise_exception;
51: RETURN;
52: END IF;
53: CLOSE cur_old_ref_values;
54:
112: CLOSE validate_cr_dt;
113: IF l_birth_dt IS NOT NULL AND l_birth_dt > new_references.crime_date THEN
114: FND_MESSAGE.SET_NAME('IGS','IGS_PE_INT_DT_LT_BRDT');
115: IGS_GE_MSG_STACK.ADD;
116: APP_EXCEPTION.RAISE_EXCEPTION;
117: END IF;
118: END IF;
119:
120: IF new_references.crime_date > TRUNC(SYSDATE) THEN
123: CLOSE mes_token;
124: FND_MESSAGE.SET_NAME('IGS','IGS_AD_DATE_SYSDATE');
125: FND_MESSAGE.SET_TOKEN('NAME',l_meaning);
126: IGS_GE_MSG_STACK.ADD;
127: APP_EXCEPTION.RAISE_EXCEPTION;
128: END IF;
129: END BeforeRowInsertUpdate1;
130:
131: PROCEDURE BeforeRowInsertUpdate2(
161: IF x_felony_convicted_flag IS NOT NULL THEN
162: IF new_references.convict_ind = 'Y' AND x_felony_convicted_flag = 'N' THEN
163: fnd_message.set_name('IGS','IGS_PE_SS_NO_CRMNL_CONVICT');
164: igs_ge_msg_stack.add;
165: app_exception.raise_exception;
166: END IF;
167: ELSIF x_felony_convicted_flag IS NULL THEN
168: fnd_message.set_name('IGS','IGS_PE_SS_FLNY_CANT_INSERT');
169: igs_ge_msg_stack.add;
166: END IF;
167: ELSIF x_felony_convicted_flag IS NULL THEN
168: fnd_message.set_name('IGS','IGS_PE_SS_FLNY_CANT_INSERT');
169: igs_ge_msg_stack.add;
170: app_exception.raise_exception;
171: END IF;
172: ELSIF p_updating THEN
173: IF new_references.convict_ind = 'Y' AND x_felony_convicted_flag <> 'Y' THEN
174: FND_MESSAGE.SET_NAME('IGS','IGS_PE_SS_NO_CRMNL_CONVICT');
172: ELSIF p_updating THEN
173: IF new_references.convict_ind = 'Y' AND x_felony_convicted_flag <> 'Y' THEN
174: FND_MESSAGE.SET_NAME('IGS','IGS_PE_SS_NO_CRMNL_CONVICT');
175: igs_ge_msg_stack.add;
176: app_exception.raise_exception;
177: END IF;
178: END IF;
179:
180: END BeforeRowInsertUpdate2;
199: )
200: ) THEN
201: fnd_message.set_name ('IGS', 'IGS_PE_FLNY_DUP_EXISTS');
202: igs_ge_msg_stack.add;
203: app_exception.raise_exception;
204: END IF;
205:
206: END check_uniqueness;
207:
225: new_references.person_id
226: ) THEN
227: fnd_message.set_name ('FND', 'FORM_RECORD_DELETED');
228: igs_ge_msg_stack.add;
229: app_exception.raise_exception;
230: END IF;
231:
232: END check_parent_existance;
233:
332: IF (cur_rowid%FOUND) THEN
333: CLOSE cur_rowid;
334: fnd_message.set_name ('IGS', 'IGS_PE_PEFD_HZ_FK');
335: igs_ge_msg_stack.add;
336: app_exception.raise_exception;
337: RETURN;
338: END IF;
339: CLOSE cur_rowid;
340:
394: )
395: ) THEN
396: fnd_message.set_name('IGS','IGS_GE_RECORD_ALREADY_EXISTS');
397: igs_ge_msg_stack.add;
398: app_exception.raise_exception;
399: END IF;
400: check_uniqueness;
401: check_parent_existance;
402: BeforeRowInsertUpdate2(TRUE, FALSE);
417: )
418: ) THEN
419: fnd_message.set_name('IGS','IGS_GE_RECORD_ALREADY_EXISTS');
420: igs_ge_msg_stack.add;
421: app_exception.raise_exception;
422: END IF;
423: check_uniqueness;
424: ELSIF (p_action = 'VALIDATE_UPDATE') THEN
425: BeforeRowInsertUpdate1( FALSE,TRUE,FALSE );
474: END IF;
475: ELSE
476: fnd_message.set_name ('FND', 'SYSTEM-INVALID ARGS');
477: igs_ge_msg_stack.add;
478: app_exception.raise_exception;
479: END IF;
480:
481: SELECT igs_pe_felony_dtls_s.NEXTVAL
482: INTO x_felony_details_id
546: fnd_message.set_name ('IGS', 'IGS_SC_POLICY_EXCEPTION');
547: fnd_message.set_token ('ERR_CD', SQLCODE);
548: igs_ge_msg_stack.add;
549: igs_sc_gen_001.unset_ctx('R');
550: app_exception.raise_exception;
551: ELSE
552: igs_sc_gen_001.unset_ctx('R');
553: RAISE;
554: END IF;
594: IF (c1%notfound) THEN
595: fnd_message.set_name('FND', 'FORM_RECORD_DELETED');
596: igs_ge_msg_stack.add;
597: CLOSE c1;
598: app_exception.raise_exception;
599: RETURN;
600: END IF;
601: CLOSE c1;
602:
615: NULL;
616: ELSE
617: fnd_message.set_name('FND', 'FORM_RECORD_CHANGED');
618: igs_ge_msg_stack.add;
619: app_exception.raise_exception;
620: END IF;
621:
622: RETURN;
623:
664: END IF;
665: ELSE
666: fnd_message.set_name( 'FND', 'SYSTEM-INVALID ARGS');
667: igs_ge_msg_stack.add;
668: app_exception.raise_exception;
669: END IF;
670:
671: before_dml(
672: p_action => 'UPDATE',
702: IF (SQL%NOTFOUND) THEN
703: fnd_message.set_name ('IGS', 'IGS_SC_POLICY_UPD_DEL_EXCEP');
704: igs_ge_msg_stack.add;
705: igs_sc_gen_001.unset_ctx('R');
706: app_exception.raise_exception;
707: END IF;
708: IF (x_mode = 'S') THEN
709: igs_sc_gen_001.unset_ctx('R');
710: END IF;
717: fnd_message.set_name ('IGS', 'IGS_SC_UPD_POLICY_EXCP');
718: fnd_message.set_token ('ERR_CD', SQLCODE);
719: igs_ge_msg_stack.add;
720: igs_sc_gen_001.unset_ctx('R');
721: app_exception.raise_exception;
722: ELSE
723: igs_sc_gen_001.unset_ctx('R');
724: RAISE;
725: END IF;
815: IF (SQL%NOTFOUND) THEN
816: fnd_message.set_name ('IGS', 'IGS_SC_POLICY_UPD_DEL_EXCEP');
817: igs_ge_msg_stack.add;
818: igs_sc_gen_001.unset_ctx('R');
819: app_exception.raise_exception;
820: END IF;
821: IF (x_mode = 'S') THEN
822: igs_sc_gen_001.unset_ctx('R');
823: END IF;