190: END IF;
191:
192: -- prepare output for bind variables
193: x_custom_output := BIS_QUERY_ATTRIBUTES_TBL();
194: l_custom_rec := BIS_PMV_PARAMETERS_PUB.INITIALIZE_QUERY_TYPE;
195:
196: -- set the basic bind variables for the status SQL
197: poa_dbi_util_pkg.get_custom_status_binds (x_custom_output);
198: poa_dbi_util_pkg.get_custom_rolling_binds(x_custom_output,l_xtd);
201: IF (l_view_by <> 'ORGANIZATION+ORGANIZATION_SUBINVENTORY'
202: AND l_where_clause2 NOT LIKE '%fact.subinventory%') THEN
203: l_custom_rec.attribute_name := ':ISC_AGG_FLAG2';
204: l_custom_rec.attribute_value := l_aggregation_level_flag1;
205: l_custom_rec.attribute_type := BIS_PMV_PARAMETERS_PUB.BIND_TYPE;
206: l_custom_rec.attribute_data_type := BIS_PMV_PARAMETERS_PUB.INTEGER_BIND;
207: x_custom_output.extend;
208: x_custom_output(x_custom_output.count) := l_custom_rec;
209: END IF;
202: AND l_where_clause2 NOT LIKE '%fact.subinventory%') THEN
203: l_custom_rec.attribute_name := ':ISC_AGG_FLAG2';
204: l_custom_rec.attribute_value := l_aggregation_level_flag1;
205: l_custom_rec.attribute_type := BIS_PMV_PARAMETERS_PUB.BIND_TYPE;
206: l_custom_rec.attribute_data_type := BIS_PMV_PARAMETERS_PUB.INTEGER_BIND;
207: x_custom_output.extend;
208: x_custom_output(x_custom_output.count) := l_custom_rec;
209: END IF;
210:
209: END IF;
210:
211: l_custom_rec.attribute_name := ':ISC_AGG_FLAG';
212: l_custom_rec.attribute_value := l_aggregation_level_flag2;
213: l_custom_rec.attribute_type := BIS_PMV_PARAMETERS_PUB.BIND_TYPE;
214: l_custom_rec.attribute_data_type := BIS_PMV_PARAMETERS_PUB.INTEGER_BIND;
215: x_custom_output.extend;
216: x_custom_output(x_custom_output.count) := l_custom_rec;
217:
210:
211: l_custom_rec.attribute_name := ':ISC_AGG_FLAG';
212: l_custom_rec.attribute_value := l_aggregation_level_flag2;
213: l_custom_rec.attribute_type := BIS_PMV_PARAMETERS_PUB.BIND_TYPE;
214: l_custom_rec.attribute_data_type := BIS_PMV_PARAMETERS_PUB.INTEGER_BIND;
215: x_custom_output.extend;
216: x_custom_output(x_custom_output.count) := l_custom_rec;
217:
218: x_custom_sql := l_query;