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