DBA Data[Home] [Help]

PACKAGE BODY: APPS.BISVIEWER_PUB

Source


1 PACKAGE BODY BISVIEWER_PUB AS
2 /* $Header: BISPUBPB.pls 120.0 2005/06/01 17:41:54 appldev noship $ */
3 -- Added for ARU db drv auto generation
4 -- dbdrv: sql ~PROD ~PATH ~FILE none none none package &phase=plb 
5 -- dbdrv: checkfile(115.13=120.0):~PROD:~PATH:~FILE
6 
7 procedure    showReport(pUrlString        in   varchar2,
8                         pUserId           in   varchar2    default null,
9                         pRespId           in   varchar2    default null ,
10                         pSessionId        in   varchar2    default null,
11                         pFunctionName     in   varchar2    default null,
12                         --added pPageId for enhancement #2442162
13                         pPageId           in   varchar2    default null
14                        )
15 
16 IS
17 l_resp_id           varchar2(80);
18 l_url_string        VARCHAR2(5000);
19 l_session_id        VARCHAR2(80);
20 l_application_id 	NUMBER;
21 l_function_id       NUMBER;
22 
23 CURSOR cFndResp (pRespId IN VARCHAR2) IS
24 SELECT application_id
25 FROM fnd_responsibility
26 WHERE responsibility_id = pRespId;
27 
28 BEGIN
29 
30    --jprabhud enhancement #2442162
31    IF NOT icx_sec.ValidateSession THEN
32       RETURN;
33     END IF;
34     if (pRespId is not null and to_number(pRespId) > 0) then
35        l_resp_id := pRespId;
36     else
37        l_resp_id := icx_sec.getID(icx_sec.PV_RESPONSIBILITY_ID);
38     end if;
39    --nbarik - 05/15/04 - Enhancement 3576963 - Drill Java Conversion
40    -- nbarik - 04/23/04 - Bug Fix 3589098
41    -- Senthil bugFix #4112205
42    l_url_string := pUrlString;
43    IF (pFunctionName IS NOT NULL) THEN
44      l_url_string := l_url_string || '&pFunctionName=' || BIS_PMV_UTIL.encode(pFunctionName);
45    END IF;
46    l_url_string := 'pMode=1&pUrlString=' || BIS_PMV_UTIL.encode(l_url_string);
47 
48 
49    IF (pUserId IS NOT NULL) THEN
50      l_url_string := l_url_string || '&pUserId=' || pUserId;
51    END IF;
52    IF (pRespId IS NOT NULL) THEN
53      l_url_string := l_url_string || '&pRespId=' || pRespId;
54    END IF;
55    IF (pSessionId IS NOT NULL) THEN
56      l_url_string := l_url_string || '&pSessionId=' || pSessionId;
57    END IF;
58    IF (pPageId IS NOT NULL) THEN
59      l_url_string := l_url_string || '&pPageId=' || pPageId;
60    END IF;
61   IF (pSessionId is not null) then
62     l_session_id := pSessionId;
63   ELSE
64     l_session_id := icx_sec.getID(icx_sec.PV_SESSION_ID);
65   END IF;
66 
67   IF cFNDResp%ISOPEN THEN
68    CLOSE cFNDResp;
69   END IF;
70   OPEN cFNDResp(l_resp_id);
71   FETCH cFNDResp INTO l_application_id;
72   CLOSE cFNDResp;
73 
74   SELECT function_id
75   INTO l_function_id
76   FROM fnd_form_functions
77   WHERE function_name = 'BIS_PMV_DRILL_JSP';
78 
79   OracleApps.runFunction (
80                       c_function_id => l_function_id
81                     , n_session_id => l_session_id
82                     , c_parameters => l_url_string
83                     , p_resp_appl_id => l_application_id
84                     , p_responsibility_id => l_resp_id
85                     , p_Security_group_id => icx_sec.g_security_group_id
86                   );
87   /*
88    BIS_PMV_DRILL_PVT.drillacross(pURLString => l_url_string,
89                                  pUserId  => pUserId,
90                                  pSessionId => pSessionId,
91                                  pRespId => l_resp_id, --jprabhud enhancement #2442162
92                                  --jprabhud do not pass pFunctionName, null will be used enhancement #2442162
93                                  --jprabhud added pPageId for enhancement #2442162
94                                  pPageId=>pPageId
95                                  );
96    */
97 EXCEPTION
98   WHEN OTHERS THEN
99 	  IF cFNDResp%ISOPEN THEN
100 	   CLOSE cFNDResp;
101 	  END IF;
102 
103 END showReport;
104 
105 END BISVIEWER_PUB;