[Home] [Help]
PACKAGE BODY: APPS.PO_POXPOSMH_XMLP_PKG
Source
1 PACKAGE BODY PO_POXPOSMH_XMLP_PKG AS
2 /* $Header: POXPOSMHB.pls 120.1 2007/12/25 11:19:49 krreddy noship $ */
3
4 function BeforeReport return boolean is
5 begin
6
7 BEGIN
8 /*SRW.USER_EXIT('FND SRWINIT');*/null;
9
10 if (get_p_struct_num <> TRUE )
11 then /*SRW.MESSAGE('1','Init failed');*/null;
12
13 end if;
14 FORMAT_MASK := PO_COMMON_XMLP_PKG.GET_PRECISION(P_QTY_PRECISION);
15 null;
16
17
18 null;
19
20
21 null;
22
23
24 null;
25
26 RETURN TRUE;
27 END; return (TRUE);
28 end;
29
30 function AfterReport return boolean is
31 begin
32
33 /*SRW.USER_EXIT('FND SRWEXIT');*/null;
34 return (TRUE);
35 end;
36
37 procedure get_precision is
38 begin
39 /*srw.attr.mask := SRW.FORMATMASK_ATTR;*/null;
40
41 if P_qty_precision = 0 then /*srw.attr.formatmask := '-NNN,NNN,NNN,NN0';*/null;
42
43 else
44 if P_qty_precision = 1 then /*srw.attr.formatmask := '-NNN,NNN,NNN,NN0.0';*/null;
45
46 else
47 if P_qty_precision = 3 then /*srw.attr.formatmask := '-NN,NNN,NNN,NN0.000';*/null;
48
49 else
50 if P_qty_precision = 4 then /*srw.attr.formatmask := '-N,NNN,NNN,NN0.0000';*/null;
51
52 else
53 if P_qty_precision = 5 then /*srw.attr.formatmask := '-NNN,NNN,NN0.00000';*/null;
54
55 else
56 if P_qty_precision = 6 then /*srw.attr.formatmask := '-NN,NNN,NN0.000000';*/null;
57
58 else /*srw.attr.formatmask := '-NNN,NNN,NNN,NN0.00';*/null;
59
60 end if; end if; end if; end if; end if; end if;
61 /*srw.set_attr(0,srw.attr);*/null;
62
63 end;
64
65 function get_p_struct_num return boolean is
66
67 l_p_struct_num number;
68
69 begin
70 select structure_id
71 into l_p_struct_num
72 from mtl_default_sets_view
73 where functional_area_id = 2 ;
74
75 P_STRUCT_NUM := l_p_struct_num ;
76
77 return(TRUE) ;
78
79 RETURN NULL; exception
80 when others then return(FALSE) ;
81 end;
82
83 function c_report_avg_no_of_daysformula(C_report_tot_days_hold in number, C_report_number_total in number) return number is
84 begin
85 if(C_report_number_total=0) then
86 return(0);
87 else
88 return (C_report_tot_days_hold / C_report_number_total);
89 end if;
90 end;
91
92 function c_total_days_holdingformula(average in number, number_amount_tot in number) return number is
93 begin
94 return(average * number_amount_tot);
95 end;
96
97 function c_unit_price_round(unit_price in varchar2, parent_currency_precision in number) return number is
98
99 begin
100
101 /*srw.reference(unit_price);*/null;
102
103 /*srw.reference(parent_currency_precision);*/null;
104
105
106 return(round(unit_price,parent_currency_precision));
107 end;
108
109 function c_invoice_price_round(invoice_price in number, parent_currency_precision in number) return number is
110
111 begin
112
113 /*srw.reference(invoice_price);*/null;
114
115 /*srw.reference(Parent_currency_precision);*/null;
116
117 return(round(invoice_price,parent_currency_precision));
118
119 end;
120
121 --Functions to refer Oracle report placeholders--
122
123 END PO_POXPOSMH_XMLP_PKG ;
124