9: RETURN BOOLEAN AS
10: BEGIN
11: -- crsp_val_iud_us_dtl
12: -- This module validates whether or not inserts and updates can be made to
13: -- IGS_EN_UNIT_SET
14: -- detail records (ie; record structures underneath the IGS_EN_UNIT_SET table)
15: DECLARE
16: v_s_unit_set_status IGS_EN_UNIT_SET_STAT.s_unit_set_status%TYPE;
17: CURSOR c_us IS
10: BEGIN
11: -- crsp_val_iud_us_dtl
12: -- This module validates whether or not inserts and updates can be made to
13: -- IGS_EN_UNIT_SET
14: -- detail records (ie; record structures underneath the IGS_EN_UNIT_SET table)
15: DECLARE
16: v_s_unit_set_status IGS_EN_UNIT_SET_STAT.s_unit_set_status%TYPE;
17: CURSOR c_us IS
18: SELECT uss.s_unit_set_status
12: -- This module validates whether or not inserts and updates can be made to
13: -- IGS_EN_UNIT_SET
14: -- detail records (ie; record structures underneath the IGS_EN_UNIT_SET table)
15: DECLARE
16: v_s_unit_set_status IGS_EN_UNIT_SET_STAT.s_unit_set_status%TYPE;
17: CURSOR c_us IS
18: SELECT uss.s_unit_set_status
19: FROM IGS_EN_UNIT_SET us,
20: IGS_EN_UNIT_SET_STAT uss
15: DECLARE
16: v_s_unit_set_status IGS_EN_UNIT_SET_STAT.s_unit_set_status%TYPE;
17: CURSOR c_us IS
18: SELECT uss.s_unit_set_status
19: FROM IGS_EN_UNIT_SET us,
20: IGS_EN_UNIT_SET_STAT uss
21: WHERE us.unit_set_cd = p_unit_set_cd AND
22: us.version_number = p_version_number AND
23: us.unit_set_status = uss.unit_set_status;
16: v_s_unit_set_status IGS_EN_UNIT_SET_STAT.s_unit_set_status%TYPE;
17: CURSOR c_us IS
18: SELECT uss.s_unit_set_status
19: FROM IGS_EN_UNIT_SET us,
20: IGS_EN_UNIT_SET_STAT uss
21: WHERE us.unit_set_cd = p_unit_set_cd AND
22: us.version_number = p_version_number AND
23: us.unit_set_status = uss.unit_set_status;
24: BEGIN
23: us.unit_set_status = uss.unit_set_status;
24: BEGIN
25: -- Set the default message number
26: p_message_name := NULL;
27: -- 1. Select the IGS_EN_UNIT_SET.IGS_EN_UNIT_SET_STAT for the given p_unit_cd and
28: -- p_version_number and
29: -- Select the IGS_EN_UNIT_SET_STAT.s_unit_set_status for the selected
30: -- IGS_EN_UNIT_SET.IGS_EN_UNIT_SET_STAT.
31: OPEN c_us;
25: -- Set the default message number
26: p_message_name := NULL;
27: -- 1. Select the IGS_EN_UNIT_SET.IGS_EN_UNIT_SET_STAT for the given p_unit_cd and
28: -- p_version_number and
29: -- Select the IGS_EN_UNIT_SET_STAT.s_unit_set_status for the selected
30: -- IGS_EN_UNIT_SET.IGS_EN_UNIT_SET_STAT.
31: OPEN c_us;
32: FETCH c_us INTO v_s_unit_set_status;
33: -- 2. If no record is found -
26: p_message_name := NULL;
27: -- 1. Select the IGS_EN_UNIT_SET.IGS_EN_UNIT_SET_STAT for the given p_unit_cd and
28: -- p_version_number and
29: -- Select the IGS_EN_UNIT_SET_STAT.s_unit_set_status for the selected
30: -- IGS_EN_UNIT_SET.IGS_EN_UNIT_SET_STAT.
31: OPEN c_us;
32: FETCH c_us INTO v_s_unit_set_status;
33: -- 2. If no record is found -
34: IF (c_us%NOTFOUND) THEN
36: p_message_name := NULL;
37: RETURN TRUE;
38: END IF;
39: CLOSE c_us;
40: -- 3. Test the value of the IGS_EN_UNIT_SET_STAT.s_unit_set_status
41: IF v_s_unit_set_status = 'INACTIVE' THEN
42: p_message_name := 'IGS_PS_UNIT_SET_INACTIVE';
43: RETURN FALSE;
44: END IF;