163: l_pre_start := FII_TIME_API.ent_pper_start(l_cur_start); -- get the previous month
164: l_pre_end := FII_TIME_API.ent_pper_end(l_cur_end); -- get the previous month
165:
166:
167: l_custom_rec := BIS_PMV_PARAMETERS_PUB.INITIALIZE_QUERY_TYPE;
168: x_custom_output := BIS_QUERY_ATTRIBUTES_TBL();
169:
170: IF (l_plan IS NULL OR l_plan2 IS NULL)
171: THEN l_stmt := '
249: x_custom_sql := l_stmt;
250:
251: l_custom_rec.attribute_name := ':ISC_PERIOD_TYPE_ID';
252: l_custom_rec.attribute_value := to_char(l_period_type_id);
253: l_custom_Rec.attribute_type := BIS_PMV_PARAMETERS_PUB.BIND_TYPE;
254: l_custom_Rec.attribute_data_type := BIS_PMV_PARAMETERS_PUB.INTEGER_BIND;
255: x_custom_output.EXTEND;
256: x_custom_output(1) := l_custom_rec;
257:
250:
251: l_custom_rec.attribute_name := ':ISC_PERIOD_TYPE_ID';
252: l_custom_rec.attribute_value := to_char(l_period_type_id);
253: l_custom_Rec.attribute_type := BIS_PMV_PARAMETERS_PUB.BIND_TYPE;
254: l_custom_Rec.attribute_data_type := BIS_PMV_PARAMETERS_PUB.INTEGER_BIND;
255: x_custom_output.EXTEND;
256: x_custom_output(1) := l_custom_rec;
257:
258: l_custom_rec.attribute_name := ':ISC_CUR_START';
256: x_custom_output(1) := l_custom_rec;
257:
258: l_custom_rec.attribute_name := ':ISC_CUR_START';
259: l_custom_rec.attribute_value := to_char(l_cur_start,'DD/MM/YYYY');
260: l_custom_Rec.attribute_type := BIS_PMV_PARAMETERS_PUB.BIND_TYPE;
261: l_custom_Rec.attribute_data_type := BIS_PMV_PARAMETERS_PUB.DATE_BIND;
262: x_custom_output.EXTEND;
263: x_custom_output(2) := l_custom_rec;
264:
257:
258: l_custom_rec.attribute_name := ':ISC_CUR_START';
259: l_custom_rec.attribute_value := to_char(l_cur_start,'DD/MM/YYYY');
260: l_custom_Rec.attribute_type := BIS_PMV_PARAMETERS_PUB.BIND_TYPE;
261: l_custom_Rec.attribute_data_type := BIS_PMV_PARAMETERS_PUB.DATE_BIND;
262: x_custom_output.EXTEND;
263: x_custom_output(2) := l_custom_rec;
264:
265: l_custom_rec.attribute_name := ':ISC_CUR_END';
263: x_custom_output(2) := l_custom_rec;
264:
265: l_custom_rec.attribute_name := ':ISC_CUR_END';
266: l_custom_rec.attribute_value := to_char(l_cur_end,'DD/MM/YYYY');
267: l_custom_Rec.attribute_type := BIS_PMV_PARAMETERS_PUB.BIND_TYPE;
268: l_custom_Rec.attribute_data_type := BIS_PMV_PARAMETERS_PUB.DATE_BIND;
269: x_custom_output.EXTEND;
270: x_custom_output(3) := l_custom_rec;
271:
264:
265: l_custom_rec.attribute_name := ':ISC_CUR_END';
266: l_custom_rec.attribute_value := to_char(l_cur_end,'DD/MM/YYYY');
267: l_custom_Rec.attribute_type := BIS_PMV_PARAMETERS_PUB.BIND_TYPE;
268: l_custom_Rec.attribute_data_type := BIS_PMV_PARAMETERS_PUB.DATE_BIND;
269: x_custom_output.EXTEND;
270: x_custom_output(3) := l_custom_rec;
271:
272: l_custom_rec.attribute_name := ':ISC_PRE_START';
270: x_custom_output(3) := l_custom_rec;
271:
272: l_custom_rec.attribute_name := ':ISC_PRE_START';
273: l_custom_rec.attribute_value := to_char(l_pre_start,'DD/MM/YYYY');
274: l_custom_Rec.attribute_type := BIS_PMV_PARAMETERS_PUB.BIND_TYPE;
275: l_custom_Rec.attribute_data_type := BIS_PMV_PARAMETERS_PUB.DATE_BIND;
276: x_custom_output.EXTEND;
277: x_custom_output(4) := l_custom_rec;
278:
271:
272: l_custom_rec.attribute_name := ':ISC_PRE_START';
273: l_custom_rec.attribute_value := to_char(l_pre_start,'DD/MM/YYYY');
274: l_custom_Rec.attribute_type := BIS_PMV_PARAMETERS_PUB.BIND_TYPE;
275: l_custom_Rec.attribute_data_type := BIS_PMV_PARAMETERS_PUB.DATE_BIND;
276: x_custom_output.EXTEND;
277: x_custom_output(4) := l_custom_rec;
278:
279: l_custom_rec.attribute_name := ':ISC_PRE_END';
277: x_custom_output(4) := l_custom_rec;
278:
279: l_custom_rec.attribute_name := ':ISC_PRE_END';
280: l_custom_rec.attribute_value := to_char(l_pre_end,'DD/MM/YYYY');
281: l_custom_Rec.attribute_type := BIS_PMV_PARAMETERS_PUB.BIND_TYPE;
282: l_custom_Rec.attribute_data_type := BIS_PMV_PARAMETERS_PUB.DATE_BIND;
283: x_custom_output.EXTEND;
284: x_custom_output(5) := l_custom_rec;
285:
278:
279: l_custom_rec.attribute_name := ':ISC_PRE_END';
280: l_custom_rec.attribute_value := to_char(l_pre_end,'DD/MM/YYYY');
281: l_custom_Rec.attribute_type := BIS_PMV_PARAMETERS_PUB.BIND_TYPE;
282: l_custom_Rec.attribute_data_type := BIS_PMV_PARAMETERS_PUB.DATE_BIND;
283: x_custom_output.EXTEND;
284: x_custom_output(5) := l_custom_rec;
285:
286: l_custom_rec.attribute_name := ':ISC_ITEM_CAT_FLAG';
284: x_custom_output(5) := l_custom_rec;
285:
286: l_custom_rec.attribute_name := ':ISC_ITEM_CAT_FLAG';
287: l_custom_rec.attribute_value := to_char(l_item_cat_flag);
288: l_custom_Rec.attribute_type := BIS_PMV_PARAMETERS_PUB.BIND_TYPE;
289: l_custom_Rec.attribute_data_type := BIS_PMV_PARAMETERS_PUB.INTEGER_BIND;
290: x_custom_output.EXTEND;
291: x_custom_output(6) := l_custom_rec;
292:
285:
286: l_custom_rec.attribute_name := ':ISC_ITEM_CAT_FLAG';
287: l_custom_rec.attribute_value := to_char(l_item_cat_flag);
288: l_custom_Rec.attribute_type := BIS_PMV_PARAMETERS_PUB.BIND_TYPE;
289: l_custom_Rec.attribute_data_type := BIS_PMV_PARAMETERS_PUB.INTEGER_BIND;
290: x_custom_output.EXTEND;
291: x_custom_output(6) := l_custom_rec;
292:
293: l_custom_rec.attribute_name := ':ISC_UNION_FLAG';
291: x_custom_output(6) := l_custom_rec;
292:
293: l_custom_rec.attribute_name := ':ISC_UNION_FLAG';
294: l_custom_rec.attribute_value := to_char(l_union_flag);
295: l_custom_Rec.attribute_type := BIS_PMV_PARAMETERS_PUB.BIND_TYPE;
296: l_custom_Rec.attribute_data_type := BIS_PMV_PARAMETERS_PUB.INTEGER_BIND;
297: x_custom_output.EXTEND;
298: x_custom_output(7) := l_custom_rec;
299:
292:
293: l_custom_rec.attribute_name := ':ISC_UNION_FLAG';
294: l_custom_rec.attribute_value := to_char(l_union_flag);
295: l_custom_Rec.attribute_type := BIS_PMV_PARAMETERS_PUB.BIND_TYPE;
296: l_custom_Rec.attribute_data_type := BIS_PMV_PARAMETERS_PUB.INTEGER_BIND;
297: x_custom_output.EXTEND;
298: x_custom_output(7) := l_custom_rec;
299:
300: l_custom_rec.attribute_name := BIS_PMV_PARAMETERS_PUB.VIEW_BY_VALUE;
296: l_custom_Rec.attribute_data_type := BIS_PMV_PARAMETERS_PUB.INTEGER_BIND;
297: x_custom_output.EXTEND;
298: x_custom_output(7) := l_custom_rec;
299:
300: l_custom_rec.attribute_name := BIS_PMV_PARAMETERS_PUB.VIEW_BY_VALUE;
301: l_custom_rec.attribute_value := 'TIME+'||l_period_type;
302: l_custom_rec.attribute_type := BIS_PMV_PARAMETERS_PUB.VIEW_BY_TYPE;
303: x_custom_output.EXTEND;
304: x_custom_output(8) := l_custom_rec;
298: x_custom_output(7) := l_custom_rec;
299:
300: l_custom_rec.attribute_name := BIS_PMV_PARAMETERS_PUB.VIEW_BY_VALUE;
301: l_custom_rec.attribute_value := 'TIME+'||l_period_type;
302: l_custom_rec.attribute_type := BIS_PMV_PARAMETERS_PUB.VIEW_BY_TYPE;
303: x_custom_output.EXTEND;
304: x_custom_output(8) := l_custom_rec;
305:
306: l_custom_rec.attribute_name := ':ISC_MON_NUM';
304: x_custom_output(8) := l_custom_rec;
305:
306: l_custom_rec.attribute_name := ':ISC_MON_NUM';
307: l_custom_rec.attribute_value := to_char(l_mon_num);
308: l_custom_Rec.attribute_type := BIS_PMV_PARAMETERS_PUB.BIND_TYPE;
309: l_custom_Rec.attribute_data_type := BIS_PMV_PARAMETERS_PUB.INTEGER_BIND;
310: x_custom_output.EXTEND;
311: x_custom_output(9) := l_custom_rec;
312:
305:
306: l_custom_rec.attribute_name := ':ISC_MON_NUM';
307: l_custom_rec.attribute_value := to_char(l_mon_num);
308: l_custom_Rec.attribute_type := BIS_PMV_PARAMETERS_PUB.BIND_TYPE;
309: l_custom_Rec.attribute_data_type := BIS_PMV_PARAMETERS_PUB.INTEGER_BIND;
310: x_custom_output.EXTEND;
311: x_custom_output(9) := l_custom_rec;
312:
313: END get_sql;