DBA Data[Home] [Help]

PACKAGE BODY: APPS.FA_FAS442_XMLP_PKG

Source


1 PACKAGE BODY FA_FAS442_XMLP_PKG AS
2 /* $Header: FAS442B.pls 120.0.12010000.1 2008/07/28 13:14:36 appldev ship $ */
3 function report_nameformula(Company_Name in varchar2) return varchar2 is
4 begin
5 DECLARE
6   l_report_name VARCHAR2(80);
7   l_conc_program_id NUMBER;
8 BEGIN
9 --Added during DT Fix
10 P_CONC_REQUEST_ID := fnd_global.CONC_REQUEST_ID;
11 --End of DT Fix
12   RP_Company_Name := Company_Name;
13   SELECT cr.concurrent_program_id
14   INTO l_conc_program_id
15   FROM FND_CONCURRENT_REQUESTS cr
16   WHERE cr.program_application_id = 140
17   AND   cr.request_id = P_CONC_REQUEST_ID;
18   SELECT cp.user_concurrent_program_name
19   INTO   l_report_name
20   FROM    FND_CONCURRENT_PROGRAMS_VL cp
21   WHERE
22       cp.concurrent_program_id= l_conc_program_id
23   and cp.application_id = 140;
24   l_report_name := substr(l_report_name,1,instr(l_report_name,' (XML)'));
25   RP_Report_Name := l_report_name;
26   RETURN(l_report_name);
27 EXCEPTION
28   WHEN OTHERS THEN
29     RP_Report_Name := ':Report Title:';
30     RETURN(RP_REPORT_NAME);
31 END;
32 RETURN NULL; end;
33 function BeforeReport return boolean is
34 begin
35 /*SRW.USER_EXIT('FND SRWINIT');*/null;
36   return (TRUE);
37 end;
38 function AfterReport return boolean is
39 begin
40 /*SRW.USER_EXIT('FND SRWEXIT');*/null;
41   return (TRUE);
42 end;
43 function Period1_PCFormula return Number is
44 begin
45 DECLARE
46   l_period_POD  DATE;
47   l_period_PCD  DATE;
48   l_period_PC   NUMBER(15);
49   l_period_FY   NUMBER(15);
50 BEGIN
51   SELECT period_counter,
52          period_open_date,
53          nvl(period_close_date, sysdate),
54          fiscal_year
55   INTO   l_period_PC,
56          l_period_POD,
57          l_period_PCD,
58          l_period_FY
59   FROM   FA_DEPRN_PERIODS
60   WHERE  book_type_code = P_BOOK
61   AND    period_name    = P_PERIOD1;
62   Period1_POD := l_period_POD;
63   Period1_PCD := l_period_PCD;
64   Period1_FY  := l_period_FY;
65   return(l_period_PC);
66 END;
67 RETURN NULL; end;
68 function Period2_PCFormula return Number is
69 begin
70 DECLARE
71   l_period_POD  DATE;
72   l_period_PCD  DATE;
73   l_period_PC   NUMBER(15);
74   l_period_FY   NUMBER(15);
75 BEGIN
76   SELECT period_counter,
77          period_open_date,
78          nvl(period_close_date, sysdate),
79          fiscal_year
80   INTO   l_period_PC,
81          l_period_POD,
82          l_period_PCD,
83          l_period_FY
84   FROM   FA_DEPRN_PERIODS
85   WHERE  book_type_code = P_BOOK
86   AND    period_name    = P_PERIOD2;
87   Period2_POD := l_period_POD;
88   Period2_PCD := l_period_PCD;
89   Period2_FY  := l_period_FY;
90   return(l_period_PC);
91 END;
92 RETURN NULL; end;
93 function PRECFormula return VARCHAR2 is
94 begin
95 DECLARE
96   l_precision NUMBER(15);
97 BEGIN
98   SELECT
99          cur.precision
100   INTO
101          l_precision
102   FROM   FA_BOOK_CONTROLS bc,
103          GL_SETS_OF_BOOKS sob,
104          FND_CURRENCIES cur
105   WHERE  bc.book_type_code = P_BOOK
106   AND    sob.set_of_books_id = bc.set_of_books_id
107   AND    sob.currency_code   = cur.currency_code;
108   Precision := l_precision;
109   return(l_precision);
110 END;
111 RETURN NULL; end;
112 --Functions to refer Oracle report placeholders--
113  Function PRECISION_p return number is
114 	Begin
115 	 return PRECISION;
116 	 END;
117  Function ACCT_BAL_APROMPT_p return varchar2 is
118 	Begin
119 	 return ACCT_BAL_APROMPT;
120 	 END;
121  Function ACCT_CC_APROMPT_p return varchar2 is
122 	Begin
123 	 return ACCT_CC_APROMPT;
124 	 END;
125  Function CAT_MAJ_RPROMPT_p return varchar2 is
126 	Begin
127 	 return CAT_MAJ_RPROMPT;
128 	 END;
129  Function Period1_POD_p return date is
130 	Begin
131 	 return Period1_POD;
132 	 END;
133  Function Period1_PCD_p return date is
134 	Begin
135 	 return Period1_PCD;
136 	 END;
137  Function Period1_FY_p return number is
138 	Begin
139 	 return Period1_FY;
140 	 END;
141  Function Period2_POD_p return date is
142 	Begin
143 	 return Period2_POD;
144 	 END;
145  Function Period2_PCD_p return date is
146 	Begin
147 	 return Period2_PCD;
148 	 END;
149  Function Period2_FY_p return number is
150 	Begin
151 	 return Period2_FY;
152 	 END;
153  Function RP_COMPANY_NAME_p return varchar2 is
154 	Begin
155 	 return RP_COMPANY_NAME;
156 	 END;
157  Function RP_REPORT_NAME_p return varchar2 is
158 	Begin
159 	 return RP_REPORT_NAME;
160 	 END;
161  Function RP_BAL_LPROMPT_p return varchar2 is
162 	Begin
163 	 return RP_BAL_LPROMPT;
164 	 END;
165 END FA_FAS442_XMLP_PKG ;
166