[Home] [Help]
PACKAGE BODY: APPS.PO_POXRQUNI_XMLP_PKG
Source
1 PACKAGE BODY PO_POXRQUNI_XMLP_PKG AS
2 /* $Header: POXRQUNIB.pls 120.1 2007/12/25 12:01:52 krreddy noship $ */
3
4 USER_EXIT_FAILURE EXCEPTION;
5
6 function BeforeReport return boolean is
7 begin
8
9 DECLARE
10 l_yes_no fnd_lookups.meaning%type;
11 BEGIN
12 /*SRW.USER_EXIT('FND SRWINIT');*/null;
13
14
15 if (get_p_struct_num <> TRUE )
16 then /*SRW.MESSAGE('1','P Struct Num Init failed');*/null;
17
18 end if;
19
20 IF P_PRINT_PRICE_HISTORY is NULL THEN
21 P_PRINT_PRICE_HISTORY_1 := 'N';
22 ELSE
23 P_PRINT_PRICE_HISTORY_1 := P_PRINT_PRICE_HISTORY;
24 END IF;
25
26 SELECT meaning
27 INTO l_yes_no
28 FROM FND_LOOKUPS
29 WHERE lookup_type = 'YES_NO'
30 AND lookup_code = P_PRINT_PRICE_HISTORY_1;
31
32 P_PRINT_PRICE_HISTORY_DISP := l_yes_no;
33
34 FORMAT_MASK := PO_COMMON_XMLP_PKG.GET_PRECISION(P_qty_precision);
35 null;
36
37
38 null;
39
40
41 null;
42
43 RETURN TRUE;
44 END; return (TRUE);
45 end;
46
47 procedure get_precision is
48 begin
49 /*srw.attr.mask := SRW.FORMATMASK_ATTR;*/null;
50
51 if P_qty_precision = 0 then /*srw.attr.formatmask := '-NNN,NNN,NNN,NN0';*/null;
52
53 else
54 if P_qty_precision = 1 then /*srw.attr.formatmask := '-NNN,NNN,NNN,NN0.0';*/null;
55
56 else
57 if P_qty_precision = 3 then /*srw.attr.formatmask := '-NN,NNN,NNN,NN0.000';*/null;
58
59 else
60 if P_qty_precision = 4 then /*srw.attr.formatmask := '-N,NNN,NNN,NN0.0000';*/null;
61
62 else
63 if P_qty_precision = 5 then /*srw.attr.formatmask := '-NNN,NNN,NN0.00000';*/null;
64
65 else
66 if P_qty_precision = 6 then /*srw.attr.formatmask := '-NN,NNN,NN0.000000';*/null;
67
68 else /*srw.attr.formatmask := '-NNN,NNN,NNN,NN0.00';*/null;
69
70 end if; end if; end if; end if; end if; end if;
71 /*srw.set_attr(0,srw.attr);*/null;
72
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 function get_p_struct_num return boolean is
83
84 l_p_struct_num number;
85
86 begin
87 select structure_id
88 into l_p_struct_num
89 from mtl_default_sets_view
90 where functional_area_id = 2 ;
91
92 P_STRUCT_NUM := l_p_struct_num ;
93
94 return(TRUE) ;
95
96 RETURN NULL; exception
97 when others then return(FALSE) ;
98 end;
99
100 function AfterPForm return boolean is
101 begin
102
103
104
105 if(p_location is not null) then
106
107 select hlt.location_id
108 into p_location_id
109 from hr_locations_all_tl hlt
110 where hlt.location_code = p_location
111 and hlt.language=userenv('LANG');
112 end if;
113 if(P_NEEDBY_DATE_FROM <> to_date('1900/01/01','yyyy/mm/dd') and P_NEED_BY_DATE_TO <> to_date('9999/01/01','yyyy/mm/dd')) then
114 P_NEEDBY_DATE_FROM1 := to_char(P_NEEDBY_DATE_FROM,'DD-MON-YYYY');
115 P_NEED_BY_DATE_TO1 := to_char(P_NEED_BY_DATE_TO,'DD-MON-YYYY');
116 else
117 P_NEEDBY_DATE_FROM1 := '';
118 P_NEED_BY_DATE_TO1 := '';
119 end if;
120 return (TRUE);
121 end;
122
123 function locationformula(p_location_id in number) return char is
124
125 x_location_code varchar2(100);
126 x_count number;
127
128 begin
129
130 if(p_location is not null) then
131 return p_location;
132 else
133 begin
134 select hlt.location_code
135 into x_location_code
136 from hr_locations_all_tl hlt
137 where hlt.location_id=p_location_id
138 and hlt.language=userenv('LANG');
139
140 exception when no_data_found then
141
142 select (substr(hzl.address1,1,50) || '-' || hzl.city )
143 into x_location_code
144 from hz_locations hzl
145 where hzl.location_id = location_id;
146
147 end;
148 return x_location_code;
149 end if;
150 end;
151
152 --Functions to refer Oracle report placeholders--
153
154 END PO_POXRQUNI_XMLP_PKG ;
155