DBA Data[Home] [Help]

PACKAGE BODY: APPS.AR_ARXGRL_XMLP_PKG

Source


1 PACKAGE BODY AR_ARXGRL_XMLP_PKG AS
2 /* $Header: ARXGRLB.pls 120.0 2007/12/27 13:52:08 abraghun noship $ */
3 
4 function report_nameformula(Company_Name in varchar2) return varchar2 is
5 begin
6 
7 DECLARE
8     l_report_name  VARCHAR2(80);
9 BEGIN
10     RP_Company_Name := Company_Name;
11     SELECT substr(cp.user_concurrent_program_name,1,80)
12     INTO   l_report_name
13     FROM   FND_CONCURRENT_PROGRAMS_VL cp,
14            FND_CONCURRENT_REQUESTS cr
15     WHERE  cr.request_id = P_CONC_REQUEST_ID
16     AND    cp.application_id = cr.program_application_id
17     AND    cp.concurrent_program_id = cr.concurrent_program_id;
18 
19     RP_Report_Name := l_report_name;
20     RETURN(l_report_name);
21 EXCEPTION
22     WHEN NO_DATA_FOUND
23     THEN RP_REPORT_NAME := 'Ordering And Grouping Rules Listing';
24          RETURN('Ordering And Grouping Rules Listing');
25 END;
26 RETURN NULL; end;
27 
28 function BeforeReport return boolean is
29 begin
30 
31 begin
32 
33 	/*SRW.USER_EXIT('FND SRWINIT');*/null;
34 
35 
36 
37 
38 
39 
40 end;
41   return (TRUE);
42 end;
43 
44 function Sub_TitleFormula return VARCHAR2 is
45 begin
46 
47 begin
48 RP_SUB_TITLE := ' ';
49 return(' ');
50 end;
51 
52 RETURN NULL; end;
53 
54 function AfterReport return boolean is
55 begin
56 
57 /*SRW.USER_EXIT('FND SRWEXIT');*/null;
58   return (TRUE);
59 end;
60 
61 function org_idFormula return VARCHAR2 is
62 l_org_id varchar2(10);
63 begin
64 
65      /*srw.message ('100', 'Org_IdFormula');*/null;
66 
67 
68 
69 
70      oe_profile.get('SO_ORGANIZATION_ID', l_org_id );
71 
72      /*srw.message ('100', 'Org_IdFormula:  Organization Id:  ' || l_org_id );*/null;
73 
74 
75     RETURN(l_org_id);
76 
77 
78 RETURN NULL; EXCEPTION
79      WHEN NO_DATA_FOUND THEN
80           /*srw.message ('101', 'Org_IdFormula:  Get Organization Id:  No Data Found.');*/null;
81 
82           RAISE;
83      WHEN OTHERS THEN
84           /*srw.message ('101', 'Org_IdFormula:  Get Organization Id:  Failed.');*/null;
85 
86           RAISE;
87 
88 end;
89 
90 function tax_acct_seg_numformula(location_structure_id in number) return number is
91 begin
92 
93 declare
94   segment_num number;
95 
96 begin
97 
98 
99 select max( segment.segment_num)
100 into   segment_num
101 from fnd_flex_value_sets vs,
102      fnd_id_flex_segments segment,
103      fnd_flex_validation_tables tab,
104      fnd_segment_attribute_values qual
105 where segment.application_id = 222
106 and   segment.id_flex_code = 'RLOC'
107 and   segment.id_flex_num = location_structure_id
108 and   tab.flex_value_set_id = vs.flex_value_set_id
109 and   tab.application_table_name = 'AR_LOCATION_VALUES'
110 and   segment.application_id = qual.application_id
111 and   segment.id_flex_code = qual.id_flex_code
112 and   segment.id_flex_num  = qual.id_flex_num
113 and   segment.application_column_name = qual.application_column_name
114 and   segment.enabled_flag = 'Y'
115 and   qual.attribute_value = 'Y'
116 and   qual.segment_attribute_type = 'TAX_ACCOUNT';
117 
118 return(segment_num);
119 
120 end;
121 
122 
123 
124 RETURN NULL; end;
125 
126 function AfterPForm return boolean is
127 begin
128 
129 if (p_ordering_name_low is not null)
130 then  lp_ordering_low := 'and lor.name >= :p_ordering_name_low';
131 end if;
132 
133 if (p_ordering_name_high is not null)
134 then  lp_ordering_high := 'and lor.name <= :p_ordering_name_high';
135 end if;
136 
137 if (p_grouping_name_low is not null)
138 then  lp_grouping_low := 'and gr1.name >= :p_grouping_name_low';
139 end if;
140 
141 if (p_grouping_name_high is not null)
142 then  lp_grouping_high := 'and gr1.name <= :p_grouping_name_high';
143 end if;
144 
145 select substrb(meaning ,1,50)
146 into  p_run_ordering_meaning
147 from  ar_lookups
148 where lookup_type = 'YES/NO'
149 and   lookup_code = p_run_ordering;
150 
151 
152 select substrb(meaning ,1,50)
153 into  p_run_grouping_meaning
154 from  ar_lookups
155 where lookup_type = 'YES/NO'
156 and   lookup_code = p_run_grouping;
157 
158 return (TRUE);
159 
160 end;
161 
162 --Functions to refer Oracle report placeholders--
163 
164  Function Acct_Bal_Aprompt_p return varchar2 is
165 	Begin
166 	 return Acct_Bal_Aprompt;
167 	 END;
168  Function RP_COMPANY_NAME_p return varchar2 is
169 	Begin
170 	 return RP_COMPANY_NAME;
171 	 END;
172  Function RP_REPORT_NAME_p return varchar2 is
173 	Begin
174 	 return RP_REPORT_NAME;
175 	 END;
176  Function RP_DATA_FOUND_p return varchar2 is
177 	Begin
178 	 return RP_DATA_FOUND;
179 	 END;
180  Function RP_SUB_TITLE_p return varchar2 is
181 	Begin
182 	 return RP_SUB_TITLE;
183 	 END;
184 END AR_ARXGRL_XMLP_PKG ;
185 
186