DBA Data[Home] [Help]

PACKAGE BODY: APPS.IGS_CO_VAL_LPTR

Source


1 PACKAGE BODY IGS_CO_VAL_LPTR AS
2 /* $Header: IGSCO14B.pls 115.5 2002/11/28 23:06:06 nsidana ship $ */
3   -------------------------------------------------------------------------------------------
4   --Change History:
5   --Who         When            What
6   --avenkatr    29-AUG-2001    Bug Id : 1956374. Removed procedure "corp_val_cort_closed"
7   --avenkatr    29-AUG-2001    Bug Id : 1956374. Removed procedure "corp_val_lpt_closed"
8   -------------------------------------------------------------------------------------------
9 
10   --
11   -- Validate if System Letter Parameter Type Restriction exist.
12   FUNCTION corp_val_slptr_rstrn(
13   p_s_letter_parameter_type IN VARCHAR2 ,
14   p_correspondence_type IN VARCHAR2 ,
15   p_message_name OUT NOCOPY VARCHAR2 )
16   RETURN BOOLEAN AS
17 
18   BEGIN	-- corp_val_slptr_rstrn
19   	-- Validates that the s_letter_parameter_type is able to be used within
20   	-- the IGS_CO_TYPE and that no restrictions exist that deny the
21   	-- s_letter_parameter_type being able to be assigned within the
22   	-- IGS_CO_TYPE.
23   DECLARE
24   	CURSOR c_slptr IS
25   		SELECT	CORRESPONDENCE_TYPE
26   		FROM	IGS_CO_S_LTR_PR_RSTN
27   		WHERE	s_letter_parameter_type= p_s_letter_parameter_type;
28   	v_valid_correspondence_type 	BOOLEAN DEFAULT TRUE;
29   BEGIN
30   	-- Set the default message number
31   	p_message_name   := Null;
32   	-- loop through all the records found to check
33   	-- whether p_correspondence_type is in the list.
34   	FOR v_slptr_rec IN c_slptr LOOP
35   		v_valid_correspondence_type := FALSE;
36   		IF v_slptr_rec.CORRESPONDENCE_TYPE = p_correspondence_type THEN
37   			-- Set a flag to indicate that the s_letter_parameter_type
38   			-- can be assigned within the correspondence type and exit the loop.
39   			v_valid_correspondence_type := TRUE;
40   			EXIT;
41   		END IF;
42   	END LOOP;
43   	IF NOT v_valid_correspondence_type THEN
44   		p_message_name   := 'IGS_CO_SYSLETTER_EXIST_CORTYP';
45   		RETURN FALSE;
46   	END IF;
47   	-- Return the default value
48   	RETURN TRUE;
49   EXCEPTION
50   	WHEN OTHERS THEN
51   		IF c_slptr%ISOPEN THEN
52   			CLOSE c_slptr;
53   		END IF;
54   		RAISE;
55   END;
56 
57   END corp_val_slptr_rstrn;
58 END IGS_CO_VAL_LPTR;