367: x_last_update_login => x_last_update_login
368: );
369:
370: IF (x_mode = 'S') THEN
371: igs_sc_gen_001.set_ctx('R');
372: END IF;
373: INSERT INTO igs_ad_appl_perstat (
374: appl_perstat_id,
375: person_id,
401: x_program_application_id,
402: x_program_update_date
403: ) RETURNING appl_perstat_id INTO x_appl_perstat_id;
404: IF (x_mode = 'S') THEN
405: igs_sc_gen_001.unset_ctx('R');
406: END IF;
407:
408:
409: OPEN c;
416:
417: EXCEPTION
418: WHEN OTHERS THEN
419: IF (x_mode = 'S') THEN
420: igs_sc_gen_001.unset_ctx('R');
421: END IF;
422:
423: IF SQLCODE = '-28115' OR SQLCODE = '-28113' OR SQLCODE = '-28111' THEN
424: -- Code to handle Security Policy error raised
575: END IF;
576: END IF;
577:
578: IF (x_mode = 'S') THEN
579: igs_sc_gen_001.set_ctx('R');
580: END IF;
581: UPDATE igs_ad_appl_perstat
582: SET
583: appl_perstat_id = new_references.appl_perstat_id,
597: IF (SQL%NOTFOUND) THEN
598: fnd_message.set_name ('IGS', 'IGS_SC_POLICY_UPD_DEL_EXCEP');
599: igs_ge_msg_stack.add;
600: IF (x_mode = 'S') THEN
601: igs_sc_gen_001.unset_ctx('R');
602: END IF;
603: app_exception.raise_exception;
604: END IF;
605: IF (x_mode = 'S') THEN
602: END IF;
603: app_exception.raise_exception;
604: END IF;
605: IF (x_mode = 'S') THEN
606: igs_sc_gen_001.unset_ctx('R');
607: END IF;
608:
609:
610: EXCEPTION
609:
610: EXCEPTION
611: WHEN OTHERS THEN
612: IF (x_mode = 'S') THEN
613: igs_sc_gen_001.unset_ctx('R');
614: END IF;
615: IF SQLCODE = '-28115' OR SQLCODE = '-28113' OR SQLCODE = '-28111' THEN
616: -- Code to handle Security Policy error raised
617: -- 1) ORA-28115 (policy with check option violation) which is raised when Policy predicate was evaluated to FALSE with the updated values.
705: x_rowid => x_rowid
706: );
707:
708: IF (x_mode = 'S') THEN
709: igs_sc_gen_001.set_ctx('R');
710: END IF;
711: DELETE FROM igs_ad_appl_perstat
712: WHERE rowid = x_rowid;
713:
714: IF (SQL%NOTFOUND) THEN
715: fnd_message.set_name ('IGS', 'IGS_SC_POLICY_UPD_DEL_EXCEP');
716: igs_ge_msg_stack.add;
717: IF (x_mode = 'S') THEN
718: igs_sc_gen_001.set_ctx('R');
719: END IF;
720: app_exception.raise_exception;
721: END IF;
722: IF (x_mode = 'S') THEN
719: END IF;
720: app_exception.raise_exception;
721: END IF;
722: IF (x_mode = 'S') THEN
723: igs_sc_gen_001.unset_ctx('R');
724: END IF;
725:
726:
727: EXCEPTION
726:
727: EXCEPTION
728: WHEN OTHERS THEN
729: IF (x_mode = 'S') THEN
730: igs_sc_gen_001.set_ctx('R');
731: END IF;
732: IF SQLCODE = '-28115' OR SQLCODE = '-28113' OR SQLCODE = '-28111' THEN
733: -- Code to handle Security Policy error raised
734: -- 1) ORA-28115 (policy with check option violation) which is raised when Policy predicate was evaluated to FALSE with the updated values.