[Home] [Help]
PACKAGE BODY: APPS.PO_POXCONST_XMLP_PKG
Source
1 PACKAGE BODY PO_POXCONST_XMLP_PKG AS
2 /* $Header: POXCONSTB.pls 120.1 2007/12/25 10:49:19 krreddy noship $ */
3
4 USER_EXIT_FAILURE EXCEPTION;
5
6 function BeforeReport return boolean is
7 begin
8
9 declare
10 l_sort po_lookup_codes.displayed_field%type ;
11 begin
12
13 QTY_PRECISION:=PO_common_xmlp_pkg.GET_PRECISION(P_QTY_PRECISION);
14 if P_orderby is not null then
15
16 select displayed_field
17 into l_sort
18 from po_lookup_codes
19 where lookup_code = P_orderby
20 and lookup_type = 'SRS ORDER BY';
21
22 P_orderby_displayed := l_sort ;
23
24 else
25
26 P_orderby_displayed := '' ;
27
28 end if;
29
30
31 end;
32 BEGIN
33 /*SRW.USER_EXIT('FND SRWINIT');*/null;
34
35 EXCEPTION WHEN USER_EXIT_FAILURE /*SRW.USER_EXIT_FAILURE */THEN
36 /*SRW.MESSAGE(1, 'srw_init');*/null;
37
38 END;
39 BEGIN
40 if (get_p_struct_num <> TRUE )
41 then /*SRW.MESSAGE('1','Init failed');*/null;
42
43 end if;
44 END;
45 BEGIN
46
47 null;
48 EXCEPTION WHEN USER_EXIT_FAILURE /*SRW.USER_EXIT_FAILURE */THEN
49 /*SRW.MESSAGE(1, 'Before Item Flex');*/null;
50
51 END;
52 BEGIN
53
54 null;
55 EXCEPTION WHEN USER_EXIT_FAILURE /*SRW.USER_EXIT_FAILURE */THEN
56 /*SRW.MESSAGE(1, 'Before Cat Flex');*/null;
57
58 END;
59 BEGIN
60
61 null;
62 EXCEPTION WHEN USER_EXIT_FAILURE /*SRW.USER_EXIT_FAILURE */THEN
63 /*SRW.MESSAGE(1, 'Before Item Orderby');*/null;
64
65 END;
66 BEGIN
67
68 null;
69 EXCEPTION WHEN USER_EXIT_FAILURE /*SRW.USER_EXIT_FAILURE */THEN
70 /*SRW.MESSAGE(1, 'Before Cat Orderby');*/null;
71
72 END; return (TRUE);
73 end;
74
75 function AfterReport return boolean is
76 begin
77
78 /*SRW.USER_EXIT('FND SRWEXIT');*/null;
79 return (TRUE);
80 end;
81
82 procedure get_precision is
83 begin
84 /*srw.attr.mask := SRW.FORMATMASK_ATTR;*/null;
85
86 if P_qty_precision = 0 then /*srw.attr.formatmask := '-NNN,NNN,NNN,NN0';*/null;
87
88 else
89 if P_qty_precision = 1 then /*srw.attr.formatmask := '-NNN,NNN,NNN,NN0.0';*/null;
90
91 else
92 if P_qty_precision = 3 then /*srw.attr.formatmask := '-NN,NNN,NNN,NN0.000';*/null;
93
94 else
95 if P_qty_precision = 4 then /*srw.attr.formatmask := '-N,NNN,NNN,NN0.0000';*/null;
96
97 else
98 if P_qty_precision = 5 then /*srw.attr.formatmask := '-NNN,NNN,NN0.00000';*/null;
99
100 else
101 if P_qty_precision = 6 then /*srw.attr.formatmask := '-NN,NNN,NN0.000000';*/null;
102
103 else /*srw.attr.formatmask := '-NNN,NNN,NNN,NN0.00';*/null;
104
105 end if; end if; end if; end if; end if; end if;
106 /*srw.set_attr(0,srw.attr);*/null;
107
108 end;
109
110 function orderby_clauseFormula return VARCHAR2 is
111 begin
112
113 if P_ORDERBY = 'PO Number' then
114 return ('21, 22');
115 elsif P_ORDERBY = 'ITEM' then
116 return(P_ORDERBY_ITEM) ;
117 elsif P_ORDERBY = 'CATEGORY' then
118 return (P_ORDERBY_CAT) ;
119 end if;
120 --RETURN NULL; end;
121 return ('21, 22'); end;
122
123 function get_p_struct_num return boolean is
124
125 l_p_struct_num number;
126
127 begin
128 select structure_id
129 into l_p_struct_num
130 from mtl_default_sets_view
131 where functional_area_id = 2 ;
132
133 P_STRUCT_NUM := l_p_struct_num ;
134
135 return(TRUE) ;
136
137 RETURN NULL; exception
138 when others then return(FALSE) ;
139 end;
140
141 function c_sum_contract_round(C_SUM_CONTRACT in number, C_PRECISION in number) return number is
142 BEGIN
143
144 /*SRW.REFERENCE(C_SUM_CONTRACT);*/null;
145
146 /*SRW.REFERENCE(C_PRECISION);*/null;
147
148 RETURN(ROUND(C_SUM_CONTRACT, C_PRECISION));
149
150 END;
151
152 function c_amount_round(C_AMOUNT in number, C_PRECISION in number) return number is
153 BEGIN
154
155 /*SRW.REFERENCE(C_AMOUNT);*/null;
156
157 /*SRW.REFERENCE(C_PRECISION);*/null;
158
159 RETURN(ROUND(C_AMOUNT, C_PRECISION));
160
161 END;
162
163 function c_total_po_amount_round(C_TOTAL_PO_AMOUNT in number, C_PRECISION in number) return number is
164 BEGIN
165
166 /*SRW.REFERENCE(C_TOTAL_PO_AMOUNT);*/null;
167
168 /*SRW.REFERENCE(C_PRECISION);*/null;
169
170 RETURN(ROUND(C_TOTAL_PO_AMOUNT, C_PRECISION));
171
172 END;
173
174 function c_amount_1_round(c_amount_1 in number, c_precision in number) return number is
175 begin
176
177 /*srw.reference(c_amount_1);*/null;
178
179 /*srw.reference(c_precision);*/null;
180
181 return(round(c_amount_1, c_precision));
182
183 end;
184
185 function c_unit_price_roundformula(UNIT_PRICE in varchar2, C_EXTENDED_PRECISION in number) return number is
186 begin
187 /*SRW.REFERENCE(UNIT_PRICE);*/null;
188
189 /*SRW.REFERENCE(C_EXTENDED_PRECISION);*/null;
190
191 RETURN(ROUND(UNIT_PRICE,C_EXTENDED_PRECISION));
192 end;
193
194 --Functions to refer Oracle report placeholders--
195
196 END PO_POXCONST_XMLP_PKG ;
197