159:
160:
161: l_lang := USERENV('LANG');
162:
163: l_custom_rec := BIS_PMV_PARAMETERS_PUB.Initialize_Query_Type;
164: x_custom_output := BIS_QUERY_ATTRIBUTES_TBL();
165:
166: IF (l_plan IS NULL OR l_plan2 IS NULL)
167: THEN l_stmt := '
326: x_custom_sql := l_stmt;
327:
328: l_custom_rec.attribute_name := ':ISC_LANG';
329: l_custom_rec.attribute_value := l_lang;
330: l_custom_rec.attribute_type := bis_pmv_parameters_pub.bind_type;
331: l_custom_rec.attribute_data_type := bis_pmv_parameters_pub.varchar2_bind;
332: x_custom_output.extend;
333: x_custom_output(1) := l_custom_rec;
334:
327:
328: l_custom_rec.attribute_name := ':ISC_LANG';
329: l_custom_rec.attribute_value := l_lang;
330: l_custom_rec.attribute_type := bis_pmv_parameters_pub.bind_type;
331: l_custom_rec.attribute_data_type := bis_pmv_parameters_pub.varchar2_bind;
332: x_custom_output.extend;
333: x_custom_output(1) := l_custom_rec;
334:
335: l_custom_rec.attribute_name := ':ISC_PERIOD_TYPE_ID';
333: x_custom_output(1) := l_custom_rec;
334:
335: l_custom_rec.attribute_name := ':ISC_PERIOD_TYPE_ID';
336: l_custom_rec.attribute_value := to_char(l_period_type_id);
337: l_custom_rec.attribute_type := bis_pmv_parameters_pub.bind_type;
338: l_custom_rec.attribute_data_type := bis_pmv_parameters_pub.integer_bind;
339: x_custom_output.extend;
340: x_custom_output(2) := l_custom_rec;
341:
334:
335: l_custom_rec.attribute_name := ':ISC_PERIOD_TYPE_ID';
336: l_custom_rec.attribute_value := to_char(l_period_type_id);
337: l_custom_rec.attribute_type := bis_pmv_parameters_pub.bind_type;
338: l_custom_rec.attribute_data_type := bis_pmv_parameters_pub.integer_bind;
339: x_custom_output.extend;
340: x_custom_output(2) := l_custom_rec;
341:
342: l_custom_rec.attribute_name := ':ISC_TIME_FROM';
340: x_custom_output(2) := l_custom_rec;
341:
342: l_custom_rec.attribute_name := ':ISC_TIME_FROM';
343: l_custom_rec.attribute_value := to_char(l_time_from,'DD/MM/YYYY');
344: l_custom_rec.attribute_type := bis_pmv_parameters_pub.bind_type;
345: l_custom_rec.attribute_data_type := bis_pmv_parameters_pub.date_bind;
346: x_custom_output.extend;
347: x_custom_output(3) := l_custom_rec;
348:
341:
342: l_custom_rec.attribute_name := ':ISC_TIME_FROM';
343: l_custom_rec.attribute_value := to_char(l_time_from,'DD/MM/YYYY');
344: l_custom_rec.attribute_type := bis_pmv_parameters_pub.bind_type;
345: l_custom_rec.attribute_data_type := bis_pmv_parameters_pub.date_bind;
346: x_custom_output.extend;
347: x_custom_output(3) := l_custom_rec;
348:
349: l_custom_rec.attribute_name := ':ISC_ITEM_CAT_FLAG';
347: x_custom_output(3) := l_custom_rec;
348:
349: l_custom_rec.attribute_name := ':ISC_ITEM_CAT_FLAG';
350: l_custom_rec.attribute_value := to_char(l_item_cat_flag);
351: l_custom_rec.attribute_type := bis_pmv_parameters_pub.bind_type;
352: l_custom_rec.attribute_data_type := bis_pmv_parameters_pub.integer_bind;
353: x_custom_output.extend;
354: x_custom_output(4) := l_custom_rec;
355:
348:
349: l_custom_rec.attribute_name := ':ISC_ITEM_CAT_FLAG';
350: l_custom_rec.attribute_value := to_char(l_item_cat_flag);
351: l_custom_rec.attribute_type := bis_pmv_parameters_pub.bind_type;
352: l_custom_rec.attribute_data_type := bis_pmv_parameters_pub.integer_bind;
353: x_custom_output.extend;
354: x_custom_output(4) := l_custom_rec;
355:
356: l_custom_rec.attribute_name := ':ISC_UNION1_FLAG';
354: x_custom_output(4) := l_custom_rec;
355:
356: l_custom_rec.attribute_name := ':ISC_UNION1_FLAG';
357: l_custom_rec.attribute_value := to_char(l_union1_flag);
358: l_custom_rec.attribute_type := BIS_PMV_PARAMETERS_PUB.Bind_Type;
359: l_custom_rec.attribute_data_type := BIS_PMV_PARAMETERS_PUB.Integer_Bind;
360: x_custom_output.extend;
361: x_custom_output(5) := l_custom_rec;
362:
355:
356: l_custom_rec.attribute_name := ':ISC_UNION1_FLAG';
357: l_custom_rec.attribute_value := to_char(l_union1_flag);
358: l_custom_rec.attribute_type := BIS_PMV_PARAMETERS_PUB.Bind_Type;
359: l_custom_rec.attribute_data_type := BIS_PMV_PARAMETERS_PUB.Integer_Bind;
360: x_custom_output.extend;
361: x_custom_output(5) := l_custom_rec;
362:
363: END Get_Sql;