[Home] [Help]
PACKAGE BODY: APPS.PO_POXRQRCO_XMLP_PKG
Source
1 PACKAGE BODY PO_POXRQRCO_XMLP_PKG AS
2 /* $Header: POXRQRCOB.pls 120.1 2008/01/06 08:06:27 dwkrishn noship $ */
3
4 USER_EXIT_FAILURE EXCEPTION;
5
6 function BeforeReport return boolean is
7 begin
8
9
10
11 get_boiler_plates ;
12
13
14
15 DECLARE
16
17 l_message1 po_lookup_codes.description%TYPE ;
18
19 BEGIN
20
21 QTY_PRECISION:=po_common_xmlp_pkg.get_precision(P_QTY_PRECISION);
22 /*SRW.USER_EXIT('FND SRWINIT');*/null;
23
24 /*srw.user_exit('FND INSTALLATION OUTPUT_TYPE="STATUS"
25 OUTPUT_FIELD=":P_OE_STATUS"
26 APPS="ONT"') ;*/null;
27
28
29 if P_OE_STATUS <> 'I' then
30 select description
31 into l_message1
32 from po_lookup_codes
33 where lookup_type = 'SRW MESSAGE'
34 and lookup_code = 'CANNOT RUN PROGRAM' ;
35
36 /*srw.message(1,l_message1) ;*/null;
37
38 return false;
39 end if;
40
41
42 EXCEPTION WHEN USER_EXIT_FAILURE /*SRW.USER_EXIT_FAILURE */THEN
43
44 select description
45 into l_message1
46 from po_lookup_codes
47 where lookup_type = 'SRW MESSAGE'
48 and lookup_code = 'FAILURE TO GET STATUS' ;
49
50 /*srw.message(1,l_message1) ;*/null;
51
52 return false;
53
54 END;
55
56 BEGIN
57 if (get_p_struct_num <> TRUE )
58 then /*SRW.MESSAGE('1','P Struct Num Init failed');*/null;
59
60 end if;
61
62 null;
63
64
65 null;
66
67
68 null;
69
70
71 null;
72 RETURN TRUE;
73 END;
74
75 return (TRUE);
76 end;
77
78 function AfterReport return boolean is
79 begin
80
81 /*SRW.USER_EXIT('FND SRWEXIT');*/null;
82 return (TRUE);
83 end;
84
85 procedure get_precision is
86 begin
87 /*srw.attr.mask := SRW.FORMATMASK_ATTR;*/null;
88
89 if P_qty_precision = 0 then /*srw.attr.formatmask := '-NNN,NNN,NNN,NN0';*/null;
90
91 else
92 if P_qty_precision = 1 then /*srw.attr.formatmask := '-NNN,NNN,NNN,NN0.0';*/null;
93
94 else
95 if P_qty_precision = 3 then /*srw.attr.formatmask := '-NN,NNN,NNN,NN0.000';*/null;
96
97 else
98 if P_qty_precision = 4 then /*srw.attr.formatmask := '-N,NNN,NNN,NN0.0000';*/null;
99
100 else
101 if P_qty_precision = 5 then /*srw.attr.formatmask := '-NNN,NNN,NN0.00000';*/null;
102
103 else
104 if P_qty_precision = 6 then /*srw.attr.formatmask := '-NN,NNN,NN0.000000';*/null;
105
106 else /*srw.attr.formatmask := '-NNN,NNN,NNN,NN0.00';*/null;
107
108 end if; end if; end if; end if; end if; end if;
109 /*srw.set_attr(0,srw.attr);*/null;
110
111 end;
112
113 function get_p_struct_num return boolean is
114
115 l_p_struct_num number;
116
117 begin
118 select structure_id
119 into l_p_struct_num
120 from mtl_default_sets_view
121 where functional_area_id = 2 ;
122
123 P_STRUCT_NUM := l_p_struct_num ;
124
125 return(TRUE) ;
126
127 RETURN NULL; exception
128 when others then return(FALSE) ;
129 end;
130
131 procedure get_boiler_plates is
132
133 w_industry_code varchar2(20);
134 w_industry_stat varchar2(20);
135
136 begin
137
138 if fnd_installation.get(0, 0,
139 w_industry_stat,
140 w_industry_code) then
141 if w_industry_code = 'C' then
142 c_order_title := null ;
143 else
144 get_lookup_meaning('IND_SALES_ORDER',
145 w_industry_code,
146 c_order_title);
147 end if;
148 end if;
149
150 c_industry_code := w_Industry_code ;
151
152 end ;
153
154 procedure get_lookup_meaning(p_lookup_type in varchar2,
155 p_lookup_code in varchar2,
156 p_lookup_meaning in out nocopy varchar2)
157 is
158
159 w_meaning varchar2(80);
160
161 begin
162
163 select meaning
164 into w_meaning
165 from fnd_lookups
166 where lookup_type = p_lookup_type
167 and lookup_code = p_lookup_code ;
168
169 p_lookup_meaning := w_meaning ;
170
171 exception
172 when no_data_found then
173 p_lookup_meaning := null ;
174
175 end ;
176
177 function set_display_for_core return boolean is
178
179 begin
180
181 if c_industry_code = 'C' then
182 return(TRUE);
183 else
184 if c_order_title is not null then
185 return(FALSE);
186 else
187 return(TRUE);
188 end if;
189 end if;
190
191 RETURN NULL; end;
192
193 function set_display_for_gov return boolean is
194
195 begin
196
197
198 if c_industry_code = 'C' then
199 return(FALSE);
200 else
201 if c_order_title is not null then
202 return(TRUE);
203 else
204 return(FALSE);
205 end if;
206 end if;
207
208 RETURN NULL; end ;
209
210 --Functions to refer Oracle report placeholders--
211
212 Function C_industry_code_p return varchar2 is
213 Begin
214 return C_industry_code;
215 END;
216 Function C_order_title_p return varchar2 is
217 Begin
218 return C_order_title;
219 END;
220 END PO_POXRQRCO_XMLP_PKG ;
221