DBA Data[Home] [Help]

PACKAGE BODY: APPS.IGS_GE_REPORT

Source


1 PACKAGE BODY IGS_GE_REPORT AS
2 /* $Header: IGSGE12B.pls 120.0 2005/06/01 13:01:05 appldev noship $ */
3 
4 PROCEDURE GET_INFO(
5   p_request_id            IN  NUMBER,
6   p_report_id             OUT NOCOPY NUMBER,
7   p_report_set            OUT NOCOPY VARCHAR2,
8   p_responsibility        OUT NOCOPY VARCHAR2,
9   p_application           OUT NOCOPY VARCHAR2,
10   p_request_time          OUT NOCOPY DATE,
11   p_resub_interval        OUT NOCOPY VARCHAR2,
12   p_run_time              OUT NOCOPY DATE,
13   p_printer               OUT NOCOPY VARCHAR2,
14   p_copies                OUT NOCOPY NUMBER,
15   p_save_output           OUT NOCOPY VARCHAR2 )
16 
17 AS
18 	v_report_id             NUMBER(15);
19         v_responsibility        VARCHAR2(240);
20         v_application           VARCHAR2(240);
21         v_request_time          DATE;
22         v_resub_interval        VARCHAR2(100);
23         v_run_time              DATE;
24         v_printer               VARCHAR2(30);
25         v_copies                NUMBER(15);
26         v_so_flag               VARCHAR2(1);
27         v_save_output           VARCHAR2(10);
28         v_parent_id             NUMBER(15);
29         v_request_type          VARCHAR2(1);
30         v_description           VARCHAR2(240);
31 
32 	-- ssawhney:  program application_id is the app id through which this prog was run/reg
33 	-- resp application id is the app id of the resp through which the prog was run
34 	-- so for IGF cprogs, p-a-id = 8406 and r-app-id=8405.
35 
36         CURSOR c_get_info
37 	IS
38 	SELECT fcr.concurrent_program_id,
39                fcr.parent_request_id,
40                fr.description,
41                fa.description,
42                fcr.requested_start_date,
43                TO_CHAR(fcr.RESUBMIT_INTERVAL)||' '||fcr.RESUBMIT_INTERVAL_UNIT_CODE,
44                fcr.actual_start_date,
45                fcr.printer,
46                fcr.number_of_copies,
47                fcr.save_output_flag
48         FROM   FND_CONCURRENT_REQUESTS FCR,
49                FND_APPLICATION_VL FA,
50                FND_RESPONSIBILITY_VL FR
51 	WHERE  fcr.responsibility_id = fr.responsibility_id
52 	  AND  fcr.responsibility_application_id = fr.application_id  -- added by ssawhney 3690874
53           AND  fcr.program_application_id = fa.application_id
54           and  fcr.request_id = p_request_id;
55 
56        CURSOR c_get_rs (cp_parent_id 		fnd_concurrent_requests.parent_request_id%TYPE) IS
57 		SELECT	parent_request_id,
58                         request_type,
59                         description
60 		FROM	fnd_concurrent_requests
61 		WHERE	request_id = cp_parent_id;
62 
63 
64 BEGIN
65         OPEN c_get_info;
66 
67         FETCH c_get_info
68          INTO v_report_id,
69               v_parent_id,
70               v_responsibility,
71               v_application,
72               v_request_time,
73               v_resub_interval,
74               v_run_time,
75               v_printer,
76               v_copies,
77               v_so_flag;
78 
79 
80         CLOSE c_get_info;
81 
82 
83        IF
84            v_so_flag = 'Y'
85        THEN
86            v_save_output := 'YES';
87        ELSE
88            v_save_output  := 'NO';
89 
90        END IF;
91 
92        v_description  := '';
93        v_request_type := '';
94 
95        IF  v_parent_id > 0
96        THEN
97            OPEN c_get_rs (v_parent_id);
98            FETCH c_get_rs
99              INTO v_parent_id,v_request_type,v_description;
100            CLOSE c_get_rs;
101 
102            IF v_request_type = 'S'
103            THEN
104                OPEN c_get_rs (v_parent_id);
105                FETCH c_get_rs
106                  INTO  v_parent_id,v_request_type,v_description;
107               CLOSE c_get_rs;
108            END IF;
109 
110            IF v_request_type = 'M'
111            THEN
112               p_report_set    :=  v_description;
113            END IF;
114        END IF;
115 
116        p_report_id      :=  v_report_id;
117        p_responsibility :=  v_responsibility;
118        p_application    :=  v_application;
119        p_request_time   :=  v_request_time;
120        p_resub_interval :=  v_resub_interval;
121        p_run_time       :=  v_run_time;
122        p_printer        :=  v_printer;
123        p_copies         :=  v_copies;
124        p_save_output    :=  v_save_output;
125 
126 
127 EXCEPTION
128        WHEN OTHERS THEN
129 	       Fnd_Message.Set_Name('IGS', 'IGS_GE_UNHANDLED_EXP');
130 	       FND_MESSAGE.SET_TOKEN('NAME','IGS_GE_REPORT.GET_INFO');
131 	       IGS_GE_MSG_STACK.ADD;
132        	       App_Exception.Raise_Exception;
133 
134 END GET_INFO;
135 
136 procedure IGS_PE_VALIDATE_ADDRESS(
137   p_city		IN VARCHAR2 ,
138   p_state		IN VARCHAR2 ,
139   p_province		IN VARCHAR2 ,
140   p_county		IN VARCHAR2 ,
141   p_country		IN VARCHAR2 ,
142   p_postcode		IN VARCHAR2 ,
143   p_valid_address	OUT NOCOPY VARCHAR2 ,
144   p_error_msg		OUT NOCOPY VARCHAR2 )
145 
146   AS
147   BEGIN
148   	--Validation Logic Implemented by user
149   	--After Validation , if the user finds this address is valid , do the following :
150   	--	P_VALID_ADDRESS := 'Y';
151   	--	P_ERROR_MSG := NULL;
152   	-- If address is not valid , then do the following :
153   	--	P_VALID_ADDRESS := 'N';
154   	--	P_ERROR_MSG := The parameter which is not valid(eg. P_CITY);
155 
156   	-- If the user does not have any logic implemented , the following is done :
157   		P_VALID_ADDRESS := 'Y';
158   		P_ERROR_MSG	:= NULL;
159 
160 
161 EXCEPTION
162        WHEN OTHERS THEN
163 	       Fnd_Message.Set_Name('IGS', 'IGS_GE_UNHANDLED_EXP');
164 	       IGS_GE_MSG_STACK.ADD;
165        	       App_Exception.Raise_Exception;
166 
167 end IGS_PE_VALIDATE_ADDRESS;
168 
169 END IGS_GE_REPORT;