341: uop.ci_end_dt,
342: uop.waitlist_allowed,
343: uop.max_students_per_waitlist,
344: uop.delete_flag
345: FROM igs_ps_unit_ofr_pat uop,
346: igs_ps_unit_ver uv
347: WHERE uop.cal_type = p_source_cal_type
348: AND uop.ci_sequence_number = p_source_sequence_number
349: AND uv.unit_cd = uop.unit_cd
361: AND version_number = cp_version_number
362: AND cal_type = cp_dest_cal_type;
363: gv_uo_rec gc_check_dest_uo_exists%ROWTYPE;
364:
365: CURSOR gc_check_uop_exists (cp_unit_cd igs_ps_unit_ofr_pat.unit_cd%TYPE,
366: cp_version_number igs_ps_unit_ofr_pat.version_number%TYPE) IS
367: SELECT 'x'
368: FROM igs_ps_unit_ofr_pat
369: WHERE unit_cd = cp_unit_cd
362: AND cal_type = cp_dest_cal_type;
363: gv_uo_rec gc_check_dest_uo_exists%ROWTYPE;
364:
365: CURSOR gc_check_uop_exists (cp_unit_cd igs_ps_unit_ofr_pat.unit_cd%TYPE,
366: cp_version_number igs_ps_unit_ofr_pat.version_number%TYPE) IS
367: SELECT 'x'
368: FROM igs_ps_unit_ofr_pat
369: WHERE unit_cd = cp_unit_cd
370: AND version_number = cp_version_number
364:
365: CURSOR gc_check_uop_exists (cp_unit_cd igs_ps_unit_ofr_pat.unit_cd%TYPE,
366: cp_version_number igs_ps_unit_ofr_pat.version_number%TYPE) IS
367: SELECT 'x'
368: FROM igs_ps_unit_ofr_pat
369: WHERE unit_cd = cp_unit_cd
370: AND version_number = cp_version_number
371: AND cal_type = p_dest_cal_type
372: AND ci_sequence_number = p_dest_sequence_number
496: igs_ge_gen_003.genp_ins_log ('USEC-ROLL' ,
497: ' ',
498: lv_out_date );
499:
500: -- selecting IGS_PS_UNIT_OFR_PAT records from IGS_PS_UNIT_OFR_PAT and IGS_PS_UNIT_VER
501: OPEN gc_unit_offering_pattern;
502: LOOP
503: FETCH gc_unit_offering_pattern INTO gv_uop_rec;
504: EXIT WHEN gc_unit_offering_pattern%NOTFOUND;
539: gv_uop_rec.version_number);
540: FETCH gc_check_uop_exists INTO gv_check;
541: IF (gc_check_uop_exists%NOTFOUND) THEN
542:
543: igs_ps_unit_ofr_pat_pkg.Insert_Row(
544: x_rowid => x_rowid,
545: x_unit_cd => gv_uop_rec.unit_cd,
546: x_version_number => gv_uop_rec.version_number,
547: x_ci_sequence_number => p_dest_sequence_number,
567: CLOSE gc_check_uop_exists;
568:
569: --Enhancement bug no 1800179
570: -- insert IGS_PS_UNIT_OFR_OPT and IGS_AS_UNITASS_ITEM records for
571: -- the IGS_PS_UNIT_OFR_PAT record
572: IF (igs_ps_gen_008.crsp_ins_uop_uoo( gv_uop_rec.unit_cd,
573: gv_uop_rec.version_number,
574: p_dest_cal_type,
575: p_source_sequence_number,
681: v_total_all_uoo_uai_inserted := TRUE;
682: END IF;
683:
684: -- set uop indicate flag
685: -- if no IGS_PS_UNIT_OFR_PAT records were inserted
686: IF (gv_rec_inserted_cnt = 0) THEN
687: v_none_uop_recs_inserted := TRUE;
688: -- if all IGS_PS_UNIT_OFR_PAT records were inserted
689: ELSIF (gv_rec_inserted_cnt = gc_unit_offering_pattern%ROWCOUNT) THEN
684: -- set uop indicate flag
685: -- if no IGS_PS_UNIT_OFR_PAT records were inserted
686: IF (gv_rec_inserted_cnt = 0) THEN
687: v_none_uop_recs_inserted := TRUE;
688: -- if all IGS_PS_UNIT_OFR_PAT records were inserted
689: ELSIF (gv_rec_inserted_cnt = gc_unit_offering_pattern%ROWCOUNT) THEN
690: v_all_uop_recs_inserted := TRUE;
691: -- if some IGS_PS_UNIT_OFR_PAT records were inserted
692: ELSE
687: v_none_uop_recs_inserted := TRUE;
688: -- if all IGS_PS_UNIT_OFR_PAT records were inserted
689: ELSIF (gv_rec_inserted_cnt = gc_unit_offering_pattern%ROWCOUNT) THEN
690: v_all_uop_recs_inserted := TRUE;
691: -- if some IGS_PS_UNIT_OFR_PAT records were inserted
692: ELSE
693: v_some_uop_recs_inserted := TRUE;
694: END IF;
695: CLOSE gc_unit_offering_pattern;