DBA Data[Home] [Help]

PACKAGE BODY: APPS.FA_FAS870_XMLP_PKG

Source


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