[Home] [Help]
PACKAGE BODY: APPS.AST_OFL_TERR_MISS_ACC_PARAM
Source
1 PACKAGE BODY AST_OFL_TERR_MISS_ACC_PARAM AS
2 /* $Header: astrtnpb.pls 115.6 2002/02/07 15:24:29 pkm ship $ */
3
4 g_image_prefix varchar2(250) := '/OA_MEDIA/'||icx_sec.getid(icx_sec.pv_language_code)||'/';
5 l_user_id number;
6 v_date_time varchar2(30);
7 l_agent varchar2(200);
8 ctr1 integer := 0;
9 ctr2 integer := 0;
10 --G_DATE_FORMAT varchar2(20) := as_ofl_util_pkg.get_date_format;
11 G_DATE_FORMAT varchar2(20) := 'MM/DD/YY';
12
13
14 TYPE day_TABLE IS table of varchar2(2000) INDEX BY BINARY_INTEGER;
15 TYPE year_TABLE IS table of varchar2(2000) INDEX BY BINARY_INTEGER;
16
17 day_data day_table;
18 year_data year_table;
19
20
21 procedure header is
22
23 -----------------------------------------------------------------------------------------------
24 --
25 -- PROCEDURE: header
26 --
27 -- DESCRIPTION: This procedure is creates the descriptive header in the parameter form
28 --
29 -----------------------------------------------------------------------------------------------
30 begin
31 select to_char(sysdate,G_DATE_FORMAT) into v_date_time from dual;
32 htp.htmlopen;
33 htp.headOpen;
34 htp.title('Territories - No Accesses Report');
35 htp.headClose;
36 htp.bodyopen(cattributes=>'bgcolor="#CCCCCC"');
37 htp.tableOpen('border="0" ');
38 htp.tableRowOpen( calign => 'TOP' );
39 --htp.tableData( htf.img(curl=>g_image_prefix||'oppty.gif'));
40 htp.tableData( '<FONT size=+1 face="times new roman">' || 'Territories - No Accesses Report', cnowrap => 'TRUE');
41 htp.tableData(htf.bold(v_date_time),calign => 'right',ccolspan => '110');
42 htp.tableRowClose;
43 htp.tableClose;
44 htp.tableOpen( cattributes => 'border=0 cellspacing=0 cellpadding=0 width=561' );
45 htp.tableRowOpen( cvalign => 'top' );
46 htp.tableData( ' ', ccolspan => '2', cattributes => ' height=9');
47 htp.tableData( '<FONT face="Times New Roman">' ||htf.bold( 'Please specify the criteria and select OK. ') ||
48 '</FONT>', calign => 'center', crowspan => '2', ccolspan => '110', cattributes => ' width=346');
49 htp.tableData( ' ', ccolspan => '6');
50 htp.Br;
51 htp.tableRowClose;
52 htp.tableClose;
53 htp.bodyClose;
54 htp.headClose;
55 htp.htmlClose;
56 end;
57 -----------------------------------------------------------------------------------------------
58 procedure terr_miss_acc_param is
59
60 -----------------------------------------------------------------------------------------------
61 --
62 -- PROCEDURE: Missing Territory Assignments Report
63 --
64 -- DESCRIPTION: This procedure is main body of the parameter form
65 --
66 -----------------------------------------------------------------------------------------------
67 /*
68 cursor cur_terr_group is select territory_group_id , name
69 from as_territory_groups;
70
71 rec_terr_group cur_terr_group%rowtype;
72 */
73
74 BEGIN
75
76
77 if (icx_sec.validateSession) then
78 header;
79
80 l_user_id := icx_sec.getID(icx_sec.PV_USER_ID);
81 -------------------- Returns login user Id--------------------------
82 htp.FormOpen(owa_util.Get_Owa_Service_Path||'AST_OFL_TERR_MISS_acc_report.report_wrapper',
83 cattributes => ' NAME="param"');
84 htp.htmlopen;
85 htp.headOpen;
86 htp.title('Territories - No Accesses Report');
87 htp.headClose;
88 htp.bodyopen(cattributes=>'bgcolor="#CCCCCC"');
89 htp.tableopen;
90 htp.tableRowOpen( cvalign => 'top' );
91 htp.tableData( ' ', cattributes => ' height=9');
92 htp.tableData( '<FONT size=2 face="Times New Roman">' || '</FONT>', calign => 'right', crowspan => '2', ccolspan => '3', cattributes => ' width=154');
93 htp.tableData( ' ');
94 htp.tableRowClose;
95 htp.tableClose;
96 htp.tableOpen(cattributes=>'width="600" ');
97
98 htp.tableRowOpen();
99 htp.p('<td align="RIGHT" width="50%"valign="top">Select Output Format</td>');
100 htp.p('<td>');
101 htp.p ('<SELECT name="p_response">');
102 htp.FormSelectOption('Excel');
103 htp.FormSelectOption('HTML',cselected => 'TRUE');
104 htp.FormSelectClose;
105 htp.tableRowClose;
106
107 --htp.tableRowClose;
108 /*
109 htp.tableRowOpen();
110 htp.p('<td align="RIGHT" valign="top">Customer Name</td>');
111 htp.p('<td>');
112 htp.FormText('p_customer_name','50');
113 htp.p('</td>');
114 htp.tableRowClose;
115
116 */
117 htp.tableClose;
118 htp.Br;
119 htp.Br;
120 htp.Br;
121 footer;
122 htp.FormClose;
123 htp.bodyclose;
124 htp.htmlclose;
125 else
126 htp.p('Invalid session');
127 end if;
128 exception
129 when others then
130 htp.p(SQLERRM);
131 END terr_miss_acc_param;
132
133 procedure footer is
134 BEGIN
135 l_agent := owa_util.get_cgi_env('SCRIPT_NAME');
136 htp.htmlopen;
137 htp.tableRowOpen;
138 htp.tableData( htf.hr, crowspan => '1', ccolspan => '190', cnowrap => 'TRUE');
139 htp.tableRowClose;
140 htp.tableOpen( calign => 'center', cattributes => ' border=0 cellspacing=2 cellpadding=2' );
141 htp.tableRowOpen;
142 htp.formOpen( curl => l_agent||'/AST_OFL_TERR_MISS_acc_report.report_wrapper', cmethod => 'GET',
143 cattributes => ' NAME="MyForm" TARGET="_top"');
144 htp.tableData( htf.formSubmit( cvalue => 'OK', cattributes => ' onMouseOver="window.status=''OK'';return true"'));
145
146 htp.tableData( '<INPUT type=button value="Cancel" onClick="history.back()" onMouseOver="window.status="Cancel";return true">');
147 htp.tableRowClose;
148 htp.tableClose;
149 htp.htmlClose;
150 END footer;
151 END;