DBA Data[Home] [Help]

PACKAGE BODY: APPS.AST_OFL_TERR_ACC_CLASS_PARAM

Source


1 PACKAGE BODY AST_OFL_TERR_ACC_CLASS_PARAM AS
2  /* $Header: astrtapb.pls 115.10 2002/02/06 14:27:40 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 
11 -- Changed for 11i AJScott
12 --   G_DATE_FORMAT  varchar2(20)   := as_ofl_util_pkg.get_date_format;
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 
32 -- Changed for 11i AJScott
33 --     select to_char(sysdate,G_DATE_FORMAT) into v_date_time from dual;
34      select fnd_date.date_to_chardate(sysdate) into v_date_time from dual;
35 
36      htp.htmlopen;
37      htp.headOpen;
38      htp.title('Account Classification Report');
39      htp.headClose;
40      htp.bodyopen(cattributes=>'bgcolor="#CCCCCC"');
41      htp.tableOpen('border="0"  ');
42      htp.tableRowOpen( calign => 'TOP' );
43      --htp.tableData( htf.img(curl=>g_image_prefix||'oppty.gif'));
44      htp.tableData( '<FONT size=+1 face="times new roman">' || 'Account Classification Report', cnowrap => 'TRUE');
45      htp.tableData(htf.bold(v_date_time),calign => 'right',ccolspan => '110');
46      htp.tableRowClose;
47      htp.tableClose;
48      htp.tableOpen(  cattributes => 'border=0 cellspacing=0 cellpadding=0 width=561' );
49      htp.tableRowOpen( cvalign => 'top' );
50      htp.tableData( ' ', ccolspan => '2', cattributes => ' height=9');
51      htp.tableData( '<FONT face="Times New Roman">' ||htf.bold( 'Please specify the criteria and select OK.  ') ||
52                     '</FONT>', calign => 'center', crowspan => '2', ccolspan => '110', cattributes => ' width=346');
53      htp.tableData( ' ', ccolspan => '6');
54      htp.Br;
55      htp.tableRowClose;
56      htp.tableClose;
57      htp.bodyClose;
58      htp.headClose;
59      htp.htmlClose;
60    end;
61 -----------------------------------------------------------------------------------------------
62 procedure terr_acc_class_param is
63 
64 -----------------------------------------------------------------------------------------------
65 --
66 --  PROCEDURE: Territories - Account Classification Report
67 --
68 --  DESCRIPTION:  This procedure is main body of the parameter form
69 --
70 -----------------------------------------------------------------------------------------------
71 /*
72    cursor cur_terr_group is select territory_group_id , name
73 
74 -- Changed for 11i AJScott
75 --   from  as_territory_groups;
76     from as_territory_groups_all;
77 
78    rec_terr_group cur_terr_group%rowtype;
79 */
80 
81    BEGIN
82 
83 
84 if (icx_sec.validateSession) then
85        header;
86 
87        l_user_id := icx_sec.getID(icx_sec.PV_USER_ID);
88        -------------------- Returns login user Id--------------------------
89        htp.FormOpen(owa_util.Get_Owa_Service_Path||'AST_OFL_TERR_acc_class_report.report_wrapper',
90                              cattributes => ' NAME="param"');
91        htp.htmlopen;
92        htp.headOpen;
93        htp.title('Account Classification Report');
94        htp.headClose;
95        htp.bodyopen(cattributes=>'bgcolor="#CCCCCC"');
96        htp.tableopen;
97        htp.tableRowOpen( cvalign => 'top' );
98        htp.tableData( ' ', cattributes => ' height=9');
99        htp.tableData( '<FONT size=2 face="Times New Roman">' || '</FONT>', calign => 'right', crowspan => '2', ccolspan => '3', cattributes => ' width=154');
100        htp.tableData( ' ');
101        htp.tableRowClose;
102        htp.tableClose;
103        htp.tableOpen(cattributes=>'width="600" ');
104 
105        htp.tableRowOpen();
106        htp.p('<td align="RIGHT" width="50%"valign="top">Select Output Format</td>');
107        htp.p('<td>');
108        htp.p ('<SELECT name="p_response">');
109        htp.FormSelectOption('Excel');
110        htp.FormSelectOption('HTML',cselected => 'TRUE');
111        htp.FormSelectClose;
112        htp.tableRowClose;
113 
114      --htp.tableRowClose;
115 
116      htp.tableRowOpen();
117      htp.p('<td align="RIGHT" valign="top">Customer Name</td>');
118      htp.p('<td>');
119      htp.FormText('p_customer_name','50');
120      htp.p('</td>');
121      htp.tableRowClose;
122 
123        htp.tableClose;
124        htp.Br;
125        htp.Br;
126        htp.Br;
127        footer;
128        htp.FormClose;
129        htp.bodyclose;
130        htp.htmlclose;
131  else
132   htp.p('Invalid session');
133      end if;
134      exception
135         when others then
136                 htp.p(SQLERRM);
137  END terr_acc_class_param;
138 
139  procedure footer is
140  BEGIN
141       l_agent := owa_util.get_cgi_env('SCRIPT_NAME');
142       htp.htmlopen;
143       htp.tableRowOpen;
144       htp.tableData( htf.hr, crowspan => '1', ccolspan => '190', cnowrap => 'TRUE');
145       htp.tableRowClose;
146       htp.tableOpen( calign => 'center', cattributes => ' border=0 cellspacing=2 cellpadding=2' );
147       htp.tableRowOpen;
148       htp.formOpen( curl => l_agent||'/AST_OFL_TERR_acc_class_report.report_wrapper', cmethod => 'GET',
149                               cattributes => ' NAME="MyForm" TARGET="_top"');
150         htp.tableData( htf.formSubmit( cvalue => 'OK', cattributes => ' onMouseOver="window.status=''OK'';return true"'));
151 
152       --htp.tableData( '<INPUT type=button value="Cancel" onClick="history.back()" onMouseOver="window.status="Cancel";return true">');
153       htp.tableData( '<INPUT type=button value="Reset" onClick="history.back()" onMouseOver="window.status="Cancel";return true">');
154       htp.tableData( '<INPUT type=button value="Cancel" onClick="window.close()" onMouseOver="window.status="Close";return true">');
155       htp.tableRowClose;
156       htp.tableClose;
157       htp.htmlClose;
158    END footer;
159 END;