1 PACKAGE BODY IGS_RE_VAL_TPMT AS
2 /* $Header: IGSRE18B.pls 115.3 2002/11/29 03:30:55 nsidana ship $ */
3 --
4 -- To validate thesis panel member type tracking type value
5 FUNCTION RESP_VAL_TPMT_TRT(
6 p_tracking_type IN VARCHAR2 ,
7 p_message_name OUT NOCOPY VARCHAR2 )
8 RETURN BOOLEAN AS
9 BEGIN -- resp_val_tpmt_trt
10 -- Validate IGS_RE_THS_PNL_MR_TP.tracking_type.
11 DECLARE
12 CURSOR c_trt IS
13 SELECT 'x'
14 FROM IGS_TR_TYPE trt
15 WHERE trt.tracking_type = p_tracking_type AND
16 trt.closed_ind = 'Y';
17 v_trt_exists VARCHAR2(1);
18 BEGIN
19 -- Set the default message number
20 p_message_name := NULL;
21 If p_tracking_type IS NOT NULL THEN
22 -- Cursor handling
23 OPEN c_trt;
24 FETCH c_trt INTO v_trt_exists;
25 IF c_trt %FOUND THEN
26 CLOSE c_trt;
27 p_message_name := 'IGS_RE_TRK_TYPE_CLOSED';
28 RETURN FALSE;
29 END IF;
30 CLOSE c_trt;
31 END IF;
32 -- Return the default value
33 RETURN TRUE;
34 EXCEPTION
35 WHEN OTHERS THEN
36 IF c_trt %ISOPEN THEN
37 CLOSE c_trt;
38 END IF;
39 RAISE;
40 END;
41 EXCEPTION
42 WHEN OTHERS THEN
43 Fnd_Message.Set_Name ('IGS', 'IGS_GE_UNHANDLED_EXCEPTION');
44 IGS_GE_MSG_STACK.ADD;
45 App_Exception.Raise_Exception;
46 END resp_val_tpmt_trt;
47 END IGS_RE_VAL_TPMT;