DBA Data[Home] [Help]

PACKAGE BODY: APPS.FA_FAS444_XMLP_PKG

Source


1 PACKAGE BODY FA_FAS444_XMLP_PKG AS
2 /* $Header: FAS444B.pls 120.0.12010000.1 2008/07/28 13:14:41 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 := ':Retired Assets Without Property Classes Report:';
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 --Functions to refer Oracle report placeholders--
94  Function ACCT_BAL_APROMPT_p return varchar2 is
95 	Begin
96 	 return ACCT_BAL_APROMPT;
97 	 END;
98  Function Period1_POD_p return date is
99 	Begin
100 	 return Period1_POD;
101 	 END;
102  Function Period1_PCD_p return date is
103 	Begin
104 	 return Period1_PCD;
105 	 END;
106  Function Period1_FY_p return number is
107 	Begin
108 	 return Period1_FY;
109 	 END;
110  Function Period2_POD_p return date is
111 	Begin
112 	 return Period2_POD;
113 	 END;
114  Function Period2_PCD_p return date is
115 	Begin
116 	 return Period2_PCD;
117 	 END;
118  Function Period2_FY_p return number is
119 	Begin
120 	 return Period2_FY;
121 	 END;
122  Function RP_COMPANY_NAME_p return varchar2 is
123 	Begin
124 	 return RP_COMPANY_NAME;
125 	 END;
126  Function RP_REPORT_NAME_p return varchar2 is
127 	Begin
128 	 return RP_REPORT_NAME;
129 	 END;
130  Function RP_BAL_LPROMPT_p return varchar2 is
131 	Begin
132 	 return RP_BAL_LPROMPT;
133 	 END;
134 END FA_FAS444_XMLP_PKG ;
135