1 PACKAGE BODY BIS_BIA_RSG_PSTATE AS
2 /* $Header: BISPGSTB.pls 120.6 2006/05/09 05:30:59 rkumar ship $ */
3
4 PROCEDURE debug ( text varchar2 )
5 IS
6 BEGIN
7 --INSERT INTO amit_DEBUG VALUES(text);
8 -- commit;
9 null;
10 END;
11
12 FUNCTION time_interval (p_interval IN NUMBER)
13 RETURN VARCHAR2
14 IS
15 l_result VARCHAR2 (30) := '';
16 l_dummy PLS_INTEGER := 0;
17
18 FUNCTION format (p_value IN NUMBER)
19 RETURN VARCHAR2
20 IS
21 l_str VARCHAR2 (30) := '';
22 BEGIN
23 IF p_value < 10
24 THEN
25 l_str := '0' || TO_CHAR (p_value);
26 ELSE
27 l_str := p_value;
28 END IF;
29
30 RETURN l_str;
31 END format;
32 BEGIN
33 l_dummy := FLOOR (p_interval) * 24 + MOD (FLOOR (p_interval * 24), 24);
34 l_result := format (l_dummy) || ':';
35 l_dummy := MOD (FLOOR (p_interval * 24 * 60), 60);
36 l_result := l_result || format (l_dummy) || ':';
37 l_dummy := MOD (FLOOR (p_interval * 24 * 60 * 60), 60);
38 l_result := l_result || format (l_dummy);
39 RETURN l_result;
40 END time_interval;
41
42
43
44 FUNCTION duration(
45 p_duration number) return VARCHAR2 IS
46 BEGIN
47 if(p_duration is null) then
48 return null;
49 else
50 return time_interval(p_duration);
51 end if;
52 END duration;
53
54
55
56
57 FUNCTION get_refresh_mode(P_REQUEST_SET_NAME varchar2) RETURN VARCHAR2 IS --added for bug 4183903
58
59 cursor refresh_mode is
60 select option_value
61 from bis_request_set_options
62 where request_set_name = P_REQUEST_SET_NAME
63 and option_name='REFRESH_MODE';
64
65 cursor analyze_object is
66 select option_value
67 from bis_request_set_options
68 where request_set_name= P_REQUEST_SET_NAME
69 and option_name='ANALYZE_OBJECT';
70
71 l_refresh_mode refresh_mode%rowtype;
72 l_analyze_object analyze_object%rowtype;
73
74 BEGIN
75 OPEN refresh_mode;
76 FETCH refresh_mode INTO l_refresh_mode;
77 CLOSE refresh_mode;
78
79 if (l_refresh_mode.option_value is null) then
80 OPEN analyze_object;
81 FETCH analyze_object INTO l_analyze_object;
82 CLOSE analyze_object;
83 if (l_analyze_object.option_value ='Y') then
84 RETURN 'ANAL';
85 end if;
86 end if;
87
88 RETURN l_refresh_mode.option_value;
89
90 EXCEPTION WHEN OTHERS THEN
91 BIS_COLLECTION_UTILITIES.put_line('Exception happens in get_refresh_mode ' || sqlerrm);
92 raise;
93
94 END get_refresh_mode;
95
96
97
98
99 function sync_last_refresh_time(p_last_refresh_time in date) return date is
100 begin
101 if p_last_refresh_time=to_date('01-01-1900','DD-MM-YYYY') then
102 return null;
103 else
104 return p_last_refresh_time;
105 end if;
106 end;
107
108
109 FUNCTION get_Plan_URL RETURN VARCHAR2
110 IS
111 l_value varchar2(32767);
112 l_url varchar2(32767);
113 BEGIN
114 l_value := fnd_profile.value('BIS_LOAD_SCHEDULE');
115 if (l_value is not null) then
116 l_url := '''<A HREF="'|| l_value || '">Plan</A>''';
117 else
118 l_url := ''' ''';
119 end if;
120 return l_url;
121
122
123 END;
124
125 /*Enh 4638578
126 This function will get the Request set names for all the request sets either created for
127 that report or created for a dashbaord to which the report is attached.
128
129 Will return the name of request sets for that dashboard
130 */
131 Function get_rs_for_content(p_content_name in varchar2,
132 p_content_type in varchar2) return varchar2 is
133 cursor c_rs_for_reports (l_report_name varchar2) is
134 select request_set_name from (select request_set_name --request set for dashboard that has this report
135 from bis_request_set_objects
136 where object_name in (
137 select Distinct obj.OBJECT_NAME
138 from bis_obj_dependency obj
139 where object_type in ('PAGE') and enabled_flag='Y'
140 start with
141 obj.depend_object_type ='REPORT'
142 and obj.depend_object_name=l_report_name
143 connect by prior obj.OBJECT_NAME=obj.depend_object_name
144 and prior obj.OBJECT_TYPE=obj.depend_object_TYPE)
145 and object_type ='PAGE'
146 union -- request set for report directly
147 select request_set_name from bis_request_set_objects
148 where object_name =l_report_name and object_type ='REPORT') where
149 BIS_BIA_RSG_PSTATE.get_refresh_mode(REQUEST_SET_NAME) <> 'ANAL';
150
151 cursor c_rs_for_pages (l_page_name varchar2) is
152 SELECT REQUEST_SET_NAME FROM
153 (select request_set_name from bis_request_set_objects
154 where object_name =l_PAGE_name and object_type ='PAGE') WHERE
155 BIS_BIA_RSG_PSTATE.get_refresh_mode(REQUEST_SET_NAME) <> 'ANAL';
156
157 l_rs_names varchar2(32767);
158 l_currow1 c_rs_for_reports%rowtype;
159 l_currow2 c_rs_for_reports%rowtype;
160 begin
161 l_rs_names := null;
162 DEBUG('iN GET_rs'||p_content_type);
163 DEBUG('iN GET_rs'||p_content_name);
164 --EXECUTE THE CURSOR DEPENDEING ON THE CONTENT TYPE
165 if(p_content_type='PAGE') THEN
166 DEBUG('IN GET_rs if page');
167 for l_currow1 in c_rs_for_pages(p_content_name) loop
168 l_rs_names := l_rs_names ||','''||l_currow1.request_set_name||'''';
169 end loop;
170 ELSIF (p_content_type ='REPORT') THEN
171 DEBUG('IN GET_rs if report');
172 for l_currow2 in c_rs_for_reports(p_content_name) loop
173 l_rs_names := l_rs_names ||','''||l_currow2.request_set_name||'''';
174 --DEBUG('RS_NAME'||L_RS_NAMES);
175 end loop;
176 END IF;
177 --DEBUG('RS_NAME'||L_RS_NAMES);
178 return substr(l_rs_names,2);
179
180 end;
181
182 PROCEDURE Get_Sql ( p_param IN BIS_PMV_PAGE_PARAMETER_TBL,
183 x_custom_sql OUT NOCOPY VARCHAR2,
184 x_custom_output OUT NOCOPY BIS_QUERY_ATTRIBUTES_TBL) IS
185
186 l_sql_stmt VARCHAR2(32767);
187 l_custom_rec BIS_QUERY_ATTRIBUTES;
188 l_bind VARCHAR2(32767);
189 pname VARCHAR2(1024);
190 pid VARCHAR2(1024);
191 content_name varchar2(1024);
192 plan_url varchar2(250); --ADDED FOR BUG 4418935
193 plan_text varchar2(250); --ADDED FOR BUG 4418935
194 content_type varchar2(30);
195 l_rs_names varchar2(32767); -- added for enh 4638578
196 BEGIN
197
198 --TO REMOVE GSCC WARNING MOVED THE INITIALIZATIONS HERE
199 pname := NULL;
200 pid := NULL;
201 content_name := NULL;
202 plan_url := NULL;
203 plan_text := NULL;
204
205 FOR i IN 1..p_param.count LOOP
206 pname := p_param(i).parameter_name;
207 --pvalue := p_param(i).parameter_value;
208 pid := p_param(i).parameter_id;
209 --debug( '( ' || pname || ', ' || pvalue || ' )' );
210
211 if pname = 'DBI_REQUEST_SET+DBI_REQUEST_SET' then
212 content_name := pid ;
213 debug('DBI_REQUEST_SET+DBI_REQUEST_SET: ' || content_name);
214 --code to remove extra quotes added by PMV
215 content_name := trim('''' from content_name);
216 end if;
217
218 if pname = 'DBI_CONTENT_TYPE+DBI_CONTENT_TYPE' then
219 content_type := pid ;
220 debug('DBI_CONTENT_TYPE+DBI_CONTENT_TYPE' || content_type);
221 --code to remove extra quotes added by PMV
222 content_type := trim('''' from content_type);
223 end if;
224 END LOOP;
225
226 --following condition is not needed, because after enhancement 4638578
227 -- because user is not allowed to change the page_name on the report
228 /*if (page_name is not null AND page_name <> 'All') then
229 l_bind := ' bis_impl_dev_pkg.get_function_by_page(OBJECTS.object_name) = :PAGE_NAME ';
230 else
231 l_bind := ' bis_impl_dev_pkg.get_function_by_page(OBJECTS.object_name) is not null ';
232 end if; */
233
234 begin
235 --call the procedure update_terminated_rs that will update the status of those request sets that were terminated by user. --Bug 4183903
236 BIS_COLL_RS_HISTORY.update_terminated_rs;
237
238 EXCEPTION WHEN OTHERS THEN
239 debug('Error happened while trying to update the status of those request sets that were terminated by user. Report MAY show terminated request sets as running');
240 END;
241
242 --CODE ADDED FOR BUG 4418935
243 plan_url := fnd_profile.value('BIS_LOAD_SCHEDULE');
244 if(plan_url is null) then
245 plan_url := ' ';
246 end if;
247
248 plan_text := BIS_REQUESTSET_VIEWHISTORY.get_bis_lookup_meaning('BIS_RSG_PAGE_STATUS_REPORT','PLAN_URL');
249
250 --query Modified for 3753793
251 --query modified for bug 4319254
252 --query modified for bug 4418395
253 -- added one more column in select list to implement plan url
254
255 --added code for enhancment 4638578
256 if (content_type = 'PAGE') then
257 debug ('in page if first');
258 l_bind := ' bis_impl_dev_pkg.get_function_by_page(OBJECTS.object_name) = :CONTENT_NAME ';
259 ELSIF (CONTENT_TYPE ='REPORT') THEN
260 l_bind := ' OBJECTS.object_name = :CONTENT_NAME ';
261 end if;
262
263 debug(content_type||'<=content_type');
264 --added code for enhancment 4638578
265 if (content_type = 'PAGE') then
266 debug ('in page if');
267 l_sql_stmt := 'select
268 DISP.value BIS_BIA_RSG_PAGE_NAME_DISPLAY,
269 BIS_RSG_PMV_REPORT_PKG.date_to_charDTTZ( LAST_SUCCESSFUL_REFRESH.Last_Refresh_Time ) BIS_BIA_RSG_PAGE_LSTREFDATE,
270 LAST_SUCCESSFUL_REFRESH.Last_Refresh_Duration BIS_BIA_RSG_PAGE_LAST_REFDUR,
271 CURRENT_RUN.Current_Status BIS_BIA_RSG_PAGE_STATUS,
272 BIS_RSG_PMV_REPORT_PKG.date_to_charDTTZ(CURRENT_RUN.Refresh_Start_Time) BIS_BIA_RSG_PAGE_REFSTARTTIME,
273 BIS_RSG_PMV_REPORT_PKG.date_to_charDTTZ(NEXT_SCHEDULED_REFRESH.REQUESTED_START_DATE) BIS_BIA_RSG_PAGE_NEXTREF,
274 decode('''||plan_url||''','' '',null,'''|| plan_text||''') BIS_BIA_RSG_PAGE_REFPLAN,
275 decode('''||plan_url||''','' '',null,'''||plan_url||''') BISREPORTURL
276 from
277
278 BIS_BIA_RSG_PAGE_STATUS_V DISP,
279
280 (
281 select OBJECT_NAME,
282 decode(Last_Refresh_Time,to_date(''01-01-1900'',''DD-MM-YYYY''),null,Last_Refresh_Duration) Last_Refresh_Duration,
283 BIS_BIA_RSG_PSTATE.sync_last_refresh_time(Last_Refresh_Time) Last_Refresh_Time
284 from
285 (
286 select OBJECTS.OBJECT_NAME,
287 BIS_BIA_RSG_PSTATE.duration(COMPLETION_DATE - START_DATE) Last_Refresh_Duration,
288 bis_submit_requestset.get_last_refreshdate(objects.object_type,null,objects.object_name) Last_Refresh_Time,
289 rank() over(partition by OBJECTS.OBJECT_NAME order by START_DATE desc) rk
290 FROM BIS_RS_RUN_HISTORY HISTORY, BIS_REQUEST_SET_OBJECTS OBJECTS
291 WHERE
292 '|| l_bind ||' AND
293 OBJECTS.OBJECT_TYPE = ''PAGE'' AND
294 BIS_BIA_RSG_PSTATE.get_refresh_mode(OBJECTS.REQUEST_SET_NAME) <> ''ANAL'' AND
295 OBJECTS.REQUEST_SET_NAME = HISTORY.REQUEST_SET_NAME AND
296 HISTORY.PHASE_CODE = ''C'' AND
297 (HISTORY.STATUS_CODE = ''C'' OR HISTORY.STATUS_CODE = ''G'')
298 )
299 where rk =1
300 )
301 LAST_SUCCESSFUL_REFRESH,
302
303 (
304 SELECT OBJECTS.OBJECT_NAME,
305 LOOKUPS.MEANING Current_Status,
306 min(START_DATE) Refresh_Start_Time
307 FROM BIS_RS_RUN_HISTORY HISTORY, BIS_REQUEST_SET_OBJECTS OBJECTS, FND_LOOKUPS LOOKUPS
308 WHERE
309 '|| l_bind ||' AND
310 OBJECTS.OBJECT_TYPE = ''PAGE'' AND
311 BIS_BIA_RSG_PSTATE.get_refresh_mode(OBJECTS.REQUEST_SET_NAME) <>''ANAL'' AND
312 OBJECTS.REQUEST_SET_NAME = HISTORY.REQUEST_SET_NAME AND
313 HISTORY.PHASE_CODE = ''R'' AND
314 HISTORY.PHASE_CODE = LOOKUPS.LOOKUP_CODE AND
315 LOOKUPS.LOOKUP_TYPE = ''BIS_RSG_PSTATE_RPT_LKP'' --modified for bug#5144541: rkumar
316 group by OBJECTS.OBJECT_NAME,LOOKUPS.MEANING
317 )
318 CURRENT_RUN,
319
320 (
321 SELECT
322 OBJECTS.OBJECT_NAME,
323 min(FND_CONC.REQUESTED_START_DATE) REQUESTED_START_DATE
324 from
325 BIS_REQUEST_SET_OBJECTS OBJECTS,
326 FND_CONCURRENT_REQUESTS FND_CONC,
327 FND_REQUEST_SETS FND
328 where
329 '|| l_bind ||' AND
330 OBJECTS.OBJECT_TYPE = ''PAGE'' AND
331 BIS_BIA_RSG_PSTATE.get_refresh_mode(OBJECTS.REQUEST_SET_NAME) <> ''ANAL'' AND
332 OBJECTS.REQUEST_SET_NAME = FND.REQUEST_SET_NAME AND
333 OBJECTS.SET_APP_ID = FND.APPLICATION_ID AND
334 to_char(FND.APPLICATION_ID) = FND_CONC.ARGUMENT1 AND
335 to_char(FND.REQUEST_SET_ID) = FND_CONC.ARGUMENT2 AND
336 FND_CONC.PHASE_CODE = ''P'' AND
337 FND_CONC.STATUS_CODE = ''I''
338 group by objects.object_name
339 )
340 NEXT_SCHEDULED_REFRESH
341
342 WHERE
343 DISP.TYPE=''PAGE'' AND --added for enh 4638578
344 bis_impl_dev_pkg.get_function_by_page(NEXT_SCHEDULED_REFRESH.object_name(+)) = DISP.ID AND
345 bis_impl_dev_pkg.get_function_by_page(CURRENT_RUN.object_name(+)) = DISP.ID AND
346 bis_impl_dev_pkg.get_function_by_page(LAST_SUCCESSFUL_REFRESH.object_name(+)) = DISP.ID
347 ';
348
349 --END OF l_sql_stmt
350 else -- here the query for report goes
351 debug ('in report if');
352 DEBUG('IN MAIN CONTENT_NAME'||content_name);
353 --l_rs_names := get_rs_for_content(content_name,'REPORT');
354 --debug('rs_names'||l_rs_names);
355 l_sql_stmt := ' select
356 DISP.value BIS_BIA_RSG_PAGE_NAME_DISPLAY,
357 BIS_RSG_PMV_REPORT_PKG.date_to_charDTTZ( LAST_SUCCESSFUL_REFRESH.Last_Refresh_Time ) BIS_BIA_RSG_PAGE_LSTREFDATE,
358 LAST_SUCCESSFUL_REFRESH.Last_Refresh_Duration BIS_BIA_RSG_PAGE_LAST_REFDUR,
359 CURRENT_RUN.Current_Status BIS_BIA_RSG_PAGE_STATUS,
360 BIS_RSG_PMV_REPORT_PKG.date_to_charDTTZ(CURRENT_RUN.Refresh_Start_Time) BIS_BIA_RSG_PAGE_REFSTARTTIME,
361 BIS_RSG_PMV_REPORT_PKG.date_to_charDTTZ(NEXT_SCHEDULED_REFRESH.REQUESTED_START_DATE) BIS_BIA_RSG_PAGE_NEXTREF,
362 decode('''||plan_url||''','' '',null,'''|| plan_text||''') BIS_BIA_RSG_PAGE_REFPLAN,
363 decode('''||plan_url||''','' '',null,'''||plan_url||''') BISREPORTURL
364 from
365 (SELECT ''Dummy'' JOIN_COL,id,value from BIS_BIA_RSG_PAGE_STATUS_V where TYPE=''REPORT''
366 AND ID=:CONTENT_NAME) DISP,
367 ( select ''Dummy'' AS JOIN_COL,
368 decode(Last_Refresh_Time,to_date(''01-01-1900'',''DD-MM-YYYY''),null,Last_Refresh_Duration) Last_Refresh_Duration,
369 BIS_BIA_RSG_PSTATE.sync_last_refresh_time(Last_refresh_time) Last_Refresh_Time
370 from (SELECT Last_Refresh_Duration,
371 bis_submit_requestset.get_last_refreshdate(''REPORT'',null,:CONTENT_NAME) Last_refresh_time
372 from
373 (select BIS_BIA_RSG_PSTATE.duration(COMPLETION_DATE - START_DATE) Last_Refresh_Duration
374 FROM BIS_RS_RUN_HISTORY HISTORY WHERE
375 HISTORY.REQUEST_SET_NAME IN
376 (select request_set_name RS_NAME from (select request_set_name --request set for dashboard that has this report
377 from bis_request_set_objects where object_name in ( select Distinct obj.OBJECT_NAME
378 from bis_obj_dependency obj where object_type in (''PAGE'') and enabled_flag=''Y''
379 start with obj.depend_object_type =''REPORT'' and obj.depend_object_name=:CONTENT_NAME
380 connect by prior obj.OBJECT_NAME=obj.depend_object_name and
381 prior obj.OBJECT_TYPE=obj.depend_object_TYPE) and object_type =''PAGE'' union -- request set for report directly
382 select request_set_name RS_NAME from bis_request_set_objects
383 where object_name =:CONTENT_NAME and object_type =''REPORT'')
384 where BIS_BIA_RSG_PSTATE.get_refresh_mode(REQUEST_SET_NAME) != ''ANAL'') AND
385 HISTORY.PHASE_CODE = ''C'' AND
386 (HISTORY.STATUS_CODE = ''C'' OR HISTORY.STATUS_CODE = ''G'')
387 order by start_date desc
388 )
389 where rownum =1 )
390 )
391 LAST_SUCCESSFUL_REFRESH,
392 (
393 SELECT ''Dummy'' AS JOIN_COL,
394 LOOKUPS.MEANING Current_Status,
395 min(START_DATE) Refresh_Start_Time
396 FROM BIS_RS_RUN_HISTORY HISTORY, FND_LOOKUPS LOOKUPS
397 WHERE
398 HISTORY.REQUEST_SET_NAME IN
399 (select request_set_name RS_NAME from (select request_set_name --request set for dashboard that has this report
400 from bis_request_set_objects where object_name in ( select Distinct obj.OBJECT_NAME
401 from bis_obj_dependency obj where object_type in (''PAGE'') and enabled_flag=''Y''
402 start with obj.depend_object_type =''REPORT'' and obj.depend_object_name=:CONTENT_NAME
403 connect by prior obj.OBJECT_NAME=obj.depend_object_name and
404 prior obj.OBJECT_TYPE=obj.depend_object_TYPE) and object_type =''PAGE'' union -- request set for report directly
405 select request_set_name RS_NAME from bis_request_set_objects
406 where object_name =:CONTENT_NAME and object_type =''REPORT'')
407 where BIS_BIA_RSG_PSTATE.get_refresh_mode(REQUEST_SET_NAME) != ''ANAL'')AND
408 HISTORY.PHASE_CODE = ''R'' AND
409 HISTORY.PHASE_CODE = LOOKUPS.LOOKUP_CODE AND
410 LOOKUPS.LOOKUP_TYPE = ''BIS_RSG_PSTATE_RPT_LKP''
411 group by history.request_id,LOOKUPS.MEANING
412 )
413 CURRENT_RUN,
414 (
415 SELECT ''Dummy'' AS JOIN_COL,
416 min(FND_CONC.REQUESTED_START_DATE) REQUESTED_START_DATE
417 from
418 BIS_REQUEST_SET_OBJECTS OBJECTS,
419 FND_CONCURRENT_REQUESTS FND_CONC,
420 FND_REQUEST_SETS FND
421 where
422 OBJECTS.REQUEST_SET_NAME in(select request_set_name RS_NAME from (select request_set_name --request set for dashboard that has this report
423 from bis_request_set_objects where object_name in ( select Distinct obj.OBJECT_NAME
424 from bis_obj_dependency obj where object_type in (''PAGE'') and enabled_flag=''Y''
425 start with obj.depend_object_type =''REPORT'' and obj.depend_object_name=:CONTENT_NAME
426 connect by prior obj.OBJECT_NAME=obj.depend_object_name and
427 prior obj.OBJECT_TYPE=obj.depend_object_TYPE) and object_type =''PAGE'' union -- request set for report directly
428 select request_set_name RS_NAME from bis_request_set_objects
429 where object_name =:CONTENT_NAME and object_type =''REPORT'')
430 where BIS_BIA_RSG_PSTATE.get_refresh_mode(REQUEST_SET_NAME) != ''ANAL'') and
431 OBJECTS.REQUEST_SET_NAME = FND.REQUEST_SET_NAME AND
432 OBJECTS.SET_APP_ID = FND.APPLICATION_ID AND
433 to_char(FND.APPLICATION_ID) = FND_CONC.ARGUMENT1 AND
434 to_char(FND.REQUEST_SET_ID) = FND_CONC.ARGUMENT2 AND
435 FND_CONC.PHASE_CODE = ''P'' AND
436 FND_CONC.STATUS_CODE = ''I''
437 group by fnd_conc.request_id
438 )
439 NEXT_SCHEDULED_REFRESH
440 WHERE
441 NEXT_SCHEDULED_REFRESH.JOIN_COL(+) = DISP.JOIN_COL AND
442 CURRENT_RUN.JOIN_COL(+) = DISP.JOIN_COL AND
443 LAST_SUCCESSFUL_REFRESH.JOIN_COL(+) = DISP.JOIN_COL
444 ';
445
446 --END OF l_sql_stmt
447 end if;
448
449 debug ('IN MAIN after if');
450 l_custom_rec := BIS_PMV_PARAMETERS_PUB.Initialize_Query_Type;
451 x_custom_output := bis_query_attributes_tbl();
452
453 l_sql_stmt := l_sql_stmt || ' and DISP.ID = :CONTENT_NAME' ;
454
455 l_custom_rec.attribute_name := ':CONTENT_NAME';
456 l_custom_rec.attribute_value := content_name;
457 l_custom_rec.attribute_type := bis_pmv_parameters_pub.bind_type;
458 l_custom_rec.attribute_data_type := bis_pmv_parameters_pub.varchar2_bind;
459 x_custom_output.extend;
460 x_custom_output(1) := l_custom_rec;
461 --- we have inserted the parameter directly in the query, as pmv does not allow
462 ---- bind parameter length to exceed more than 255..
463 /*
464 IF(CONTENT_TYPE='REPORT') THEN
465 debug ('IN MAIN setting up rs name');
466 l_custom_rec.attribute_name := ':RS_NAME';
467 l_custom_rec.attribute_value := l_rs_names;
468 l_custom_rec.attribute_type := bis_pmv_parameters_pub.bind_type;
469 l_custom_rec.attribute_data_type := bis_pmv_parameters_pub.varchar2_bind;
470 x_custom_output.extend;
471 x_custom_output(2) := l_custom_rec;
472 END IF;*/
473
474 debug ('IN MAIN after setting up rs_name');
475 --debug(l_sql_stmt);
476 l_sql_stmt := l_sql_stmt || ' &' || 'ORDER_BY_CLAUSE NULLS LAST ';
477
478 x_custom_sql := l_sql_stmt;
479
480 END GET_SQL ;
481
482
483 END; -- Package Body BIS_BIA_RSG_PSTATE