37: --
38: l_cursor integer; -- Dynamic sql cursor identifier
39: l_pl_sql varchar2(900); -- Dynamic PL/SQL package procedure
40: -- call source code text.
41: l_execute integer; -- Value returned by dbms_sql.execute
42: l_correction varchar2(6); -- Char version of boolean OUT value
43: l_update varchar2(6); -- Char version of boolean OUT value
44: l_update_override varchar2(6); -- Char version of boolean OUT value
45: l_update_change_insert varchar2(6); -- Char version of boolean OUT value
50: --
51: -- Define dynamic PL/SQL block with package procedure call
52: --
53: -- Note: The varchar2 variables are required because
54: -- dbms_sql.bind_variable does not support the boolean datatype.
55: -- After the package procedure call the boolean values have to be
56: -- converted to varchar2, just so they can be retreved from the
57: -- dynamic PL/SQL using dbms_sql.bind_variable.
58: --
53: -- Note: The varchar2 variables are required because
54: -- dbms_sql.bind_variable does not support the boolean datatype.
55: -- After the package procedure call the boolean values have to be
56: -- converted to varchar2, just so they can be retreved from the
57: -- dynamic PL/SQL using dbms_sql.bind_variable.
58: --
59: l_pl_sql := 'declare ' ||
60: 'l_correction boolean; ' ||
61: 'l_update boolean; ' ||
99: --
100: -- Execute the Dynamic PL/SQL statement
101: --
102: -- Open dynamic cursor
103: l_cursor := dbms_sql.open_cursor;
104: hr_utility.set_location(l_proc, 30);
105: --
106: -- Parse dynamic PL/SQL
107: dbms_sql.parse(l_cursor, l_pl_sql, dbms_sql.v7);
103: l_cursor := dbms_sql.open_cursor;
104: hr_utility.set_location(l_proc, 30);
105: --
106: -- Parse dynamic PL/SQL
107: dbms_sql.parse(l_cursor, l_pl_sql, dbms_sql.v7);
108: hr_utility.set_location(l_proc, 40);
109: --
110: -- Bind dynamic package procedure IN parameter values
111: dbms_sql.bind_variable(l_cursor, ':p_effective_date', p_effective_date);
107: dbms_sql.parse(l_cursor, l_pl_sql, dbms_sql.v7);
108: hr_utility.set_location(l_proc, 40);
109: --
110: -- Bind dynamic package procedure IN parameter values
111: dbms_sql.bind_variable(l_cursor, ':p_effective_date', p_effective_date);
112: dbms_sql.bind_variable(l_cursor, ':p_base_key_value', p_base_key_value);
113: hr_utility.set_location(l_proc, 50);
114: --
115: -- Bind dynamic PL/SQL local variable (OUT parameter) values
108: hr_utility.set_location(l_proc, 40);
109: --
110: -- Bind dynamic package procedure IN parameter values
111: dbms_sql.bind_variable(l_cursor, ':p_effective_date', p_effective_date);
112: dbms_sql.bind_variable(l_cursor, ':p_base_key_value', p_base_key_value);
113: hr_utility.set_location(l_proc, 50);
114: --
115: -- Bind dynamic PL/SQL local variable (OUT parameter) values
116: dbms_sql.bind_variable(l_cursor, ':correction', l_correction, c_out_len);
112: dbms_sql.bind_variable(l_cursor, ':p_base_key_value', p_base_key_value);
113: hr_utility.set_location(l_proc, 50);
114: --
115: -- Bind dynamic PL/SQL local variable (OUT parameter) values
116: dbms_sql.bind_variable(l_cursor, ':correction', l_correction, c_out_len);
117: dbms_sql.bind_variable(l_cursor, ':update', l_update, c_out_len);
118: dbms_sql.bind_variable(l_cursor, ':update_override'
119: ,l_update_override, c_out_len);
120: dbms_sql.bind_variable(l_cursor, ':update_change_insert'
113: hr_utility.set_location(l_proc, 50);
114: --
115: -- Bind dynamic PL/SQL local variable (OUT parameter) values
116: dbms_sql.bind_variable(l_cursor, ':correction', l_correction, c_out_len);
117: dbms_sql.bind_variable(l_cursor, ':update', l_update, c_out_len);
118: dbms_sql.bind_variable(l_cursor, ':update_override'
119: ,l_update_override, c_out_len);
120: dbms_sql.bind_variable(l_cursor, ':update_change_insert'
121: ,l_update_change_insert, c_out_len);
114: --
115: -- Bind dynamic PL/SQL local variable (OUT parameter) values
116: dbms_sql.bind_variable(l_cursor, ':correction', l_correction, c_out_len);
117: dbms_sql.bind_variable(l_cursor, ':update', l_update, c_out_len);
118: dbms_sql.bind_variable(l_cursor, ':update_override'
119: ,l_update_override, c_out_len);
120: dbms_sql.bind_variable(l_cursor, ':update_change_insert'
121: ,l_update_change_insert, c_out_len);
122: hr_utility.set_location(l_proc, 60);
116: dbms_sql.bind_variable(l_cursor, ':correction', l_correction, c_out_len);
117: dbms_sql.bind_variable(l_cursor, ':update', l_update, c_out_len);
118: dbms_sql.bind_variable(l_cursor, ':update_override'
119: ,l_update_override, c_out_len);
120: dbms_sql.bind_variable(l_cursor, ':update_change_insert'
121: ,l_update_change_insert, c_out_len);
122: hr_utility.set_location(l_proc, 60);
123: --
124: -- Execute the dynamic PL/SQL block
121: ,l_update_change_insert, c_out_len);
122: hr_utility.set_location(l_proc, 60);
123: --
124: -- Execute the dynamic PL/SQL block
125: l_execute := dbms_sql.execute(l_cursor);
126: hr_utility.set_location(l_proc, 70);
127: --
128: -- Obtain the OUT parameter, as varchar2 values.
129: --
126: hr_utility.set_location(l_proc, 70);
127: --
128: -- Obtain the OUT parameter, as varchar2 values.
129: --
130: dbms_sql.variable_value(l_cursor, ':correction', l_correction);
131: dbms_sql.variable_value(l_cursor, ':update', l_update);
132: dbms_sql.variable_value(l_cursor, ':update_override', l_update_override);
133: dbms_sql.variable_value(l_cursor, ':update_change_insert'
134: ,l_update_change_insert);
127: --
128: -- Obtain the OUT parameter, as varchar2 values.
129: --
130: dbms_sql.variable_value(l_cursor, ':correction', l_correction);
131: dbms_sql.variable_value(l_cursor, ':update', l_update);
132: dbms_sql.variable_value(l_cursor, ':update_override', l_update_override);
133: dbms_sql.variable_value(l_cursor, ':update_change_insert'
134: ,l_update_change_insert);
135: hr_utility.set_location(l_proc, 80);
128: -- Obtain the OUT parameter, as varchar2 values.
129: --
130: dbms_sql.variable_value(l_cursor, ':correction', l_correction);
131: dbms_sql.variable_value(l_cursor, ':update', l_update);
132: dbms_sql.variable_value(l_cursor, ':update_override', l_update_override);
133: dbms_sql.variable_value(l_cursor, ':update_change_insert'
134: ,l_update_change_insert);
135: hr_utility.set_location(l_proc, 80);
136: --
129: --
130: dbms_sql.variable_value(l_cursor, ':correction', l_correction);
131: dbms_sql.variable_value(l_cursor, ':update', l_update);
132: dbms_sql.variable_value(l_cursor, ':update_override', l_update_override);
133: dbms_sql.variable_value(l_cursor, ':update_change_insert'
134: ,l_update_change_insert);
135: hr_utility.set_location(l_proc, 80);
136: --
137: -- Close Dynamic Cursor
135: hr_utility.set_location(l_proc, 80);
136: --
137: -- Close Dynamic Cursor
138: --
139: dbms_sql.close_cursor(l_cursor);
140: hr_utility.set_location(l_proc, 90);
141: --
142: -- Convert the varchar2 values back into boolean so
143: -- they can be returned from this procedure.
171: -- In case of an unexpected error ensure
172: -- that the Dynamic Cursor is closed.
173: --
174: when others then
175: if dbms_sql.is_open(l_cursor) then
176: dbms_sql.close_cursor(l_cursor);
177: end if;
178: raise;
179: end get_update_mode_list;
172: -- that the Dynamic Cursor is closed.
173: --
174: when others then
175: if dbms_sql.is_open(l_cursor) then
176: dbms_sql.close_cursor(l_cursor);
177: end if;
178: raise;
179: end get_update_mode_list;
180: --
203: --
204: l_cursor integer; -- Dynamic sql cursor identifier
205: l_pl_sql varchar2(900); -- Dynamic PL/SQL package procedure
206: -- call source code text.
207: l_execute integer; -- Value returned by dbms_sql.execute
208: l_zap varchar2(6); -- Char version of boolean OUT value
209: l_delete varchar2(6); -- Char version of boolean OUT value
210: l_future_change varchar2(6); -- Char version of boolean OUT value
211: l_delete_next_change varchar2(6); -- Char version of boolean OUT value
216: --
217: -- Define dynamic PL/SQL block with package procedure call
218: --
219: -- Note: The varchar2 variables are required because
220: -- dbms_sql.bind_variable does not support the boolean datatype.
221: -- After the package procedure call the boolean values have to be
222: -- converted to varchar2, just so they can be retreved from the
223: -- dynamic PL/SQL using dbms_sql.bind_variable.
224: --
219: -- Note: The varchar2 variables are required because
220: -- dbms_sql.bind_variable does not support the boolean datatype.
221: -- After the package procedure call the boolean values have to be
222: -- converted to varchar2, just so they can be retreved from the
223: -- dynamic PL/SQL using dbms_sql.bind_variable.
224: --
225: l_pl_sql := 'declare ' ||
226: 'l_zap boolean; ' ||
227: 'l_delete boolean; ' ||
265: --
266: -- Execute the Dynamic PL/SQL statement
267: --
268: -- Open dynamic cursor
269: l_cursor := dbms_sql.open_cursor;
270: hr_utility.set_location(l_proc, 30);
271: --
272: -- Parse dynamic PL/SQL
273: dbms_sql.parse(l_cursor, l_pl_sql, dbms_sql.v7);
269: l_cursor := dbms_sql.open_cursor;
270: hr_utility.set_location(l_proc, 30);
271: --
272: -- Parse dynamic PL/SQL
273: dbms_sql.parse(l_cursor, l_pl_sql, dbms_sql.v7);
274: hr_utility.set_location(l_proc, 40);
275: --
276: -- Bind dynamic package procedure IN parameter values
277: dbms_sql.bind_variable(l_cursor, ':p_effective_date', p_effective_date);
273: dbms_sql.parse(l_cursor, l_pl_sql, dbms_sql.v7);
274: hr_utility.set_location(l_proc, 40);
275: --
276: -- Bind dynamic package procedure IN parameter values
277: dbms_sql.bind_variable(l_cursor, ':p_effective_date', p_effective_date);
278: dbms_sql.bind_variable(l_cursor, ':p_base_key_value', p_base_key_value);
279: hr_utility.set_location(l_proc, 50);
280: --
281: -- Bind dynamic PL/SQL local variable (OUT parameter) values
274: hr_utility.set_location(l_proc, 40);
275: --
276: -- Bind dynamic package procedure IN parameter values
277: dbms_sql.bind_variable(l_cursor, ':p_effective_date', p_effective_date);
278: dbms_sql.bind_variable(l_cursor, ':p_base_key_value', p_base_key_value);
279: hr_utility.set_location(l_proc, 50);
280: --
281: -- Bind dynamic PL/SQL local variable (OUT parameter) values
282: dbms_sql.bind_variable(l_cursor, ':zap', l_zap, c_out_len);
278: dbms_sql.bind_variable(l_cursor, ':p_base_key_value', p_base_key_value);
279: hr_utility.set_location(l_proc, 50);
280: --
281: -- Bind dynamic PL/SQL local variable (OUT parameter) values
282: dbms_sql.bind_variable(l_cursor, ':zap', l_zap, c_out_len);
283: dbms_sql.bind_variable(l_cursor, ':delete', l_delete, c_out_len);
284: dbms_sql.bind_variable(l_cursor, ':future_change'
285: ,l_future_change, c_out_len);
286: dbms_sql.bind_variable(l_cursor, ':delete_next_change'
279: hr_utility.set_location(l_proc, 50);
280: --
281: -- Bind dynamic PL/SQL local variable (OUT parameter) values
282: dbms_sql.bind_variable(l_cursor, ':zap', l_zap, c_out_len);
283: dbms_sql.bind_variable(l_cursor, ':delete', l_delete, c_out_len);
284: dbms_sql.bind_variable(l_cursor, ':future_change'
285: ,l_future_change, c_out_len);
286: dbms_sql.bind_variable(l_cursor, ':delete_next_change'
287: ,l_delete_next_change, c_out_len);
280: --
281: -- Bind dynamic PL/SQL local variable (OUT parameter) values
282: dbms_sql.bind_variable(l_cursor, ':zap', l_zap, c_out_len);
283: dbms_sql.bind_variable(l_cursor, ':delete', l_delete, c_out_len);
284: dbms_sql.bind_variable(l_cursor, ':future_change'
285: ,l_future_change, c_out_len);
286: dbms_sql.bind_variable(l_cursor, ':delete_next_change'
287: ,l_delete_next_change, c_out_len);
288: hr_utility.set_location(l_proc, 60);
282: dbms_sql.bind_variable(l_cursor, ':zap', l_zap, c_out_len);
283: dbms_sql.bind_variable(l_cursor, ':delete', l_delete, c_out_len);
284: dbms_sql.bind_variable(l_cursor, ':future_change'
285: ,l_future_change, c_out_len);
286: dbms_sql.bind_variable(l_cursor, ':delete_next_change'
287: ,l_delete_next_change, c_out_len);
288: hr_utility.set_location(l_proc, 60);
289: --
290: -- Execute the dynamic PL/SQL block
287: ,l_delete_next_change, c_out_len);
288: hr_utility.set_location(l_proc, 60);
289: --
290: -- Execute the dynamic PL/SQL block
291: l_execute := dbms_sql.execute(l_cursor);
292: hr_utility.set_location(l_proc, 70);
293: --
294: -- Obtain the OUT parameter, as varchar2 values.
295: --
292: hr_utility.set_location(l_proc, 70);
293: --
294: -- Obtain the OUT parameter, as varchar2 values.
295: --
296: dbms_sql.variable_value(l_cursor, ':zap', l_zap);
297: dbms_sql.variable_value(l_cursor, ':delete', l_delete);
298: dbms_sql.variable_value(l_cursor, ':future_change', l_future_change);
299: dbms_sql.variable_value(l_cursor, ':delete_next_change'
300: ,l_delete_next_change);
293: --
294: -- Obtain the OUT parameter, as varchar2 values.
295: --
296: dbms_sql.variable_value(l_cursor, ':zap', l_zap);
297: dbms_sql.variable_value(l_cursor, ':delete', l_delete);
298: dbms_sql.variable_value(l_cursor, ':future_change', l_future_change);
299: dbms_sql.variable_value(l_cursor, ':delete_next_change'
300: ,l_delete_next_change);
301: hr_utility.set_location(l_proc, 80);
294: -- Obtain the OUT parameter, as varchar2 values.
295: --
296: dbms_sql.variable_value(l_cursor, ':zap', l_zap);
297: dbms_sql.variable_value(l_cursor, ':delete', l_delete);
298: dbms_sql.variable_value(l_cursor, ':future_change', l_future_change);
299: dbms_sql.variable_value(l_cursor, ':delete_next_change'
300: ,l_delete_next_change);
301: hr_utility.set_location(l_proc, 80);
302: --
295: --
296: dbms_sql.variable_value(l_cursor, ':zap', l_zap);
297: dbms_sql.variable_value(l_cursor, ':delete', l_delete);
298: dbms_sql.variable_value(l_cursor, ':future_change', l_future_change);
299: dbms_sql.variable_value(l_cursor, ':delete_next_change'
300: ,l_delete_next_change);
301: hr_utility.set_location(l_proc, 80);
302: --
303: -- Close Dynamic Cursor
301: hr_utility.set_location(l_proc, 80);
302: --
303: -- Close Dynamic Cursor
304: --
305: dbms_sql.close_cursor(l_cursor);
306: hr_utility.set_location(l_proc, 90);
307: --
308: -- Convert the varchar2 values back into boolean so
309: -- they can be returned from this procedure.
337: -- In case of an unexpected error ensure
338: -- that the Dynamic Cursor is closed.
339: --
340: when others then
341: if dbms_sql.is_open(l_cursor) then
342: dbms_sql.close_cursor(l_cursor);
343: end if;
344: raise;
345: end get_delete_mode_list;
338: -- that the Dynamic Cursor is closed.
339: --
340: when others then
341: if dbms_sql.is_open(l_cursor) then
342: dbms_sql.close_cursor(l_cursor);
343: end if;
344: raise;
345: end get_delete_mode_list;
346: --
369: --
370: l_cursor integer; -- Dynamic sql cursor identifier
371: l_pl_sql varchar2(900); -- Dynamic PL/SQL package procedure
372: -- call source code text.
373: l_execute integer; -- Value returned by dbms_sql.execute
374: l_validation_start_date date; -- Bind value from Dynamic PL/SQL.
375: l_validation_end_date date; -- Bind value from Dynamic PL/SQL.
376: --
377: l_proc varchar2(72) := g_package||'lock_record';
380: --
381: -- Define dynamic PL/SQL block with package procedure call
382: --
383: -- Note: The varchar2 variables are required because
384: -- dbms_sql.bind_variable does not support the boolean datatype.
385: -- After the package procedure call the boolean values have to be
386: -- converted to varchar2, just so they can be retreved from the
387: -- dynamic PL/SQL using dbms_sql.bind_variable.
388: --
383: -- Note: The varchar2 variables are required because
384: -- dbms_sql.bind_variable does not support the boolean datatype.
385: -- After the package procedure call the boolean values have to be
386: -- converted to varchar2, just so they can be retreved from the
387: -- dynamic PL/SQL using dbms_sql.bind_variable.
388: --
389: l_pl_sql := 'begin {Package_Name}.{Procedure_Name}' ||
390: '(p_effective_date =>:p_effective_date ' ||
391: ',p_datetrack_mode =>:p_datetrack_mode ' ||
405: --
406: -- Execute the Dynamic PL/SQL statement
407: --
408: -- Open dynamic cursor
409: l_cursor := dbms_sql.open_cursor;
410: hr_utility.set_location(l_proc, 30);
411: --
412: -- Parse dynamic PL/SQL
413: dbms_sql.parse(l_cursor, l_pl_sql, dbms_sql.v7);
409: l_cursor := dbms_sql.open_cursor;
410: hr_utility.set_location(l_proc, 30);
411: --
412: -- Parse dynamic PL/SQL
413: dbms_sql.parse(l_cursor, l_pl_sql, dbms_sql.v7);
414: hr_utility.set_location(l_proc, 40);
415: --
416: -- Bind dynamic package procedure IN parameter values
417: dbms_sql.bind_variable(l_cursor, ':p_effective_date', p_effective_date);
413: dbms_sql.parse(l_cursor, l_pl_sql, dbms_sql.v7);
414: hr_utility.set_location(l_proc, 40);
415: --
416: -- Bind dynamic package procedure IN parameter values
417: dbms_sql.bind_variable(l_cursor, ':p_effective_date', p_effective_date);
418: dbms_sql.bind_variable(l_cursor, ':p_datetrack_mode', p_datetrack_mode);
419: dbms_sql.bind_variable(l_cursor, ':p_base_key_value', p_base_key_value);
420: dbms_sql.bind_variable(l_cursor, ':p_object_version_number',
421: p_object_version_number);
414: hr_utility.set_location(l_proc, 40);
415: --
416: -- Bind dynamic package procedure IN parameter values
417: dbms_sql.bind_variable(l_cursor, ':p_effective_date', p_effective_date);
418: dbms_sql.bind_variable(l_cursor, ':p_datetrack_mode', p_datetrack_mode);
419: dbms_sql.bind_variable(l_cursor, ':p_base_key_value', p_base_key_value);
420: dbms_sql.bind_variable(l_cursor, ':p_object_version_number',
421: p_object_version_number);
422: hr_utility.set_location(l_proc, 50);
415: --
416: -- Bind dynamic package procedure IN parameter values
417: dbms_sql.bind_variable(l_cursor, ':p_effective_date', p_effective_date);
418: dbms_sql.bind_variable(l_cursor, ':p_datetrack_mode', p_datetrack_mode);
419: dbms_sql.bind_variable(l_cursor, ':p_base_key_value', p_base_key_value);
420: dbms_sql.bind_variable(l_cursor, ':p_object_version_number',
421: p_object_version_number);
422: hr_utility.set_location(l_proc, 50);
423: --
416: -- Bind dynamic package procedure IN parameter values
417: dbms_sql.bind_variable(l_cursor, ':p_effective_date', p_effective_date);
418: dbms_sql.bind_variable(l_cursor, ':p_datetrack_mode', p_datetrack_mode);
419: dbms_sql.bind_variable(l_cursor, ':p_base_key_value', p_base_key_value);
420: dbms_sql.bind_variable(l_cursor, ':p_object_version_number',
421: p_object_version_number);
422: hr_utility.set_location(l_proc, 50);
423: --
424: -- Bind dynamic PL/SQL local variable (OUT parameter) values
421: p_object_version_number);
422: hr_utility.set_location(l_proc, 50);
423: --
424: -- Bind dynamic PL/SQL local variable (OUT parameter) values
425: dbms_sql.bind_variable(l_cursor, ':p_validation_start_date',
426: l_validation_start_date);
427: dbms_sql.bind_variable(l_cursor, ':p_validation_end_date',
428: l_validation_end_date);
429: hr_utility.set_location(l_proc, 60);
423: --
424: -- Bind dynamic PL/SQL local variable (OUT parameter) values
425: dbms_sql.bind_variable(l_cursor, ':p_validation_start_date',
426: l_validation_start_date);
427: dbms_sql.bind_variable(l_cursor, ':p_validation_end_date',
428: l_validation_end_date);
429: hr_utility.set_location(l_proc, 60);
430: --
431: -- Execute the dynamic PL/SQL block
428: l_validation_end_date);
429: hr_utility.set_location(l_proc, 60);
430: --
431: -- Execute the dynamic PL/SQL block
432: l_execute := dbms_sql.execute(l_cursor);
433: hr_utility.set_location(l_proc, 70);
434: --
435: -- Obtain the OUT parameter, as varchar2 values.
436: --
433: hr_utility.set_location(l_proc, 70);
434: --
435: -- Obtain the OUT parameter, as varchar2 values.
436: --
437: dbms_sql.variable_value(l_cursor, ':p_validation_start_date',
438: l_validation_start_date);
439: dbms_sql.variable_value(l_cursor, ':p_validation_end_date',
440: l_validation_end_date);
441: hr_utility.set_location(l_proc, 80);
435: -- Obtain the OUT parameter, as varchar2 values.
436: --
437: dbms_sql.variable_value(l_cursor, ':p_validation_start_date',
438: l_validation_start_date);
439: dbms_sql.variable_value(l_cursor, ':p_validation_end_date',
440: l_validation_end_date);
441: hr_utility.set_location(l_proc, 80);
442: --
443: -- Close Dynamic Cursor
441: hr_utility.set_location(l_proc, 80);
442: --
443: -- Close Dynamic Cursor
444: --
445: dbms_sql.close_cursor(l_cursor);
446: hr_utility.set_location(l_proc, 90);
447: --
448: -- Set Out parameters
449: --
455: -- In case of an unexpected error ensure
456: -- that the Dynamic Cursor is closed.
457: --
458: when others then
459: if dbms_sql.is_open(l_cursor) then
460: dbms_sql.close_cursor(l_cursor);
461: end if;
462: raise;
463: end lock_record;
456: -- that the Dynamic Cursor is closed.
457: --
458: when others then
459: if dbms_sql.is_open(l_cursor) then
460: dbms_sql.close_cursor(l_cursor);
461: end if;
462: raise;
463: end lock_record;
464: --