14: p_message_name OUT NOCOPY VARCHAR2 )
15: RETURN BOOLEAN AS
16: -- Local function : to perform recursive loop of the location relationship.
17: FUNCTION orgp_val_lr_loop (
18: p_location_cd IN IGS_AD_LOCATION.location_cd%TYPE)
19: RETURN BOOLEAN
20: IS
21: CURSOR c_lr IS
22: SELECT location_cd
19: RETURN BOOLEAN
20: IS
21: CURSOR c_lr IS
22: SELECT location_cd
23: FROM IGS_AD_LOCATION_REL
24: WHERE sub_location_cd = p_location_cd;
25: v_valid BOOLEAN DEFAULT TRUE;
26: v_other_detail VARCHAR2(255);
27: BEGIN
72: p_message_name OUT NOCOPY VARCHAR2 )
73: RETURN BOOLEAN AS
74: CURSOR c_loc IS
75: SELECT closed_ind
76: FROM IGS_AD_LOCATION
77: WHERE location_cd = p_location_cd
78: AND closed_ind = 'Y';
79: v_other_detail VARCHAR2(255);
80: BEGIN
92: END orgp_val_loc_cd;
93: --
94: -- Retrofitted
95: FUNCTION assp_val_lr_dfltslot(
96: p_location_cd IGS_AD_LOCATION_REL.location_cd%TYPE ,
97: p_sub_location_cd IGS_AD_LOCATION_REL.sub_location_cd%TYPE ,
98: p_dflt_ind IGS_AD_LOCATION_REL.dflt_ind%TYPE ,
99: p_message_name OUT NOCOPY VARCHAR2 )
100: RETURN BOOLEAN AS
93: --
94: -- Retrofitted
95: FUNCTION assp_val_lr_dfltslot(
96: p_location_cd IGS_AD_LOCATION_REL.location_cd%TYPE ,
97: p_sub_location_cd IGS_AD_LOCATION_REL.sub_location_cd%TYPE ,
98: p_dflt_ind IGS_AD_LOCATION_REL.dflt_ind%TYPE ,
99: p_message_name OUT NOCOPY VARCHAR2 )
100: RETURN BOOLEAN AS
101: gv_other_detail VARCHAR2(255);
94: -- Retrofitted
95: FUNCTION assp_val_lr_dfltslot(
96: p_location_cd IGS_AD_LOCATION_REL.location_cd%TYPE ,
97: p_sub_location_cd IGS_AD_LOCATION_REL.sub_location_cd%TYPE ,
98: p_dflt_ind IGS_AD_LOCATION_REL.dflt_ind%TYPE ,
99: p_message_name OUT NOCOPY VARCHAR2 )
100: RETURN BOOLEAN AS
101: gv_other_detail VARCHAR2(255);
102: BEGIN -- assp_val_lr_dfltslot
103: -- Can only set the default indicator when:
104: -- parent location has an s_location_type = CAMPUS and
105: -- child location has an s_location_type = EXAM_CTR or GRD_CTR
106: DECLARE
107: v_s_location_type IGS_AD_LOCATION_TYPE.s_location_type%TYPE;
108: v_sub_s_location_type IGS_AD_LOCATION_TYPE.s_location_type%TYPE;
109: v_message_name VARCHAR2(30);
110: BEGIN
111: -- 1. Set the default message number
104: -- parent location has an s_location_type = CAMPUS and
105: -- child location has an s_location_type = EXAM_CTR or GRD_CTR
106: DECLARE
107: v_s_location_type IGS_AD_LOCATION_TYPE.s_location_type%TYPE;
108: v_sub_s_location_type IGS_AD_LOCATION_TYPE.s_location_type%TYPE;
109: v_message_name VARCHAR2(30);
110: BEGIN
111: -- 1. Set the default message number
112: p_message_name := NULL;
145: END assp_val_lr_dfltslot;
146: --
147: -- Retrofitted
148: FUNCTION assp_val_lr_dflt_one(
149: p_location_cd IGS_AD_LOCATION_REL.location_cd%TYPE ,
150: p_sub_location_cd IGS_AD_LOCATION_REL.sub_location_cd%TYPE ,
151: p_sub_s_location_type IN VARCHAR2 ,
152: p_message_name OUT NOCOPY VARCHAR2 )
153: RETURN BOOLEAN AS
146: --
147: -- Retrofitted
148: FUNCTION assp_val_lr_dflt_one(
149: p_location_cd IGS_AD_LOCATION_REL.location_cd%TYPE ,
150: p_sub_location_cd IGS_AD_LOCATION_REL.sub_location_cd%TYPE ,
151: p_sub_s_location_type IN VARCHAR2 ,
152: p_message_name OUT NOCOPY VARCHAR2 )
153: RETURN BOOLEAN AS
154: gv_other_detail VARCHAR2(255);
159: -- ASSP_VAL_LR_DFLTSLOT validation.
160: DECLARE
161: CURSOR c_lr IS
162: SELECT 'x'
163: FROM IGS_AD_LOCATION_REL lr,
164: IGS_AD_LOCATION loc,
165: IGS_AD_LOCATION_TYPE lot
166: WHERE lr.location_cd = p_location_cd AND
167: lr.sub_location_cd <> p_sub_location_cd AND
160: DECLARE
161: CURSOR c_lr IS
162: SELECT 'x'
163: FROM IGS_AD_LOCATION_REL lr,
164: IGS_AD_LOCATION loc,
165: IGS_AD_LOCATION_TYPE lot
166: WHERE lr.location_cd = p_location_cd AND
167: lr.sub_location_cd <> p_sub_location_cd AND
168: lr.dflt_ind = 'Y' AND
161: CURSOR c_lr IS
162: SELECT 'x'
163: FROM IGS_AD_LOCATION_REL lr,
164: IGS_AD_LOCATION loc,
165: IGS_AD_LOCATION_TYPE lot
166: WHERE lr.location_cd = p_location_cd AND
167: lr.sub_location_cd <> p_sub_location_cd AND
168: lr.dflt_ind = 'Y' AND
169: lr.sub_location_cd = loc.location_cd AND
194: END assp_val_lr_dflt_one;
195: --
196: -- Retrofitted
197: FUNCTION assp_val_lr_lr(
198: p_location_cd IGS_AD_LOCATION_REL.location_cd%TYPE ,
199: p_sub_location_cd IGS_AD_LOCATION_REL.sub_location_cd%TYPE ,
200: p_message_name OUT NOCOPY VARCHAR2 )
201: RETURN BOOLEAN AS
202: gv_other_detail VARCHAR2(255);
195: --
196: -- Retrofitted
197: FUNCTION assp_val_lr_lr(
198: p_location_cd IGS_AD_LOCATION_REL.location_cd%TYPE ,
199: p_sub_location_cd IGS_AD_LOCATION_REL.sub_location_cd%TYPE ,
200: p_message_name OUT NOCOPY VARCHAR2 )
201: RETURN BOOLEAN AS
202: gv_other_detail VARCHAR2(255);
203: BEGIN -- assp_val_lr_lr
203: BEGIN -- assp_val_lr_lr
204: -- Can not make a location with a system location type of CAMPUS
205: -- a child of a location with a system location type of EXAM_CTR or GRD_CTR
206: DECLARE
207: v_s_location_type IGS_AD_LOCATION_TYPE.s_location_type%TYPE;
208: v_sub_s_location_type IGS_AD_LOCATION_TYPE.s_location_type%TYPE;
209: BEGIN
210: -- 1. Set the default message number
211: p_message_name := NULL;
204: -- Can not make a location with a system location type of CAMPUS
205: -- a child of a location with a system location type of EXAM_CTR or GRD_CTR
206: DECLARE
207: v_s_location_type IGS_AD_LOCATION_TYPE.s_location_type%TYPE;
208: v_sub_s_location_type IGS_AD_LOCATION_TYPE.s_location_type%TYPE;
209: BEGIN
210: -- 1. Set the default message number
211: p_message_name := NULL;
212: -- 2. Check system location type for the locations in the relationship
209: BEGIN
210: -- 1. Set the default message number
211: p_message_name := NULL;
212: -- 2. Check system location type for the locations in the relationship
213: -- Fetch system location type for parent IGS_AD_LOCATION.
214: v_s_location_type := IGS_OR_GEN_001.ORGP_GET_S_LOC_TYPE(
215: p_location_cd);
216: -- Fetch system location type for a child locations.
217: v_sub_s_location_type := IGS_OR_GEN_001.ORGP_GET_S_LOC_TYPE(