26: l_bua_view_by varchar2(100);
27:
28: begin
29:
30: l_session_id := isc_fs_rpt_util_pkg.get_parameter_value
31: ( p_param
32: , 'BIS_ICX_SESSION_ID'
33: );
34:
59: l_district_leaf_node varchar2(1);
60:
61: begin
62:
63: if nvl(isc_fs_rpt_util_pkg.get_parameter_value
64: ( p_param
65: , isc_fs_rpt_util_pkg.G_CATEGORY
66: ),'All') = 'All' then
67: l_top_node := 'Y';
61: begin
62:
63: if nvl(isc_fs_rpt_util_pkg.get_parameter_value
64: ( p_param
65: , isc_fs_rpt_util_pkg.G_CATEGORY
66: ),'All') = 'All' then
67: l_top_node := 'Y';
68: else
69: l_top_node := 'N';
70: end if;
71:
72: if p_report_type = 'FTFR' then
73:
74: l_district_leaf_node := isc_fs_rpt_util_pkg.is_district_leaf_node
75: ( p_param );
76:
77: isc_fs_rpt_util_pkg.bind_group_id
78: ( p_dim_bmap
73:
74: l_district_leaf_node := isc_fs_rpt_util_pkg.is_district_leaf_node
75: ( p_param );
76:
77: isc_fs_rpt_util_pkg.bind_group_id
78: ( p_dim_bmap
79: , p_custom_output
80: , isc_fs_rpt_util_pkg.G_CATEGORY
81: , isc_fs_rpt_util_pkg.G_PRODUCT
76:
77: isc_fs_rpt_util_pkg.bind_group_id
78: ( p_dim_bmap
79: , p_custom_output
80: , isc_fs_rpt_util_pkg.G_CATEGORY
81: , isc_fs_rpt_util_pkg.G_PRODUCT
82: , isc_fs_rpt_util_pkg.G_CUSTOMER
83: );
84:
77: isc_fs_rpt_util_pkg.bind_group_id
78: ( p_dim_bmap
79: , p_custom_output
80: , isc_fs_rpt_util_pkg.G_CATEGORY
81: , isc_fs_rpt_util_pkg.G_PRODUCT
82: , isc_fs_rpt_util_pkg.G_CUSTOMER
83: );
84:
85: if bitand(p_dim_bmap,isc_fs_rpt_util_pkg.G_CATEGORY_BMAP) = isc_fs_rpt_util_pkg.G_CATEGORY_BMAP then
78: ( p_dim_bmap
79: , p_custom_output
80: , isc_fs_rpt_util_pkg.G_CATEGORY
81: , isc_fs_rpt_util_pkg.G_PRODUCT
82: , isc_fs_rpt_util_pkg.G_CUSTOMER
83: );
84:
85: if bitand(p_dim_bmap,isc_fs_rpt_util_pkg.G_CATEGORY_BMAP) = isc_fs_rpt_util_pkg.G_CATEGORY_BMAP then
86:
81: , isc_fs_rpt_util_pkg.G_PRODUCT
82: , isc_fs_rpt_util_pkg.G_CUSTOMER
83: );
84:
85: if bitand(p_dim_bmap,isc_fs_rpt_util_pkg.G_CATEGORY_BMAP) = isc_fs_rpt_util_pkg.G_CATEGORY_BMAP then
86:
87: return '(
88: select
89: v.top_node_flag vbh_top_node_flag
128: when l_top_node = 'Y' then '
129: and v.top_node_flag = ''Y''' end || '
130: )';
131:
132: elsif bitand(p_dim_bmap,isc_fs_rpt_util_pkg.G_PRODUCT_BMAP) = isc_fs_rpt_util_pkg.G_PRODUCT_BMAP or
133: bitand(p_dim_bmap,isc_fs_rpt_util_pkg.G_CUSTOMER_BMAP) = isc_fs_rpt_util_pkg.G_CUSTOMER_BMAP or
134: bitand(p_dim_bmap,isc_fs_rpt_util_pkg.G_SEVERITY_BMAP) = isc_fs_rpt_util_pkg.G_SEVERITY_BMAP then
135:
136: return '(
129: and v.top_node_flag = ''Y''' end || '
130: )';
131:
132: elsif bitand(p_dim_bmap,isc_fs_rpt_util_pkg.G_PRODUCT_BMAP) = isc_fs_rpt_util_pkg.G_PRODUCT_BMAP or
133: bitand(p_dim_bmap,isc_fs_rpt_util_pkg.G_CUSTOMER_BMAP) = isc_fs_rpt_util_pkg.G_CUSTOMER_BMAP or
134: bitand(p_dim_bmap,isc_fs_rpt_util_pkg.G_SEVERITY_BMAP) = isc_fs_rpt_util_pkg.G_SEVERITY_BMAP then
135:
136: return '(
137: select
130: )';
131:
132: elsif bitand(p_dim_bmap,isc_fs_rpt_util_pkg.G_PRODUCT_BMAP) = isc_fs_rpt_util_pkg.G_PRODUCT_BMAP or
133: bitand(p_dim_bmap,isc_fs_rpt_util_pkg.G_CUSTOMER_BMAP) = isc_fs_rpt_util_pkg.G_CUSTOMER_BMAP or
134: bitand(p_dim_bmap,isc_fs_rpt_util_pkg.G_SEVERITY_BMAP) = isc_fs_rpt_util_pkg.G_SEVERITY_BMAP then
135:
136: return '(
137: select
138: f.time_id
190: else
191: l_alias := 't';
192: end if;
193:
194: if isc_fs_rpt_util_pkg.get_parameter_id
195: ( p_param
196: , isc_fs_rpt_util_pkg.G_DISTRICT
197: ) like '%.%' then
198: l_resource := 'Y';
192: end if;
193:
194: if isc_fs_rpt_util_pkg.get_parameter_id
195: ( p_param
196: , isc_fs_rpt_util_pkg.G_DISTRICT
197: ) like '%.%' then
198: l_resource := 'Y';
199: else
200: l_resource := 'N';
227: , t.actual_end_date
228: , t.actual_effort_hrs
229: , nvl(s.master_id,s.id) product_id ' ||
230: case
231: when bitand(p_dim_bmap,isc_fs_rpt_util_pkg.G_CATEGORY_BMAP) = isc_fs_rpt_util_pkg.G_CATEGORY_BMAP then
232: '
233: , v.top_node_flag vbh_top_node_flag
234: , v.parent_id vbh_parent_category_id
235: , v.imm_child_id vbh_child_category_id'
249: end || '
250: , biv_dbi_resolution_sum_f r
251: , eni_oltp_item_star s' ||
252: case
253: when bitand(p_dim_bmap,isc_fs_rpt_util_pkg.G_CATEGORY_BMAP) = isc_fs_rpt_util_pkg.G_CATEGORY_BMAP then
254: '
255: , eni_denorm_hierarchies v
256: , mtl_default_category_sets m'
257: end ||
274: ' end || '
275: and r.inventory_item_id = s.inventory_item_id
276: and r.inv_organization_id = s.organization_id' ||
277: case
278: when bitand(p_dim_bmap,isc_fs_rpt_util_pkg.G_CATEGORY_BMAP) = isc_fs_rpt_util_pkg.G_CATEGORY_BMAP then
279: '
280: and m.functional_area_id = 11
281: and v.object_id = m.category_set_id
282: and v.dbi_flag = ''Y''
308: , x_custom_output out nocopy bis_query_attributes_tbl
309: )
310: is
311:
312: l_dimension_tbl isc_fs_rpt_util_pkg.t_dimension_tbl;
313: l_dim_filter_map poa_dbi_util_pkg.poa_dbi_dim_map;
314: l_custom_output bis_query_attributes_tbl;
315: l_curr_suffix varchar2(3);
316: l_where_clause varchar2(10000);
327: l_to_date_type varchar2(200);
328:
329: begin
330:
331: isc_fs_rpt_util_pkg.register_dimension_levels
332: ( l_dimension_tbl
333: , l_dim_filter_map
334: , isc_fs_rpt_util_pkg.G_CATEGORY, 'Y'
335: , isc_fs_rpt_util_pkg.G_PRODUCT, 'Y'
330:
331: isc_fs_rpt_util_pkg.register_dimension_levels
332: ( l_dimension_tbl
333: , l_dim_filter_map
334: , isc_fs_rpt_util_pkg.G_CATEGORY, 'Y'
335: , isc_fs_rpt_util_pkg.G_PRODUCT, 'Y'
336: , isc_fs_rpt_util_pkg.G_CUSTOMER, 'Y'
337: , isc_fs_rpt_util_pkg.G_DISTRICT, 'Y'
338: , isc_fs_rpt_util_pkg.G_SEVERITY, 'Y'
331: isc_fs_rpt_util_pkg.register_dimension_levels
332: ( l_dimension_tbl
333: , l_dim_filter_map
334: , isc_fs_rpt_util_pkg.G_CATEGORY, 'Y'
335: , isc_fs_rpt_util_pkg.G_PRODUCT, 'Y'
336: , isc_fs_rpt_util_pkg.G_CUSTOMER, 'Y'
337: , isc_fs_rpt_util_pkg.G_DISTRICT, 'Y'
338: , isc_fs_rpt_util_pkg.G_SEVERITY, 'Y'
339: );
332: ( l_dimension_tbl
333: , l_dim_filter_map
334: , isc_fs_rpt_util_pkg.G_CATEGORY, 'Y'
335: , isc_fs_rpt_util_pkg.G_PRODUCT, 'Y'
336: , isc_fs_rpt_util_pkg.G_CUSTOMER, 'Y'
337: , isc_fs_rpt_util_pkg.G_DISTRICT, 'Y'
338: , isc_fs_rpt_util_pkg.G_SEVERITY, 'Y'
339: );
340:
333: , l_dim_filter_map
334: , isc_fs_rpt_util_pkg.G_CATEGORY, 'Y'
335: , isc_fs_rpt_util_pkg.G_PRODUCT, 'Y'
336: , isc_fs_rpt_util_pkg.G_CUSTOMER, 'Y'
337: , isc_fs_rpt_util_pkg.G_DISTRICT, 'Y'
338: , isc_fs_rpt_util_pkg.G_SEVERITY, 'Y'
339: );
340:
341: isc_fs_rpt_util_pkg.process_parameters
334: , isc_fs_rpt_util_pkg.G_CATEGORY, 'Y'
335: , isc_fs_rpt_util_pkg.G_PRODUCT, 'Y'
336: , isc_fs_rpt_util_pkg.G_CUSTOMER, 'Y'
337: , isc_fs_rpt_util_pkg.G_DISTRICT, 'Y'
338: , isc_fs_rpt_util_pkg.G_SEVERITY, 'Y'
339: );
340:
341: isc_fs_rpt_util_pkg.process_parameters
342: ( p_param => p_param
337: , isc_fs_rpt_util_pkg.G_DISTRICT, 'Y'
338: , isc_fs_rpt_util_pkg.G_SEVERITY, 'Y'
339: );
340:
341: isc_fs_rpt_util_pkg.process_parameters
342: ( p_param => p_param
343: , p_dimension_tbl => l_dimension_tbl
344: , p_dim_filter_map => l_dim_filter_map
345: , p_trend => 'N'
358: else
359: l_to_date_type := 'RLX';
360: end if;
361:
362: l_view_by := isc_fs_rpt_util_pkg.get_parameter_value
363: ( p_param
364: , 'VIEW_BY'
365: );
366:
363: ( p_param
364: , 'VIEW_BY'
365: );
366:
367: if l_view_by = isc_fs_rpt_util_pkg.G_PRODUCT then
368: l_product := 'v4.description ISC_ATTRIBUTE_3';
369: else
370: l_product := 'null ISC_ATTRIBUTE_3';
371: end if;
427: , ISC_MEASURE_26 ISC_MEASURE_32
428: , ISC_MEASURE_22 ISC_MEASURE_33
429: , ISC_MEASURE_23 ISC_MEASURE_34
430: , ' || l_product || '
431: , ' || isc_fs_rpt_util_pkg.get_district_drill_down
432: ( l_view_by
433: , g_task_rep_func
434: , 'ISC_ATTRIBUTE_4' ) || '
435: , ' || isc_fs_rpt_util_pkg.get_category_drill_down
431: , ' || isc_fs_rpt_util_pkg.get_district_drill_down
432: ( l_view_by
433: , g_task_rep_func
434: , 'ISC_ATTRIBUTE_4' ) || '
435: , ' || isc_fs_rpt_util_pkg.get_category_drill_down
436: ( l_view_by
437: , g_task_rep_func
438: , 'ISC_ATTRIBUTE_5' ) || '
439: , ' || isc_fs_rpt_util_pkg.get_detail_drill_down
435: , ' || isc_fs_rpt_util_pkg.get_category_drill_down
436: ( l_view_by
437: , g_task_rep_func
438: , 'ISC_ATTRIBUTE_5' ) || '
439: , ' || isc_fs_rpt_util_pkg.get_detail_drill_down
440: ( p_view_by => l_view_by
441: , p_function_name => g_detail_rep_func
442: , p_check_column_name => 'ISC_MEASURE_8'
443: , p_column_alias => 'ISC_ATTRIBUTE_6'
445: , p_check_resource => 'Y'
446: ) || '
447: from (
448: select
449: row_number() over(&ORDER_BY_CLAUSE nulls last, '|| isc_fs_rpt_util_pkg.get_inner_select_col(l_join_tbl) || ')-1 rnk
450: , iset.*
451: from ( select * from (
452: select ' || isc_fs_rpt_util_pkg.get_inner_select_col(l_join_tbl) || '
453: , ' || isc_fs_rpt_util_pkg.rate_column
448: select
449: row_number() over(&ORDER_BY_CLAUSE nulls last, '|| isc_fs_rpt_util_pkg.get_inner_select_col(l_join_tbl) || ')-1 rnk
450: , iset.*
451: from ( select * from (
452: select ' || isc_fs_rpt_util_pkg.get_inner_select_col(l_join_tbl) || '
453: , ' || isc_fs_rpt_util_pkg.rate_column
454: ( 'p_ftf_count'
455: , 'p_sr_count'
456: , 'ISC_MEASURE_1'
449: row_number() over(&ORDER_BY_CLAUSE nulls last, '|| isc_fs_rpt_util_pkg.get_inner_select_col(l_join_tbl) || ')-1 rnk
450: , iset.*
451: from ( select * from (
452: select ' || isc_fs_rpt_util_pkg.get_inner_select_col(l_join_tbl) || '
453: , ' || isc_fs_rpt_util_pkg.rate_column
454: ( 'p_ftf_count'
455: , 'p_sr_count'
456: , 'ISC_MEASURE_1'
457: , 'Y'
455: , 'p_sr_count'
456: , 'ISC_MEASURE_1'
457: , 'Y'
458: ) || '
459: , ' || isc_fs_rpt_util_pkg.rate_column
460: ( 'c_ftf_count'
461: , 'c_sr_count'
462: , 'ISC_MEASURE_2'
463: , 'Y'
461: , 'c_sr_count'
462: , 'ISC_MEASURE_2'
463: , 'Y'
464: ) || '
465: , ' || isc_fs_rpt_util_pkg.change_column
466: ( isc_fs_rpt_util_pkg.rate_column
467: ( 'c_ftf_count'
468: , 'c_sr_count'
469: , null
462: , 'ISC_MEASURE_2'
463: , 'Y'
464: ) || '
465: , ' || isc_fs_rpt_util_pkg.change_column
466: ( isc_fs_rpt_util_pkg.rate_column
467: ( 'c_ftf_count'
468: , 'c_sr_count'
469: , null
470: , 'Y'
468: , 'c_sr_count'
469: , null
470: , 'Y'
471: )
472: , isc_fs_rpt_util_pkg.rate_column
473: ( 'p_ftf_count'
474: , 'p_sr_count'
475: , null
476: , 'Y'
478: , 'ISC_MEASURE_3'
479: , 'N'
480: ) || '
481: , nvl(c_ftf_count,0) ISC_MEASURE_4
482: , ' || isc_fs_rpt_util_pkg.rate_column
483: ( 'p_non_ftf_count'
484: , 'p_sr_count'
485: , 'ISC_MEASURE_5'
486: , 'Y'
484: , 'p_sr_count'
485: , 'ISC_MEASURE_5'
486: , 'Y'
487: ) || '
488: , ' || isc_fs_rpt_util_pkg.rate_column
489: ( 'c_non_ftf_count'
490: , 'c_sr_count'
491: , 'ISC_MEASURE_6'
492: , 'Y'
490: , 'c_sr_count'
491: , 'ISC_MEASURE_6'
492: , 'Y'
493: ) || '
494: , ' || isc_fs_rpt_util_pkg.change_column
495: ( isc_fs_rpt_util_pkg.rate_column
496: ( 'c_non_ftf_count'
497: , 'c_sr_count'
498: , null
491: , 'ISC_MEASURE_6'
492: , 'Y'
493: ) || '
494: , ' || isc_fs_rpt_util_pkg.change_column
495: ( isc_fs_rpt_util_pkg.rate_column
496: ( 'c_non_ftf_count'
497: , 'c_sr_count'
498: , null
499: , 'Y'
497: , 'c_sr_count'
498: , null
499: , 'Y'
500: )
501: , isc_fs_rpt_util_pkg.rate_column
502: ( 'p_non_ftf_count'
503: , 'p_sr_count'
504: , null
505: , 'Y'
507: , 'ISC_MEASURE_7'
508: , 'N'
509: ) || '
510: , nvl(c_non_ftf_count,0) ISC_MEASURE_8
511: , ' || isc_fs_rpt_util_pkg.rate_column
512: ( 'p_ftf_count_total'
513: , 'p_sr_count_total'
514: , 'ISC_MEASURE_21'
515: , 'Y'
513: , 'p_sr_count_total'
514: , 'ISC_MEASURE_21'
515: , 'Y'
516: ) || '
517: , ' || isc_fs_rpt_util_pkg.rate_column
518: ( 'c_ftf_count_total'
519: , 'c_sr_count_total'
520: , 'ISC_MEASURE_22'
521: , 'Y'
519: , 'c_sr_count_total'
520: , 'ISC_MEASURE_22'
521: , 'Y'
522: ) || '
523: , ' || isc_fs_rpt_util_pkg.change_column
524: ( isc_fs_rpt_util_pkg.rate_column
525: ( 'c_ftf_count_total'
526: , 'c_sr_count_total'
527: , null
520: , 'ISC_MEASURE_22'
521: , 'Y'
522: ) || '
523: , ' || isc_fs_rpt_util_pkg.change_column
524: ( isc_fs_rpt_util_pkg.rate_column
525: ( 'c_ftf_count_total'
526: , 'c_sr_count_total'
527: , null
528: , 'Y'
526: , 'c_sr_count_total'
527: , null
528: , 'Y'
529: )
530: , isc_fs_rpt_util_pkg.rate_column
531: ( 'p_ftf_count_total'
532: , 'p_sr_count_total'
533: , null
534: , 'Y'
536: , 'ISC_MEASURE_23'
537: , 'N'
538: ) || '
539: , nvl(c_ftf_count_total,0) ISC_MEASURE_24
540: , ' || isc_fs_rpt_util_pkg.rate_column
541: ( 'p_non_ftf_count_total'
542: , 'p_sr_count_total'
543: , 'ISC_MEASURE_25'
544: , 'Y'
542: , 'p_sr_count_total'
543: , 'ISC_MEASURE_25'
544: , 'Y'
545: ) || '
546: , ' || isc_fs_rpt_util_pkg.rate_column
547: ( 'c_non_ftf_count_total'
548: , 'c_sr_count_total'
549: , 'ISC_MEASURE_26'
550: , 'Y'
548: , 'c_sr_count_total'
549: , 'ISC_MEASURE_26'
550: , 'Y'
551: ) || '
552: , ' || isc_fs_rpt_util_pkg.change_column
553: ( isc_fs_rpt_util_pkg.rate_column
554: ( 'c_non_ftf_count_total'
555: , 'c_sr_count_total'
556: , null
549: , 'ISC_MEASURE_26'
550: , 'Y'
551: ) || '
552: , ' || isc_fs_rpt_util_pkg.change_column
553: ( isc_fs_rpt_util_pkg.rate_column
554: ( 'c_non_ftf_count_total'
555: , 'c_sr_count_total'
556: , null
557: , 'Y'
555: , 'c_sr_count_total'
556: , null
557: , 'Y'
558: )
559: , isc_fs_rpt_util_pkg.rate_column
560: ( 'p_non_ftf_count_total'
561: , 'p_sr_count_total'
562: , null
563: , 'Y'
577: , p_filter_where => '1=1) iset '
578: , p_generate_viewby => 'Y'
579: );
580:
581: isc_fs_rpt_util_pkg.enhance_time_join
582: ( l_stmt
583: , 'N'
584: );
585:
583: , 'N'
584: );
585:
586: -- the next line can be used to dump the contents of the PMV parameters as comments into stmt
587: -- l_stmt := l_stmt || isc_fs_rpt_util_pkg.dump_parameters(p_param);
588:
589: poa_dbi_util_pkg.get_custom_rolling_binds
590: ( p_custom_output => l_custom_output
591: , p_xtd => l_xtd
603: , x_custom_output out nocopy bis_query_attributes_tbl
604: )
605: is
606:
607: l_dimension_tbl isc_fs_rpt_util_pkg.t_dimension_tbl;
608: l_dim_filter_map poa_dbi_util_pkg.poa_dbi_dim_map;
609: l_custom_output bis_query_attributes_tbl;
610: l_curr_suffix varchar2(3);
611: l_where_clause varchar2(10000);
620: l_to_date_type varchar2(200);
621:
622: begin
623:
624: isc_fs_rpt_util_pkg.register_dimension_levels
625: ( l_dimension_tbl
626: , l_dim_filter_map
627: , isc_fs_rpt_util_pkg.G_CATEGORY, 'Y'
628: , isc_fs_rpt_util_pkg.G_PRODUCT, 'Y'
623:
624: isc_fs_rpt_util_pkg.register_dimension_levels
625: ( l_dimension_tbl
626: , l_dim_filter_map
627: , isc_fs_rpt_util_pkg.G_CATEGORY, 'Y'
628: , isc_fs_rpt_util_pkg.G_PRODUCT, 'Y'
629: , isc_fs_rpt_util_pkg.G_CUSTOMER, 'Y'
630: , isc_fs_rpt_util_pkg.G_DISTRICT, 'Y'
631: , isc_fs_rpt_util_pkg.G_SEVERITY, 'Y'
624: isc_fs_rpt_util_pkg.register_dimension_levels
625: ( l_dimension_tbl
626: , l_dim_filter_map
627: , isc_fs_rpt_util_pkg.G_CATEGORY, 'Y'
628: , isc_fs_rpt_util_pkg.G_PRODUCT, 'Y'
629: , isc_fs_rpt_util_pkg.G_CUSTOMER, 'Y'
630: , isc_fs_rpt_util_pkg.G_DISTRICT, 'Y'
631: , isc_fs_rpt_util_pkg.G_SEVERITY, 'Y'
632: );
625: ( l_dimension_tbl
626: , l_dim_filter_map
627: , isc_fs_rpt_util_pkg.G_CATEGORY, 'Y'
628: , isc_fs_rpt_util_pkg.G_PRODUCT, 'Y'
629: , isc_fs_rpt_util_pkg.G_CUSTOMER, 'Y'
630: , isc_fs_rpt_util_pkg.G_DISTRICT, 'Y'
631: , isc_fs_rpt_util_pkg.G_SEVERITY, 'Y'
632: );
633:
626: , l_dim_filter_map
627: , isc_fs_rpt_util_pkg.G_CATEGORY, 'Y'
628: , isc_fs_rpt_util_pkg.G_PRODUCT, 'Y'
629: , isc_fs_rpt_util_pkg.G_CUSTOMER, 'Y'
630: , isc_fs_rpt_util_pkg.G_DISTRICT, 'Y'
631: , isc_fs_rpt_util_pkg.G_SEVERITY, 'Y'
632: );
633:
634: isc_fs_rpt_util_pkg.process_parameters
627: , isc_fs_rpt_util_pkg.G_CATEGORY, 'Y'
628: , isc_fs_rpt_util_pkg.G_PRODUCT, 'Y'
629: , isc_fs_rpt_util_pkg.G_CUSTOMER, 'Y'
630: , isc_fs_rpt_util_pkg.G_DISTRICT, 'Y'
631: , isc_fs_rpt_util_pkg.G_SEVERITY, 'Y'
632: );
633:
634: isc_fs_rpt_util_pkg.process_parameters
635: ( p_param => p_param
630: , isc_fs_rpt_util_pkg.G_DISTRICT, 'Y'
631: , isc_fs_rpt_util_pkg.G_SEVERITY, 'Y'
632: );
633:
634: isc_fs_rpt_util_pkg.process_parameters
635: ( p_param => p_param
636: , p_dimension_tbl => l_dimension_tbl
637: , p_dim_filter_map => l_dim_filter_map
638: , p_trend => 'Y'
678: );
679:
680: l_stmt := 'select
681: cal.name VIEWBY
682: , ' || isc_fs_rpt_util_pkg.rate_column
683: ( 'iset.p_ftf_count'
684: , 'iset.p_sr_count'
685: , 'ISC_MEASURE_1'
686: , 'Y'
684: , 'iset.p_sr_count'
685: , 'ISC_MEASURE_1'
686: , 'Y'
687: ) || '
688: , ' || isc_fs_rpt_util_pkg.rate_column
689: ( 'iset.c_ftf_count'
690: , 'iset.c_sr_count'
691: , 'ISC_MEASURE_2'
692: , 'Y'
690: , 'iset.c_sr_count'
691: , 'ISC_MEASURE_2'
692: , 'Y'
693: ) || '
694: , ' || isc_fs_rpt_util_pkg.change_column
695: ( isc_fs_rpt_util_pkg.rate_column
696: ( 'iset.c_ftf_count'
697: , 'iset.c_sr_count'
698: , null
691: , 'ISC_MEASURE_2'
692: , 'Y'
693: ) || '
694: , ' || isc_fs_rpt_util_pkg.change_column
695: ( isc_fs_rpt_util_pkg.rate_column
696: ( 'iset.c_ftf_count'
697: , 'iset.c_sr_count'
698: , null
699: , 'Y'
697: , 'iset.c_sr_count'
698: , null
699: , 'Y'
700: )
701: , isc_fs_rpt_util_pkg.rate_column
702: ( 'iset.p_ftf_count'
703: , 'iset.p_sr_count'
704: , null
705: , 'Y'
706: )
707: , 'ISC_MEASURE_3'
708: , 'N'
709: ) ||
710: isc_fs_rpt_util_pkg.get_trend_drill
711: ( l_xtd
712: , g_trd_rep_func
713: , 'ISC_ATTRIBUTE_1'
714: , 'ISC_ATTRIBUTE_2'
722: , p_col_name => l_col_tbl
723: , p_use_grpid => 'N'
724: );
725:
726: isc_fs_rpt_util_pkg.enhance_time_join
727: ( l_stmt
728: , 'Y'
729: );
730:
728: , 'Y'
729: );
730:
731: -- the next line can be used to dump the contents of the PMV parameters as comments into stmt
732: -- l_stmt := l_stmt || isc_fs_rpt_util_pkg.dump_parameters(p_param);
733:
734: x_custom_sql := l_stmt;
735:
736: x_custom_output := l_custom_output;
763: , x_custom_output out nocopy bis_query_attributes_tbl
764: )
765: as
766:
767: l_dimension_tbl isc_fs_rpt_util_pkg.t_dimension_tbl;
768: l_dim_filter_map poa_dbi_util_pkg.poa_dbi_dim_map;
769: l_custom_output bis_query_attributes_tbl;
770: l_curr_suffix varchar2(3);
771: l_where_clause varchar2(10000);
778: l_cost_element varchar2(200);
779: l_col_tbl poa_dbi_util_pkg.poa_dbi_col_tbl;
780: l_stmt varchar2(32767);
781: l_rank_order varchar2(200);
782: l_detail_col_tbl isc_fs_rpt_util_pkg.t_detail_column_tbl;
783: l_order_by varchar2(200);
784: l_asc_desc varchar2(100);
785:
786: begin
785:
786: begin
787:
788: -- split into two calls as limit is 10 and have 11
789: isc_fs_rpt_util_pkg.register_dimension_levels
790: ( l_dimension_tbl
791: , l_dim_filter_map
792: , isc_fs_rpt_util_pkg.G_CATEGORY, 'Y'
793: , isc_fs_rpt_util_pkg.G_PRODUCT, 'Y'
788: -- split into two calls as limit is 10 and have 11
789: isc_fs_rpt_util_pkg.register_dimension_levels
790: ( l_dimension_tbl
791: , l_dim_filter_map
792: , isc_fs_rpt_util_pkg.G_CATEGORY, 'Y'
793: , isc_fs_rpt_util_pkg.G_PRODUCT, 'Y'
794: , isc_fs_rpt_util_pkg.G_CUSTOMER, 'Y'
795: , isc_fs_rpt_util_pkg.G_DISTRICT, 'Y'
796: , isc_fs_rpt_util_pkg.G_TASK_TYPE, 'N'
789: isc_fs_rpt_util_pkg.register_dimension_levels
790: ( l_dimension_tbl
791: , l_dim_filter_map
792: , isc_fs_rpt_util_pkg.G_CATEGORY, 'Y'
793: , isc_fs_rpt_util_pkg.G_PRODUCT, 'Y'
794: , isc_fs_rpt_util_pkg.G_CUSTOMER, 'Y'
795: , isc_fs_rpt_util_pkg.G_DISTRICT, 'Y'
796: , isc_fs_rpt_util_pkg.G_TASK_TYPE, 'N'
797: , isc_fs_rpt_util_pkg.G_TASK_OWNER, 'N'
790: ( l_dimension_tbl
791: , l_dim_filter_map
792: , isc_fs_rpt_util_pkg.G_CATEGORY, 'Y'
793: , isc_fs_rpt_util_pkg.G_PRODUCT, 'Y'
794: , isc_fs_rpt_util_pkg.G_CUSTOMER, 'Y'
795: , isc_fs_rpt_util_pkg.G_DISTRICT, 'Y'
796: , isc_fs_rpt_util_pkg.G_TASK_TYPE, 'N'
797: , isc_fs_rpt_util_pkg.G_TASK_OWNER, 'N'
798: , isc_fs_rpt_util_pkg.G_TASK_ASSIGNEE, 'N'
791: , l_dim_filter_map
792: , isc_fs_rpt_util_pkg.G_CATEGORY, 'Y'
793: , isc_fs_rpt_util_pkg.G_PRODUCT, 'Y'
794: , isc_fs_rpt_util_pkg.G_CUSTOMER, 'Y'
795: , isc_fs_rpt_util_pkg.G_DISTRICT, 'Y'
796: , isc_fs_rpt_util_pkg.G_TASK_TYPE, 'N'
797: , isc_fs_rpt_util_pkg.G_TASK_OWNER, 'N'
798: , isc_fs_rpt_util_pkg.G_TASK_ASSIGNEE, 'N'
799: , isc_fs_rpt_util_pkg.G_TASK_STATUS, 'N'
792: , isc_fs_rpt_util_pkg.G_CATEGORY, 'Y'
793: , isc_fs_rpt_util_pkg.G_PRODUCT, 'Y'
794: , isc_fs_rpt_util_pkg.G_CUSTOMER, 'Y'
795: , isc_fs_rpt_util_pkg.G_DISTRICT, 'Y'
796: , isc_fs_rpt_util_pkg.G_TASK_TYPE, 'N'
797: , isc_fs_rpt_util_pkg.G_TASK_OWNER, 'N'
798: , isc_fs_rpt_util_pkg.G_TASK_ASSIGNEE, 'N'
799: , isc_fs_rpt_util_pkg.G_TASK_STATUS, 'N'
800: );
793: , isc_fs_rpt_util_pkg.G_PRODUCT, 'Y'
794: , isc_fs_rpt_util_pkg.G_CUSTOMER, 'Y'
795: , isc_fs_rpt_util_pkg.G_DISTRICT, 'Y'
796: , isc_fs_rpt_util_pkg.G_TASK_TYPE, 'N'
797: , isc_fs_rpt_util_pkg.G_TASK_OWNER, 'N'
798: , isc_fs_rpt_util_pkg.G_TASK_ASSIGNEE, 'N'
799: , isc_fs_rpt_util_pkg.G_TASK_STATUS, 'N'
800: );
801:
794: , isc_fs_rpt_util_pkg.G_CUSTOMER, 'Y'
795: , isc_fs_rpt_util_pkg.G_DISTRICT, 'Y'
796: , isc_fs_rpt_util_pkg.G_TASK_TYPE, 'N'
797: , isc_fs_rpt_util_pkg.G_TASK_OWNER, 'N'
798: , isc_fs_rpt_util_pkg.G_TASK_ASSIGNEE, 'N'
799: , isc_fs_rpt_util_pkg.G_TASK_STATUS, 'N'
800: );
801:
802: isc_fs_rpt_util_pkg.register_dimension_levels
795: , isc_fs_rpt_util_pkg.G_DISTRICT, 'Y'
796: , isc_fs_rpt_util_pkg.G_TASK_TYPE, 'N'
797: , isc_fs_rpt_util_pkg.G_TASK_OWNER, 'N'
798: , isc_fs_rpt_util_pkg.G_TASK_ASSIGNEE, 'N'
799: , isc_fs_rpt_util_pkg.G_TASK_STATUS, 'N'
800: );
801:
802: isc_fs_rpt_util_pkg.register_dimension_levels
803: ( l_dimension_tbl
798: , isc_fs_rpt_util_pkg.G_TASK_ASSIGNEE, 'N'
799: , isc_fs_rpt_util_pkg.G_TASK_STATUS, 'N'
800: );
801:
802: isc_fs_rpt_util_pkg.register_dimension_levels
803: ( l_dimension_tbl
804: , l_dim_filter_map
805: , isc_fs_rpt_util_pkg.G_SR_TYPE, 'N'
806: , isc_fs_rpt_util_pkg.G_SR_STATUS, 'N'
801:
802: isc_fs_rpt_util_pkg.register_dimension_levels
803: ( l_dimension_tbl
804: , l_dim_filter_map
805: , isc_fs_rpt_util_pkg.G_SR_TYPE, 'N'
806: , isc_fs_rpt_util_pkg.G_SR_STATUS, 'N'
807: , isc_fs_rpt_util_pkg.G_SR_OWNER, 'N'
808: , isc_fs_rpt_util_pkg.G_SEVERITY, 'Y'
809: );
802: isc_fs_rpt_util_pkg.register_dimension_levels
803: ( l_dimension_tbl
804: , l_dim_filter_map
805: , isc_fs_rpt_util_pkg.G_SR_TYPE, 'N'
806: , isc_fs_rpt_util_pkg.G_SR_STATUS, 'N'
807: , isc_fs_rpt_util_pkg.G_SR_OWNER, 'N'
808: , isc_fs_rpt_util_pkg.G_SEVERITY, 'Y'
809: );
810:
803: ( l_dimension_tbl
804: , l_dim_filter_map
805: , isc_fs_rpt_util_pkg.G_SR_TYPE, 'N'
806: , isc_fs_rpt_util_pkg.G_SR_STATUS, 'N'
807: , isc_fs_rpt_util_pkg.G_SR_OWNER, 'N'
808: , isc_fs_rpt_util_pkg.G_SEVERITY, 'Y'
809: );
810:
811: isc_fs_rpt_util_pkg.process_parameters
804: , l_dim_filter_map
805: , isc_fs_rpt_util_pkg.G_SR_TYPE, 'N'
806: , isc_fs_rpt_util_pkg.G_SR_STATUS, 'N'
807: , isc_fs_rpt_util_pkg.G_SR_OWNER, 'N'
808: , isc_fs_rpt_util_pkg.G_SEVERITY, 'Y'
809: );
810:
811: isc_fs_rpt_util_pkg.process_parameters
812: ( p_param => p_param
807: , isc_fs_rpt_util_pkg.G_SR_OWNER, 'N'
808: , isc_fs_rpt_util_pkg.G_SEVERITY, 'Y'
809: );
810:
811: isc_fs_rpt_util_pkg.process_parameters
812: ( p_param => p_param
813: , p_dimension_tbl => l_dimension_tbl
814: , p_dim_filter_map => l_dim_filter_map
815: , p_trend => 'D'
829: , l_dim_bmap
830: , l_custom_output
831: );
832:
833: l_order_by := isc_fs_rpt_util_pkg.get_parameter_value
834: ( p_param
835: , 'ORDERBY'
836: );
837:
852: when g_dual_view_by = 'Y' then
853: ', actual_start_date asc, actual_end_date asc, task_number'
854: end;
855:
856: isc_fs_rpt_util_pkg.add_detail_column
857: ( p_detail_col_tbl => l_detail_col_tbl
858: , p_dimension_tbl => l_dimension_tbl
859: , p_fact_col_name => 'source_object_name'
860: , p_fact_col_total => 'N'
860: , p_fact_col_total => 'N'
861: , p_column_key => 'source_object_name'
862: );
863:
864: isc_fs_rpt_util_pkg.add_detail_column
865: ( p_detail_col_tbl => l_detail_col_tbl
866: , p_dimension_tbl => l_dimension_tbl
867: , p_fact_col_name => 'source_object_id'
868: , p_fact_col_total => 'N'
870: );
871:
872: if g_dual_view_by = 'Y' then
873:
874: isc_fs_rpt_util_pkg.add_detail_column
875: ( p_detail_col_tbl => l_detail_col_tbl
876: , p_dimension_tbl => l_dimension_tbl
877: , p_fact_col_name => 'task_number'
878: , p_fact_col_total => 'N'
878: , p_fact_col_total => 'N'
879: , p_column_key => 'task_number'
880: );
881:
882: isc_fs_rpt_util_pkg.add_detail_column
883: ( p_detail_col_tbl => l_detail_col_tbl
884: , p_dimension_tbl => l_dimension_tbl
885: , p_fact_col_name => 'task_id'
886: , p_fact_col_total => 'N'
886: , p_fact_col_total => 'N'
887: , p_column_key => 'task_id'
888: );
889:
890: isc_fs_rpt_util_pkg.add_detail_column
891: ( p_detail_col_tbl => l_detail_col_tbl
892: , p_dimension_tbl => l_dimension_tbl
893: , p_dimension_level => isc_fs_rpt_util_pkg.G_TASK_STATUS
894: , p_column_key => 'task_status'
889:
890: isc_fs_rpt_util_pkg.add_detail_column
891: ( p_detail_col_tbl => l_detail_col_tbl
892: , p_dimension_tbl => l_dimension_tbl
893: , p_dimension_level => isc_fs_rpt_util_pkg.G_TASK_STATUS
894: , p_column_key => 'task_status'
895: );
896:
897: isc_fs_rpt_util_pkg.add_detail_column
893: , p_dimension_level => isc_fs_rpt_util_pkg.G_TASK_STATUS
894: , p_column_key => 'task_status'
895: );
896:
897: isc_fs_rpt_util_pkg.add_detail_column
898: ( p_detail_col_tbl => l_detail_col_tbl
899: , p_dimension_tbl => l_dimension_tbl
900: , p_dimension_level => isc_fs_rpt_util_pkg.G_TASK_TYPE
901: , p_column_key => 'task_type'
896:
897: isc_fs_rpt_util_pkg.add_detail_column
898: ( p_detail_col_tbl => l_detail_col_tbl
899: , p_dimension_tbl => l_dimension_tbl
900: , p_dimension_level => isc_fs_rpt_util_pkg.G_TASK_TYPE
901: , p_column_key => 'task_type'
902: );
903:
904: isc_fs_rpt_util_pkg.add_detail_column
900: , p_dimension_level => isc_fs_rpt_util_pkg.G_TASK_TYPE
901: , p_column_key => 'task_type'
902: );
903:
904: isc_fs_rpt_util_pkg.add_detail_column
905: ( p_detail_col_tbl => l_detail_col_tbl
906: , p_dimension_tbl => l_dimension_tbl
907: , p_dimension_level => isc_fs_rpt_util_pkg.G_TASK_OWNER
908: , p_column_key => 'task_owner'
903:
904: isc_fs_rpt_util_pkg.add_detail_column
905: ( p_detail_col_tbl => l_detail_col_tbl
906: , p_dimension_tbl => l_dimension_tbl
907: , p_dimension_level => isc_fs_rpt_util_pkg.G_TASK_OWNER
908: , p_column_key => 'task_owner'
909: );
910:
911: isc_fs_rpt_util_pkg.add_detail_column
907: , p_dimension_level => isc_fs_rpt_util_pkg.G_TASK_OWNER
908: , p_column_key => 'task_owner'
909: );
910:
911: isc_fs_rpt_util_pkg.add_detail_column
912: ( p_detail_col_tbl => l_detail_col_tbl
913: , p_dimension_tbl => l_dimension_tbl
914: , p_dimension_level => isc_fs_rpt_util_pkg.G_TASK_ASSIGNEE
915: , p_column_key => 'task_assignee'
910:
911: isc_fs_rpt_util_pkg.add_detail_column
912: ( p_detail_col_tbl => l_detail_col_tbl
913: , p_dimension_tbl => l_dimension_tbl
914: , p_dimension_level => isc_fs_rpt_util_pkg.G_TASK_ASSIGNEE
915: , p_column_key => 'task_assignee'
916: );
917:
918: isc_fs_rpt_util_pkg.add_detail_column
914: , p_dimension_level => isc_fs_rpt_util_pkg.G_TASK_ASSIGNEE
915: , p_column_key => 'task_assignee'
916: );
917:
918: isc_fs_rpt_util_pkg.add_detail_column
919: ( p_detail_col_tbl => l_detail_col_tbl
920: , p_dimension_tbl => l_dimension_tbl
921: , p_fact_col_name => 'actual_start_date'
922: , p_fact_col_total => 'N'
922: , p_fact_col_total => 'N'
923: , p_column_key => 'actual_start_date'
924: );
925:
926: isc_fs_rpt_util_pkg.add_detail_column
927: ( p_detail_col_tbl => l_detail_col_tbl
928: , p_dimension_tbl => l_dimension_tbl
929: , p_fact_col_name => 'actual_end_date'
930: , p_fact_col_total => 'N'
930: , p_fact_col_total => 'N'
931: , p_column_key => 'actual_end_date'
932: );
933:
934: isc_fs_rpt_util_pkg.add_detail_column
935: ( p_detail_col_tbl => l_detail_col_tbl
936: , p_dimension_tbl => l_dimension_tbl
937: , p_fact_col_name => 'actual_effort_hrs'
938: , p_fact_col_total => 'Y'
940: );
941:
942: else
943:
944: isc_fs_rpt_util_pkg.add_detail_column
945: ( p_detail_col_tbl => l_detail_col_tbl
946: , p_dimension_tbl => l_dimension_tbl
947: , p_dimension_level => isc_fs_rpt_util_pkg.G_SR_STATUS
948: , p_column_key => 'sr_status'
943:
944: isc_fs_rpt_util_pkg.add_detail_column
945: ( p_detail_col_tbl => l_detail_col_tbl
946: , p_dimension_tbl => l_dimension_tbl
947: , p_dimension_level => isc_fs_rpt_util_pkg.G_SR_STATUS
948: , p_column_key => 'sr_status'
949: );
950:
951: isc_fs_rpt_util_pkg.add_detail_column
947: , p_dimension_level => isc_fs_rpt_util_pkg.G_SR_STATUS
948: , p_column_key => 'sr_status'
949: );
950:
951: isc_fs_rpt_util_pkg.add_detail_column
952: ( p_detail_col_tbl => l_detail_col_tbl
953: , p_dimension_tbl => l_dimension_tbl
954: , p_dimension_level => isc_fs_rpt_util_pkg.G_SR_TYPE
955: , p_column_key => 'sr_type'
950:
951: isc_fs_rpt_util_pkg.add_detail_column
952: ( p_detail_col_tbl => l_detail_col_tbl
953: , p_dimension_tbl => l_dimension_tbl
954: , p_dimension_level => isc_fs_rpt_util_pkg.G_SR_TYPE
955: , p_column_key => 'sr_type'
956: );
957:
958: isc_fs_rpt_util_pkg.add_detail_column
954: , p_dimension_level => isc_fs_rpt_util_pkg.G_SR_TYPE
955: , p_column_key => 'sr_type'
956: );
957:
958: isc_fs_rpt_util_pkg.add_detail_column
959: ( p_detail_col_tbl => l_detail_col_tbl
960: , p_dimension_tbl => l_dimension_tbl
961: , p_dimension_level => isc_fs_rpt_util_pkg.G_SR_OWNER
962: , p_column_key => 'sr_owner'
957:
958: isc_fs_rpt_util_pkg.add_detail_column
959: ( p_detail_col_tbl => l_detail_col_tbl
960: , p_dimension_tbl => l_dimension_tbl
961: , p_dimension_level => isc_fs_rpt_util_pkg.G_SR_OWNER
962: , p_column_key => 'sr_owner'
963: );
964:
965: isc_fs_rpt_util_pkg.add_detail_column
961: , p_dimension_level => isc_fs_rpt_util_pkg.G_SR_OWNER
962: , p_column_key => 'sr_owner'
963: );
964:
965: isc_fs_rpt_util_pkg.add_detail_column
966: ( p_detail_col_tbl => l_detail_col_tbl
967: , p_dimension_tbl => l_dimension_tbl
968: , p_fact_col_name => 'report_date'
969: , p_fact_col_total => 'N'
971: );
972:
973: end if;
974:
975: isc_fs_rpt_util_pkg.add_detail_column
976: ( p_detail_col_tbl => l_detail_col_tbl
977: , p_dimension_tbl => l_dimension_tbl
978: , p_dimension_level => isc_fs_rpt_util_pkg.G_PRODUCT
979: , p_column_key => 'product'
974:
975: isc_fs_rpt_util_pkg.add_detail_column
976: ( p_detail_col_tbl => l_detail_col_tbl
977: , p_dimension_tbl => l_dimension_tbl
978: , p_dimension_level => isc_fs_rpt_util_pkg.G_PRODUCT
979: , p_column_key => 'product'
980: );
981:
982: isc_fs_rpt_util_pkg.add_detail_column
978: , p_dimension_level => isc_fs_rpt_util_pkg.G_PRODUCT
979: , p_column_key => 'product'
980: );
981:
982: isc_fs_rpt_util_pkg.add_detail_column
983: ( p_detail_col_tbl => l_detail_col_tbl
984: , p_dimension_tbl => l_dimension_tbl
985: , p_dimension_level => isc_fs_rpt_util_pkg.G_CUSTOMER
986: , p_column_key => 'customer'
981:
982: isc_fs_rpt_util_pkg.add_detail_column
983: ( p_detail_col_tbl => l_detail_col_tbl
984: , p_dimension_tbl => l_dimension_tbl
985: , p_dimension_level => isc_fs_rpt_util_pkg.G_CUSTOMER
986: , p_column_key => 'customer'
987: );
988:
989: l_stmt := 'select
992: case
993: when g_dual_view_by = 'Y' then '
994: , oset.task_number EXTRAVIEWBY
995: , oset.task_id EXTRAVIEWBYID
996: , ' || isc_fs_rpt_util_pkg.get_detail_column
997: (l_detail_col_tbl,'task_status','ISC_ATTRIBUTE_1') || '
998: , ' || isc_fs_rpt_util_pkg.get_detail_column
999: (l_detail_col_tbl,'task_type','ISC_ATTRIBUTE_2') || '
1000: , ' || isc_fs_rpt_util_pkg.get_detail_column
994: , oset.task_number EXTRAVIEWBY
995: , oset.task_id EXTRAVIEWBYID
996: , ' || isc_fs_rpt_util_pkg.get_detail_column
997: (l_detail_col_tbl,'task_status','ISC_ATTRIBUTE_1') || '
998: , ' || isc_fs_rpt_util_pkg.get_detail_column
999: (l_detail_col_tbl,'task_type','ISC_ATTRIBUTE_2') || '
1000: , ' || isc_fs_rpt_util_pkg.get_detail_column
1001: (l_detail_col_tbl,'task_owner','ISC_ATTRIBUTE_3') || '
1002: , ' || isc_fs_rpt_util_pkg.get_detail_column
996: , ' || isc_fs_rpt_util_pkg.get_detail_column
997: (l_detail_col_tbl,'task_status','ISC_ATTRIBUTE_1') || '
998: , ' || isc_fs_rpt_util_pkg.get_detail_column
999: (l_detail_col_tbl,'task_type','ISC_ATTRIBUTE_2') || '
1000: , ' || isc_fs_rpt_util_pkg.get_detail_column
1001: (l_detail_col_tbl,'task_owner','ISC_ATTRIBUTE_3') || '
1002: , ' || isc_fs_rpt_util_pkg.get_detail_column
1003: (l_detail_col_tbl,'task_assignee','ISC_ATTRIBUTE_4') || '
1004: , oset.actual_start_date ISC_MEASURE_1
998: , ' || isc_fs_rpt_util_pkg.get_detail_column
999: (l_detail_col_tbl,'task_type','ISC_ATTRIBUTE_2') || '
1000: , ' || isc_fs_rpt_util_pkg.get_detail_column
1001: (l_detail_col_tbl,'task_owner','ISC_ATTRIBUTE_3') || '
1002: , ' || isc_fs_rpt_util_pkg.get_detail_column
1003: (l_detail_col_tbl,'task_assignee','ISC_ATTRIBUTE_4') || '
1004: , oset.actual_start_date ISC_MEASURE_1
1005: , oset.actual_end_date ISC_MEASURE_2
1006: , oset.actual_effort_hrs ISC_MEASURE_3
1008: else '
1009: , null EXTRAVIEWBY
1010: , null EXTRAVIEWBYID
1011: , ' || -- biv_dbi_resolution_sum_f does not currently provide incident_status_id
1012: -- isc_fs_rpt_util_pkg.get_detail_column
1013: -- (l_detail_col_tbl,'sr_status','ISC_ATTRIBUTE_1') || '
1014: 'null ISC_ATTRIBUTE_1' || '
1015: , ' || isc_fs_rpt_util_pkg.get_detail_column
1016: (l_detail_col_tbl,'sr_type','ISC_ATTRIBUTE_2') || '
1011: , ' || -- biv_dbi_resolution_sum_f does not currently provide incident_status_id
1012: -- isc_fs_rpt_util_pkg.get_detail_column
1013: -- (l_detail_col_tbl,'sr_status','ISC_ATTRIBUTE_1') || '
1014: 'null ISC_ATTRIBUTE_1' || '
1015: , ' || isc_fs_rpt_util_pkg.get_detail_column
1016: (l_detail_col_tbl,'sr_type','ISC_ATTRIBUTE_2') || '
1017: , ' || isc_fs_rpt_util_pkg.get_detail_column
1018: (l_detail_col_tbl,'sr_owner','ISC_ATTRIBUTE_3') || '
1019: , null ISC_ATTRIBUTE_4
1013: -- (l_detail_col_tbl,'sr_status','ISC_ATTRIBUTE_1') || '
1014: 'null ISC_ATTRIBUTE_1' || '
1015: , ' || isc_fs_rpt_util_pkg.get_detail_column
1016: (l_detail_col_tbl,'sr_type','ISC_ATTRIBUTE_2') || '
1017: , ' || isc_fs_rpt_util_pkg.get_detail_column
1018: (l_detail_col_tbl,'sr_owner','ISC_ATTRIBUTE_3') || '
1019: , null ISC_ATTRIBUTE_4
1020: , null ISC_MEASURE_1
1021: , null ISC_MEASURE_2
1021: , null ISC_MEASURE_2
1022: , null ISC_MEASURE_3
1023: , oset.report_date ISC_MEASURE_4'
1024: end || '
1025: , ' || isc_fs_rpt_util_pkg.get_detail_column
1026: (l_detail_col_tbl,'product','ISC_ATTRIBUTE_5') || '
1027: , ' || isc_fs_rpt_util_pkg.get_detail_column
1028: (l_detail_col_tbl,'customer','ISC_ATTRIBUTE_6') ||
1029: case
1023: , oset.report_date ISC_MEASURE_4'
1024: end || '
1025: , ' || isc_fs_rpt_util_pkg.get_detail_column
1026: (l_detail_col_tbl,'product','ISC_ATTRIBUTE_5') || '
1027: , ' || isc_fs_rpt_util_pkg.get_detail_column
1028: (l_detail_col_tbl,'customer','ISC_ATTRIBUTE_6') ||
1029: case
1030: when g_dual_view_by = 'Y' then '
1031: , oset.actual_effort_hrs_total'
1031: , oset.actual_effort_hrs_total'
1032: else '
1033: , null'
1034: end || ' ISC_MEASURE_23
1035: , ' || isc_fs_rpt_util_pkg.get_sr_detail_page_function('oset.source_object_id') || ' ISC_ATTRIBUTE_12' ||
1036: case
1037: when g_dual_view_by = 'Y' then '
1038: , ' || isc_fs_rpt_util_pkg.get_task_detail_page_function('oset.task_id') || ' ISC_ATTRIBUTE_13'
1039: else '
1034: end || ' ISC_MEASURE_23
1035: , ' || isc_fs_rpt_util_pkg.get_sr_detail_page_function('oset.source_object_id') || ' ISC_ATTRIBUTE_12' ||
1036: case
1037: when g_dual_view_by = 'Y' then '
1038: , ' || isc_fs_rpt_util_pkg.get_task_detail_page_function('oset.task_id') || ' ISC_ATTRIBUTE_13'
1039: else '
1040: , null ISC_ATTRIBUTE_13'
1041: end || '
1042: from
1039: else '
1040: , null ISC_ATTRIBUTE_13'
1041: end || '
1042: from
1043: ' || isc_fs_rpt_util_pkg.detail_sql
1044: ( p_detail_col_tbl => l_detail_col_tbl
1045: , p_dimension_tbl => l_dimension_tbl
1046: , p_mv_name => l_mv
1047: , p_where_clause => l_where_clause
1050: );
1051:
1052:
1053: -- the next line can be used to dump the contents of the PMV parameters as comments into stmt
1054: -- l_stmt := l_stmt || isc_fs_rpt_util_pkg.dump_parameters(p_param);
1055:
1056: x_custom_sql := l_stmt;
1057:
1058: x_custom_output := l_custom_output;