[Home] [Help]
PACKAGE BODY: APPS.FA_FAS446_XMLP_PKG
Source
1 PACKAGE BODY FA_FAS446_XMLP_PKG AS
2 /* $Header: FAS446B.pls 120.0.12010000.1 2008/07/28 13:14:45 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 RP_Company_Name := Company_Name;
10 SELECT cr.concurrent_program_id
11 INTO l_conc_program_id
12 FROM FND_CONCURRENT_REQUESTS cr
13 WHERE cr.program_application_id = 140
14 AND cr.request_id = P_CONC_REQUEST_ID;
15 SELECT cp.user_concurrent_program_name
16 INTO l_report_name
17 FROM FND_CONCURRENT_PROGRAMS_VL cp
18 WHERE
19 cp.concurrent_program_id= l_conc_program_id
20 and cp.application_id = 140;
21 l_report_name := substr(l_report_name,1,instr(l_report_name,' (XML)'));
22 RP_Report_Name := l_report_name;
23 RETURN(l_report_name);
24 EXCEPTION
25 WHEN OTHERS THEN
26 RP_Report_Name := ':Report Title:';
27 RETURN(RP_REPORT_NAME);
28 END;
29 RETURN NULL; end;
30 function BeforeReport return boolean is
31 begin
32 P_CONC_REQUEST_ID := fnd_global.CONC_REQUEST_ID;
33 /*SRW.USER_EXIT('FND SRWINIT');*/null;
34 return (TRUE);
35 end;
36 function AfterReport return boolean is
37 begin
38 /*SRW.USER_EXIT('FND SRWEXIT');*/null;
39 return (TRUE);
40 end;
41 function Period1_PCFormula return Number is
42 begin
43 DECLARE
44 l_period_POD DATE;
45 l_period_PCD DATE;
46 l_period_PC NUMBER(15);
47 l_period_FY NUMBER(15);
48 BEGIN
49 SELECT period_counter,
50 period_open_date,
51 nvl(period_close_date, sysdate),
52 fiscal_year
53 INTO l_period_PC,
54 l_period_POD,
55 l_period_PCD,
56 l_period_FY
57 FROM FA_DEPRN_PERIODS
58 WHERE book_type_code = P_BOOK
59 AND period_name = P_PERIOD1;
60 Period1_POD := l_period_POD;
61 Period1_PCD := l_period_PCD;
62 Period1_FY := l_period_FY;
63 return(l_period_PC);
64 END;
65 RETURN NULL; end;
66 function Period2_PCFormula return Number is
67 begin
68 DECLARE
69 l_period_POD DATE;
70 l_period_PCD DATE;
71 l_period_PC NUMBER(15);
72 l_period_FY NUMBER(15);
73 BEGIN
74 SELECT period_counter,
75 period_open_date,
76 nvl(period_close_date, sysdate),
77 fiscal_year
78 INTO l_period_PC,
79 l_period_POD,
80 l_period_PCD,
81 l_period_FY
82 FROM FA_DEPRN_PERIODS
83 WHERE book_type_code = P_BOOK
84 AND period_name = P_PERIOD2;
85 Period2_POD := l_period_POD;
86 Period2_PCD := l_period_PCD;
87 Period2_FY := l_period_FY;
88 return(l_period_PC);
89 END;
90 RETURN NULL; end;
91 function PRECFormula return VARCHAR2 is
92 begin
93 DECLARE
94 l_precision NUMBER(15);
95 BEGIN
96 SELECT
97 cur.precision
98 INTO
99 l_precision
100 FROM FA_BOOK_CONTROLS bc,
101 GL_SETS_OF_BOOKS sob,
102 FND_CURRENCIES cur
103 WHERE bc.book_type_code = P_BOOK
104 AND sob.set_of_books_id = bc.set_of_books_id
105 AND sob.currency_code = cur.currency_code;
106 Precision := l_precision;
107 return(l_precision);
108 END;
109 RETURN NULL; end;
110 function GAIN_NLSFormula return VARCHAR2 is
111 begin
112 DECLARE
113 l_meaning VARCHAR2(80);
114 BEGIN
115 select MEANING
116 into l_meaning
117 from FA_LOOKUPS
118 where LOOKUP_TYPE = 'GAINLOSS'
119 and LOOKUP_CODE = 'GAIN';
120 return (l_meaning);
121 EXCEPTION
122 WHEN OTHERS THEN
123 return (null);
124 END;
125 RETURN NULL; end;
126 function LOSS_NLSFormula return VARCHAR2 is
127 begin
128 DECLARE
129 l_meaning VARCHAR2(80);
130 BEGIN
131 select MEANING
132 into l_meaning
133 from FA_LOOKUPS
134 where LOOKUP_TYPE = 'GAINLOSS'
135 and LOOKUP_CODE = 'LOSS';
136 return (l_meaning);
137 EXCEPTION
138 WHEN OTHERS THEN
139 return (null);
140 END;
141 RETURN NULL; end;
142 --Functions to refer Oracle report placeholders--
143 Function PRECISION_p return number is
144 Begin
145 return PRECISION;
146 END;
147 Function ACCT_BAL_APROMPT_p return varchar2 is
148 Begin
149 return ACCT_BAL_APROMPT;
150 END;
151 Function ACCT_CC_APROMPT_p return varchar2 is
152 Begin
153 return ACCT_CC_APROMPT;
154 END;
155 Function CAT_MAJ_RPROMPT_p return varchar2 is
156 Begin
157 return CAT_MAJ_RPROMPT;
158 END;
159 Function Period1_POD_p return date is
160 Begin
161 return Period1_POD;
162 END;
163 Function Period1_PCD_p return date is
164 Begin
165 return Period1_PCD;
166 END;
167 Function Period1_FY_p return number is
168 Begin
169 return Period1_FY;
170 END;
171 Function Period2_POD_p return date is
172 Begin
173 return Period2_POD;
174 END;
175 Function Period2_PCD_p return date is
176 Begin
177 return Period2_PCD;
178 END;
179 Function Period2_FY_p return number is
180 Begin
181 return Period2_FY;
182 END;
183 Function RP_COMPANY_NAME_p return varchar2 is
184 Begin
185 return RP_COMPANY_NAME;
186 END;
187 Function RP_REPORT_NAME_p return varchar2 is
188 Begin
189 return RP_REPORT_NAME;
190 END;
191 Function RP_BAL_LPROMPT_p return varchar2 is
192 Begin
193 return RP_BAL_LPROMPT;
194 END;
195 END FA_FAS446_XMLP_PKG ;
196