26: --
27: BEGIN
28: --
29: /* Initialize table/record variables */
30: l_custom_rec := BIS_PMV_PARAMETERS_PUB.Initialize_Query_Type;
31: x_custom_output := BIS_QUERY_ATTRIBUTES_TBL();
32:
33: /* Get security clause for Manager based security */
34: l_security_clause := hri_oltp_pmv_util_pkg.get_security_clause('MGR');
89: x_custom_sql := l_sqltext;
90:
91: l_custom_rec.attribute_name := ':TIME_PERIOD_TYPE';
92: l_custom_rec.attribute_value := l_parameter_rec.page_period_type;
93: l_custom_Rec.attribute_type := bis_pmv_parameters_pub.bind_type;
94: l_custom_rec.attribute_data_type := bis_pmv_parameters_pub.varchar2_bind;
95: x_custom_output.extend;
96: x_custom_output(1) := l_custom_rec;
97:
90:
91: l_custom_rec.attribute_name := ':TIME_PERIOD_TYPE';
92: l_custom_rec.attribute_value := l_parameter_rec.page_period_type;
93: l_custom_Rec.attribute_type := bis_pmv_parameters_pub.bind_type;
94: l_custom_rec.attribute_data_type := bis_pmv_parameters_pub.varchar2_bind;
95: x_custom_output.extend;
96: x_custom_output(1) := l_custom_rec;
97:
98: l_custom_rec.attribute_name := ':TIME_COMPARISON_TYPE';
96: x_custom_output(1) := l_custom_rec;
97:
98: l_custom_rec.attribute_name := ':TIME_COMPARISON_TYPE';
99: l_custom_rec.attribute_value := l_parameter_rec.time_comparison_type;
100: l_custom_Rec.attribute_type := bis_pmv_parameters_pub.bind_type;
101: l_custom_rec.attribute_data_type := bis_pmv_parameters_pub.varchar2_bind;
102: x_custom_output.extend;
103: x_custom_output(2) := l_custom_rec;
104:
97:
98: l_custom_rec.attribute_name := ':TIME_COMPARISON_TYPE';
99: l_custom_rec.attribute_value := l_parameter_rec.time_comparison_type;
100: l_custom_Rec.attribute_type := bis_pmv_parameters_pub.bind_type;
101: l_custom_rec.attribute_data_type := bis_pmv_parameters_pub.varchar2_bind;
102: x_custom_output.extend;
103: x_custom_output(2) := l_custom_rec;
104:
105: l_custom_rec.attribute_name := ':TIME_PERIOD_NUMBER';
103: x_custom_output(2) := l_custom_rec;
104:
105: l_custom_rec.attribute_name := ':TIME_PERIOD_NUMBER';
106: l_custom_rec.attribute_value := l_previous_periods;
107: l_custom_Rec.attribute_type := bis_pmv_parameters_pub.bind_type;
108: l_custom_rec.attribute_data_type := bis_pmv_parameters_pub.numeric_bind;
109: x_custom_output.extend;
110: x_custom_output(3) := l_custom_rec;
111:
104:
105: l_custom_rec.attribute_name := ':TIME_PERIOD_NUMBER';
106: l_custom_rec.attribute_value := l_previous_periods;
107: l_custom_Rec.attribute_type := bis_pmv_parameters_pub.bind_type;
108: l_custom_rec.attribute_data_type := bis_pmv_parameters_pub.numeric_bind;
109: x_custom_output.extend;
110: x_custom_output(3) := l_custom_rec;
111:
112: l_custom_rec.attribute_name := ':GEO_COUNTRY_CODE1';
110: x_custom_output(3) := l_custom_rec;
111:
112: l_custom_rec.attribute_name := ':GEO_COUNTRY_CODE1';
113: l_custom_rec.attribute_value := l_country_tab(1);
114: l_custom_rec.attribute_type := bis_pmv_parameters_pub.bind_type;
115: l_custom_rec.attribute_data_type := bis_pmv_parameters_pub.varchar2_bind;
116: x_custom_output.extend;
117: x_custom_output(4) := l_custom_rec;
118:
111:
112: l_custom_rec.attribute_name := ':GEO_COUNTRY_CODE1';
113: l_custom_rec.attribute_value := l_country_tab(1);
114: l_custom_rec.attribute_type := bis_pmv_parameters_pub.bind_type;
115: l_custom_rec.attribute_data_type := bis_pmv_parameters_pub.varchar2_bind;
116: x_custom_output.extend;
117: x_custom_output(4) := l_custom_rec;
118:
119: l_custom_rec.attribute_name := ':GEO_COUNTRY_CODE2';
117: x_custom_output(4) := l_custom_rec;
118:
119: l_custom_rec.attribute_name := ':GEO_COUNTRY_CODE2';
120: l_custom_rec.attribute_value := l_country_tab(2);
121: l_custom_rec.attribute_type := bis_pmv_parameters_pub.bind_type;
122: l_custom_rec.attribute_data_type := bis_pmv_parameters_pub.varchar2_bind;
123: x_custom_output.extend;
124: x_custom_output(5) := l_custom_rec;
125:
118:
119: l_custom_rec.attribute_name := ':GEO_COUNTRY_CODE2';
120: l_custom_rec.attribute_value := l_country_tab(2);
121: l_custom_rec.attribute_type := bis_pmv_parameters_pub.bind_type;
122: l_custom_rec.attribute_data_type := bis_pmv_parameters_pub.varchar2_bind;
123: x_custom_output.extend;
124: x_custom_output(5) := l_custom_rec;
125:
126: l_custom_rec.attribute_name := ':GEO_COUNTRY_CODE3';
124: x_custom_output(5) := l_custom_rec;
125:
126: l_custom_rec.attribute_name := ':GEO_COUNTRY_CODE3';
127: l_custom_rec.attribute_value := l_country_tab(3);
128: l_custom_rec.attribute_type := bis_pmv_parameters_pub.bind_type;
129: l_custom_rec.attribute_data_type := bis_pmv_parameters_pub.varchar2_bind;
130: x_custom_output.extend;
131: x_custom_output(6) := l_custom_rec;
132:
125:
126: l_custom_rec.attribute_name := ':GEO_COUNTRY_CODE3';
127: l_custom_rec.attribute_value := l_country_tab(3);
128: l_custom_rec.attribute_type := bis_pmv_parameters_pub.bind_type;
129: l_custom_rec.attribute_data_type := bis_pmv_parameters_pub.varchar2_bind;
130: x_custom_output.extend;
131: x_custom_output(6) := l_custom_rec;
132:
133: l_custom_rec.attribute_name := ':GEO_COUNTRY_CODE4';
131: x_custom_output(6) := l_custom_rec;
132:
133: l_custom_rec.attribute_name := ':GEO_COUNTRY_CODE4';
134: l_custom_rec.attribute_value := l_country_tab(4);
135: l_custom_rec.attribute_type := bis_pmv_parameters_pub.bind_type;
136: l_custom_rec.attribute_data_type := bis_pmv_parameters_pub.varchar2_bind;
137: x_custom_output.extend;
138: x_custom_output(7) := l_custom_rec;
139: END get_sql2;
132:
133: l_custom_rec.attribute_name := ':GEO_COUNTRY_CODE4';
134: l_custom_rec.attribute_value := l_country_tab(4);
135: l_custom_rec.attribute_type := bis_pmv_parameters_pub.bind_type;
136: l_custom_rec.attribute_data_type := bis_pmv_parameters_pub.varchar2_bind;
137: x_custom_output.extend;
138: x_custom_output(7) := l_custom_rec;
139: END get_sql2;
140:
161: --
162: BEGIN
163: --
164: /* Initialize table/record variables */
165: l_custom_rec := BIS_PMV_PARAMETERS_PUB.Initialize_Query_Type;
166: x_custom_output := BIS_QUERY_ATTRIBUTES_TBL();
167:
168: /* Get security clause for Manager based security */
169: l_security_clause := hri_oltp_pmv_util_pkg.get_security_clause('MGR');
234: x_custom_sql := l_sqltext;
235:
236: l_custom_rec.attribute_name := ':TIME_PERIOD_TYPE';
237: l_custom_rec.attribute_value := l_parameter_rec.page_period_type;
238: l_custom_Rec.attribute_type := bis_pmv_parameters_pub.bind_type;
239: l_custom_rec.attribute_data_type := bis_pmv_parameters_pub.varchar2_bind;
240: x_custom_output.extend;
241: x_custom_output(1) := l_custom_rec;
242:
235:
236: l_custom_rec.attribute_name := ':TIME_PERIOD_TYPE';
237: l_custom_rec.attribute_value := l_parameter_rec.page_period_type;
238: l_custom_Rec.attribute_type := bis_pmv_parameters_pub.bind_type;
239: l_custom_rec.attribute_data_type := bis_pmv_parameters_pub.varchar2_bind;
240: x_custom_output.extend;
241: x_custom_output(1) := l_custom_rec;
242:
243: l_custom_rec.attribute_name := ':TIME_COMPARISON_TYPE';
241: x_custom_output(1) := l_custom_rec;
242:
243: l_custom_rec.attribute_name := ':TIME_COMPARISON_TYPE';
244: l_custom_rec.attribute_value := l_parameter_rec.time_comparison_type;
245: l_custom_Rec.attribute_type := bis_pmv_parameters_pub.bind_type;
246: l_custom_rec.attribute_data_type := bis_pmv_parameters_pub.varchar2_bind;
247: x_custom_output.extend;
248: x_custom_output(2) := l_custom_rec;
249:
242:
243: l_custom_rec.attribute_name := ':TIME_COMPARISON_TYPE';
244: l_custom_rec.attribute_value := l_parameter_rec.time_comparison_type;
245: l_custom_Rec.attribute_type := bis_pmv_parameters_pub.bind_type;
246: l_custom_rec.attribute_data_type := bis_pmv_parameters_pub.varchar2_bind;
247: x_custom_output.extend;
248: x_custom_output(2) := l_custom_rec;
249:
250: l_custom_rec.attribute_name := ':TIME_PERIOD_NUMBER';
248: x_custom_output(2) := l_custom_rec;
249:
250: l_custom_rec.attribute_name := ':TIME_PERIOD_NUMBER';
251: l_custom_rec.attribute_value := l_previous_periods;
252: l_custom_Rec.attribute_type := bis_pmv_parameters_pub.bind_type;
253: l_custom_rec.attribute_data_type := bis_pmv_parameters_pub.numeric_bind;
254: x_custom_output.extend;
255: x_custom_output(3) := l_custom_rec;
256:
249:
250: l_custom_rec.attribute_name := ':TIME_PERIOD_NUMBER';
251: l_custom_rec.attribute_value := l_previous_periods;
252: l_custom_Rec.attribute_type := bis_pmv_parameters_pub.bind_type;
253: l_custom_rec.attribute_data_type := bis_pmv_parameters_pub.numeric_bind;
254: x_custom_output.extend;
255: x_custom_output(3) := l_custom_rec;
256:
257: l_custom_rec.attribute_name := ':GEO_COUNTRY_CODE1';
255: x_custom_output(3) := l_custom_rec;
256:
257: l_custom_rec.attribute_name := ':GEO_COUNTRY_CODE1';
258: l_custom_rec.attribute_value := l_country_tab(1);
259: l_custom_rec.attribute_type := bis_pmv_parameters_pub.bind_type;
260: l_custom_rec.attribute_data_type := bis_pmv_parameters_pub.varchar2_bind;
261: x_custom_output.extend;
262: x_custom_output(4) := l_custom_rec;
263:
256:
257: l_custom_rec.attribute_name := ':GEO_COUNTRY_CODE1';
258: l_custom_rec.attribute_value := l_country_tab(1);
259: l_custom_rec.attribute_type := bis_pmv_parameters_pub.bind_type;
260: l_custom_rec.attribute_data_type := bis_pmv_parameters_pub.varchar2_bind;
261: x_custom_output.extend;
262: x_custom_output(4) := l_custom_rec;
263:
264: l_custom_rec.attribute_name := ':GEO_COUNTRY_CODE2';
262: x_custom_output(4) := l_custom_rec;
263:
264: l_custom_rec.attribute_name := ':GEO_COUNTRY_CODE2';
265: l_custom_rec.attribute_value := l_country_tab(2);
266: l_custom_rec.attribute_type := bis_pmv_parameters_pub.bind_type;
267: l_custom_rec.attribute_data_type := bis_pmv_parameters_pub.varchar2_bind;
268: x_custom_output.extend;
269: x_custom_output(5) := l_custom_rec;
270:
263:
264: l_custom_rec.attribute_name := ':GEO_COUNTRY_CODE2';
265: l_custom_rec.attribute_value := l_country_tab(2);
266: l_custom_rec.attribute_type := bis_pmv_parameters_pub.bind_type;
267: l_custom_rec.attribute_data_type := bis_pmv_parameters_pub.varchar2_bind;
268: x_custom_output.extend;
269: x_custom_output(5) := l_custom_rec;
270:
271: l_custom_rec.attribute_name := ':GEO_COUNTRY_CODE3';
269: x_custom_output(5) := l_custom_rec;
270:
271: l_custom_rec.attribute_name := ':GEO_COUNTRY_CODE3';
272: l_custom_rec.attribute_value := l_country_tab(3);
273: l_custom_rec.attribute_type := bis_pmv_parameters_pub.bind_type;
274: l_custom_rec.attribute_data_type := bis_pmv_parameters_pub.varchar2_bind;
275: x_custom_output.extend;
276: x_custom_output(6) := l_custom_rec;
277:
270:
271: l_custom_rec.attribute_name := ':GEO_COUNTRY_CODE3';
272: l_custom_rec.attribute_value := l_country_tab(3);
273: l_custom_rec.attribute_type := bis_pmv_parameters_pub.bind_type;
274: l_custom_rec.attribute_data_type := bis_pmv_parameters_pub.varchar2_bind;
275: x_custom_output.extend;
276: x_custom_output(6) := l_custom_rec;
277:
278: l_custom_rec.attribute_name := ':GEO_COUNTRY_CODE4';
276: x_custom_output(6) := l_custom_rec;
277:
278: l_custom_rec.attribute_name := ':GEO_COUNTRY_CODE4';
279: l_custom_rec.attribute_value := l_country_tab(4);
280: l_custom_rec.attribute_type := bis_pmv_parameters_pub.bind_type;
281: l_custom_rec.attribute_data_type := bis_pmv_parameters_pub.varchar2_bind;
282: x_custom_output.extend;
283: x_custom_output(7) := l_custom_rec;
284:
277:
278: l_custom_rec.attribute_name := ':GEO_COUNTRY_CODE4';
279: l_custom_rec.attribute_value := l_country_tab(4);
280: l_custom_rec.attribute_type := bis_pmv_parameters_pub.bind_type;
281: l_custom_rec.attribute_data_type := bis_pmv_parameters_pub.varchar2_bind;
282: x_custom_output.extend;
283: x_custom_output(7) := l_custom_rec;
284:
285: l_custom_rec.attribute_name := ':GLOBAL_CURRENCY';
283: x_custom_output(7) := l_custom_rec;
284:
285: l_custom_rec.attribute_name := ':GLOBAL_CURRENCY';
286: l_custom_rec.attribute_value := l_parameter_rec.currency_code;
287: l_custom_Rec.attribute_type := bis_pmv_parameters_pub.bind_type;
288: l_custom_rec.attribute_data_type := bis_pmv_parameters_pub.varchar2_bind;
289: x_custom_output.extend;
290: x_custom_output(8) := l_custom_rec;
291:
284:
285: l_custom_rec.attribute_name := ':GLOBAL_CURRENCY';
286: l_custom_rec.attribute_value := l_parameter_rec.currency_code;
287: l_custom_Rec.attribute_type := bis_pmv_parameters_pub.bind_type;
288: l_custom_rec.attribute_data_type := bis_pmv_parameters_pub.varchar2_bind;
289: x_custom_output.extend;
290: x_custom_output(8) := l_custom_rec;
291:
292: l_custom_rec.attribute_name := ':GLOBAL_RATE';
290: x_custom_output(8) := l_custom_rec;
291:
292: l_custom_rec.attribute_name := ':GLOBAL_RATE';
293: l_custom_rec.attribute_value := l_parameter_rec.rate_type;
294: l_custom_Rec.attribute_type := bis_pmv_parameters_pub.bind_type;
295: l_custom_rec.attribute_data_type := bis_pmv_parameters_pub.varchar2_bind;
296: x_custom_output.extend;
297: x_custom_output(9) := l_custom_rec;
298:
291:
292: l_custom_rec.attribute_name := ':GLOBAL_RATE';
293: l_custom_rec.attribute_value := l_parameter_rec.rate_type;
294: l_custom_Rec.attribute_type := bis_pmv_parameters_pub.bind_type;
295: l_custom_rec.attribute_data_type := bis_pmv_parameters_pub.varchar2_bind;
296: x_custom_output.extend;
297: x_custom_output(9) := l_custom_rec;
298:
299: END get_avg_sal_sql;