[Home] [Help]
PACKAGE BODY: APPS.PO_POXRQRSR_XMLP_PKG
Source
1 PACKAGE BODY PO_POXRQRSR_XMLP_PKG AS
2 /* $Header: POXRQRSRB.pls 120.1 2007/12/25 11:54:52 krreddy noship $ */
3
4 USER_EXIT_FAILURE EXCEPTION;
5
6 function BeforeReport return boolean is
7 begin
8
9 BEGIN
10 /*SRW.USER_EXIT('FND SRWINIT');*/null;
11
12 IF (get_p_struct_num <> TRUE)
13 THEN /*SRW.MESSAGE('1','P_Struct_Num Init failed.');*/null;
14
15 END IF;
16
17 null;
18
19
20 null;
21
22 FORMAT_MASK := PO_COMMON_XMLP_PKG.GET_PRECISION(P_qty_precision);
23
24 RETURN TRUE;
25 END; return (TRUE);
26 end;
27
28 procedure get_precision is
29 begin
30 /*srw.attr.mask := SRW.FORMATMASK_ATTR;*/null;
31
32 if P_qty_precision = 0 then /*srw.attr.formatmask := '-NNN,NNN,NNN,NN0';*/null;
33
34 else
35 if P_qty_precision = 1 then /*srw.attr.formatmask := '-NNN,NNN,NNN,NN0.0';*/null;
36
37 else
38 if P_qty_precision = 3 then /*srw.attr.formatmask := '-NN,NNN,NNN,NN0.000';*/null;
39
40 else
41 if P_qty_precision = 4 then /*srw.attr.formatmask := '-N,NNN,NNN,NN0.0000';*/null;
42
43 else
44 if P_qty_precision = 5 then /*srw.attr.formatmask := '-NNN,NNN,NN0.00000';*/null;
45
46 else
47 if P_qty_precision = 6 then /*srw.attr.formatmask := '-NN,NNN,NN0.000000';*/null;
48
49 else /*srw.attr.formatmask := '-NNN,NNN,NNN,NN0.00';*/null;
50
51 end if; end if; end if; end if; end if; end if;
52 /*srw.set_attr(0,srw.attr);*/null;
53
54 end;
55
56 function get_p_struct_num return boolean is
57
58 l_p_struct_num number;
59
60 begin
61 select structure_id
62 into l_p_struct_num
63 from mtl_default_sets_view
64 where functional_area_id = 2;
65
66 P_struct_num := l_p_struct_num;
67
68 return(TRUE);
69
70 RETURN NULL; exception
71 when others then return(FALSE);
72 end;
73
74 function C_WHERE_REQ_NUMFormula return Char is
75 numbering_type varchar2(40);
76 begin
77 select psp.manual_req_num_type
78 into numbering_type
79 from po_system_parameters psp;
80
81 if (numbering_type = 'NUMERIC') then
82 RETURN (' AND decode(rtrim(prh.segment1,''0123456789''),NULL,to_number(prh.segment1),-1)
83 BETWEEN decode(rtrim(nvl( ' ||nvl(P_req_num_from, 'NULL' ) ||
84 ',prh.segment1),''0123456789''),NULL, to_number(nvl( ' || nvl(P_req_num_from , 'NULL')||
85 ',prh.segment1)),-1) AND decode(rtrim(nvl( ' ||nvl(P_req_num_to ,'NULL')||
86 ',prh.segment1),''0123456789''),NULL, to_number(nvl(' ||nvl(P_req_num_to,'NULL')||
87 ',prh.segment1)),-1)' );
88
89 else
90 return(' AND prh.segment1 BETWEEN
91 nvl('||''''||P_req_num_from||''''||',prh.segment1)
92 AND
93 nvl('||''''||P_req_num_to||''''||',prh.segment1)');
94 end if;
95 RETURN NULL;
96 end;
97
98 function cf_locationsformula(deliver_to_location in varchar2, deliver_to_location_id in number) return char is
99 x_address varchar2(1000);
100 begin
101 if deliver_to_location is not null then
102 return deliver_to_location ;
103 else
104 select address1 || ' ' || address2 || ' ' || address3 into x_address
105 from hz_locations where location_id = deliver_to_location_id;
106 return(x_address);
107 end if;
108 end;
109
110 --Functions to refer Oracle report placeholders--
111
112 END PO_POXRQRSR_XMLP_PKG ;
113