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