6:
7: FUNCTION ofr_enrollment_or_waitlist ( p_uoo_id IN igs_ps_unit_ofr_opt.uoo_id%TYPE,
8: p_session_id IN igs_en_su_attempt.session_id%TYPE,
9: p_waitlist_ind IN VARCHAR2,
10: p_person_number IN igs_pe_person.person_number%TYPE,
11: p_course_cd IN igs_en_su_attempt.course_cd%TYPE,
12: p_enr_method_type IN igs_en_su_attempt.enr_method_type%TYPE,
13: p_deny_or_warn OUT NOCOPY VARCHAR2,
14: p_message OUT NOCOPY VARCHAR2,
70: -- local rowtype variable for above cursor
71: l_c_igs_ps_unit_ofr_opt c_igs_ps_unit_ofr_opt%ROWTYPE ;
72:
73: -- cursor which picks up person id corresponding to person number passed as parameter
74: CURSOR c_igs_pe_person(cp_person_number igs_pe_person.person_number%TYPE) IS
75: SELECT party_id
76: FROM hz_parties
77: WHERE party_number = cp_person_number ;
78:
76: FROM hz_parties
77: WHERE party_number = cp_person_number ;
78:
79: -- local rowtype variable for above cursor
80: l_c_igs_pe_person c_igs_pe_person%ROWTYPE ;
81: -- local variables
82: l_rowid igs_en_su_attempt.row_id%TYPE ;
83: l_person_id igs_pe_person.person_id%TYPE ;
84: l_result BOOLEAN DEFAULT FALSE ;
79: -- local rowtype variable for above cursor
80: l_c_igs_pe_person c_igs_pe_person%ROWTYPE ;
81: -- local variables
82: l_rowid igs_en_su_attempt.row_id%TYPE ;
83: l_person_id igs_pe_person.person_id%TYPE ;
84: l_result BOOLEAN DEFAULT FALSE ;
85: l_deny_or_warn_flag VARCHAR2(1000) ;
86: l_ret_flag BOOLEAN DEFAULT FALSE ;
87: l_rsv_seat_ext_id igs_ps_rsv_ext.rsv_ext_id%TYPE ;
113:
114: -- cursor to get person type
115: CURSOR cur_per_typ IS
116: SELECT person_type_code
117: FROM igs_pe_person_types
118: WHERE system_type = 'OTHER';
119: l_cur_per_typ cur_per_typ%ROWTYPE;
120: lv_person_type igs_pe_person_types.person_type_code%TYPE;
121:
116: SELECT person_type_code
117: FROM igs_pe_person_types
118: WHERE system_type = 'OTHER';
119: l_cur_per_typ cur_per_typ%ROWTYPE;
120: lv_person_type igs_pe_person_types.person_type_code%TYPE;
121:
122: -- cursor tp get system person type
123: CURSOR cur_sys_pers_type(cp_person_type_code VARCHAR2) IS
124: SELECT system_type
121:
122: -- cursor tp get system person type
123: CURSOR cur_sys_pers_type(cp_person_type_code VARCHAR2) IS
124: SELECT system_type
125: FROM igs_pe_person_types
126: WHERE person_type_code = cp_person_type_code;
127:
128: l_sys_per_type igs_pe_person_types.system_type%TYPE;
129:
124: SELECT system_type
125: FROM igs_pe_person_types
126: WHERE person_type_code = cp_person_type_code;
127:
128: l_sys_per_type igs_pe_person_types.system_type%TYPE;
129:
130: BEGIN
131: IGS_GE_MSG_STACK.INITIALIZE;
132: --fetch the person id corresponding to person number passed as parameter
129:
130: BEGIN
131: IGS_GE_MSG_STACK.INITIALIZE;
132: --fetch the person id corresponding to person number passed as parameter
133: OPEN c_igs_pe_person( cp_person_number => p_person_number) ;
134: FETCH c_igs_pe_person INTO l_c_igs_pe_person ;
135: --person number passed as parameter does not exist
136: IF c_igs_pe_person%NOTFOUND THEN
137: CLOSE c_igs_pe_person ;
130: BEGIN
131: IGS_GE_MSG_STACK.INITIALIZE;
132: --fetch the person id corresponding to person number passed as parameter
133: OPEN c_igs_pe_person( cp_person_number => p_person_number) ;
134: FETCH c_igs_pe_person INTO l_c_igs_pe_person ;
135: --person number passed as parameter does not exist
136: IF c_igs_pe_person%NOTFOUND THEN
137: CLOSE c_igs_pe_person ;
138: p_message := 'IGS_PE_PERS_NOT_EXIST' ;
132: --fetch the person id corresponding to person number passed as parameter
133: OPEN c_igs_pe_person( cp_person_number => p_person_number) ;
134: FETCH c_igs_pe_person INTO l_c_igs_pe_person ;
135: --person number passed as parameter does not exist
136: IF c_igs_pe_person%NOTFOUND THEN
137: CLOSE c_igs_pe_person ;
138: p_message := 'IGS_PE_PERS_NOT_EXIST' ;
139: RETURN (FALSE) ;
140: END IF;
133: OPEN c_igs_pe_person( cp_person_number => p_person_number) ;
134: FETCH c_igs_pe_person INTO l_c_igs_pe_person ;
135: --person number passed as parameter does not exist
136: IF c_igs_pe_person%NOTFOUND THEN
137: CLOSE c_igs_pe_person ;
138: p_message := 'IGS_PE_PERS_NOT_EXIST' ;
139: RETURN (FALSE) ;
140: END IF;
141: l_person_id := l_c_igs_pe_person.party_id ;
137: CLOSE c_igs_pe_person ;
138: p_message := 'IGS_PE_PERS_NOT_EXIST' ;
139: RETURN (FALSE) ;
140: END IF;
141: l_person_id := l_c_igs_pe_person.party_id ;
142: CLOSE c_igs_pe_person ;
143:
144: -- fetch the uoo id details
145: OPEN c_igs_ps_unit_ofr_opt( p_uoo_id) ;
138: p_message := 'IGS_PE_PERS_NOT_EXIST' ;
139: RETURN (FALSE) ;
140: END IF;
141: l_person_id := l_c_igs_pe_person.party_id ;
142: CLOSE c_igs_pe_person ;
143:
144: -- fetch the uoo id details
145: OPEN c_igs_ps_unit_ofr_opt( p_uoo_id) ;
146: FETCH c_igs_ps_unit_ofr_opt INTO l_c_igs_ps_unit_ofr_opt ;