DBA Data[Home] [Help]

PACKAGE BODY: APPS.PO_POXPOVPS_XMLP_PKG

Source


1 PACKAGE BODY PO_POXPOVPS_XMLP_PKG AS
2 /* $Header: POXPOVPSB.pls 120.2 2008/01/05 15:58:06 dwkrishn noship $ */
3 USER_EXIT_FAILURE EXCEPTION;
4 function BeforeReport return boolean is
5 begin
6 declare
7 l_sort     po_lookup_codes.displayed_field%type;
8 l_yes_no   fnd_lookups.meaning%type;
9 begin
10 P_CREATION_DATE_FROM_LP := to_char(P_CREATION_DATE_FROM,'DD-MON-YY');
11 P_CREATION_DATE_TO_LP	:= to_char(P_CREATION_DATE_TO,'DD-MON-YY');
12 if P_orderby is not null then
13     select displayed_field
14     into l_sort
15     from po_lookup_codes
16     where lookup_code = P_orderby
17     and lookup_type = 'SRS ORDER BY';
18     P_orderby_displayed := l_sort ;
19 else
20     P_orderby_displayed := '' ;
21 end if;
22 IF P_SMALL_BUSINESS is NULL THEN
23    P_SMALL_BUSINESS_DISP := '';
24 ELSE
25    SELECT meaning
26    INTO l_yes_no
27    FROM fnd_lookups
28    WHERE lookup_type = 'YES_NO'
29    AND lookup_code = P_SMALL_BUSINESS;
30    P_SMALL_BUSINESS_DISP := l_yes_no;
31 END IF;
32 IF P_WOMEN_OWNED is NULL THEN
33    P_WOMEN_OWNED_DISP := '';
34 ELSE
35    SELECT meaning
36    INTO l_yes_no
37    FROM fnd_lookups
38    WHERE lookup_type = 'YES_NO'
39    AND lookup_code = P_WOMEN_OWNED;
40    P_WOMEN_OWNED_DISP := l_yes_no;
41 END IF;
42 IF P_MINORITY_OWNED is NULL THEN
43    P_MINORITY_OWNED_DISP := '';
44 ELSE
45    SELECT meaning
46    INTO l_yes_no
47    FROM fnd_lookups
48    WHERE lookup_type = 'YES_NO'
49    AND lookup_code = P_MINORITY_OWNED;
50    P_MINORITY_OWNED_DISP := l_yes_no;
51 END IF;
52 /*SRW.USER_EXIT('FND SRWINIT');*/null;
53 LP_orderby_displayed:=P_orderby_displayed;
54 RETURN TRUE;
55 end;  return (TRUE);
56 end;
57 function orderby_clauseFormula return VARCHAR2 is
58 begin
59 if P_orderby = 'VENDOR TYPE' then
60       return('pov.vendor_type_lookup_code, pov.vendor_name,
61               pvs.vendor_site_code,
62               decode(psp1.manual_po_num_type, ''NUMERIC'', null, poh.segment1),
63               decode(psp1.manual_po_num_type, ''NUMERIC'',
64                      to_number(poh.segment1), null)');
65 else
66     return('pov.vendor_name, pov.vendor_type_lookup_code, 			pvs.vendor_site_code,
67             decode(psp1.manual_po_num_type, ''NUMERIC'', null, poh.segment1),
68             decode(psp1.manual_po_num_type, ''NUMERIC'',
69                    to_number(poh.segment1), null)');
70 end if;
71 RETURN NULL; end;
72 function get_percent_wo(PO_CNT_WO in varchar2, Report_PO_Count in number) return number is
73          percent_wo  number;
74 begin
75         percent_wo := PO_CNT_WO/Report_PO_Count*100;
76         return(percent_wo);
77 end;
78 function get_percent_mo(PO_CNT_MO in varchar2, Report_PO_Count in number) return number is
79          percent_mo  number;
80 begin
81         percent_mo := PO_CNT_MO/Report_PO_Count*100;
82         return(percent_mo);
83 end;
84 function get_percent_sb(PO_CNT_SB in varchar2, Report_PO_Count in number) return number is
85          percent_sb  number;
86 begin
87         percent_sb := PO_CNT_SB/Report_PO_Count*100;
88         return(percent_sb);
89 end;
90 function AfterReport return boolean is
91 begin
92   /*SRW.USER_EXIT('FND SRWEXIT');*/null;
93   return (TRUE);
94 end;
95 --Functions to refer Oracle report placeholders--
96  Function C_amount_func_vendor_round_p return number is
97 	Begin
98 	 return C_amount_func_vendor_round;
99 	 END;
100  Function C_amount_rep_round_p return number is
101 	Begin
102 	 return C_amount_rep_round;
103 	 END;
104  Function C_amount_func_site_round_p return number is
105 	Begin
106 	 return C_amount_func_site_round;
107 	 END;
108  Function C_amount_func_po_type_round_p return number is
109 	Begin
110 	 return C_amount_func_po_type_round;
111 	 END;
112  Function C_amount_po_round_p return number is
113 	Begin
114 	 return C_amount_po_round;
115 	 END;
116  Function C_amount_functional_round_p return number is
117 	Begin
118 	 return C_amount_functional_round;
119 	 END;
120  Function C_AMOUNT_WO_ROUND_p return number is
121 	Begin
122 	 return C_AMOUNT_WO_ROUND;
123 	 END;
124  Function C_AMOUNT_SB_ROUND_p return number is
125 	Begin
126 	 return C_AMOUNT_SB_ROUND;
127 	 END;
128  Function C_AMOUNT_MO_ROUND_p return number is
129 	Begin
130 	 return C_AMOUNT_MO_ROUND;
131 	 END;
132 END PO_POXPOVPS_XMLP_PKG ;
133