DBA Data[Home] [Help]

PACKAGE BODY: APPS.FND_WEB

Source


1 package body FND_WEB as
2 /* $Header: AFSCWEBB.pls 120.1 2005/07/02 04:17:18 appldev ship $ */
3 
4 
5 /*
6 ** PING
7 **   Confirm basic setup of PL/SQL web server catridge.
8 **   Report core information about the Application database server.
9 */
10 procedure PING
11 is
12   val   varchar2(2000);
13 begin
14   -- Set page title
15   htp.htmlOpen;
16   htp.headOpen;
17   htp.title('FND_WEB.PING');
18   htp.headClose;
19 
20   htp.bodyOpen;
21   htp.p('FND_WEB.PING');
22   htp.tableOpen('border=1 cellpadding=3');
23 
24   select to_char(sysdate, 'DD-MON-YYYY HH24:MI:SS') into val from dual;
25   htp.tableRowOpen;
26     htp.tableData('SYSDATE', 'Left');
27     htp.tableData(val, 'Left');
28   htp.tableRowClose;
29 
30   select banner into val from v$version where rownum=1;
31   htp.tableRowOpen;
32     htp.tableData('DATABASE_VERSION', 'Left');
33     htp.tableData(val, 'Left');
34   htp.tableRowClose;
35 
36   --bug#4115696: GJIMENEZ: Use the correct API to determine
37   --the database ID instead of the
38   --below select statement:
39   --select lower(host_name)||'_'||lower(instance_name)
40   --into val
41   --from v$instance;
42   val := fnd_web_config.database_id;
43 
44   htp.tableRowOpen;
45     htp.tableData('DATABASE_ID', 'Left');
46     htp.tableData(val, 'Left');
47   htp.tableRowClose;
48 
49   select user into val from dual;
50   htp.tableRowOpen;
51     htp.tableData('SCHEMA_NAME', 'Left');
52     htp.tableData(val, 'Left');
53   htp.tableRowClose;
54 
55   select product_version into val
56   from   fnd_product_installations
57   where  application_id=0;
58   htp.tableRowOpen;
59     htp.tableData('AOL_VERSION', 'Left');
60     htp.tableData(val, 'Left');
61   htp.tableRowClose;
62 
63   begin
64     select pov.profile_option_value
65     into   val
66     from   fnd_profile_options po,
67            fnd_profile_option_values pov
68     where  po.profile_option_name = 'APPS_WEB_AGENT'
69     and    pov.application_id = po.application_id
70     and    pov.profile_option_id = po.profile_option_id
71     and    pov.level_id = 10001;
72     htp.tableRowOpen;
73       htp.tableData('APPS_WEB_AGENT', 'Left');
74       htp.tableData(val, 'Left');
75     htp.tableRowClose;
76   exception
77     when others then null;
78   end;
79 
80   htp.tableClose;
81   htp.bodyClose;
82   htp.htmlClose;
83 
84 exception
85   when others then
86       htp.p('ERROR');
87       htp.bodyClose;
88       htp.htmlClose;
89 end PING;
90 
91 /*
92 ** VERSION
93 **   Report PL/SQL package version information
94 */
95 procedure VERSION(filter in varchar2 default '') is
96 
97   cursor header_cursor(header_filter varchar2) is
98     select US.NAME NAME,
99 	   US.TYPE TYPE,
100 	   substr(US.TEXT, instr(US.TEXT, '$Header')+9,
101 		  instr(substr(US.TEXT, instr(US.TEXT, '$Header')+9),
102 			' ', 1, 2)-1) VERSION
103     from   USER_SOURCE US
104     where  US.NAME like header_filter
105     and    US.TYPE in ('PACKAGE', 'PACKAGE BODY')
106     and    US.TEXT like '%$Header: %'
107     order by 1, 2;
108 
109 begin
110   -- Set page title
111   htp.htmlOpen;
112   htp.headOpen;
113   htp.title('FND_WEB.VERSION');
114   htp.headClose;
115 
116   htp.bodyOpen;
117   htp.p('FND_WEB.VERSION');
118 
119   htp.tableOpen('border=1 cellpadding=3');
120 
121   for header_row in header_cursor(upper(filter)||'%') loop
122     htp.tableRowOpen;
123       htp.tableData(header_row.name, 'Left');
124       htp.tableData(header_row.type, 'Left');
125       htp.tableData(header_row.version, 'Left');
126     htp.tableRowClose;
127   end loop;
128 
129   htp.tableClose;
130   htp.bodyClose;
131   htp.htmlClose;
132 
133 exception
134   when others then
135       htp.p('ERROR');
136       htp.bodyClose;
137       htp.htmlClose;
138 end VERSION;
139 
140 /*
141 ** SHOWENV
142 */
143 procedure SHOWENV
144 is
145 begin
146   -- Set page title
147   htp.htmlOpen;
148   htp.headOpen;
149   htp.title('FND_WEB.SHOWENV');
150   htp.headClose;
151 
152   htp.bodyOpen;
153   htp.p('FND_WEB.SHOWENV');
154   htp.hr;
155 
156   owa_util.print_cgi_env;
157 
158   htp.bodyClose;
159   htp.htmlClose;
160 
161 exception
162   when others then
163       htp.p('ERROR');
164       htp.bodyClose;
165       htp.htmlClose;
166 end SHOWENV;
167 
168 end FND_WEB;