DBA Data[Home] [Help]

PACKAGE BODY: APPS.FA_FAS460_XMLP_PKG

Source


1 PACKAGE BODY FA_FAS460_XMLP_PKG AS
2 /* $Header: FAS460B.pls 120.0.12010000.1 2008/07/28 13:14:54 appldev ship $ */
3 function BeforeReport return boolean is
4 begin
5  P_CONC_REQUEST_ID := fnd_global.CONC_REQUEST_ID;
6 begin
7 /*SRW.USER_EXIT('FND SRWINIT');*/null;
8 END;  return (TRUE);
9 end;
10 function AfterReport return boolean is
11 begin
12 /*SRW.USER_EXIT('FND SRWEXIT');*/null;
13 RETURN(TRUE);  return (TRUE);
14 end;
15 function BOOKFormula return VARCHAR2 is
16 begin
17 DECLARE
18          l_book     VARCHAR2(15);
19          l_accounting_flex_structure  number(15);
20          l_currency_code  VARCHAR2(15);
21          l_precision      number(15);
22 	 l_per_ctr		number(15);
23 BEGIN
24          select bc.book_type_code,
25                 bc.accounting_flex_structure,
26                 sob.currency_code,
27                 cur.precision,
28 		dp.period_counter
29          into   l_book,
30                 l_accounting_flex_structure,
31                 l_currency_code,
32                 l_precision,
33 		l_per_ctr
34          from fa_book_controls bc,
35               gl_sets_of_books sob,
36               fnd_currencies cur,
37 		fa_deprn_periods dp
38          where bc.book_type_code = P_BOOK
39          and   bc.date_ineffective is null
40          and   sob.set_of_books_id = bc.set_of_books_id
41          and   sob.currency_code = cur.currency_code
42 	and 	dp.book_type_code = P_BOOK
43 	and	P_END_DATE_ACQ between
44  	  dp.period_open_date and 				 nvl(dp.period_close_date, P_END_DATE_ACQ+1);
45          Currency_Code := l_currency_code;
46          Accounting_flex_structure := l_accounting_flex_structure;
47          Precision := l_precision;
48 	 P_Per_Ctr := l_per_ctr;
49          return(l_book);
50 EXCEPTION
51   when no_data_found then
52     Currency_Code := null;
53     Accounting_flex_structure := null;
54     Precision := null;
55     P_Per_Ctr := null;
56 END;
57 RETURN NULL; end;
58 function report_nameformula(Company_Name in varchar2, ACCT_BAL_LPROMPT in varchar2) return varchar2 is
59 begin
60 DECLARE
61         l_report_name  VARCHAR2(80);
62   l_conc_program_id NUMBER;
63 BEGIN
64         RP_Company_Name := Company_Name;
65         RP_BAL_LPROMPT := ACCT_BAL_LPROMPT;
66   SELECT cr.concurrent_program_id
67   INTO l_conc_program_id
68   FROM FND_CONCURRENT_REQUESTS cr
69   WHERE cr.program_application_id = 140
70   AND   cr.request_id = P_CONC_REQUEST_ID;
71   SELECT cp.user_concurrent_program_name
72   INTO   l_report_name
73   FROM    FND_CONCURRENT_PROGRAMS_VL cp
74   WHERE
75       cp.concurrent_program_id= l_conc_program_id
76   and cp.application_id = 140;
77 l_report_name := substr(l_report_name,1,instr(l_report_name,' (XML)'));
78         RP_Report_Name := l_report_name;
79         RETURN(l_report_name);
80 EXCEPTION
81         WHEN OTHERS THEN
82          RP_REPORT_NAME := ':Property Tax Report:';
83          RETURN(RP_REPORT_NAME);
84 END;
85 RETURN NULL; end;
86 --Functions to refer Oracle report placeholders--
87  Function CURRENCY_CODE_p return varchar2 is
88 	Begin
89 	 return CURRENCY_CODE;
90 	 END;
91  Function ACCOUNTING_FLEX_STRUCTURE_p return number is
92 	Begin
93 	 return ACCOUNTING_FLEX_STRUCTURE;
94 	 END;
95  Function PRECISION_p return number is
96 	Begin
97 	 return PRECISION;
98 	 END;
99  Function RP_COMPANY_NAME_p return varchar2 is
100 	Begin
101 	 return RP_COMPANY_NAME;
102 	 END;
103  Function RP_REPORT_NAME_p return varchar2 is
104 	Begin
105 	 return RP_REPORT_NAME;
106 	 END;
107 	 --modified
108  Function RP_BAL_LPROMPT_p(ACCT_BAL_LPROMPT VARCHAR2) return varchar2 is
109 	Begin
110 	 RP_BAL_LPROMPT := ACCT_BAL_LPROMPT;
111 	 return RP_BAL_LPROMPT;
112 	 END;
113 END FA_FAS460_XMLP_PKG ;
114