166:
167: PROCEDURE call_start_debug(
168: procedure_name IN cn_obj_procedures_v.NAME%TYPE,
169: x_event_id IN cn_events.event_id%TYPE,
170: code IN OUT NOCOPY cn_utils.code_type,
171: x_org_id IN NUMBER)
172: IS
173:
174: x_event_name cn_lookups.lookup_code%TYPE := 'CUSTOM';
174: x_event_name cn_lookups.lookup_code%TYPE := 'CUSTOM';
175:
176: BEGIN
177:
178: cn_utils.set_org_id(x_org_id);
179:
180: cn_utils.appendcr(code);
181:
182: cn_utils.appindcr(code, 'x_proc_audit_id := NULL; -- Will get a value in the call below FOR TESTING');
176: BEGIN
177:
178: cn_utils.set_org_id(x_org_id);
179:
180: cn_utils.appendcr(code);
181:
182: cn_utils.appindcr(code, 'x_proc_audit_id := NULL; -- Will get a value in the call below FOR TESTING');
183:
184: IF (x_event_id = cn_global.inv_event_id) THEN
178: cn_utils.set_org_id(x_org_id);
179:
180: cn_utils.appendcr(code);
181:
182: cn_utils.appindcr(code, 'x_proc_audit_id := NULL; -- Will get a value in the call below FOR TESTING');
183:
184: IF (x_event_id = cn_global.inv_event_id) THEN
185: x_event_name := 'INV';
186:
203:
204: IF(x_event_id > 0)
205: THEN
206: IF CN_COLLECTION_GEN.isParallelEnabled THEN
207: cn_utils.appindcr(code, 'EXECUTE IMMEDIATE ''ALTER SESSION ENABLE PARALLEL DML'';');
208: END IF;
209: END IF;
210:
211: cn_utils.appindcr(code, 'cn_message_pkg.begin_batch(');
207: cn_utils.appindcr(code, 'EXECUTE IMMEDIATE ''ALTER SESSION ENABLE PARALLEL DML'';');
208: END IF;
209: END IF;
210:
211: cn_utils.appindcr(code, 'cn_message_pkg.begin_batch(');
212: cn_utils.indent(code, 5);
213:
214: cn_utils.appindcr(code, ' x_parent_proc_audit_id => dummy_num');
215: cn_utils.appindcr(code, ',x_process_audit_id => x_proc_audit_id');
208: END IF;
209: END IF;
210:
211: cn_utils.appindcr(code, 'cn_message_pkg.begin_batch(');
212: cn_utils.indent(code, 5);
213:
214: cn_utils.appindcr(code, ' x_parent_proc_audit_id => dummy_num');
215: cn_utils.appindcr(code, ',x_process_audit_id => x_proc_audit_id');
216: cn_utils.appindcr(code, ',x_request_id => fnd_global.conc_request_id');
210:
211: cn_utils.appindcr(code, 'cn_message_pkg.begin_batch(');
212: cn_utils.indent(code, 5);
213:
214: cn_utils.appindcr(code, ' x_parent_proc_audit_id => dummy_num');
215: cn_utils.appindcr(code, ',x_process_audit_id => x_proc_audit_id');
216: cn_utils.appindcr(code, ',x_request_id => fnd_global.conc_request_id');
217: cn_utils.appindcr(code, ',x_process_type => '''|| x_event_name ||'''');
218: cn_utils.appindcr(code, ',p_org_id => x_org_id );');
211: cn_utils.appindcr(code, 'cn_message_pkg.begin_batch(');
212: cn_utils.indent(code, 5);
213:
214: cn_utils.appindcr(code, ' x_parent_proc_audit_id => dummy_num');
215: cn_utils.appindcr(code, ',x_process_audit_id => x_proc_audit_id');
216: cn_utils.appindcr(code, ',x_request_id => fnd_global.conc_request_id');
217: cn_utils.appindcr(code, ',x_process_type => '''|| x_event_name ||'''');
218: cn_utils.appindcr(code, ',p_org_id => x_org_id );');
219:
212: cn_utils.indent(code, 5);
213:
214: cn_utils.appindcr(code, ' x_parent_proc_audit_id => dummy_num');
215: cn_utils.appindcr(code, ',x_process_audit_id => x_proc_audit_id');
216: cn_utils.appindcr(code, ',x_request_id => fnd_global.conc_request_id');
217: cn_utils.appindcr(code, ',x_process_type => '''|| x_event_name ||'''');
218: cn_utils.appindcr(code, ',p_org_id => x_org_id );');
219:
220: cn_utils.unindent(code, 5);
213:
214: cn_utils.appindcr(code, ' x_parent_proc_audit_id => dummy_num');
215: cn_utils.appindcr(code, ',x_process_audit_id => x_proc_audit_id');
216: cn_utils.appindcr(code, ',x_request_id => fnd_global.conc_request_id');
217: cn_utils.appindcr(code, ',x_process_type => '''|| x_event_name ||'''');
218: cn_utils.appindcr(code, ',p_org_id => x_org_id );');
219:
220: cn_utils.unindent(code, 5);
221:
214: cn_utils.appindcr(code, ' x_parent_proc_audit_id => dummy_num');
215: cn_utils.appindcr(code, ',x_process_audit_id => x_proc_audit_id');
216: cn_utils.appindcr(code, ',x_request_id => fnd_global.conc_request_id');
217: cn_utils.appindcr(code, ',x_process_type => '''|| x_event_name ||'''');
218: cn_utils.appindcr(code, ',p_org_id => x_org_id );');
219:
220: cn_utils.unindent(code, 5);
221:
222: cn_utils.appindcr(code, 'x_col_audit_id := x_proc_audit_id;');
216: cn_utils.appindcr(code, ',x_request_id => fnd_global.conc_request_id');
217: cn_utils.appindcr(code, ',x_process_type => '''|| x_event_name ||'''');
218: cn_utils.appindcr(code, ',p_org_id => x_org_id );');
219:
220: cn_utils.unindent(code, 5);
221:
222: cn_utils.appindcr(code, 'x_col_audit_id := x_proc_audit_id;');
223:
224: --Condition added to fix bug 6203234
218: cn_utils.appindcr(code, ',p_org_id => x_org_id );');
219:
220: cn_utils.unindent(code, 5);
221:
222: cn_utils.appindcr(code, 'x_col_audit_id := x_proc_audit_id;');
223:
224: --Condition added to fix bug 6203234
225: IF(x_event_id > 0)
226: THEN
223:
224: --Condition added to fix bug 6203234
225: IF(x_event_id > 0)
226: THEN
227: cn_utils.record_process_start('COL', '''Collection run for process '' || x_proc_audit_id', 'x_col_audit_id', code);
228: END IF;
229:
230: cn_utils.appindcr(code, 'cn_message_pkg.debug('''|| procedure_name || '>>'');');
231: cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, '''|| procedure_name || '>>'');');
226: THEN
227: cn_utils.record_process_start('COL', '''Collection run for process '' || x_proc_audit_id', 'x_col_audit_id', code);
228: END IF;
229:
230: cn_utils.appindcr(code, 'cn_message_pkg.debug('''|| procedure_name || '>>'');');
231: cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, '''|| procedure_name || '>>'');');
232: cn_utils.appindcr(code, 'MO_GLOBAL.SET_POLICY_CONTEXT (''S'','||x_org_id||');');
233: cn_utils.appendcr(code);
234:
227: cn_utils.record_process_start('COL', '''Collection run for process '' || x_proc_audit_id', 'x_col_audit_id', code);
228: END IF;
229:
230: cn_utils.appindcr(code, 'cn_message_pkg.debug('''|| procedure_name || '>>'');');
231: cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, '''|| procedure_name || '>>'');');
232: cn_utils.appindcr(code, 'MO_GLOBAL.SET_POLICY_CONTEXT (''S'','||x_org_id||');');
233: cn_utils.appendcr(code);
234:
235: cn_utils.unset_org_id();
228: END IF;
229:
230: cn_utils.appindcr(code, 'cn_message_pkg.debug('''|| procedure_name || '>>'');');
231: cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, '''|| procedure_name || '>>'');');
232: cn_utils.appindcr(code, 'MO_GLOBAL.SET_POLICY_CONTEXT (''S'','||x_org_id||');');
233: cn_utils.appendcr(code);
234:
235: cn_utils.unset_org_id();
236:
229:
230: cn_utils.appindcr(code, 'cn_message_pkg.debug('''|| procedure_name || '>>'');');
231: cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, '''|| procedure_name || '>>'');');
232: cn_utils.appindcr(code, 'MO_GLOBAL.SET_POLICY_CONTEXT (''S'','||x_org_id||');');
233: cn_utils.appendcr(code);
234:
235: cn_utils.unset_org_id();
236:
237: END call_start_debug;
231: cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, '''|| procedure_name || '>>'');');
232: cn_utils.appindcr(code, 'MO_GLOBAL.SET_POLICY_CONTEXT (''S'','||x_org_id||');');
233: cn_utils.appendcr(code);
234:
235: cn_utils.unset_org_id();
236:
237: END call_start_debug;
238:
239:
249: procedure_name cn_obj_procedures_v.NAME%TYPE,
250: x_module_id cn_modules.module_id%TYPE,
251: x_repository_id cn_repositories.repository_id%TYPE,
252: x_event_id cn_events.event_id%TYPE,
253: code IN OUT NOCOPY cn_utils.code_type,
254: x_org_id IN NUMBER) IS
255:
256: x_row_count NUMBER;
257:
256: x_row_count NUMBER;
257:
258: BEGIN
259:
260: cn_utils.set_org_id(x_org_id);
261:
262: cn_utils.appendcr(code);
263: cn_utils.appendcr(code, '--******** NOTIFY PROCESS ********-- ');
264: cn_utils.appendcr(code);
258: BEGIN
259:
260: cn_utils.set_org_id(x_org_id);
261:
262: cn_utils.appendcr(code);
263: cn_utils.appendcr(code, '--******** NOTIFY PROCESS ********-- ');
264: cn_utils.appendcr(code);
265: cn_utils.unset_org_id();
266: cn_debug.print_msg('call_notify >>', 1);
259:
260: cn_utils.set_org_id(x_org_id);
261:
262: cn_utils.appendcr(code);
263: cn_utils.appendcr(code, '--******** NOTIFY PROCESS ********-- ');
264: cn_utils.appendcr(code);
265: cn_utils.unset_org_id();
266: cn_debug.print_msg('call_notify >>', 1);
267: fnd_file.put_line(fnd_file.Log, 'call_notify >>');
260: cn_utils.set_org_id(x_org_id);
261:
262: cn_utils.appendcr(code);
263: cn_utils.appendcr(code, '--******** NOTIFY PROCESS ********-- ');
264: cn_utils.appendcr(code);
265: cn_utils.unset_org_id();
266: cn_debug.print_msg('call_notify >>', 1);
267: fnd_file.put_line(fnd_file.Log, 'call_notify >>');
268:
261:
262: cn_utils.appendcr(code);
263: cn_utils.appendcr(code, '--******** NOTIFY PROCESS ********-- ');
264: cn_utils.appendcr(code);
265: cn_utils.unset_org_id();
266: cn_debug.print_msg('call_notify >>', 1);
267: fnd_file.put_line(fnd_file.Log, 'call_notify >>');
268:
269: -- Translate the incoming period_names into period_ids. AE 02-28-96
268:
269: -- Translate the incoming period_names into period_ids. AE 02-28-96
270: -- We had to do this because AOL only passes VARCHAR2 input parms.
271:
272: cn_utils.set_org_id(x_org_id);
273: cn_utils.appindcr(code, 'cn_message_pkg.debug('''|| procedure_name || ': Call notify process begin.'');');
274: cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, '''|| procedure_name || ': Call notify process begin.'');');
275: cn_utils.appindcr(code, 'SELECT period_id ');
276: cn_utils.appindcr(code, ' INTO x_start_period_id ');
269: -- Translate the incoming period_names into period_ids. AE 02-28-96
270: -- We had to do this because AOL only passes VARCHAR2 input parms.
271:
272: cn_utils.set_org_id(x_org_id);
273: cn_utils.appindcr(code, 'cn_message_pkg.debug('''|| procedure_name || ': Call notify process begin.'');');
274: cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, '''|| procedure_name || ': Call notify process begin.'');');
275: cn_utils.appindcr(code, 'SELECT period_id ');
276: cn_utils.appindcr(code, ' INTO x_start_period_id ');
277: cn_utils.appindcr(code, ' FROM cn_periods ');
270: -- We had to do this because AOL only passes VARCHAR2 input parms.
271:
272: cn_utils.set_org_id(x_org_id);
273: cn_utils.appindcr(code, 'cn_message_pkg.debug('''|| procedure_name || ': Call notify process begin.'');');
274: cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, '''|| procedure_name || ': Call notify process begin.'');');
275: cn_utils.appindcr(code, 'SELECT period_id ');
276: cn_utils.appindcr(code, ' INTO x_start_period_id ');
277: cn_utils.appindcr(code, ' FROM cn_periods ');
278: cn_utils.appindcr(code, 'WHERE period_name = x_start_period_name' );
271:
272: cn_utils.set_org_id(x_org_id);
273: cn_utils.appindcr(code, 'cn_message_pkg.debug('''|| procedure_name || ': Call notify process begin.'');');
274: cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, '''|| procedure_name || ': Call notify process begin.'');');
275: cn_utils.appindcr(code, 'SELECT period_id ');
276: cn_utils.appindcr(code, ' INTO x_start_period_id ');
277: cn_utils.appindcr(code, ' FROM cn_periods ');
278: cn_utils.appindcr(code, 'WHERE period_name = x_start_period_name' );
279: cn_utils.appindcr(code, 'AND org_id = '||x_org_id||' ;');
272: cn_utils.set_org_id(x_org_id);
273: cn_utils.appindcr(code, 'cn_message_pkg.debug('''|| procedure_name || ': Call notify process begin.'');');
274: cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, '''|| procedure_name || ': Call notify process begin.'');');
275: cn_utils.appindcr(code, 'SELECT period_id ');
276: cn_utils.appindcr(code, ' INTO x_start_period_id ');
277: cn_utils.appindcr(code, ' FROM cn_periods ');
278: cn_utils.appindcr(code, 'WHERE period_name = x_start_period_name' );
279: cn_utils.appindcr(code, 'AND org_id = '||x_org_id||' ;');
280:
273: cn_utils.appindcr(code, 'cn_message_pkg.debug('''|| procedure_name || ': Call notify process begin.'');');
274: cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, '''|| procedure_name || ': Call notify process begin.'');');
275: cn_utils.appindcr(code, 'SELECT period_id ');
276: cn_utils.appindcr(code, ' INTO x_start_period_id ');
277: cn_utils.appindcr(code, ' FROM cn_periods ');
278: cn_utils.appindcr(code, 'WHERE period_name = x_start_period_name' );
279: cn_utils.appindcr(code, 'AND org_id = '||x_org_id||' ;');
280:
281: cn_utils.appendcr(code);
274: cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, '''|| procedure_name || ': Call notify process begin.'');');
275: cn_utils.appindcr(code, 'SELECT period_id ');
276: cn_utils.appindcr(code, ' INTO x_start_period_id ');
277: cn_utils.appindcr(code, ' FROM cn_periods ');
278: cn_utils.appindcr(code, 'WHERE period_name = x_start_period_name' );
279: cn_utils.appindcr(code, 'AND org_id = '||x_org_id||' ;');
280:
281: cn_utils.appendcr(code);
282: cn_utils.appindcr(code, 'SELECT period_id ');
275: cn_utils.appindcr(code, 'SELECT period_id ');
276: cn_utils.appindcr(code, ' INTO x_start_period_id ');
277: cn_utils.appindcr(code, ' FROM cn_periods ');
278: cn_utils.appindcr(code, 'WHERE period_name = x_start_period_name' );
279: cn_utils.appindcr(code, 'AND org_id = '||x_org_id||' ;');
280:
281: cn_utils.appendcr(code);
282: cn_utils.appindcr(code, 'SELECT period_id ');
283: cn_utils.appindcr(code, ' INTO x_end_period_id ');
277: cn_utils.appindcr(code, ' FROM cn_periods ');
278: cn_utils.appindcr(code, 'WHERE period_name = x_start_period_name' );
279: cn_utils.appindcr(code, 'AND org_id = '||x_org_id||' ;');
280:
281: cn_utils.appendcr(code);
282: cn_utils.appindcr(code, 'SELECT period_id ');
283: cn_utils.appindcr(code, ' INTO x_end_period_id ');
284: cn_utils.appindcr(code, ' FROM cn_periods ');
285: cn_utils.appindcr(code, 'WHERE period_name = x_end_period_name' );
278: cn_utils.appindcr(code, 'WHERE period_name = x_start_period_name' );
279: cn_utils.appindcr(code, 'AND org_id = '||x_org_id||' ;');
280:
281: cn_utils.appendcr(code);
282: cn_utils.appindcr(code, 'SELECT period_id ');
283: cn_utils.appindcr(code, ' INTO x_end_period_id ');
284: cn_utils.appindcr(code, ' FROM cn_periods ');
285: cn_utils.appindcr(code, 'WHERE period_name = x_end_period_name' );
286: cn_utils.appindcr(code, 'AND org_id = '||x_org_id||' ;');
279: cn_utils.appindcr(code, 'AND org_id = '||x_org_id||' ;');
280:
281: cn_utils.appendcr(code);
282: cn_utils.appindcr(code, 'SELECT period_id ');
283: cn_utils.appindcr(code, ' INTO x_end_period_id ');
284: cn_utils.appindcr(code, ' FROM cn_periods ');
285: cn_utils.appindcr(code, 'WHERE period_name = x_end_period_name' );
286: cn_utils.appindcr(code, 'AND org_id = '||x_org_id||' ;');
287: cn_utils.appendcr(code);
280:
281: cn_utils.appendcr(code);
282: cn_utils.appindcr(code, 'SELECT period_id ');
283: cn_utils.appindcr(code, ' INTO x_end_period_id ');
284: cn_utils.appindcr(code, ' FROM cn_periods ');
285: cn_utils.appindcr(code, 'WHERE period_name = x_end_period_name' );
286: cn_utils.appindcr(code, 'AND org_id = '||x_org_id||' ;');
287: cn_utils.appendcr(code);
288: cn_utils.unset_org_id();
281: cn_utils.appendcr(code);
282: cn_utils.appindcr(code, 'SELECT period_id ');
283: cn_utils.appindcr(code, ' INTO x_end_period_id ');
284: cn_utils.appindcr(code, ' FROM cn_periods ');
285: cn_utils.appindcr(code, 'WHERE period_name = x_end_period_name' );
286: cn_utils.appindcr(code, 'AND org_id = '||x_org_id||' ;');
287: cn_utils.appendcr(code);
288: cn_utils.unset_org_id();
289:
282: cn_utils.appindcr(code, 'SELECT period_id ');
283: cn_utils.appindcr(code, ' INTO x_end_period_id ');
284: cn_utils.appindcr(code, ' FROM cn_periods ');
285: cn_utils.appindcr(code, 'WHERE period_name = x_end_period_name' );
286: cn_utils.appindcr(code, 'AND org_id = '||x_org_id||' ;');
287: cn_utils.appendcr(code);
288: cn_utils.unset_org_id();
289:
290: -- Generate the call statement
283: cn_utils.appindcr(code, ' INTO x_end_period_id ');
284: cn_utils.appindcr(code, ' FROM cn_periods ');
285: cn_utils.appindcr(code, 'WHERE period_name = x_end_period_name' );
286: cn_utils.appindcr(code, 'AND org_id = '||x_org_id||' ;');
287: cn_utils.appendcr(code);
288: cn_utils.unset_org_id();
289:
290: -- Generate the call statement
291: cn_debug.print_msg('call_notify: Generating CALL statement.', 1);
284: cn_utils.appindcr(code, ' FROM cn_periods ');
285: cn_utils.appindcr(code, 'WHERE period_name = x_end_period_name' );
286: cn_utils.appindcr(code, 'AND org_id = '||x_org_id||' ;');
287: cn_utils.appendcr(code);
288: cn_utils.unset_org_id();
289:
290: -- Generate the call statement
291: cn_debug.print_msg('call_notify: Generating CALL statement.', 1);
292: fnd_file.put_line(fnd_file.Log, 'call_notify: Generating CALL statement.');
290: -- Generate the call statement
291: cn_debug.print_msg('call_notify: Generating CALL statement.', 1);
292: fnd_file.put_line(fnd_file.Log, 'call_notify: Generating CALL statement.');
293:
294: cn_utils.set_org_id(x_org_id);
295: cn_utils.appindcr(code, 'cn_message_pkg.debug('''|| procedure_name || ': entering notify.'');');
296: cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, '''|| procedure_name || ': entering notify.'');');
297:
298: IF (x_event_id = cn_global.inv_event_id) THEN
291: cn_debug.print_msg('call_notify: Generating CALL statement.', 1);
292: fnd_file.put_line(fnd_file.Log, 'call_notify: Generating CALL statement.');
293:
294: cn_utils.set_org_id(x_org_id);
295: cn_utils.appindcr(code, 'cn_message_pkg.debug('''|| procedure_name || ': entering notify.'');');
296: cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, '''|| procedure_name || ': entering notify.'');');
297:
298: IF (x_event_id = cn_global.inv_event_id) THEN
299: cn_utils.appindcr(code, 'cn_notify_invoices.notify(x_start_period_id, x_end_period_id, debug_pipe, debug_level,x_org_id);' );
292: fnd_file.put_line(fnd_file.Log, 'call_notify: Generating CALL statement.');
293:
294: cn_utils.set_org_id(x_org_id);
295: cn_utils.appindcr(code, 'cn_message_pkg.debug('''|| procedure_name || ': entering notify.'');');
296: cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, '''|| procedure_name || ': entering notify.'');');
297:
298: IF (x_event_id = cn_global.inv_event_id) THEN
299: cn_utils.appindcr(code, 'cn_notify_invoices.notify(x_start_period_id, x_end_period_id, debug_pipe, debug_level,x_org_id);' );
300:
295: cn_utils.appindcr(code, 'cn_message_pkg.debug('''|| procedure_name || ': entering notify.'');');
296: cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, '''|| procedure_name || ': entering notify.'');');
297:
298: IF (x_event_id = cn_global.inv_event_id) THEN
299: cn_utils.appindcr(code, 'cn_notify_invoices.notify(x_start_period_id, x_end_period_id, debug_pipe, debug_level,x_org_id);' );
300:
301: ELSIF (x_event_id = cn_global.pmt_event_id) THEN
302: cn_utils.appindcr(code, 'cn_notify_payments.notify(x_start_period_id, x_end_period_id, debug_pipe, debug_level,x_org_id);' );
303:
298: IF (x_event_id = cn_global.inv_event_id) THEN
299: cn_utils.appindcr(code, 'cn_notify_invoices.notify(x_start_period_id, x_end_period_id, debug_pipe, debug_level,x_org_id);' );
300:
301: ELSIF (x_event_id = cn_global.pmt_event_id) THEN
302: cn_utils.appindcr(code, 'cn_notify_payments.notify(x_start_period_id, x_end_period_id, debug_pipe, debug_level,x_org_id);' );
303:
304: ELSIF (x_event_id = cn_global.cbk_event_id) THEN
305: cn_utils.appindcr(code, 'cn_notify_clawbacks.notify(x_start_period_id, x_end_period_id, debug_pipe, debug_level,x_org_id);' );
306:
301: ELSIF (x_event_id = cn_global.pmt_event_id) THEN
302: cn_utils.appindcr(code, 'cn_notify_payments.notify(x_start_period_id, x_end_period_id, debug_pipe, debug_level,x_org_id);' );
303:
304: ELSIF (x_event_id = cn_global.cbk_event_id) THEN
305: cn_utils.appindcr(code, 'cn_notify_clawbacks.notify(x_start_period_id, x_end_period_id, debug_pipe, debug_level,x_org_id);' );
306:
307: ELSIF (x_event_id = cn_global.wo_event_id) THEN
308: cn_utils.appindcr(code, 'cn_notify_writeoffs.notify(x_start_period_id, x_end_period_id, debug_pipe, debug_level,x_org_id);' );
309:
304: ELSIF (x_event_id = cn_global.cbk_event_id) THEN
305: cn_utils.appindcr(code, 'cn_notify_clawbacks.notify(x_start_period_id, x_end_period_id, debug_pipe, debug_level,x_org_id);' );
306:
307: ELSIF (x_event_id = cn_global.wo_event_id) THEN
308: cn_utils.appindcr(code, 'cn_notify_writeoffs.notify(x_start_period_id, x_end_period_id, debug_pipe, debug_level,x_org_id);' );
309:
310: ELSIF (x_event_id = cn_global.ord_event_id) THEN
311: cn_utils.appindcr(code, 'cn_notify_orders.regular_col_notify(');
312: cn_utils.indent(code, 8);
307: ELSIF (x_event_id = cn_global.wo_event_id) THEN
308: cn_utils.appindcr(code, 'cn_notify_writeoffs.notify(x_start_period_id, x_end_period_id, debug_pipe, debug_level,x_org_id);' );
309:
310: ELSIF (x_event_id = cn_global.ord_event_id) THEN
311: cn_utils.appindcr(code, 'cn_notify_orders.regular_col_notify(');
312: cn_utils.indent(code, 8);
313: cn_utils.appindcr(code, ' x_start_period => x_start_period_id');
314: cn_utils.appindcr(code, ',x_end_period => x_end_period_id');
315: cn_utils.appindcr(code, ',x_adj_flag => ''N''');
308: cn_utils.appindcr(code, 'cn_notify_writeoffs.notify(x_start_period_id, x_end_period_id, debug_pipe, debug_level,x_org_id);' );
309:
310: ELSIF (x_event_id = cn_global.ord_event_id) THEN
311: cn_utils.appindcr(code, 'cn_notify_orders.regular_col_notify(');
312: cn_utils.indent(code, 8);
313: cn_utils.appindcr(code, ' x_start_period => x_start_period_id');
314: cn_utils.appindcr(code, ',x_end_period => x_end_period_id');
315: cn_utils.appindcr(code, ',x_adj_flag => ''N''');
316: cn_utils.appindcr(code, ',parent_proc_audit_id => x_proc_audit_id');
309:
310: ELSIF (x_event_id = cn_global.ord_event_id) THEN
311: cn_utils.appindcr(code, 'cn_notify_orders.regular_col_notify(');
312: cn_utils.indent(code, 8);
313: cn_utils.appindcr(code, ' x_start_period => x_start_period_id');
314: cn_utils.appindcr(code, ',x_end_period => x_end_period_id');
315: cn_utils.appindcr(code, ',x_adj_flag => ''N''');
316: cn_utils.appindcr(code, ',parent_proc_audit_id => x_proc_audit_id');
317: cn_utils.appindcr(code, ',debug_pipe => debug_pipe');
310: ELSIF (x_event_id = cn_global.ord_event_id) THEN
311: cn_utils.appindcr(code, 'cn_notify_orders.regular_col_notify(');
312: cn_utils.indent(code, 8);
313: cn_utils.appindcr(code, ' x_start_period => x_start_period_id');
314: cn_utils.appindcr(code, ',x_end_period => x_end_period_id');
315: cn_utils.appindcr(code, ',x_adj_flag => ''N''');
316: cn_utils.appindcr(code, ',parent_proc_audit_id => x_proc_audit_id');
317: cn_utils.appindcr(code, ',debug_pipe => debug_pipe');
318: cn_utils.appindcr(code, ',debug_level => debug_level');
311: cn_utils.appindcr(code, 'cn_notify_orders.regular_col_notify(');
312: cn_utils.indent(code, 8);
313: cn_utils.appindcr(code, ' x_start_period => x_start_period_id');
314: cn_utils.appindcr(code, ',x_end_period => x_end_period_id');
315: cn_utils.appindcr(code, ',x_adj_flag => ''N''');
316: cn_utils.appindcr(code, ',parent_proc_audit_id => x_proc_audit_id');
317: cn_utils.appindcr(code, ',debug_pipe => debug_pipe');
318: cn_utils.appindcr(code, ',debug_level => debug_level');
319: cn_utils.appindcr(code, ',x_org_id => '||x_org_id ||' );');
312: cn_utils.indent(code, 8);
313: cn_utils.appindcr(code, ' x_start_period => x_start_period_id');
314: cn_utils.appindcr(code, ',x_end_period => x_end_period_id');
315: cn_utils.appindcr(code, ',x_adj_flag => ''N''');
316: cn_utils.appindcr(code, ',parent_proc_audit_id => x_proc_audit_id');
317: cn_utils.appindcr(code, ',debug_pipe => debug_pipe');
318: cn_utils.appindcr(code, ',debug_level => debug_level');
319: cn_utils.appindcr(code, ',x_org_id => '||x_org_id ||' );');
320: cn_utils.unindent(code, 8);
313: cn_utils.appindcr(code, ' x_start_period => x_start_period_id');
314: cn_utils.appindcr(code, ',x_end_period => x_end_period_id');
315: cn_utils.appindcr(code, ',x_adj_flag => ''N''');
316: cn_utils.appindcr(code, ',parent_proc_audit_id => x_proc_audit_id');
317: cn_utils.appindcr(code, ',debug_pipe => debug_pipe');
318: cn_utils.appindcr(code, ',debug_level => debug_level');
319: cn_utils.appindcr(code, ',x_org_id => '||x_org_id ||' );');
320: cn_utils.unindent(code, 8);
321:
314: cn_utils.appindcr(code, ',x_end_period => x_end_period_id');
315: cn_utils.appindcr(code, ',x_adj_flag => ''N''');
316: cn_utils.appindcr(code, ',parent_proc_audit_id => x_proc_audit_id');
317: cn_utils.appindcr(code, ',debug_pipe => debug_pipe');
318: cn_utils.appindcr(code, ',debug_level => debug_level');
319: cn_utils.appindcr(code, ',x_org_id => '||x_org_id ||' );');
320: cn_utils.unindent(code, 8);
321:
322: END IF;
315: cn_utils.appindcr(code, ',x_adj_flag => ''N''');
316: cn_utils.appindcr(code, ',parent_proc_audit_id => x_proc_audit_id');
317: cn_utils.appindcr(code, ',debug_pipe => debug_pipe');
318: cn_utils.appindcr(code, ',debug_level => debug_level');
319: cn_utils.appindcr(code, ',x_org_id => '||x_org_id ||' );');
320: cn_utils.unindent(code, 8);
321:
322: END IF;
323: cn_utils.appendcr(code);
316: cn_utils.appindcr(code, ',parent_proc_audit_id => x_proc_audit_id');
317: cn_utils.appindcr(code, ',debug_pipe => debug_pipe');
318: cn_utils.appindcr(code, ',debug_level => debug_level');
319: cn_utils.appindcr(code, ',x_org_id => '||x_org_id ||' );');
320: cn_utils.unindent(code, 8);
321:
322: END IF;
323: cn_utils.appendcr(code);
324: cn_utils.unset_org_id();
319: cn_utils.appindcr(code, ',x_org_id => '||x_org_id ||' );');
320: cn_utils.unindent(code, 8);
321:
322: END IF;
323: cn_utils.appendcr(code);
324: cn_utils.unset_org_id();
325:
326: cn_debug.print_msg('call_notify <<', 1);
327: fnd_file.put_line(fnd_file.Log, 'call_notify <<');
320: cn_utils.unindent(code, 8);
321:
322: END IF;
323: cn_utils.appendcr(code);
324: cn_utils.unset_org_id();
325:
326: cn_debug.print_msg('call_notify <<', 1);
327: fnd_file.put_line(fnd_file.Log, 'call_notify <<');
328:
325:
326: cn_debug.print_msg('call_notify <<', 1);
327: fnd_file.put_line(fnd_file.Log, 'call_notify <<');
328:
329: cn_utils.set_org_id(x_org_id);
330: cn_utils.appindcr(code, 'cn_message_pkg.debug('''|| procedure_name || ': exit from notify and start collection run.'');');
331: cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, '''|| procedure_name || ': exit from notify and start collection run.'');');
332:
333: IF (x_event_id = cn_global.ord_event_id) THEN
326: cn_debug.print_msg('call_notify <<', 1);
327: fnd_file.put_line(fnd_file.Log, 'call_notify <<');
328:
329: cn_utils.set_org_id(x_org_id);
330: cn_utils.appindcr(code, 'cn_message_pkg.debug('''|| procedure_name || ': exit from notify and start collection run.'');');
331: cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, '''|| procedure_name || ': exit from notify and start collection run.'');');
332:
333: IF (x_event_id = cn_global.ord_event_id) THEN
334: cn_utils.appendcr(code, '--******** COLLECT AJUSTMENTS (NEGATE IN API) ********-- ');
327: fnd_file.put_line(fnd_file.Log, 'call_notify <<');
328:
329: cn_utils.set_org_id(x_org_id);
330: cn_utils.appindcr(code, 'cn_message_pkg.debug('''|| procedure_name || ': exit from notify and start collection run.'');');
331: cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, '''|| procedure_name || ': exit from notify and start collection run.'');');
332:
333: IF (x_event_id = cn_global.ord_event_id) THEN
334: cn_utils.appendcr(code, '--******** COLLECT AJUSTMENTS (NEGATE IN API) ********-- ');
335: cn_utils.appindcr(code, '-- This will negate those adjusted trx in the API table');
330: cn_utils.appindcr(code, 'cn_message_pkg.debug('''|| procedure_name || ': exit from notify and start collection run.'');');
331: cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, '''|| procedure_name || ': exit from notify and start collection run.'');');
332:
333: IF (x_event_id = cn_global.ord_event_id) THEN
334: cn_utils.appendcr(code, '--******** COLLECT AJUSTMENTS (NEGATE IN API) ********-- ');
335: cn_utils.appindcr(code, '-- This will negate those adjusted trx in the API table');
336: cn_utils.appindcr(code, 'cn_not_trx_grp.col_adjustments(p_api_version => 1.0,');
337: cn_utils.appindcr(code, ' x_return_status => x_return_status,');
338: cn_utils.appindcr(code, ' x_msg_count => x_msg_count,');
331: cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, '''|| procedure_name || ': exit from notify and start collection run.'');');
332:
333: IF (x_event_id = cn_global.ord_event_id) THEN
334: cn_utils.appendcr(code, '--******** COLLECT AJUSTMENTS (NEGATE IN API) ********-- ');
335: cn_utils.appindcr(code, '-- This will negate those adjusted trx in the API table');
336: cn_utils.appindcr(code, 'cn_not_trx_grp.col_adjustments(p_api_version => 1.0,');
337: cn_utils.appindcr(code, ' x_return_status => x_return_status,');
338: cn_utils.appindcr(code, ' x_msg_count => x_msg_count,');
339: cn_utils.appindcr(code, ' x_msg_data => x_msg_data,');
332:
333: IF (x_event_id = cn_global.ord_event_id) THEN
334: cn_utils.appendcr(code, '--******** COLLECT AJUSTMENTS (NEGATE IN API) ********-- ');
335: cn_utils.appindcr(code, '-- This will negate those adjusted trx in the API table');
336: cn_utils.appindcr(code, 'cn_not_trx_grp.col_adjustments(p_api_version => 1.0,');
337: cn_utils.appindcr(code, ' x_return_status => x_return_status,');
338: cn_utils.appindcr(code, ' x_msg_count => x_msg_count,');
339: cn_utils.appindcr(code, ' x_msg_data => x_msg_data,');
340: cn_utils.appindcr(code, ' p_org_id => '||x_org_id ||');');
333: IF (x_event_id = cn_global.ord_event_id) THEN
334: cn_utils.appendcr(code, '--******** COLLECT AJUSTMENTS (NEGATE IN API) ********-- ');
335: cn_utils.appindcr(code, '-- This will negate those adjusted trx in the API table');
336: cn_utils.appindcr(code, 'cn_not_trx_grp.col_adjustments(p_api_version => 1.0,');
337: cn_utils.appindcr(code, ' x_return_status => x_return_status,');
338: cn_utils.appindcr(code, ' x_msg_count => x_msg_count,');
339: cn_utils.appindcr(code, ' x_msg_data => x_msg_data,');
340: cn_utils.appindcr(code, ' p_org_id => '||x_org_id ||');');
341: cn_utils.appendcr(code);
334: cn_utils.appendcr(code, '--******** COLLECT AJUSTMENTS (NEGATE IN API) ********-- ');
335: cn_utils.appindcr(code, '-- This will negate those adjusted trx in the API table');
336: cn_utils.appindcr(code, 'cn_not_trx_grp.col_adjustments(p_api_version => 1.0,');
337: cn_utils.appindcr(code, ' x_return_status => x_return_status,');
338: cn_utils.appindcr(code, ' x_msg_count => x_msg_count,');
339: cn_utils.appindcr(code, ' x_msg_data => x_msg_data,');
340: cn_utils.appindcr(code, ' p_org_id => '||x_org_id ||');');
341: cn_utils.appendcr(code);
342:
335: cn_utils.appindcr(code, '-- This will negate those adjusted trx in the API table');
336: cn_utils.appindcr(code, 'cn_not_trx_grp.col_adjustments(p_api_version => 1.0,');
337: cn_utils.appindcr(code, ' x_return_status => x_return_status,');
338: cn_utils.appindcr(code, ' x_msg_count => x_msg_count,');
339: cn_utils.appindcr(code, ' x_msg_data => x_msg_data,');
340: cn_utils.appindcr(code, ' p_org_id => '||x_org_id ||');');
341: cn_utils.appendcr(code);
342:
343: END IF;
336: cn_utils.appindcr(code, 'cn_not_trx_grp.col_adjustments(p_api_version => 1.0,');
337: cn_utils.appindcr(code, ' x_return_status => x_return_status,');
338: cn_utils.appindcr(code, ' x_msg_count => x_msg_count,');
339: cn_utils.appindcr(code, ' x_msg_data => x_msg_data,');
340: cn_utils.appindcr(code, ' p_org_id => '||x_org_id ||');');
341: cn_utils.appendcr(code);
342:
343: END IF;
344:
337: cn_utils.appindcr(code, ' x_return_status => x_return_status,');
338: cn_utils.appindcr(code, ' x_msg_count => x_msg_count,');
339: cn_utils.appindcr(code, ' x_msg_data => x_msg_data,');
340: cn_utils.appindcr(code, ' p_org_id => '||x_org_id ||');');
341: cn_utils.appendcr(code);
342:
343: END IF;
344:
345: cn_utils.appendcr(code);
341: cn_utils.appendcr(code);
342:
343: END IF;
344:
345: cn_utils.appendcr(code);
346:
347: cn_utils.unset_org_id();
348:
349: EXCEPTION
343: END IF;
344:
345: cn_utils.appendcr(code);
346:
347: cn_utils.unset_org_id();
348:
349: EXCEPTION
350: WHEN NO_DATA_FOUND THEN
351: cn_debug.print_msg('call_notify: in exception handler for NO_DATA_FOUND', 1);
367: procedure_name cn_obj_procedures_v.NAME%TYPE,
368: x_module_id cn_modules.module_id%TYPE,
369: x_repository_id cn_repositories.repository_id%TYPE,
370: x_event_id cn_events.event_id%TYPE,
371: code IN OUT NOCOPY cn_utils.code_type,
372: x_org_id IN NUMBER)
373: IS
374:
375: x_row_count NUMBER;
377: BEGIN
378:
379: l_org_id := x_org_id;
380:
381: cn_utils.set_org_id(x_org_id);
382:
383: cn_utils.appendcr(code);
384: cn_utils.appendcr(code, '--******** IDENTIFY PROCESS ********-- ');
385: cn_utils.appendcr(code);
379: l_org_id := x_org_id;
380:
381: cn_utils.set_org_id(x_org_id);
382:
383: cn_utils.appendcr(code);
384: cn_utils.appendcr(code, '--******** IDENTIFY PROCESS ********-- ');
385: cn_utils.appendcr(code);
386: cn_utils.unset_org_id();
387:
380:
381: cn_utils.set_org_id(x_org_id);
382:
383: cn_utils.appendcr(code);
384: cn_utils.appendcr(code, '--******** IDENTIFY PROCESS ********-- ');
385: cn_utils.appendcr(code);
386: cn_utils.unset_org_id();
387:
388: cn_debug.print_msg('call_identify >>', 1);
381: cn_utils.set_org_id(x_org_id);
382:
383: cn_utils.appendcr(code);
384: cn_utils.appendcr(code, '--******** IDENTIFY PROCESS ********-- ');
385: cn_utils.appendcr(code);
386: cn_utils.unset_org_id();
387:
388: cn_debug.print_msg('call_identify >>', 1);
389: fnd_file.put_line(fnd_file.Log, 'call_identify >>');
382:
383: cn_utils.appendcr(code);
384: cn_utils.appendcr(code, '--******** IDENTIFY PROCESS ********-- ');
385: cn_utils.appendcr(code);
386: cn_utils.unset_org_id();
387:
388: cn_debug.print_msg('call_identify >>', 1);
389: fnd_file.put_line(fnd_file.Log, 'call_identify >>');
390:
387:
388: cn_debug.print_msg('call_identify >>', 1);
389: fnd_file.put_line(fnd_file.Log, 'call_identify >>');
390:
391: cn_utils.set_org_id(x_org_id);
392: cn_utils.appindcr(code, 'cn_message_pkg.debug('''|| procedure_name || ': start identify process.'');');
393: cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, '''|| procedure_name || ': start identify process.'');');
394: cn_utils.appendcr(code);
395: cn_utils.appindcr(code, 'SELECT period_id ');
388: cn_debug.print_msg('call_identify >>', 1);
389: fnd_file.put_line(fnd_file.Log, 'call_identify >>');
390:
391: cn_utils.set_org_id(x_org_id);
392: cn_utils.appindcr(code, 'cn_message_pkg.debug('''|| procedure_name || ': start identify process.'');');
393: cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, '''|| procedure_name || ': start identify process.'');');
394: cn_utils.appendcr(code);
395: cn_utils.appindcr(code, 'SELECT period_id ');
396: cn_utils.appindcr(code, ' INTO x_start_period_id ');
389: fnd_file.put_line(fnd_file.Log, 'call_identify >>');
390:
391: cn_utils.set_org_id(x_org_id);
392: cn_utils.appindcr(code, 'cn_message_pkg.debug('''|| procedure_name || ': start identify process.'');');
393: cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, '''|| procedure_name || ': start identify process.'');');
394: cn_utils.appendcr(code);
395: cn_utils.appindcr(code, 'SELECT period_id ');
396: cn_utils.appindcr(code, ' INTO x_start_period_id ');
397: cn_utils.appindcr(code, ' FROM cn_periods ');
390:
391: cn_utils.set_org_id(x_org_id);
392: cn_utils.appindcr(code, 'cn_message_pkg.debug('''|| procedure_name || ': start identify process.'');');
393: cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, '''|| procedure_name || ': start identify process.'');');
394: cn_utils.appendcr(code);
395: cn_utils.appindcr(code, 'SELECT period_id ');
396: cn_utils.appindcr(code, ' INTO x_start_period_id ');
397: cn_utils.appindcr(code, ' FROM cn_periods ');
398: cn_utils.appindcr(code, 'WHERE period_name = x_start_period_name' );
391: cn_utils.set_org_id(x_org_id);
392: cn_utils.appindcr(code, 'cn_message_pkg.debug('''|| procedure_name || ': start identify process.'');');
393: cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, '''|| procedure_name || ': start identify process.'');');
394: cn_utils.appendcr(code);
395: cn_utils.appindcr(code, 'SELECT period_id ');
396: cn_utils.appindcr(code, ' INTO x_start_period_id ');
397: cn_utils.appindcr(code, ' FROM cn_periods ');
398: cn_utils.appindcr(code, 'WHERE period_name = x_start_period_name' );
399: cn_utils.appindcr(code, 'AND org_id = '||X_org_id||' ;');
392: cn_utils.appindcr(code, 'cn_message_pkg.debug('''|| procedure_name || ': start identify process.'');');
393: cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, '''|| procedure_name || ': start identify process.'');');
394: cn_utils.appendcr(code);
395: cn_utils.appindcr(code, 'SELECT period_id ');
396: cn_utils.appindcr(code, ' INTO x_start_period_id ');
397: cn_utils.appindcr(code, ' FROM cn_periods ');
398: cn_utils.appindcr(code, 'WHERE period_name = x_start_period_name' );
399: cn_utils.appindcr(code, 'AND org_id = '||X_org_id||' ;');
400: cn_utils.appendcr(code);
393: cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, '''|| procedure_name || ': start identify process.'');');
394: cn_utils.appendcr(code);
395: cn_utils.appindcr(code, 'SELECT period_id ');
396: cn_utils.appindcr(code, ' INTO x_start_period_id ');
397: cn_utils.appindcr(code, ' FROM cn_periods ');
398: cn_utils.appindcr(code, 'WHERE period_name = x_start_period_name' );
399: cn_utils.appindcr(code, 'AND org_id = '||X_org_id||' ;');
400: cn_utils.appendcr(code);
401:
394: cn_utils.appendcr(code);
395: cn_utils.appindcr(code, 'SELECT period_id ');
396: cn_utils.appindcr(code, ' INTO x_start_period_id ');
397: cn_utils.appindcr(code, ' FROM cn_periods ');
398: cn_utils.appindcr(code, 'WHERE period_name = x_start_period_name' );
399: cn_utils.appindcr(code, 'AND org_id = '||X_org_id||' ;');
400: cn_utils.appendcr(code);
401:
402: cn_utils.appindcr(code, 'SELECT period_id ');
395: cn_utils.appindcr(code, 'SELECT period_id ');
396: cn_utils.appindcr(code, ' INTO x_start_period_id ');
397: cn_utils.appindcr(code, ' FROM cn_periods ');
398: cn_utils.appindcr(code, 'WHERE period_name = x_start_period_name' );
399: cn_utils.appindcr(code, 'AND org_id = '||X_org_id||' ;');
400: cn_utils.appendcr(code);
401:
402: cn_utils.appindcr(code, 'SELECT period_id ');
403: cn_utils.appindcr(code, ' INTO x_end_period_id ');
396: cn_utils.appindcr(code, ' INTO x_start_period_id ');
397: cn_utils.appindcr(code, ' FROM cn_periods ');
398: cn_utils.appindcr(code, 'WHERE period_name = x_start_period_name' );
399: cn_utils.appindcr(code, 'AND org_id = '||X_org_id||' ;');
400: cn_utils.appendcr(code);
401:
402: cn_utils.appindcr(code, 'SELECT period_id ');
403: cn_utils.appindcr(code, ' INTO x_end_period_id ');
404: cn_utils.appindcr(code, ' FROM cn_periods ');
398: cn_utils.appindcr(code, 'WHERE period_name = x_start_period_name' );
399: cn_utils.appindcr(code, 'AND org_id = '||X_org_id||' ;');
400: cn_utils.appendcr(code);
401:
402: cn_utils.appindcr(code, 'SELECT period_id ');
403: cn_utils.appindcr(code, ' INTO x_end_period_id ');
404: cn_utils.appindcr(code, ' FROM cn_periods ');
405: cn_utils.appindcr(code, 'WHERE period_name = x_end_period_name' );
406: cn_utils.appindcr(code, 'AND org_id = '||X_org_id||' ;');
399: cn_utils.appindcr(code, 'AND org_id = '||X_org_id||' ;');
400: cn_utils.appendcr(code);
401:
402: cn_utils.appindcr(code, 'SELECT period_id ');
403: cn_utils.appindcr(code, ' INTO x_end_period_id ');
404: cn_utils.appindcr(code, ' FROM cn_periods ');
405: cn_utils.appindcr(code, 'WHERE period_name = x_end_period_name' );
406: cn_utils.appindcr(code, 'AND org_id = '||X_org_id||' ;');
407: cn_utils.appendcr(code);
400: cn_utils.appendcr(code);
401:
402: cn_utils.appindcr(code, 'SELECT period_id ');
403: cn_utils.appindcr(code, ' INTO x_end_period_id ');
404: cn_utils.appindcr(code, ' FROM cn_periods ');
405: cn_utils.appindcr(code, 'WHERE period_name = x_end_period_name' );
406: cn_utils.appindcr(code, 'AND org_id = '||X_org_id||' ;');
407: cn_utils.appendcr(code);
408: cn_utils.unset_org_id();
401:
402: cn_utils.appindcr(code, 'SELECT period_id ');
403: cn_utils.appindcr(code, ' INTO x_end_period_id ');
404: cn_utils.appindcr(code, ' FROM cn_periods ');
405: cn_utils.appindcr(code, 'WHERE period_name = x_end_period_name' );
406: cn_utils.appindcr(code, 'AND org_id = '||X_org_id||' ;');
407: cn_utils.appendcr(code);
408: cn_utils.unset_org_id();
409:
402: cn_utils.appindcr(code, 'SELECT period_id ');
403: cn_utils.appindcr(code, ' INTO x_end_period_id ');
404: cn_utils.appindcr(code, ' FROM cn_periods ');
405: cn_utils.appindcr(code, 'WHERE period_name = x_end_period_name' );
406: cn_utils.appindcr(code, 'AND org_id = '||X_org_id||' ;');
407: cn_utils.appendcr(code);
408: cn_utils.unset_org_id();
409:
410: -- Generate the call statement
403: cn_utils.appindcr(code, ' INTO x_end_period_id ');
404: cn_utils.appindcr(code, ' FROM cn_periods ');
405: cn_utils.appindcr(code, 'WHERE period_name = x_end_period_name' );
406: cn_utils.appindcr(code, 'AND org_id = '||X_org_id||' ;');
407: cn_utils.appendcr(code);
408: cn_utils.unset_org_id();
409:
410: -- Generate the call statement
411: cn_debug.print_msg('call_identify: Generating CALL statement.', 1);
404: cn_utils.appindcr(code, ' FROM cn_periods ');
405: cn_utils.appindcr(code, 'WHERE period_name = x_end_period_name' );
406: cn_utils.appindcr(code, 'AND org_id = '||X_org_id||' ;');
407: cn_utils.appendcr(code);
408: cn_utils.unset_org_id();
409:
410: -- Generate the call statement
411: cn_debug.print_msg('call_identify: Generating CALL statement.', 1);
412: fnd_file.put_line(fnd_file.Log, 'call_identify: Generating CALL statement.');
410: -- Generate the call statement
411: cn_debug.print_msg('call_identify: Generating CALL statement.', 1);
412: fnd_file.put_line(fnd_file.Log, 'call_identify: Generating CALL statement.');
413:
414: cn_utils.set_org_id(x_org_id);
415: cn_utils.appindcr(code, 'cn_ram_adjustments_pkg.identify(x_start_period_id, x_end_period_id, debug_pipe, debug_level,x_org_id);' );
416: cn_utils.appendcr(code);
417: cn_utils.unset_org_id();
418:
411: cn_debug.print_msg('call_identify: Generating CALL statement.', 1);
412: fnd_file.put_line(fnd_file.Log, 'call_identify: Generating CALL statement.');
413:
414: cn_utils.set_org_id(x_org_id);
415: cn_utils.appindcr(code, 'cn_ram_adjustments_pkg.identify(x_start_period_id, x_end_period_id, debug_pipe, debug_level,x_org_id);' );
416: cn_utils.appendcr(code);
417: cn_utils.unset_org_id();
418:
419: cn_debug.print_msg('call_identify <<', 1);
412: fnd_file.put_line(fnd_file.Log, 'call_identify: Generating CALL statement.');
413:
414: cn_utils.set_org_id(x_org_id);
415: cn_utils.appindcr(code, 'cn_ram_adjustments_pkg.identify(x_start_period_id, x_end_period_id, debug_pipe, debug_level,x_org_id);' );
416: cn_utils.appendcr(code);
417: cn_utils.unset_org_id();
418:
419: cn_debug.print_msg('call_identify <<', 1);
420: fnd_file.put_line(fnd_file.Log, 'call_identify <<');
413:
414: cn_utils.set_org_id(x_org_id);
415: cn_utils.appindcr(code, 'cn_ram_adjustments_pkg.identify(x_start_period_id, x_end_period_id, debug_pipe, debug_level,x_org_id);' );
416: cn_utils.appendcr(code);
417: cn_utils.unset_org_id();
418:
419: cn_debug.print_msg('call_identify <<', 1);
420: fnd_file.put_line(fnd_file.Log, 'call_identify <<');
421:
418:
419: cn_debug.print_msg('call_identify <<', 1);
420: fnd_file.put_line(fnd_file.Log, 'call_identify <<');
421:
422: cn_utils.set_org_id(x_org_id);
423: cn_utils.appindcr(code, 'cn_message_pkg.debug('''|| procedure_name || ': end identify process.'');');
424: cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, '''|| procedure_name || ': end identify process.'');');
425: cn_utils.appendcr(code);
426:
419: cn_debug.print_msg('call_identify <<', 1);
420: fnd_file.put_line(fnd_file.Log, 'call_identify <<');
421:
422: cn_utils.set_org_id(x_org_id);
423: cn_utils.appindcr(code, 'cn_message_pkg.debug('''|| procedure_name || ': end identify process.'');');
424: cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, '''|| procedure_name || ': end identify process.'');');
425: cn_utils.appendcr(code);
426:
427: cn_utils.unset_org_id();
420: fnd_file.put_line(fnd_file.Log, 'call_identify <<');
421:
422: cn_utils.set_org_id(x_org_id);
423: cn_utils.appindcr(code, 'cn_message_pkg.debug('''|| procedure_name || ': end identify process.'');');
424: cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, '''|| procedure_name || ': end identify process.'');');
425: cn_utils.appendcr(code);
426:
427: cn_utils.unset_org_id();
428: EXCEPTION
421:
422: cn_utils.set_org_id(x_org_id);
423: cn_utils.appindcr(code, 'cn_message_pkg.debug('''|| procedure_name || ': end identify process.'');');
424: cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, '''|| procedure_name || ': end identify process.'');');
425: cn_utils.appendcr(code);
426:
427: cn_utils.unset_org_id();
428: EXCEPTION
429:
423: cn_utils.appindcr(code, 'cn_message_pkg.debug('''|| procedure_name || ': end identify process.'');');
424: cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, '''|| procedure_name || ': end identify process.'');');
425: cn_utils.appendcr(code);
426:
427: cn_utils.unset_org_id();
428: EXCEPTION
429:
430: WHEN NO_DATA_FOUND
431: THEN
448: procedure_name cn_obj_procedures_v.NAME%TYPE,
449: x_module_id cn_modules.module_id%TYPE,
450: x_repository_id cn_repositories.repository_id%TYPE,
451: x_event_id cn_events.event_id%TYPE,
452: code IN OUT NOCOPY cn_utils.code_type,
453: x_org_id IN NUMBER)
454: IS
455:
456: x_row_count NUMBER;
456: x_row_count NUMBER;
457:
458: BEGIN
459:
460: cn_utils.set_org_id(x_org_id);
461:
462: cn_utils.appendcr(code);
463: cn_utils.appendcr(code, '--******** NEGATE PROCESS ********-- ');
464: cn_utils.appendcr(code);
458: BEGIN
459:
460: cn_utils.set_org_id(x_org_id);
461:
462: cn_utils.appendcr(code);
463: cn_utils.appendcr(code, '--******** NEGATE PROCESS ********-- ');
464: cn_utils.appendcr(code);
465: cn_utils.unset_org_id();
466:
459:
460: cn_utils.set_org_id(x_org_id);
461:
462: cn_utils.appendcr(code);
463: cn_utils.appendcr(code, '--******** NEGATE PROCESS ********-- ');
464: cn_utils.appendcr(code);
465: cn_utils.unset_org_id();
466:
467: cn_debug.print_msg('call_negate >>', 1);
460: cn_utils.set_org_id(x_org_id);
461:
462: cn_utils.appendcr(code);
463: cn_utils.appendcr(code, '--******** NEGATE PROCESS ********-- ');
464: cn_utils.appendcr(code);
465: cn_utils.unset_org_id();
466:
467: cn_debug.print_msg('call_negate >>', 1);
468: fnd_file.put_line(fnd_file.Log, 'call_negate >>');
461:
462: cn_utils.appendcr(code);
463: cn_utils.appendcr(code, '--******** NEGATE PROCESS ********-- ');
464: cn_utils.appendcr(code);
465: cn_utils.unset_org_id();
466:
467: cn_debug.print_msg('call_negate >>', 1);
468: fnd_file.put_line(fnd_file.Log, 'call_negate >>');
469:
466:
467: cn_debug.print_msg('call_negate >>', 1);
468: fnd_file.put_line(fnd_file.Log, 'call_negate >>');
469:
470: cn_utils.set_org_id(x_org_id);
471: cn_utils.appindcr(code, 'x_ram_negate_profile := CN_SYSTEM_PARAMETERS.value(''CN_RAM_NEGATE'','|| x_org_id ||');');
472: cn_utils.appendcr(code);
473: cn_utils.appindcr(code, 'cn_message_pkg.debug('''|| procedure_name ||
474: ': Profile OSC: Negate during Revenue Adjustments Collection = '' || x_ram_negate_profile);');
467: cn_debug.print_msg('call_negate >>', 1);
468: fnd_file.put_line(fnd_file.Log, 'call_negate >>');
469:
470: cn_utils.set_org_id(x_org_id);
471: cn_utils.appindcr(code, 'x_ram_negate_profile := CN_SYSTEM_PARAMETERS.value(''CN_RAM_NEGATE'','|| x_org_id ||');');
472: cn_utils.appendcr(code);
473: cn_utils.appindcr(code, 'cn_message_pkg.debug('''|| procedure_name ||
474: ': Profile OSC: Negate during Revenue Adjustments Collection = '' || x_ram_negate_profile);');
475: cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, '''|| procedure_name ||
468: fnd_file.put_line(fnd_file.Log, 'call_negate >>');
469:
470: cn_utils.set_org_id(x_org_id);
471: cn_utils.appindcr(code, 'x_ram_negate_profile := CN_SYSTEM_PARAMETERS.value(''CN_RAM_NEGATE'','|| x_org_id ||');');
472: cn_utils.appendcr(code);
473: cn_utils.appindcr(code, 'cn_message_pkg.debug('''|| procedure_name ||
474: ': Profile OSC: Negate during Revenue Adjustments Collection = '' || x_ram_negate_profile);');
475: cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, '''|| procedure_name ||
476: ': Profile OSC: Negate during Revenue Adjustments Collection = '' || x_ram_negate_profile);');
469:
470: cn_utils.set_org_id(x_org_id);
471: cn_utils.appindcr(code, 'x_ram_negate_profile := CN_SYSTEM_PARAMETERS.value(''CN_RAM_NEGATE'','|| x_org_id ||');');
472: cn_utils.appendcr(code);
473: cn_utils.appindcr(code, 'cn_message_pkg.debug('''|| procedure_name ||
474: ': Profile OSC: Negate during Revenue Adjustments Collection = '' || x_ram_negate_profile);');
475: cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, '''|| procedure_name ||
476: ': Profile OSC: Negate during Revenue Adjustments Collection = '' || x_ram_negate_profile);');
477: cn_utils.appendcr(code);
471: cn_utils.appindcr(code, 'x_ram_negate_profile := CN_SYSTEM_PARAMETERS.value(''CN_RAM_NEGATE'','|| x_org_id ||');');
472: cn_utils.appendcr(code);
473: cn_utils.appindcr(code, 'cn_message_pkg.debug('''|| procedure_name ||
474: ': Profile OSC: Negate during Revenue Adjustments Collection = '' || x_ram_negate_profile);');
475: cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, '''|| procedure_name ||
476: ': Profile OSC: Negate during Revenue Adjustments Collection = '' || x_ram_negate_profile);');
477: cn_utils.appendcr(code);
478: cn_utils.appindcr(code, 'IF x_ram_negate_profile = ''Y'' THEN ');
479: cn_utils.appindcr(code, ' cn_message_pkg.debug('''|| procedure_name || ': start negate process.'');');
473: cn_utils.appindcr(code, 'cn_message_pkg.debug('''|| procedure_name ||
474: ': Profile OSC: Negate during Revenue Adjustments Collection = '' || x_ram_negate_profile);');
475: cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, '''|| procedure_name ||
476: ': Profile OSC: Negate during Revenue Adjustments Collection = '' || x_ram_negate_profile);');
477: cn_utils.appendcr(code);
478: cn_utils.appindcr(code, 'IF x_ram_negate_profile = ''Y'' THEN ');
479: cn_utils.appindcr(code, ' cn_message_pkg.debug('''|| procedure_name || ': start negate process.'');');
480: cn_utils.appindcr(code, ' fnd_file.put_line(fnd_file.Log, '''|| procedure_name || ': start negate process.'');');
481: cn_utils.appindcr(code, ' cn_ram_adjustments_pkg.negate(debug_pipe, debug_level,'||x_org_id||');' );
474: ': Profile OSC: Negate during Revenue Adjustments Collection = '' || x_ram_negate_profile);');
475: cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, '''|| procedure_name ||
476: ': Profile OSC: Negate during Revenue Adjustments Collection = '' || x_ram_negate_profile);');
477: cn_utils.appendcr(code);
478: cn_utils.appindcr(code, 'IF x_ram_negate_profile = ''Y'' THEN ');
479: cn_utils.appindcr(code, ' cn_message_pkg.debug('''|| procedure_name || ': start negate process.'');');
480: cn_utils.appindcr(code, ' fnd_file.put_line(fnd_file.Log, '''|| procedure_name || ': start negate process.'');');
481: cn_utils.appindcr(code, ' cn_ram_adjustments_pkg.negate(debug_pipe, debug_level,'||x_org_id||');' );
482: cn_utils.appindcr(code, ' cn_message_pkg.debug('''|| procedure_name || ': end negate process.'');');
475: cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, '''|| procedure_name ||
476: ': Profile OSC: Negate during Revenue Adjustments Collection = '' || x_ram_negate_profile);');
477: cn_utils.appendcr(code);
478: cn_utils.appindcr(code, 'IF x_ram_negate_profile = ''Y'' THEN ');
479: cn_utils.appindcr(code, ' cn_message_pkg.debug('''|| procedure_name || ': start negate process.'');');
480: cn_utils.appindcr(code, ' fnd_file.put_line(fnd_file.Log, '''|| procedure_name || ': start negate process.'');');
481: cn_utils.appindcr(code, ' cn_ram_adjustments_pkg.negate(debug_pipe, debug_level,'||x_org_id||');' );
482: cn_utils.appindcr(code, ' cn_message_pkg.debug('''|| procedure_name || ': end negate process.'');');
483: cn_utils.appindcr(code, ' fnd_file.put_line(fnd_file.Log, '''|| procedure_name || ': end negate process.'');');
476: ': Profile OSC: Negate during Revenue Adjustments Collection = '' || x_ram_negate_profile);');
477: cn_utils.appendcr(code);
478: cn_utils.appindcr(code, 'IF x_ram_negate_profile = ''Y'' THEN ');
479: cn_utils.appindcr(code, ' cn_message_pkg.debug('''|| procedure_name || ': start negate process.'');');
480: cn_utils.appindcr(code, ' fnd_file.put_line(fnd_file.Log, '''|| procedure_name || ': start negate process.'');');
481: cn_utils.appindcr(code, ' cn_ram_adjustments_pkg.negate(debug_pipe, debug_level,'||x_org_id||');' );
482: cn_utils.appindcr(code, ' cn_message_pkg.debug('''|| procedure_name || ': end negate process.'');');
483: cn_utils.appindcr(code, ' fnd_file.put_line(fnd_file.Log, '''|| procedure_name || ': end negate process.'');');
484: cn_utils.appindcr(code, 'ELSE');
477: cn_utils.appendcr(code);
478: cn_utils.appindcr(code, 'IF x_ram_negate_profile = ''Y'' THEN ');
479: cn_utils.appindcr(code, ' cn_message_pkg.debug('''|| procedure_name || ': start negate process.'');');
480: cn_utils.appindcr(code, ' fnd_file.put_line(fnd_file.Log, '''|| procedure_name || ': start negate process.'');');
481: cn_utils.appindcr(code, ' cn_ram_adjustments_pkg.negate(debug_pipe, debug_level,'||x_org_id||');' );
482: cn_utils.appindcr(code, ' cn_message_pkg.debug('''|| procedure_name || ': end negate process.'');');
483: cn_utils.appindcr(code, ' fnd_file.put_line(fnd_file.Log, '''|| procedure_name || ': end negate process.'');');
484: cn_utils.appindcr(code, 'ELSE');
485: cn_utils.appindcr(code, ' cn_message_pkg.debug('''|| procedure_name || ': skip negate process.'');');
478: cn_utils.appindcr(code, 'IF x_ram_negate_profile = ''Y'' THEN ');
479: cn_utils.appindcr(code, ' cn_message_pkg.debug('''|| procedure_name || ': start negate process.'');');
480: cn_utils.appindcr(code, ' fnd_file.put_line(fnd_file.Log, '''|| procedure_name || ': start negate process.'');');
481: cn_utils.appindcr(code, ' cn_ram_adjustments_pkg.negate(debug_pipe, debug_level,'||x_org_id||');' );
482: cn_utils.appindcr(code, ' cn_message_pkg.debug('''|| procedure_name || ': end negate process.'');');
483: cn_utils.appindcr(code, ' fnd_file.put_line(fnd_file.Log, '''|| procedure_name || ': end negate process.'');');
484: cn_utils.appindcr(code, 'ELSE');
485: cn_utils.appindcr(code, ' cn_message_pkg.debug('''|| procedure_name || ': skip negate process.'');');
486: cn_utils.appindcr(code, ' fnd_file.put_line(fnd_file.Log, '''|| procedure_name || ': skip negate process.'');');
479: cn_utils.appindcr(code, ' cn_message_pkg.debug('''|| procedure_name || ': start negate process.'');');
480: cn_utils.appindcr(code, ' fnd_file.put_line(fnd_file.Log, '''|| procedure_name || ': start negate process.'');');
481: cn_utils.appindcr(code, ' cn_ram_adjustments_pkg.negate(debug_pipe, debug_level,'||x_org_id||');' );
482: cn_utils.appindcr(code, ' cn_message_pkg.debug('''|| procedure_name || ': end negate process.'');');
483: cn_utils.appindcr(code, ' fnd_file.put_line(fnd_file.Log, '''|| procedure_name || ': end negate process.'');');
484: cn_utils.appindcr(code, 'ELSE');
485: cn_utils.appindcr(code, ' cn_message_pkg.debug('''|| procedure_name || ': skip negate process.'');');
486: cn_utils.appindcr(code, ' fnd_file.put_line(fnd_file.Log, '''|| procedure_name || ': skip negate process.'');');
487: cn_utils.appendcr(code);
480: cn_utils.appindcr(code, ' fnd_file.put_line(fnd_file.Log, '''|| procedure_name || ': start negate process.'');');
481: cn_utils.appindcr(code, ' cn_ram_adjustments_pkg.negate(debug_pipe, debug_level,'||x_org_id||');' );
482: cn_utils.appindcr(code, ' cn_message_pkg.debug('''|| procedure_name || ': end negate process.'');');
483: cn_utils.appindcr(code, ' fnd_file.put_line(fnd_file.Log, '''|| procedure_name || ': end negate process.'');');
484: cn_utils.appindcr(code, 'ELSE');
485: cn_utils.appindcr(code, ' cn_message_pkg.debug('''|| procedure_name || ': skip negate process.'');');
486: cn_utils.appindcr(code, ' fnd_file.put_line(fnd_file.Log, '''|| procedure_name || ': skip negate process.'');');
487: cn_utils.appendcr(code);
488: cn_utils.appindcr(code, ' UPDATE cn_trx_lines ctl');
481: cn_utils.appindcr(code, ' cn_ram_adjustments_pkg.negate(debug_pipe, debug_level,'||x_org_id||');' );
482: cn_utils.appindcr(code, ' cn_message_pkg.debug('''|| procedure_name || ': end negate process.'');');
483: cn_utils.appindcr(code, ' fnd_file.put_line(fnd_file.Log, '''|| procedure_name || ': end negate process.'');');
484: cn_utils.appindcr(code, 'ELSE');
485: cn_utils.appindcr(code, ' cn_message_pkg.debug('''|| procedure_name || ': skip negate process.'');');
486: cn_utils.appindcr(code, ' fnd_file.put_line(fnd_file.Log, '''|| procedure_name || ': skip negate process.'');');
487: cn_utils.appendcr(code);
488: cn_utils.appindcr(code, ' UPDATE cn_trx_lines ctl');
489: cn_utils.appindcr(code, ' SET negated_flag = ''Y''');
482: cn_utils.appindcr(code, ' cn_message_pkg.debug('''|| procedure_name || ': end negate process.'');');
483: cn_utils.appindcr(code, ' fnd_file.put_line(fnd_file.Log, '''|| procedure_name || ': end negate process.'');');
484: cn_utils.appindcr(code, 'ELSE');
485: cn_utils.appindcr(code, ' cn_message_pkg.debug('''|| procedure_name || ': skip negate process.'');');
486: cn_utils.appindcr(code, ' fnd_file.put_line(fnd_file.Log, '''|| procedure_name || ': skip negate process.'');');
487: cn_utils.appendcr(code);
488: cn_utils.appindcr(code, ' UPDATE cn_trx_lines ctl');
489: cn_utils.appindcr(code, ' SET negated_flag = ''Y''');
490: cn_utils.appindcr(code, ' WHERE ctl.adjusted_flag = ''Y'' and');
483: cn_utils.appindcr(code, ' fnd_file.put_line(fnd_file.Log, '''|| procedure_name || ': end negate process.'');');
484: cn_utils.appindcr(code, 'ELSE');
485: cn_utils.appindcr(code, ' cn_message_pkg.debug('''|| procedure_name || ': skip negate process.'');');
486: cn_utils.appindcr(code, ' fnd_file.put_line(fnd_file.Log, '''|| procedure_name || ': skip negate process.'');');
487: cn_utils.appendcr(code);
488: cn_utils.appindcr(code, ' UPDATE cn_trx_lines ctl');
489: cn_utils.appindcr(code, ' SET negated_flag = ''Y''');
490: cn_utils.appindcr(code, ' WHERE ctl.adjusted_flag = ''Y'' and');
491: cn_utils.appindcr(code, ' ctl.negated_flag = ''N'' and');
484: cn_utils.appindcr(code, 'ELSE');
485: cn_utils.appindcr(code, ' cn_message_pkg.debug('''|| procedure_name || ': skip negate process.'');');
486: cn_utils.appindcr(code, ' fnd_file.put_line(fnd_file.Log, '''|| procedure_name || ': skip negate process.'');');
487: cn_utils.appendcr(code);
488: cn_utils.appindcr(code, ' UPDATE cn_trx_lines ctl');
489: cn_utils.appindcr(code, ' SET negated_flag = ''Y''');
490: cn_utils.appindcr(code, ' WHERE ctl.adjusted_flag = ''Y'' and');
491: cn_utils.appindcr(code, ' ctl.negated_flag = ''N'' and');
492: cn_utils.appindcr(code, ' ctl.collected_flag = ''N'' and');
485: cn_utils.appindcr(code, ' cn_message_pkg.debug('''|| procedure_name || ': skip negate process.'');');
486: cn_utils.appindcr(code, ' fnd_file.put_line(fnd_file.Log, '''|| procedure_name || ': skip negate process.'');');
487: cn_utils.appendcr(code);
488: cn_utils.appindcr(code, ' UPDATE cn_trx_lines ctl');
489: cn_utils.appindcr(code, ' SET negated_flag = ''Y''');
490: cn_utils.appindcr(code, ' WHERE ctl.adjusted_flag = ''Y'' and');
491: cn_utils.appindcr(code, ' ctl.negated_flag = ''N'' and');
492: cn_utils.appindcr(code, ' ctl.collected_flag = ''N'' and');
493: cn_utils.appindcr(code, ' ctl.event_id = cn_global.inv_event_id');
486: cn_utils.appindcr(code, ' fnd_file.put_line(fnd_file.Log, '''|| procedure_name || ': skip negate process.'');');
487: cn_utils.appendcr(code);
488: cn_utils.appindcr(code, ' UPDATE cn_trx_lines ctl');
489: cn_utils.appindcr(code, ' SET negated_flag = ''Y''');
490: cn_utils.appindcr(code, ' WHERE ctl.adjusted_flag = ''Y'' and');
491: cn_utils.appindcr(code, ' ctl.negated_flag = ''N'' and');
492: cn_utils.appindcr(code, ' ctl.collected_flag = ''N'' and');
493: cn_utils.appindcr(code, ' ctl.event_id = cn_global.inv_event_id');
494: cn_utils.appindcr(code, ' AND ctl.org_id = '||x_org_id||' ;');
487: cn_utils.appendcr(code);
488: cn_utils.appindcr(code, ' UPDATE cn_trx_lines ctl');
489: cn_utils.appindcr(code, ' SET negated_flag = ''Y''');
490: cn_utils.appindcr(code, ' WHERE ctl.adjusted_flag = ''Y'' and');
491: cn_utils.appindcr(code, ' ctl.negated_flag = ''N'' and');
492: cn_utils.appindcr(code, ' ctl.collected_flag = ''N'' and');
493: cn_utils.appindcr(code, ' ctl.event_id = cn_global.inv_event_id');
494: cn_utils.appindcr(code, ' AND ctl.org_id = '||x_org_id||' ;');
495: cn_utils.appendcr(code);
488: cn_utils.appindcr(code, ' UPDATE cn_trx_lines ctl');
489: cn_utils.appindcr(code, ' SET negated_flag = ''Y''');
490: cn_utils.appindcr(code, ' WHERE ctl.adjusted_flag = ''Y'' and');
491: cn_utils.appindcr(code, ' ctl.negated_flag = ''N'' and');
492: cn_utils.appindcr(code, ' ctl.collected_flag = ''N'' and');
493: cn_utils.appindcr(code, ' ctl.event_id = cn_global.inv_event_id');
494: cn_utils.appindcr(code, ' AND ctl.org_id = '||x_org_id||' ;');
495: cn_utils.appendcr(code);
496: cn_utils.appindcr(code, 'END IF;');
489: cn_utils.appindcr(code, ' SET negated_flag = ''Y''');
490: cn_utils.appindcr(code, ' WHERE ctl.adjusted_flag = ''Y'' and');
491: cn_utils.appindcr(code, ' ctl.negated_flag = ''N'' and');
492: cn_utils.appindcr(code, ' ctl.collected_flag = ''N'' and');
493: cn_utils.appindcr(code, ' ctl.event_id = cn_global.inv_event_id');
494: cn_utils.appindcr(code, ' AND ctl.org_id = '||x_org_id||' ;');
495: cn_utils.appendcr(code);
496: cn_utils.appindcr(code, 'END IF;');
497: cn_utils.appendcr(code);
490: cn_utils.appindcr(code, ' WHERE ctl.adjusted_flag = ''Y'' and');
491: cn_utils.appindcr(code, ' ctl.negated_flag = ''N'' and');
492: cn_utils.appindcr(code, ' ctl.collected_flag = ''N'' and');
493: cn_utils.appindcr(code, ' ctl.event_id = cn_global.inv_event_id');
494: cn_utils.appindcr(code, ' AND ctl.org_id = '||x_org_id||' ;');
495: cn_utils.appendcr(code);
496: cn_utils.appindcr(code, 'END IF;');
497: cn_utils.appendcr(code);
498: cn_utils.unset_org_id();
491: cn_utils.appindcr(code, ' ctl.negated_flag = ''N'' and');
492: cn_utils.appindcr(code, ' ctl.collected_flag = ''N'' and');
493: cn_utils.appindcr(code, ' ctl.event_id = cn_global.inv_event_id');
494: cn_utils.appindcr(code, ' AND ctl.org_id = '||x_org_id||' ;');
495: cn_utils.appendcr(code);
496: cn_utils.appindcr(code, 'END IF;');
497: cn_utils.appendcr(code);
498: cn_utils.unset_org_id();
499:
492: cn_utils.appindcr(code, ' ctl.collected_flag = ''N'' and');
493: cn_utils.appindcr(code, ' ctl.event_id = cn_global.inv_event_id');
494: cn_utils.appindcr(code, ' AND ctl.org_id = '||x_org_id||' ;');
495: cn_utils.appendcr(code);
496: cn_utils.appindcr(code, 'END IF;');
497: cn_utils.appendcr(code);
498: cn_utils.unset_org_id();
499:
500: cn_debug.print_msg('call_negate <<', 1);
493: cn_utils.appindcr(code, ' ctl.event_id = cn_global.inv_event_id');
494: cn_utils.appindcr(code, ' AND ctl.org_id = '||x_org_id||' ;');
495: cn_utils.appendcr(code);
496: cn_utils.appindcr(code, 'END IF;');
497: cn_utils.appendcr(code);
498: cn_utils.unset_org_id();
499:
500: cn_debug.print_msg('call_negate <<', 1);
501: fnd_file.put_line(fnd_file.Log, 'call_negate <<');
494: cn_utils.appindcr(code, ' AND ctl.org_id = '||x_org_id||' ;');
495: cn_utils.appendcr(code);
496: cn_utils.appindcr(code, 'END IF;');
497: cn_utils.appendcr(code);
498: cn_utils.unset_org_id();
499:
500: cn_debug.print_msg('call_negate <<', 1);
501: fnd_file.put_line(fnd_file.Log, 'call_negate <<');
502:
523:
524: PROCEDURE local_variables (
525: procedure_name VARCHAR2,
526: x_event_id cn_events.event_id%TYPE,
527: code IN OUT NOCOPY cn_utils.code_type,
528: x_org_id IN NUMBER) IS
529: BEGIN
530:
531:
534:
535: cn_debug.print_msg('local_variables>>', 1);
536: fnd_file.put_line(fnd_file.Log, 'local_variables>>');
537:
538: cn_utils.set_org_id(x_org_id);
539: cn_utils.indent(code, 1);
540: cn_utils.appindcr(code, 'trx_sales_line_count NUMBER := 0;');
541: cn_utils.appindcr(code, 'trx_update_count NUMBER := 0;');
542: cn_utils.appindcr(code, 'trx_line_update_count NUMBER := 0;');
535: cn_debug.print_msg('local_variables>>', 1);
536: fnd_file.put_line(fnd_file.Log, 'local_variables>>');
537:
538: cn_utils.set_org_id(x_org_id);
539: cn_utils.indent(code, 1);
540: cn_utils.appindcr(code, 'trx_sales_line_count NUMBER := 0;');
541: cn_utils.appindcr(code, 'trx_update_count NUMBER := 0;');
542: cn_utils.appindcr(code, 'trx_line_update_count NUMBER := 0;');
543: cn_utils.appindcr(code, 'trx_sales_line_update_count NUMBER := 0;');
536: fnd_file.put_line(fnd_file.Log, 'local_variables>>');
537:
538: cn_utils.set_org_id(x_org_id);
539: cn_utils.indent(code, 1);
540: cn_utils.appindcr(code, 'trx_sales_line_count NUMBER := 0;');
541: cn_utils.appindcr(code, 'trx_update_count NUMBER := 0;');
542: cn_utils.appindcr(code, 'trx_line_update_count NUMBER := 0;');
543: cn_utils.appindcr(code, 'trx_sales_line_update_count NUMBER := 0;');
544: cn_utils.appindcr(code, 'comm_lines_api_count NUMBER := 0;');
537:
538: cn_utils.set_org_id(x_org_id);
539: cn_utils.indent(code, 1);
540: cn_utils.appindcr(code, 'trx_sales_line_count NUMBER := 0;');
541: cn_utils.appindcr(code, 'trx_update_count NUMBER := 0;');
542: cn_utils.appindcr(code, 'trx_line_update_count NUMBER := 0;');
543: cn_utils.appindcr(code, 'trx_sales_line_update_count NUMBER := 0;');
544: cn_utils.appindcr(code, 'comm_lines_api_count NUMBER := 0;');
545: cn_utils.appindcr(code, 'comm_lines_api_update_count NUMBER := 0;');
538: cn_utils.set_org_id(x_org_id);
539: cn_utils.indent(code, 1);
540: cn_utils.appindcr(code, 'trx_sales_line_count NUMBER := 0;');
541: cn_utils.appindcr(code, 'trx_update_count NUMBER := 0;');
542: cn_utils.appindcr(code, 'trx_line_update_count NUMBER := 0;');
543: cn_utils.appindcr(code, 'trx_sales_line_update_count NUMBER := 0;');
544: cn_utils.appindcr(code, 'comm_lines_api_count NUMBER := 0;');
545: cn_utils.appindcr(code, 'comm_lines_api_update_count NUMBER := 0;');
546: cn_utils.appindcr(code, 'x_start_period_id NUMBER(15);');
539: cn_utils.indent(code, 1);
540: cn_utils.appindcr(code, 'trx_sales_line_count NUMBER := 0;');
541: cn_utils.appindcr(code, 'trx_update_count NUMBER := 0;');
542: cn_utils.appindcr(code, 'trx_line_update_count NUMBER := 0;');
543: cn_utils.appindcr(code, 'trx_sales_line_update_count NUMBER := 0;');
544: cn_utils.appindcr(code, 'comm_lines_api_count NUMBER := 0;');
545: cn_utils.appindcr(code, 'comm_lines_api_update_count NUMBER := 0;');
546: cn_utils.appindcr(code, 'x_start_period_id NUMBER(15);');
547: cn_utils.appindcr(code, 'x_end_period_id NUMBER(15);');
540: cn_utils.appindcr(code, 'trx_sales_line_count NUMBER := 0;');
541: cn_utils.appindcr(code, 'trx_update_count NUMBER := 0;');
542: cn_utils.appindcr(code, 'trx_line_update_count NUMBER := 0;');
543: cn_utils.appindcr(code, 'trx_sales_line_update_count NUMBER := 0;');
544: cn_utils.appindcr(code, 'comm_lines_api_count NUMBER := 0;');
545: cn_utils.appindcr(code, 'comm_lines_api_update_count NUMBER := 0;');
546: cn_utils.appindcr(code, 'x_start_period_id NUMBER(15);');
547: cn_utils.appindcr(code, 'x_end_period_id NUMBER(15);');
548: cn_utils.appindcr(code, 'x_col_audit_id NUMBER;');
541: cn_utils.appindcr(code, 'trx_update_count NUMBER := 0;');
542: cn_utils.appindcr(code, 'trx_line_update_count NUMBER := 0;');
543: cn_utils.appindcr(code, 'trx_sales_line_update_count NUMBER := 0;');
544: cn_utils.appindcr(code, 'comm_lines_api_count NUMBER := 0;');
545: cn_utils.appindcr(code, 'comm_lines_api_update_count NUMBER := 0;');
546: cn_utils.appindcr(code, 'x_start_period_id NUMBER(15);');
547: cn_utils.appindcr(code, 'x_end_period_id NUMBER(15);');
548: cn_utils.appindcr(code, 'x_col_audit_id NUMBER;');
549: cn_utils.appindcr(code, 'x_proc_audit_id NUMBER;');
542: cn_utils.appindcr(code, 'trx_line_update_count NUMBER := 0;');
543: cn_utils.appindcr(code, 'trx_sales_line_update_count NUMBER := 0;');
544: cn_utils.appindcr(code, 'comm_lines_api_count NUMBER := 0;');
545: cn_utils.appindcr(code, 'comm_lines_api_update_count NUMBER := 0;');
546: cn_utils.appindcr(code, 'x_start_period_id NUMBER(15);');
547: cn_utils.appindcr(code, 'x_end_period_id NUMBER(15);');
548: cn_utils.appindcr(code, 'x_col_audit_id NUMBER;');
549: cn_utils.appindcr(code, 'x_proc_audit_id NUMBER;');
550: cn_utils.appindcr(code, 'x_conc_program_id NUMBER;');
543: cn_utils.appindcr(code, 'trx_sales_line_update_count NUMBER := 0;');
544: cn_utils.appindcr(code, 'comm_lines_api_count NUMBER := 0;');
545: cn_utils.appindcr(code, 'comm_lines_api_update_count NUMBER := 0;');
546: cn_utils.appindcr(code, 'x_start_period_id NUMBER(15);');
547: cn_utils.appindcr(code, 'x_end_period_id NUMBER(15);');
548: cn_utils.appindcr(code, 'x_col_audit_id NUMBER;');
549: cn_utils.appindcr(code, 'x_proc_audit_id NUMBER;');
550: cn_utils.appindcr(code, 'x_conc_program_id NUMBER;');
551: cn_utils.appindcr(code, 'x_adj_batch_id NUMBER;');
544: cn_utils.appindcr(code, 'comm_lines_api_count NUMBER := 0;');
545: cn_utils.appindcr(code, 'comm_lines_api_update_count NUMBER := 0;');
546: cn_utils.appindcr(code, 'x_start_period_id NUMBER(15);');
547: cn_utils.appindcr(code, 'x_end_period_id NUMBER(15);');
548: cn_utils.appindcr(code, 'x_col_audit_id NUMBER;');
549: cn_utils.appindcr(code, 'x_proc_audit_id NUMBER;');
550: cn_utils.appindcr(code, 'x_conc_program_id NUMBER;');
551: cn_utils.appindcr(code, 'x_adj_batch_id NUMBER;');
552: cn_utils.appindcr(code, 'x_rowid ROWID;');
545: cn_utils.appindcr(code, 'comm_lines_api_update_count NUMBER := 0;');
546: cn_utils.appindcr(code, 'x_start_period_id NUMBER(15);');
547: cn_utils.appindcr(code, 'x_end_period_id NUMBER(15);');
548: cn_utils.appindcr(code, 'x_col_audit_id NUMBER;');
549: cn_utils.appindcr(code, 'x_proc_audit_id NUMBER;');
550: cn_utils.appindcr(code, 'x_conc_program_id NUMBER;');
551: cn_utils.appindcr(code, 'x_adj_batch_id NUMBER;');
552: cn_utils.appindcr(code, 'x_rowid ROWID;');
553: cn_utils.appindcr(code, 'debug_pipe VARCHAR2(30);');
546: cn_utils.appindcr(code, 'x_start_period_id NUMBER(15);');
547: cn_utils.appindcr(code, 'x_end_period_id NUMBER(15);');
548: cn_utils.appindcr(code, 'x_col_audit_id NUMBER;');
549: cn_utils.appindcr(code, 'x_proc_audit_id NUMBER;');
550: cn_utils.appindcr(code, 'x_conc_program_id NUMBER;');
551: cn_utils.appindcr(code, 'x_adj_batch_id NUMBER;');
552: cn_utils.appindcr(code, 'x_rowid ROWID;');
553: cn_utils.appindcr(code, 'debug_pipe VARCHAR2(30);');
554: cn_utils.appindcr(code, 'debug_level NUMBER := 1 ;');
547: cn_utils.appindcr(code, 'x_end_period_id NUMBER(15);');
548: cn_utils.appindcr(code, 'x_col_audit_id NUMBER;');
549: cn_utils.appindcr(code, 'x_proc_audit_id NUMBER;');
550: cn_utils.appindcr(code, 'x_conc_program_id NUMBER;');
551: cn_utils.appindcr(code, 'x_adj_batch_id NUMBER;');
552: cn_utils.appindcr(code, 'x_rowid ROWID;');
553: cn_utils.appindcr(code, 'debug_pipe VARCHAR2(30);');
554: cn_utils.appindcr(code, 'debug_level NUMBER := 1 ;');
555: cn_utils.appindcr(code, 'dummy_num NUMBER ;');
548: cn_utils.appindcr(code, 'x_col_audit_id NUMBER;');
549: cn_utils.appindcr(code, 'x_proc_audit_id NUMBER;');
550: cn_utils.appindcr(code, 'x_conc_program_id NUMBER;');
551: cn_utils.appindcr(code, 'x_adj_batch_id NUMBER;');
552: cn_utils.appindcr(code, 'x_rowid ROWID;');
553: cn_utils.appindcr(code, 'debug_pipe VARCHAR2(30);');
554: cn_utils.appindcr(code, 'debug_level NUMBER := 1 ;');
555: cn_utils.appindcr(code, 'dummy_num NUMBER ;');
556: cn_utils.appindcr(code, 'x_return_status VARCHAR2(1);');
549: cn_utils.appindcr(code, 'x_proc_audit_id NUMBER;');
550: cn_utils.appindcr(code, 'x_conc_program_id NUMBER;');
551: cn_utils.appindcr(code, 'x_adj_batch_id NUMBER;');
552: cn_utils.appindcr(code, 'x_rowid ROWID;');
553: cn_utils.appindcr(code, 'debug_pipe VARCHAR2(30);');
554: cn_utils.appindcr(code, 'debug_level NUMBER := 1 ;');
555: cn_utils.appindcr(code, 'dummy_num NUMBER ;');
556: cn_utils.appindcr(code, 'x_return_status VARCHAR2(1);');
557: cn_utils.appindcr(code, 'x_msg_count NUMBER;');
550: cn_utils.appindcr(code, 'x_conc_program_id NUMBER;');
551: cn_utils.appindcr(code, 'x_adj_batch_id NUMBER;');
552: cn_utils.appindcr(code, 'x_rowid ROWID;');
553: cn_utils.appindcr(code, 'debug_pipe VARCHAR2(30);');
554: cn_utils.appindcr(code, 'debug_level NUMBER := 1 ;');
555: cn_utils.appindcr(code, 'dummy_num NUMBER ;');
556: cn_utils.appindcr(code, 'x_return_status VARCHAR2(1);');
557: cn_utils.appindcr(code, 'x_msg_count NUMBER;');
558: cn_utils.appindcr(code, 'x_msg_data VARCHAR(2000);');
551: cn_utils.appindcr(code, 'x_adj_batch_id NUMBER;');
552: cn_utils.appindcr(code, 'x_rowid ROWID;');
553: cn_utils.appindcr(code, 'debug_pipe VARCHAR2(30);');
554: cn_utils.appindcr(code, 'debug_level NUMBER := 1 ;');
555: cn_utils.appindcr(code, 'dummy_num NUMBER ;');
556: cn_utils.appindcr(code, 'x_return_status VARCHAR2(1);');
557: cn_utils.appindcr(code, 'x_msg_count NUMBER;');
558: cn_utils.appindcr(code, 'x_msg_data VARCHAR(2000);');
559: cn_utils.appindcr(code, 'x_created_by NUMBER := to_number(fnd_global.user_id);');
552: cn_utils.appindcr(code, 'x_rowid ROWID;');
553: cn_utils.appindcr(code, 'debug_pipe VARCHAR2(30);');
554: cn_utils.appindcr(code, 'debug_level NUMBER := 1 ;');
555: cn_utils.appindcr(code, 'dummy_num NUMBER ;');
556: cn_utils.appindcr(code, 'x_return_status VARCHAR2(1);');
557: cn_utils.appindcr(code, 'x_msg_count NUMBER;');
558: cn_utils.appindcr(code, 'x_msg_data VARCHAR(2000);');
559: cn_utils.appindcr(code, 'x_created_by NUMBER := to_number(fnd_global.user_id);');
560: cn_utils.appindcr(code, 'x_creation_date DATE := sysdate;');
553: cn_utils.appindcr(code, 'debug_pipe VARCHAR2(30);');
554: cn_utils.appindcr(code, 'debug_level NUMBER := 1 ;');
555: cn_utils.appindcr(code, 'dummy_num NUMBER ;');
556: cn_utils.appindcr(code, 'x_return_status VARCHAR2(1);');
557: cn_utils.appindcr(code, 'x_msg_count NUMBER;');
558: cn_utils.appindcr(code, 'x_msg_data VARCHAR(2000);');
559: cn_utils.appindcr(code, 'x_created_by NUMBER := to_number(fnd_global.user_id);');
560: cn_utils.appindcr(code, 'x_creation_date DATE := sysdate;');
561: cn_utils.appindcr(code, 'x_last_updated_by NUMBER := to_number(fnd_global.user_id);');
554: cn_utils.appindcr(code, 'debug_level NUMBER := 1 ;');
555: cn_utils.appindcr(code, 'dummy_num NUMBER ;');
556: cn_utils.appindcr(code, 'x_return_status VARCHAR2(1);');
557: cn_utils.appindcr(code, 'x_msg_count NUMBER;');
558: cn_utils.appindcr(code, 'x_msg_data VARCHAR(2000);');
559: cn_utils.appindcr(code, 'x_created_by NUMBER := to_number(fnd_global.user_id);');
560: cn_utils.appindcr(code, 'x_creation_date DATE := sysdate;');
561: cn_utils.appindcr(code, 'x_last_updated_by NUMBER := to_number(fnd_global.user_id);');
562: cn_utils.appindcr(code, 'x_last_update_date DATE := sysdate;');
555: cn_utils.appindcr(code, 'dummy_num NUMBER ;');
556: cn_utils.appindcr(code, 'x_return_status VARCHAR2(1);');
557: cn_utils.appindcr(code, 'x_msg_count NUMBER;');
558: cn_utils.appindcr(code, 'x_msg_data VARCHAR(2000);');
559: cn_utils.appindcr(code, 'x_created_by NUMBER := to_number(fnd_global.user_id);');
560: cn_utils.appindcr(code, 'x_creation_date DATE := sysdate;');
561: cn_utils.appindcr(code, 'x_last_updated_by NUMBER := to_number(fnd_global.user_id);');
562: cn_utils.appindcr(code, 'x_last_update_date DATE := sysdate;');
563: cn_utils.appindcr(code, 'x_last_update_login NUMBER := to_number(fnd_global.login_id);');
556: cn_utils.appindcr(code, 'x_return_status VARCHAR2(1);');
557: cn_utils.appindcr(code, 'x_msg_count NUMBER;');
558: cn_utils.appindcr(code, 'x_msg_data VARCHAR(2000);');
559: cn_utils.appindcr(code, 'x_created_by NUMBER := to_number(fnd_global.user_id);');
560: cn_utils.appindcr(code, 'x_creation_date DATE := sysdate;');
561: cn_utils.appindcr(code, 'x_last_updated_by NUMBER := to_number(fnd_global.user_id);');
562: cn_utils.appindcr(code, 'x_last_update_date DATE := sysdate;');
563: cn_utils.appindcr(code, 'x_last_update_login NUMBER := to_number(fnd_global.login_id);');
564: cn_utils.appindcr(code, 'x_ram_negate_profile VARCHAR2(1);');
557: cn_utils.appindcr(code, 'x_msg_count NUMBER;');
558: cn_utils.appindcr(code, 'x_msg_data VARCHAR(2000);');
559: cn_utils.appindcr(code, 'x_created_by NUMBER := to_number(fnd_global.user_id);');
560: cn_utils.appindcr(code, 'x_creation_date DATE := sysdate;');
561: cn_utils.appindcr(code, 'x_last_updated_by NUMBER := to_number(fnd_global.user_id);');
562: cn_utils.appindcr(code, 'x_last_update_date DATE := sysdate;');
563: cn_utils.appindcr(code, 'x_last_update_login NUMBER := to_number(fnd_global.login_id);');
564: cn_utils.appindcr(code, 'x_ram_negate_profile VARCHAR2(1);');
565: --cn_utils.appindcr(code, 'X_org_id NUMBER;');
558: cn_utils.appindcr(code, 'x_msg_data VARCHAR(2000);');
559: cn_utils.appindcr(code, 'x_created_by NUMBER := to_number(fnd_global.user_id);');
560: cn_utils.appindcr(code, 'x_creation_date DATE := sysdate;');
561: cn_utils.appindcr(code, 'x_last_updated_by NUMBER := to_number(fnd_global.user_id);');
562: cn_utils.appindcr(code, 'x_last_update_date DATE := sysdate;');
563: cn_utils.appindcr(code, 'x_last_update_login NUMBER := to_number(fnd_global.login_id);');
564: cn_utils.appindcr(code, 'x_ram_negate_profile VARCHAR2(1);');
565: --cn_utils.appindcr(code, 'X_org_id NUMBER;');
566:
559: cn_utils.appindcr(code, 'x_created_by NUMBER := to_number(fnd_global.user_id);');
560: cn_utils.appindcr(code, 'x_creation_date DATE := sysdate;');
561: cn_utils.appindcr(code, 'x_last_updated_by NUMBER := to_number(fnd_global.user_id);');
562: cn_utils.appindcr(code, 'x_last_update_date DATE := sysdate;');
563: cn_utils.appindcr(code, 'x_last_update_login NUMBER := to_number(fnd_global.login_id);');
564: cn_utils.appindcr(code, 'x_ram_negate_profile VARCHAR2(1);');
565: --cn_utils.appindcr(code, 'X_org_id NUMBER;');
566:
567: cn_utils.appendcr(code);
560: cn_utils.appindcr(code, 'x_creation_date DATE := sysdate;');
561: cn_utils.appindcr(code, 'x_last_updated_by NUMBER := to_number(fnd_global.user_id);');
562: cn_utils.appindcr(code, 'x_last_update_date DATE := sysdate;');
563: cn_utils.appindcr(code, 'x_last_update_login NUMBER := to_number(fnd_global.login_id);');
564: cn_utils.appindcr(code, 'x_ram_negate_profile VARCHAR2(1);');
565: --cn_utils.appindcr(code, 'X_org_id NUMBER;');
566:
567: cn_utils.appendcr(code);
568: cn_utils.appindcr(code, 'CURSOR batches IS');
561: cn_utils.appindcr(code, 'x_last_updated_by NUMBER := to_number(fnd_global.user_id);');
562: cn_utils.appindcr(code, 'x_last_update_date DATE := sysdate;');
563: cn_utils.appindcr(code, 'x_last_update_login NUMBER := to_number(fnd_global.login_id);');
564: cn_utils.appindcr(code, 'x_ram_negate_profile VARCHAR2(1);');
565: --cn_utils.appindcr(code, 'X_org_id NUMBER;');
566:
567: cn_utils.appendcr(code);
568: cn_utils.appindcr(code, 'CURSOR batches IS');
569: cn_utils.appindcr(code, ' SELECT DISTINCT adj_batch_id');
563: cn_utils.appindcr(code, 'x_last_update_login NUMBER := to_number(fnd_global.login_id);');
564: cn_utils.appindcr(code, 'x_ram_negate_profile VARCHAR2(1);');
565: --cn_utils.appindcr(code, 'X_org_id NUMBER;');
566:
567: cn_utils.appendcr(code);
568: cn_utils.appindcr(code, 'CURSOR batches IS');
569: cn_utils.appindcr(code, ' SELECT DISTINCT adj_batch_id');
570: cn_utils.appindcr(code, ' FROM cn_trx_lines');
571: cn_utils.appindcr(code, ' WHERE adjusted_flag = ''Y'' AND');
564: cn_utils.appindcr(code, 'x_ram_negate_profile VARCHAR2(1);');
565: --cn_utils.appindcr(code, 'X_org_id NUMBER;');
566:
567: cn_utils.appendcr(code);
568: cn_utils.appindcr(code, 'CURSOR batches IS');
569: cn_utils.appindcr(code, ' SELECT DISTINCT adj_batch_id');
570: cn_utils.appindcr(code, ' FROM cn_trx_lines');
571: cn_utils.appindcr(code, ' WHERE adjusted_flag = ''Y'' AND');
572: cn_utils.appindcr(code, ' negated_flag = ''Y'' AND');
565: --cn_utils.appindcr(code, 'X_org_id NUMBER;');
566:
567: cn_utils.appendcr(code);
568: cn_utils.appindcr(code, 'CURSOR batches IS');
569: cn_utils.appindcr(code, ' SELECT DISTINCT adj_batch_id');
570: cn_utils.appindcr(code, ' FROM cn_trx_lines');
571: cn_utils.appindcr(code, ' WHERE adjusted_flag = ''Y'' AND');
572: cn_utils.appindcr(code, ' negated_flag = ''Y'' AND');
573: cn_utils.appindcr(code, ' collected_flag = ''N'' AND');
566:
567: cn_utils.appendcr(code);
568: cn_utils.appindcr(code, 'CURSOR batches IS');
569: cn_utils.appindcr(code, ' SELECT DISTINCT adj_batch_id');
570: cn_utils.appindcr(code, ' FROM cn_trx_lines');
571: cn_utils.appindcr(code, ' WHERE adjusted_flag = ''Y'' AND');
572: cn_utils.appindcr(code, ' negated_flag = ''Y'' AND');
573: cn_utils.appindcr(code, ' collected_flag = ''N'' AND');
574: cn_utils.appindcr(code, ' event_id = cn_global.inv_event_id AND ');
567: cn_utils.appendcr(code);
568: cn_utils.appindcr(code, 'CURSOR batches IS');
569: cn_utils.appindcr(code, ' SELECT DISTINCT adj_batch_id');
570: cn_utils.appindcr(code, ' FROM cn_trx_lines');
571: cn_utils.appindcr(code, ' WHERE adjusted_flag = ''Y'' AND');
572: cn_utils.appindcr(code, ' negated_flag = ''Y'' AND');
573: cn_utils.appindcr(code, ' collected_flag = ''N'' AND');
574: cn_utils.appindcr(code, ' event_id = cn_global.inv_event_id AND ');
575: cn_utils.appindcr(code, ' org_id = '||x_org_id||' ;');
568: cn_utils.appindcr(code, 'CURSOR batches IS');
569: cn_utils.appindcr(code, ' SELECT DISTINCT adj_batch_id');
570: cn_utils.appindcr(code, ' FROM cn_trx_lines');
571: cn_utils.appindcr(code, ' WHERE adjusted_flag = ''Y'' AND');
572: cn_utils.appindcr(code, ' negated_flag = ''Y'' AND');
573: cn_utils.appindcr(code, ' collected_flag = ''N'' AND');
574: cn_utils.appindcr(code, ' event_id = cn_global.inv_event_id AND ');
575: cn_utils.appindcr(code, ' org_id = '||x_org_id||' ;');
576: cn_utils.appendcr(code);
569: cn_utils.appindcr(code, ' SELECT DISTINCT adj_batch_id');
570: cn_utils.appindcr(code, ' FROM cn_trx_lines');
571: cn_utils.appindcr(code, ' WHERE adjusted_flag = ''Y'' AND');
572: cn_utils.appindcr(code, ' negated_flag = ''Y'' AND');
573: cn_utils.appindcr(code, ' collected_flag = ''N'' AND');
574: cn_utils.appindcr(code, ' event_id = cn_global.inv_event_id AND ');
575: cn_utils.appindcr(code, ' org_id = '||x_org_id||' ;');
576: cn_utils.appendcr(code);
577:
570: cn_utils.appindcr(code, ' FROM cn_trx_lines');
571: cn_utils.appindcr(code, ' WHERE adjusted_flag = ''Y'' AND');
572: cn_utils.appindcr(code, ' negated_flag = ''Y'' AND');
573: cn_utils.appindcr(code, ' collected_flag = ''N'' AND');
574: cn_utils.appindcr(code, ' event_id = cn_global.inv_event_id AND ');
575: cn_utils.appindcr(code, ' org_id = '||x_org_id||' ;');
576: cn_utils.appendcr(code);
577:
578: cn_utils.unindent(code, 1);
571: cn_utils.appindcr(code, ' WHERE adjusted_flag = ''Y'' AND');
572: cn_utils.appindcr(code, ' negated_flag = ''Y'' AND');
573: cn_utils.appindcr(code, ' collected_flag = ''N'' AND');
574: cn_utils.appindcr(code, ' event_id = cn_global.inv_event_id AND ');
575: cn_utils.appindcr(code, ' org_id = '||x_org_id||' ;');
576: cn_utils.appendcr(code);
577:
578: cn_utils.unindent(code, 1);
579: cn_utils.unset_org_id();
572: cn_utils.appindcr(code, ' negated_flag = ''Y'' AND');
573: cn_utils.appindcr(code, ' collected_flag = ''N'' AND');
574: cn_utils.appindcr(code, ' event_id = cn_global.inv_event_id AND ');
575: cn_utils.appindcr(code, ' org_id = '||x_org_id||' ;');
576: cn_utils.appendcr(code);
577:
578: cn_utils.unindent(code, 1);
579: cn_utils.unset_org_id();
580:
574: cn_utils.appindcr(code, ' event_id = cn_global.inv_event_id AND ');
575: cn_utils.appindcr(code, ' org_id = '||x_org_id||' ;');
576: cn_utils.appendcr(code);
577:
578: cn_utils.unindent(code, 1);
579: cn_utils.unset_org_id();
580:
581: cn_debug.print_msg('local_variables<<', 1);
582: fnd_file.put_line(fnd_file.Log, 'local_variables<<');
575: cn_utils.appindcr(code, ' org_id = '||x_org_id||' ;');
576: cn_utils.appendcr(code);
577:
578: cn_utils.unindent(code, 1);
579: cn_utils.unset_org_id();
580:
581: cn_debug.print_msg('local_variables<<', 1);
582: fnd_file.put_line(fnd_file.Log, 'local_variables<<');
583:
585:
586: cn_debug.print_msg('local_variables>>', 1);
587: fnd_file.put_line(fnd_file.Log, 'local_variables<<');
588:
589: cn_utils.set_org_id(x_org_id);
590: cn_utils.indent(code, 1);
591: cn_utils.appindcr(code, 'trx_count NUMBER := 0;');
592: cn_utils.appindcr(code, 'trx_line_count NUMBER := 0;');
593: cn_utils.appindcr(code, 'trx_sales_line_count NUMBER := 0;');
586: cn_debug.print_msg('local_variables>>', 1);
587: fnd_file.put_line(fnd_file.Log, 'local_variables<<');
588:
589: cn_utils.set_org_id(x_org_id);
590: cn_utils.indent(code, 1);
591: cn_utils.appindcr(code, 'trx_count NUMBER := 0;');
592: cn_utils.appindcr(code, 'trx_line_count NUMBER := 0;');
593: cn_utils.appindcr(code, 'trx_sales_line_count NUMBER := 0;');
594: cn_utils.appindcr(code, 'trx_update_count NUMBER := 0;'); --JC 02-13-97
587: fnd_file.put_line(fnd_file.Log, 'local_variables<<');
588:
589: cn_utils.set_org_id(x_org_id);
590: cn_utils.indent(code, 1);
591: cn_utils.appindcr(code, 'trx_count NUMBER := 0;');
592: cn_utils.appindcr(code, 'trx_line_count NUMBER := 0;');
593: cn_utils.appindcr(code, 'trx_sales_line_count NUMBER := 0;');
594: cn_utils.appindcr(code, 'trx_update_count NUMBER := 0;'); --JC 02-13-97
595: cn_utils.appindcr(code, 'trx_line_update_count NUMBER := 0;');
588:
589: cn_utils.set_org_id(x_org_id);
590: cn_utils.indent(code, 1);
591: cn_utils.appindcr(code, 'trx_count NUMBER := 0;');
592: cn_utils.appindcr(code, 'trx_line_count NUMBER := 0;');
593: cn_utils.appindcr(code, 'trx_sales_line_count NUMBER := 0;');
594: cn_utils.appindcr(code, 'trx_update_count NUMBER := 0;'); --JC 02-13-97
595: cn_utils.appindcr(code, 'trx_line_update_count NUMBER := 0;');
596: cn_utils.appindcr(code, 'trx_sales_line_update_count NUMBER := 0;');
589: cn_utils.set_org_id(x_org_id);
590: cn_utils.indent(code, 1);
591: cn_utils.appindcr(code, 'trx_count NUMBER := 0;');
592: cn_utils.appindcr(code, 'trx_line_count NUMBER := 0;');
593: cn_utils.appindcr(code, 'trx_sales_line_count NUMBER := 0;');
594: cn_utils.appindcr(code, 'trx_update_count NUMBER := 0;'); --JC 02-13-97
595: cn_utils.appindcr(code, 'trx_line_update_count NUMBER := 0;');
596: cn_utils.appindcr(code, 'trx_sales_line_update_count NUMBER := 0;');
597: cn_utils.appindcr(code, 'comm_lines_api_count NUMBER := 0;');
590: cn_utils.indent(code, 1);
591: cn_utils.appindcr(code, 'trx_count NUMBER := 0;');
592: cn_utils.appindcr(code, 'trx_line_count NUMBER := 0;');
593: cn_utils.appindcr(code, 'trx_sales_line_count NUMBER := 0;');
594: cn_utils.appindcr(code, 'trx_update_count NUMBER := 0;'); --JC 02-13-97
595: cn_utils.appindcr(code, 'trx_line_update_count NUMBER := 0;');
596: cn_utils.appindcr(code, 'trx_sales_line_update_count NUMBER := 0;');
597: cn_utils.appindcr(code, 'comm_lines_api_count NUMBER := 0;');
598: cn_utils.appindcr(code, 'comm_lines_api_update_count NUMBER := 0;');
591: cn_utils.appindcr(code, 'trx_count NUMBER := 0;');
592: cn_utils.appindcr(code, 'trx_line_count NUMBER := 0;');
593: cn_utils.appindcr(code, 'trx_sales_line_count NUMBER := 0;');
594: cn_utils.appindcr(code, 'trx_update_count NUMBER := 0;'); --JC 02-13-97
595: cn_utils.appindcr(code, 'trx_line_update_count NUMBER := 0;');
596: cn_utils.appindcr(code, 'trx_sales_line_update_count NUMBER := 0;');
597: cn_utils.appindcr(code, 'comm_lines_api_count NUMBER := 0;');
598: cn_utils.appindcr(code, 'comm_lines_api_update_count NUMBER := 0;');
599: cn_utils.appindcr(code, 'x_start_period_id NUMBER(15);'); --AE 02-28-96
592: cn_utils.appindcr(code, 'trx_line_count NUMBER := 0;');
593: cn_utils.appindcr(code, 'trx_sales_line_count NUMBER := 0;');
594: cn_utils.appindcr(code, 'trx_update_count NUMBER := 0;'); --JC 02-13-97
595: cn_utils.appindcr(code, 'trx_line_update_count NUMBER := 0;');
596: cn_utils.appindcr(code, 'trx_sales_line_update_count NUMBER := 0;');
597: cn_utils.appindcr(code, 'comm_lines_api_count NUMBER := 0;');
598: cn_utils.appindcr(code, 'comm_lines_api_update_count NUMBER := 0;');
599: cn_utils.appindcr(code, 'x_start_period_id NUMBER(15);'); --AE 02-28-96
600: cn_utils.appindcr(code, 'x_end_period_id NUMBER(15);'); --AE 02-28-96
593: cn_utils.appindcr(code, 'trx_sales_line_count NUMBER := 0;');
594: cn_utils.appindcr(code, 'trx_update_count NUMBER := 0;'); --JC 02-13-97
595: cn_utils.appindcr(code, 'trx_line_update_count NUMBER := 0;');
596: cn_utils.appindcr(code, 'trx_sales_line_update_count NUMBER := 0;');
597: cn_utils.appindcr(code, 'comm_lines_api_count NUMBER := 0;');
598: cn_utils.appindcr(code, 'comm_lines_api_update_count NUMBER := 0;');
599: cn_utils.appindcr(code, 'x_start_period_id NUMBER(15);'); --AE 02-28-96
600: cn_utils.appindcr(code, 'x_end_period_id NUMBER(15);'); --AE 02-28-96
601: cn_utils.appindcr(code, 'x_col_audit_id NUMBER;'); --AE 08-01-95
594: cn_utils.appindcr(code, 'trx_update_count NUMBER := 0;'); --JC 02-13-97
595: cn_utils.appindcr(code, 'trx_line_update_count NUMBER := 0;');
596: cn_utils.appindcr(code, 'trx_sales_line_update_count NUMBER := 0;');
597: cn_utils.appindcr(code, 'comm_lines_api_count NUMBER := 0;');
598: cn_utils.appindcr(code, 'comm_lines_api_update_count NUMBER := 0;');
599: cn_utils.appindcr(code, 'x_start_period_id NUMBER(15);'); --AE 02-28-96
600: cn_utils.appindcr(code, 'x_end_period_id NUMBER(15);'); --AE 02-28-96
601: cn_utils.appindcr(code, 'x_col_audit_id NUMBER;'); --AE 08-01-95
602: cn_utils.appindcr(code, 'x_proc_audit_id NUMBER;');
595: cn_utils.appindcr(code, 'trx_line_update_count NUMBER := 0;');
596: cn_utils.appindcr(code, 'trx_sales_line_update_count NUMBER := 0;');
597: cn_utils.appindcr(code, 'comm_lines_api_count NUMBER := 0;');
598: cn_utils.appindcr(code, 'comm_lines_api_update_count NUMBER := 0;');
599: cn_utils.appindcr(code, 'x_start_period_id NUMBER(15);'); --AE 02-28-96
600: cn_utils.appindcr(code, 'x_end_period_id NUMBER(15);'); --AE 02-28-96
601: cn_utils.appindcr(code, 'x_col_audit_id NUMBER;'); --AE 08-01-95
602: cn_utils.appindcr(code, 'x_proc_audit_id NUMBER;');
603: cn_utils.appindcr(code, 'x_conc_program_id NUMBER;'); --AE 01-18-96
596: cn_utils.appindcr(code, 'trx_sales_line_update_count NUMBER := 0;');
597: cn_utils.appindcr(code, 'comm_lines_api_count NUMBER := 0;');
598: cn_utils.appindcr(code, 'comm_lines_api_update_count NUMBER := 0;');
599: cn_utils.appindcr(code, 'x_start_period_id NUMBER(15);'); --AE 02-28-96
600: cn_utils.appindcr(code, 'x_end_period_id NUMBER(15);'); --AE 02-28-96
601: cn_utils.appindcr(code, 'x_col_audit_id NUMBER;'); --AE 08-01-95
602: cn_utils.appindcr(code, 'x_proc_audit_id NUMBER;');
603: cn_utils.appindcr(code, 'x_conc_program_id NUMBER;'); --AE 01-18-96
604: cn_utils.appindcr(code, 'x_batch_id NUMBER;');
597: cn_utils.appindcr(code, 'comm_lines_api_count NUMBER := 0;');
598: cn_utils.appindcr(code, 'comm_lines_api_update_count NUMBER := 0;');
599: cn_utils.appindcr(code, 'x_start_period_id NUMBER(15);'); --AE 02-28-96
600: cn_utils.appindcr(code, 'x_end_period_id NUMBER(15);'); --AE 02-28-96
601: cn_utils.appindcr(code, 'x_col_audit_id NUMBER;'); --AE 08-01-95
602: cn_utils.appindcr(code, 'x_proc_audit_id NUMBER;');
603: cn_utils.appindcr(code, 'x_conc_program_id NUMBER;'); --AE 01-18-96
604: cn_utils.appindcr(code, 'x_batch_id NUMBER;');
605: cn_utils.appindcr(code, 'x_rowid ROWID;');
598: cn_utils.appindcr(code, 'comm_lines_api_update_count NUMBER := 0;');
599: cn_utils.appindcr(code, 'x_start_period_id NUMBER(15);'); --AE 02-28-96
600: cn_utils.appindcr(code, 'x_end_period_id NUMBER(15);'); --AE 02-28-96
601: cn_utils.appindcr(code, 'x_col_audit_id NUMBER;'); --AE 08-01-95
602: cn_utils.appindcr(code, 'x_proc_audit_id NUMBER;');
603: cn_utils.appindcr(code, 'x_conc_program_id NUMBER;'); --AE 01-18-96
604: cn_utils.appindcr(code, 'x_batch_id NUMBER;');
605: cn_utils.appindcr(code, 'x_rowid ROWID;');
606: cn_utils.appindcr(code, 'debug_pipe VARCHAR2(30);'); --AE 02-28-96
599: cn_utils.appindcr(code, 'x_start_period_id NUMBER(15);'); --AE 02-28-96
600: cn_utils.appindcr(code, 'x_end_period_id NUMBER(15);'); --AE 02-28-96
601: cn_utils.appindcr(code, 'x_col_audit_id NUMBER;'); --AE 08-01-95
602: cn_utils.appindcr(code, 'x_proc_audit_id NUMBER;');
603: cn_utils.appindcr(code, 'x_conc_program_id NUMBER;'); --AE 01-18-96
604: cn_utils.appindcr(code, 'x_batch_id NUMBER;');
605: cn_utils.appindcr(code, 'x_rowid ROWID;');
606: cn_utils.appindcr(code, 'debug_pipe VARCHAR2(30);'); --AE 02-28-96
607: cn_utils.appindcr(code, 'debug_level NUMBER := 1 ;'); --AE 02-28-96
600: cn_utils.appindcr(code, 'x_end_period_id NUMBER(15);'); --AE 02-28-96
601: cn_utils.appindcr(code, 'x_col_audit_id NUMBER;'); --AE 08-01-95
602: cn_utils.appindcr(code, 'x_proc_audit_id NUMBER;');
603: cn_utils.appindcr(code, 'x_conc_program_id NUMBER;'); --AE 01-18-96
604: cn_utils.appindcr(code, 'x_batch_id NUMBER;');
605: cn_utils.appindcr(code, 'x_rowid ROWID;');
606: cn_utils.appindcr(code, 'debug_pipe VARCHAR2(30);'); --AE 02-28-96
607: cn_utils.appindcr(code, 'debug_level NUMBER := 1 ;'); --AE 02-28-96
608: cn_utils.appindcr(code, 'dummy_num NUMBER ;'); --JC 01-27-96
601: cn_utils.appindcr(code, 'x_col_audit_id NUMBER;'); --AE 08-01-95
602: cn_utils.appindcr(code, 'x_proc_audit_id NUMBER;');
603: cn_utils.appindcr(code, 'x_conc_program_id NUMBER;'); --AE 01-18-96
604: cn_utils.appindcr(code, 'x_batch_id NUMBER;');
605: cn_utils.appindcr(code, 'x_rowid ROWID;');
606: cn_utils.appindcr(code, 'debug_pipe VARCHAR2(30);'); --AE 02-28-96
607: cn_utils.appindcr(code, 'debug_level NUMBER := 1 ;'); --AE 02-28-96
608: cn_utils.appindcr(code, 'dummy_num NUMBER ;'); --JC 01-27-96
609: cn_utils.appindcr(code, 'x_return_status VARCHAR2(1);'); --DM 11-03-99
602: cn_utils.appindcr(code, 'x_proc_audit_id NUMBER;');
603: cn_utils.appindcr(code, 'x_conc_program_id NUMBER;'); --AE 01-18-96
604: cn_utils.appindcr(code, 'x_batch_id NUMBER;');
605: cn_utils.appindcr(code, 'x_rowid ROWID;');
606: cn_utils.appindcr(code, 'debug_pipe VARCHAR2(30);'); --AE 02-28-96
607: cn_utils.appindcr(code, 'debug_level NUMBER := 1 ;'); --AE 02-28-96
608: cn_utils.appindcr(code, 'dummy_num NUMBER ;'); --JC 01-27-96
609: cn_utils.appindcr(code, 'x_return_status VARCHAR2(1);'); --DM 11-03-99
610: cn_utils.appindcr(code, 'x_msg_count NUMBER;'); --DM 11-03-99
603: cn_utils.appindcr(code, 'x_conc_program_id NUMBER;'); --AE 01-18-96
604: cn_utils.appindcr(code, 'x_batch_id NUMBER;');
605: cn_utils.appindcr(code, 'x_rowid ROWID;');
606: cn_utils.appindcr(code, 'debug_pipe VARCHAR2(30);'); --AE 02-28-96
607: cn_utils.appindcr(code, 'debug_level NUMBER := 1 ;'); --AE 02-28-96
608: cn_utils.appindcr(code, 'dummy_num NUMBER ;'); --JC 01-27-96
609: cn_utils.appindcr(code, 'x_return_status VARCHAR2(1);'); --DM 11-03-99
610: cn_utils.appindcr(code, 'x_msg_count NUMBER;'); --DM 11-03-99
611: cn_utils.appindcr(code, 'x_msg_data VARCHAR(2000);'); --DM 11-03-99
604: cn_utils.appindcr(code, 'x_batch_id NUMBER;');
605: cn_utils.appindcr(code, 'x_rowid ROWID;');
606: cn_utils.appindcr(code, 'debug_pipe VARCHAR2(30);'); --AE 02-28-96
607: cn_utils.appindcr(code, 'debug_level NUMBER := 1 ;'); --AE 02-28-96
608: cn_utils.appindcr(code, 'dummy_num NUMBER ;'); --JC 01-27-96
609: cn_utils.appindcr(code, 'x_return_status VARCHAR2(1);'); --DM 11-03-99
610: cn_utils.appindcr(code, 'x_msg_count NUMBER;'); --DM 11-03-99
611: cn_utils.appindcr(code, 'x_msg_data VARCHAR(2000);'); --DM 11-03-99
612: cn_utils.appindcr(code, 'x_created_by NUMBER := to_number(fnd_global.user_id);');
605: cn_utils.appindcr(code, 'x_rowid ROWID;');
606: cn_utils.appindcr(code, 'debug_pipe VARCHAR2(30);'); --AE 02-28-96
607: cn_utils.appindcr(code, 'debug_level NUMBER := 1 ;'); --AE 02-28-96
608: cn_utils.appindcr(code, 'dummy_num NUMBER ;'); --JC 01-27-96
609: cn_utils.appindcr(code, 'x_return_status VARCHAR2(1);'); --DM 11-03-99
610: cn_utils.appindcr(code, 'x_msg_count NUMBER;'); --DM 11-03-99
611: cn_utils.appindcr(code, 'x_msg_data VARCHAR(2000);'); --DM 11-03-99
612: cn_utils.appindcr(code, 'x_created_by NUMBER := to_number(fnd_global.user_id);');
613: cn_utils.appindcr(code, 'x_creation_date DATE := sysdate;');
606: cn_utils.appindcr(code, 'debug_pipe VARCHAR2(30);'); --AE 02-28-96
607: cn_utils.appindcr(code, 'debug_level NUMBER := 1 ;'); --AE 02-28-96
608: cn_utils.appindcr(code, 'dummy_num NUMBER ;'); --JC 01-27-96
609: cn_utils.appindcr(code, 'x_return_status VARCHAR2(1);'); --DM 11-03-99
610: cn_utils.appindcr(code, 'x_msg_count NUMBER;'); --DM 11-03-99
611: cn_utils.appindcr(code, 'x_msg_data VARCHAR(2000);'); --DM 11-03-99
612: cn_utils.appindcr(code, 'x_created_by NUMBER := to_number(fnd_global.user_id);');
613: cn_utils.appindcr(code, 'x_creation_date DATE := sysdate;');
614: cn_utils.appindcr(code, 'x_last_updated_by NUMBER := to_number(fnd_global.user_id);');
607: cn_utils.appindcr(code, 'debug_level NUMBER := 1 ;'); --AE 02-28-96
608: cn_utils.appindcr(code, 'dummy_num NUMBER ;'); --JC 01-27-96
609: cn_utils.appindcr(code, 'x_return_status VARCHAR2(1);'); --DM 11-03-99
610: cn_utils.appindcr(code, 'x_msg_count NUMBER;'); --DM 11-03-99
611: cn_utils.appindcr(code, 'x_msg_data VARCHAR(2000);'); --DM 11-03-99
612: cn_utils.appindcr(code, 'x_created_by NUMBER := to_number(fnd_global.user_id);');
613: cn_utils.appindcr(code, 'x_creation_date DATE := sysdate;');
614: cn_utils.appindcr(code, 'x_last_updated_by NUMBER := to_number(fnd_global.user_id);');
615: cn_utils.appindcr(code, 'x_last_update_date DATE := sysdate;');
608: cn_utils.appindcr(code, 'dummy_num NUMBER ;'); --JC 01-27-96
609: cn_utils.appindcr(code, 'x_return_status VARCHAR2(1);'); --DM 11-03-99
610: cn_utils.appindcr(code, 'x_msg_count NUMBER;'); --DM 11-03-99
611: cn_utils.appindcr(code, 'x_msg_data VARCHAR(2000);'); --DM 11-03-99
612: cn_utils.appindcr(code, 'x_created_by NUMBER := to_number(fnd_global.user_id);');
613: cn_utils.appindcr(code, 'x_creation_date DATE := sysdate;');
614: cn_utils.appindcr(code, 'x_last_updated_by NUMBER := to_number(fnd_global.user_id);');
615: cn_utils.appindcr(code, 'x_last_update_date DATE := sysdate;');
616: cn_utils.appindcr(code, 'x_last_update_login NUMBER := to_number(fnd_global.login_id);');
609: cn_utils.appindcr(code, 'x_return_status VARCHAR2(1);'); --DM 11-03-99
610: cn_utils.appindcr(code, 'x_msg_count NUMBER;'); --DM 11-03-99
611: cn_utils.appindcr(code, 'x_msg_data VARCHAR(2000);'); --DM 11-03-99
612: cn_utils.appindcr(code, 'x_created_by NUMBER := to_number(fnd_global.user_id);');
613: cn_utils.appindcr(code, 'x_creation_date DATE := sysdate;');
614: cn_utils.appindcr(code, 'x_last_updated_by NUMBER := to_number(fnd_global.user_id);');
615: cn_utils.appindcr(code, 'x_last_update_date DATE := sysdate;');
616: cn_utils.appindcr(code, 'x_last_update_login NUMBER := to_number(fnd_global.login_id);');
617: --cn_utils.appindcr(code, 'X_org_id NUMBER ;');
610: cn_utils.appindcr(code, 'x_msg_count NUMBER;'); --DM 11-03-99
611: cn_utils.appindcr(code, 'x_msg_data VARCHAR(2000);'); --DM 11-03-99
612: cn_utils.appindcr(code, 'x_created_by NUMBER := to_number(fnd_global.user_id);');
613: cn_utils.appindcr(code, 'x_creation_date DATE := sysdate;');
614: cn_utils.appindcr(code, 'x_last_updated_by NUMBER := to_number(fnd_global.user_id);');
615: cn_utils.appindcr(code, 'x_last_update_date DATE := sysdate;');
616: cn_utils.appindcr(code, 'x_last_update_login NUMBER := to_number(fnd_global.login_id);');
617: --cn_utils.appindcr(code, 'X_org_id NUMBER ;');
618: cn_utils.appendcr(code);
611: cn_utils.appindcr(code, 'x_msg_data VARCHAR(2000);'); --DM 11-03-99
612: cn_utils.appindcr(code, 'x_created_by NUMBER := to_number(fnd_global.user_id);');
613: cn_utils.appindcr(code, 'x_creation_date DATE := sysdate;');
614: cn_utils.appindcr(code, 'x_last_updated_by NUMBER := to_number(fnd_global.user_id);');
615: cn_utils.appindcr(code, 'x_last_update_date DATE := sysdate;');
616: cn_utils.appindcr(code, 'x_last_update_login NUMBER := to_number(fnd_global.login_id);');
617: --cn_utils.appindcr(code, 'X_org_id NUMBER ;');
618: cn_utils.appendcr(code);
619:
612: cn_utils.appindcr(code, 'x_created_by NUMBER := to_number(fnd_global.user_id);');
613: cn_utils.appindcr(code, 'x_creation_date DATE := sysdate;');
614: cn_utils.appindcr(code, 'x_last_updated_by NUMBER := to_number(fnd_global.user_id);');
615: cn_utils.appindcr(code, 'x_last_update_date DATE := sysdate;');
616: cn_utils.appindcr(code, 'x_last_update_login NUMBER := to_number(fnd_global.login_id);');
617: --cn_utils.appindcr(code, 'X_org_id NUMBER ;');
618: cn_utils.appendcr(code);
619:
620:
613: cn_utils.appindcr(code, 'x_creation_date DATE := sysdate;');
614: cn_utils.appindcr(code, 'x_last_updated_by NUMBER := to_number(fnd_global.user_id);');
615: cn_utils.appindcr(code, 'x_last_update_date DATE := sysdate;');
616: cn_utils.appindcr(code, 'x_last_update_login NUMBER := to_number(fnd_global.login_id);');
617: --cn_utils.appindcr(code, 'X_org_id NUMBER ;');
618: cn_utils.appendcr(code);
619:
620:
621: -- Change made to fix bug 6203234
614: cn_utils.appindcr(code, 'x_last_updated_by NUMBER := to_number(fnd_global.user_id);');
615: cn_utils.appindcr(code, 'x_last_update_date DATE := sysdate;');
616: cn_utils.appindcr(code, 'x_last_update_login NUMBER := to_number(fnd_global.login_id);');
617: --cn_utils.appindcr(code, 'X_org_id NUMBER ;');
618: cn_utils.appendcr(code);
619:
620:
621: -- Change made to fix bug 6203234
622: if(x_event_id < 0)
620:
621: -- Change made to fix bug 6203234
622: if(x_event_id < 0)
623: then
624: cn_utils.appindcr(code, 'CURSOR batches IS');
625: cn_utils.appindcr(code, ' SELECT DISTINCT batch_id');
626: cn_utils.appindcr(code, ' FROM cn_not_trx');
627: cn_utils.appindcr(code, ' WHERE collected_flag = ''N''');
628: cn_utils.appindcr(code, ' AND event_id = ' || x_event_id );
621: -- Change made to fix bug 6203234
622: if(x_event_id < 0)
623: then
624: cn_utils.appindcr(code, 'CURSOR batches IS');
625: cn_utils.appindcr(code, ' SELECT DISTINCT batch_id');
626: cn_utils.appindcr(code, ' FROM cn_not_trx');
627: cn_utils.appindcr(code, ' WHERE collected_flag = ''N''');
628: cn_utils.appindcr(code, ' AND event_id = ' || x_event_id );
629: cn_utils.appindcr(code, ' AND org_id = '||x_org_id||' ;');
622: if(x_event_id < 0)
623: then
624: cn_utils.appindcr(code, 'CURSOR batches IS');
625: cn_utils.appindcr(code, ' SELECT DISTINCT batch_id');
626: cn_utils.appindcr(code, ' FROM cn_not_trx');
627: cn_utils.appindcr(code, ' WHERE collected_flag = ''N''');
628: cn_utils.appindcr(code, ' AND event_id = ' || x_event_id );
629: cn_utils.appindcr(code, ' AND org_id = '||x_org_id||' ;');
630: cn_utils.appendcr(code);
623: then
624: cn_utils.appindcr(code, 'CURSOR batches IS');
625: cn_utils.appindcr(code, ' SELECT DISTINCT batch_id');
626: cn_utils.appindcr(code, ' FROM cn_not_trx');
627: cn_utils.appindcr(code, ' WHERE collected_flag = ''N''');
628: cn_utils.appindcr(code, ' AND event_id = ' || x_event_id );
629: cn_utils.appindcr(code, ' AND org_id = '||x_org_id||' ;');
630: cn_utils.appendcr(code);
631: cn_utils.unindent(code, 1);
624: cn_utils.appindcr(code, 'CURSOR batches IS');
625: cn_utils.appindcr(code, ' SELECT DISTINCT batch_id');
626: cn_utils.appindcr(code, ' FROM cn_not_trx');
627: cn_utils.appindcr(code, ' WHERE collected_flag = ''N''');
628: cn_utils.appindcr(code, ' AND event_id = ' || x_event_id );
629: cn_utils.appindcr(code, ' AND org_id = '||x_org_id||' ;');
630: cn_utils.appendcr(code);
631: cn_utils.unindent(code, 1);
632: cn_utils.unset_org_id();
625: cn_utils.appindcr(code, ' SELECT DISTINCT batch_id');
626: cn_utils.appindcr(code, ' FROM cn_not_trx');
627: cn_utils.appindcr(code, ' WHERE collected_flag = ''N''');
628: cn_utils.appindcr(code, ' AND event_id = ' || x_event_id );
629: cn_utils.appindcr(code, ' AND org_id = '||x_org_id||' ;');
630: cn_utils.appendcr(code);
631: cn_utils.unindent(code, 1);
632: cn_utils.unset_org_id();
633: end if;
626: cn_utils.appindcr(code, ' FROM cn_not_trx');
627: cn_utils.appindcr(code, ' WHERE collected_flag = ''N''');
628: cn_utils.appindcr(code, ' AND event_id = ' || x_event_id );
629: cn_utils.appindcr(code, ' AND org_id = '||x_org_id||' ;');
630: cn_utils.appendcr(code);
631: cn_utils.unindent(code, 1);
632: cn_utils.unset_org_id();
633: end if;
634: cn_debug.print_msg('local_variables<<', 1);
627: cn_utils.appindcr(code, ' WHERE collected_flag = ''N''');
628: cn_utils.appindcr(code, ' AND event_id = ' || x_event_id );
629: cn_utils.appindcr(code, ' AND org_id = '||x_org_id||' ;');
630: cn_utils.appendcr(code);
631: cn_utils.unindent(code, 1);
632: cn_utils.unset_org_id();
633: end if;
634: cn_debug.print_msg('local_variables<<', 1);
635: fnd_file.put_line(fnd_file.Log, 'local_variables<<');
628: cn_utils.appindcr(code, ' AND event_id = ' || x_event_id );
629: cn_utils.appindcr(code, ' AND org_id = '||x_org_id||' ;');
630: cn_utils.appendcr(code);
631: cn_utils.unindent(code, 1);
632: cn_utils.unset_org_id();
633: end if;
634: cn_debug.print_msg('local_variables<<', 1);
635: fnd_file.put_line(fnd_file.Log, 'local_variables<<');
636: END IF; -- IF (procedure_name = 'cn_collect_ram')
634: cn_debug.print_msg('local_variables<<', 1);
635: fnd_file.put_line(fnd_file.Log, 'local_variables<<');
636: END IF; -- IF (procedure_name = 'cn_collect_ram')
637:
638: cn_utils.unset_org_id;
639:
640: END local_variables;
641: -- Procedure Name
642: -- who
646: -- 17-NOV-93 Devesh Khatu Created
647:
648: PROCEDURE who (
649: procedure_name cn_obj_procedures_v.NAME%TYPE,
650: code IN OUT NOCOPY cn_utils.code_type,
651: x_org_id IN NUMBER) IS
652: BEGIN
653: -- The who code has been temporarily commented out since the who package
654: -- is yet to be implemented.
655:
656: cn_debug.print_msg('who>>', 1);
657: fnd_file.put_line(fnd_file.Log, 'who>>');
658:
659: cn_utils.set_org_id(x_org_id);
660: cn_utils.appindcr(code, '-- who.set_program_name(''' || procedure_name || ''');');
661: cn_utils.appendcr(code);
662: cn_utils.unset_org_id();
663:
656: cn_debug.print_msg('who>>', 1);
657: fnd_file.put_line(fnd_file.Log, 'who>>');
658:
659: cn_utils.set_org_id(x_org_id);
660: cn_utils.appindcr(code, '-- who.set_program_name(''' || procedure_name || ''');');
661: cn_utils.appendcr(code);
662: cn_utils.unset_org_id();
663:
664: cn_debug.print_msg('who<<', 1);
657: fnd_file.put_line(fnd_file.Log, 'who>>');
658:
659: cn_utils.set_org_id(x_org_id);
660: cn_utils.appindcr(code, '-- who.set_program_name(''' || procedure_name || ''');');
661: cn_utils.appendcr(code);
662: cn_utils.unset_org_id();
663:
664: cn_debug.print_msg('who<<', 1);
665: fnd_file.put_line(fnd_file.Log, 'who<<');
658:
659: cn_utils.set_org_id(x_org_id);
660: cn_utils.appindcr(code, '-- who.set_program_name(''' || procedure_name || ''');');
661: cn_utils.appendcr(code);
662: cn_utils.unset_org_id();
663:
664: cn_debug.print_msg('who<<', 1);
665: fnd_file.put_line(fnd_file.Log, 'who<<');
666:
676: PROCEDURE proc_exception (
677: x_procedure_name cn_obj_procedures_v.NAME%TYPE,
678: savepoint_name VARCHAR2,
679: location VARCHAR2,
680: code IN OUT NOCOPY cn_utils.code_type,
681: x_org_id IN NUMBER)
682: IS
683: BEGIN
684:
681: x_org_id IN NUMBER)
682: IS
683: BEGIN
684:
685: cn_utils.set_org_id(x_org_id);
686: cn_utils.unindent(code, 1);
687: cn_utils.appindcr(code, 'EXCEPTION');
688: cn_utils.indent(code, 1);
689: IF (savepoint_name IS NOT NULL) THEN
682: IS
683: BEGIN
684:
685: cn_utils.set_org_id(x_org_id);
686: cn_utils.unindent(code, 1);
687: cn_utils.appindcr(code, 'EXCEPTION');
688: cn_utils.indent(code, 1);
689: IF (savepoint_name IS NOT NULL) THEN
690: cn_utils.appindcr(code, 'WHEN OTHERS THEN ROLLBACK TO ' || savepoint_name || ';');
683: BEGIN
684:
685: cn_utils.set_org_id(x_org_id);
686: cn_utils.unindent(code, 1);
687: cn_utils.appindcr(code, 'EXCEPTION');
688: cn_utils.indent(code, 1);
689: IF (savepoint_name IS NOT NULL) THEN
690: cn_utils.appindcr(code, 'WHEN OTHERS THEN ROLLBACK TO ' || savepoint_name || ';');
691: cn_utils.appindcr(code, 'cn_message_pkg.debug(''' || x_procedure_name || ': Rollback.'');');
684:
685: cn_utils.set_org_id(x_org_id);
686: cn_utils.unindent(code, 1);
687: cn_utils.appindcr(code, 'EXCEPTION');
688: cn_utils.indent(code, 1);
689: IF (savepoint_name IS NOT NULL) THEN
690: cn_utils.appindcr(code, 'WHEN OTHERS THEN ROLLBACK TO ' || savepoint_name || ';');
691: cn_utils.appindcr(code, 'cn_message_pkg.debug(''' || x_procedure_name || ': Rollback.'');');
692: cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log,''' || x_procedure_name || ': Rollback.'');');
686: cn_utils.unindent(code, 1);
687: cn_utils.appindcr(code, 'EXCEPTION');
688: cn_utils.indent(code, 1);
689: IF (savepoint_name IS NOT NULL) THEN
690: cn_utils.appindcr(code, 'WHEN OTHERS THEN ROLLBACK TO ' || savepoint_name || ';');
691: cn_utils.appindcr(code, 'cn_message_pkg.debug(''' || x_procedure_name || ': Rollback.'');');
692: cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log,''' || x_procedure_name || ': Rollback.'');');
693: ELSE
694: cn_utils.appindcr(code, 'WHEN OTHERS THEN ');
687: cn_utils.appindcr(code, 'EXCEPTION');
688: cn_utils.indent(code, 1);
689: IF (savepoint_name IS NOT NULL) THEN
690: cn_utils.appindcr(code, 'WHEN OTHERS THEN ROLLBACK TO ' || savepoint_name || ';');
691: cn_utils.appindcr(code, 'cn_message_pkg.debug(''' || x_procedure_name || ': Rollback.'');');
692: cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log,''' || x_procedure_name || ': Rollback.'');');
693: ELSE
694: cn_utils.appindcr(code, 'WHEN OTHERS THEN ');
695: END IF;
688: cn_utils.indent(code, 1);
689: IF (savepoint_name IS NOT NULL) THEN
690: cn_utils.appindcr(code, 'WHEN OTHERS THEN ROLLBACK TO ' || savepoint_name || ';');
691: cn_utils.appindcr(code, 'cn_message_pkg.debug(''' || x_procedure_name || ': Rollback.'');');
692: cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log,''' || x_procedure_name || ': Rollback.'');');
693: ELSE
694: cn_utils.appindcr(code, 'WHEN OTHERS THEN ');
695: END IF;
696:
690: cn_utils.appindcr(code, 'WHEN OTHERS THEN ROLLBACK TO ' || savepoint_name || ';');
691: cn_utils.appindcr(code, 'cn_message_pkg.debug(''' || x_procedure_name || ': Rollback.'');');
692: cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log,''' || x_procedure_name || ': Rollback.'');');
693: ELSE
694: cn_utils.appindcr(code, 'WHEN OTHERS THEN ');
695: END IF;
696:
697: cn_utils.appindcr(code, 'cn_message_pkg.debug(''' || x_procedure_name || ': In exception handler ' || location ||'.'');');
698: cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, ''' || x_procedure_name || ': In exception handler ' || location ||'.'');');
693: ELSE
694: cn_utils.appindcr(code, 'WHEN OTHERS THEN ');
695: END IF;
696:
697: cn_utils.appindcr(code, 'cn_message_pkg.debug(''' || x_procedure_name || ': In exception handler ' || location ||'.'');');
698: cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, ''' || x_procedure_name || ': In exception handler ' || location ||'.'');');
699: cn_utils.appendcr(code);
700:
701: cn_utils.appindcr(code, 'cn_process_audits_pkg.update_row(x_proc_audit_id, NULL, SYSDATE, SQLCODE,');
694: cn_utils.appindcr(code, 'WHEN OTHERS THEN ');
695: END IF;
696:
697: cn_utils.appindcr(code, 'cn_message_pkg.debug(''' || x_procedure_name || ': In exception handler ' || location ||'.'');');
698: cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, ''' || x_procedure_name || ': In exception handler ' || location ||'.'');');
699: cn_utils.appendcr(code);
700:
701: cn_utils.appindcr(code, 'cn_process_audits_pkg.update_row(x_proc_audit_id, NULL, SYSDATE, SQLCODE,');
702: cn_utils.appindcr(code, ' SQLERRM);');
695: END IF;
696:
697: cn_utils.appindcr(code, 'cn_message_pkg.debug(''' || x_procedure_name || ': In exception handler ' || location ||'.'');');
698: cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, ''' || x_procedure_name || ': In exception handler ' || location ||'.'');');
699: cn_utils.appendcr(code);
700:
701: cn_utils.appindcr(code, 'cn_process_audits_pkg.update_row(x_proc_audit_id, NULL, SYSDATE, SQLCODE,');
702: cn_utils.appindcr(code, ' SQLERRM);');
703: cn_utils.appendcr(code);
697: cn_utils.appindcr(code, 'cn_message_pkg.debug(''' || x_procedure_name || ': In exception handler ' || location ||'.'');');
698: cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, ''' || x_procedure_name || ': In exception handler ' || location ||'.'');');
699: cn_utils.appendcr(code);
700:
701: cn_utils.appindcr(code, 'cn_process_audits_pkg.update_row(x_proc_audit_id, NULL, SYSDATE, SQLCODE,');
702: cn_utils.appindcr(code, ' SQLERRM);');
703: cn_utils.appendcr(code);
704: cn_utils.appindcr(code, 'cn_message_pkg.debug(sqlcode ||'''||' '||'''||sqlerrm);');
705: cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, sqlcode ||'''||' '||'''||sqlerrm);');
698: cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, ''' || x_procedure_name || ': In exception handler ' || location ||'.'');');
699: cn_utils.appendcr(code);
700:
701: cn_utils.appindcr(code, 'cn_process_audits_pkg.update_row(x_proc_audit_id, NULL, SYSDATE, SQLCODE,');
702: cn_utils.appindcr(code, ' SQLERRM);');
703: cn_utils.appendcr(code);
704: cn_utils.appindcr(code, 'cn_message_pkg.debug(sqlcode ||'''||' '||'''||sqlerrm);');
705: cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, sqlcode ||'''||' '||'''||sqlerrm);');
706: cn_utils.appindcr(code, 'cn_message_pkg.end_batch(x_proc_audit_id);');
699: cn_utils.appendcr(code);
700:
701: cn_utils.appindcr(code, 'cn_process_audits_pkg.update_row(x_proc_audit_id, NULL, SYSDATE, SQLCODE,');
702: cn_utils.appindcr(code, ' SQLERRM);');
703: cn_utils.appendcr(code);
704: cn_utils.appindcr(code, 'cn_message_pkg.debug(sqlcode ||'''||' '||'''||sqlerrm);');
705: cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, sqlcode ||'''||' '||'''||sqlerrm);');
706: cn_utils.appindcr(code, 'cn_message_pkg.end_batch(x_proc_audit_id);');
707: cn_utils.appendcr(code);
700:
701: cn_utils.appindcr(code, 'cn_process_audits_pkg.update_row(x_proc_audit_id, NULL, SYSDATE, SQLCODE,');
702: cn_utils.appindcr(code, ' SQLERRM);');
703: cn_utils.appendcr(code);
704: cn_utils.appindcr(code, 'cn_message_pkg.debug(sqlcode ||'''||' '||'''||sqlerrm);');
705: cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, sqlcode ||'''||' '||'''||sqlerrm);');
706: cn_utils.appindcr(code, 'cn_message_pkg.end_batch(x_proc_audit_id);');
707: cn_utils.appendcr(code);
708:
701: cn_utils.appindcr(code, 'cn_process_audits_pkg.update_row(x_proc_audit_id, NULL, SYSDATE, SQLCODE,');
702: cn_utils.appindcr(code, ' SQLERRM);');
703: cn_utils.appendcr(code);
704: cn_utils.appindcr(code, 'cn_message_pkg.debug(sqlcode ||'''||' '||'''||sqlerrm);');
705: cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, sqlcode ||'''||' '||'''||sqlerrm);');
706: cn_utils.appindcr(code, 'cn_message_pkg.end_batch(x_proc_audit_id);');
707: cn_utils.appendcr(code);
708:
709: cn_utils.appindcr(code, 'app_exception.raise_exception;');
702: cn_utils.appindcr(code, ' SQLERRM);');
703: cn_utils.appendcr(code);
704: cn_utils.appindcr(code, 'cn_message_pkg.debug(sqlcode ||'''||' '||'''||sqlerrm);');
705: cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, sqlcode ||'''||' '||'''||sqlerrm);');
706: cn_utils.appindcr(code, 'cn_message_pkg.end_batch(x_proc_audit_id);');
707: cn_utils.appendcr(code);
708:
709: cn_utils.appindcr(code, 'app_exception.raise_exception;');
710: cn_utils.appendcr(code);
703: cn_utils.appendcr(code);
704: cn_utils.appindcr(code, 'cn_message_pkg.debug(sqlcode ||'''||' '||'''||sqlerrm);');
705: cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, sqlcode ||'''||' '||'''||sqlerrm);');
706: cn_utils.appindcr(code, 'cn_message_pkg.end_batch(x_proc_audit_id);');
707: cn_utils.appendcr(code);
708:
709: cn_utils.appindcr(code, 'app_exception.raise_exception;');
710: cn_utils.appendcr(code);
711: cn_utils.unset_org_id();
705: cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, sqlcode ||'''||' '||'''||sqlerrm);');
706: cn_utils.appindcr(code, 'cn_message_pkg.end_batch(x_proc_audit_id);');
707: cn_utils.appendcr(code);
708:
709: cn_utils.appindcr(code, 'app_exception.raise_exception;');
710: cn_utils.appendcr(code);
711: cn_utils.unset_org_id();
712:
713: END proc_exception;
706: cn_utils.appindcr(code, 'cn_message_pkg.end_batch(x_proc_audit_id);');
707: cn_utils.appendcr(code);
708:
709: cn_utils.appindcr(code, 'app_exception.raise_exception;');
710: cn_utils.appendcr(code);
711: cn_utils.unset_org_id();
712:
713: END proc_exception;
714:
707: cn_utils.appendcr(code);
708:
709: cn_utils.appindcr(code, 'app_exception.raise_exception;');
710: cn_utils.appendcr(code);
711: cn_utils.unset_org_id();
712:
713: END proc_exception;
714:
715: -- Procedure Name
728: x_module_id cn_modules.module_id%TYPE, --AE 01-26-96
729: x_repository_id cn_repositories.repository_id%TYPE,
730: x_event_id cn_events.event_id%TYPE,
731: x_generic BOOLEAN,
732: spec_code IN OUT NOCOPY cn_utils.code_type,
733: body_code IN OUT NOCOPY cn_utils.code_type,
734: x_org_id IN NUMBER)
735: IS
736:
729: x_repository_id cn_repositories.repository_id%TYPE,
730: x_event_id cn_events.event_id%TYPE,
731: x_generic BOOLEAN,
732: spec_code IN OUT NOCOPY cn_utils.code_type,
733: body_code IN OUT NOCOPY cn_utils.code_type,
734: x_org_id IN NUMBER)
735: IS
736:
737: BEGIN
740:
741: cn_debug.print_msg('pkg_proc_init>>', 1);
742: fnd_file.put_line(fnd_file.Log, 'pkg_proc_init>>');
743:
744: cn_utils.set_org_id(X_org_id);
745: cn_utils.proc_init(x_procedure_name, x_description, x_parameter_list,
746: 'P', NULL, x_package_id, x_repository_id, spec_code, body_code);
747:
748: -- Generate code for declaring local variables
741: cn_debug.print_msg('pkg_proc_init>>', 1);
742: fnd_file.put_line(fnd_file.Log, 'pkg_proc_init>>');
743:
744: cn_utils.set_org_id(X_org_id);
745: cn_utils.proc_init(x_procedure_name, x_description, x_parameter_list,
746: 'P', NULL, x_package_id, x_repository_id, spec_code, body_code);
747:
748: -- Generate code for declaring local variables
749: local_variables(x_procedure_name, x_event_id, body_code,l_org_id);
747:
748: -- Generate code for declaring local variables
749: local_variables(x_procedure_name, x_event_id, body_code,l_org_id);
750:
751: cn_utils.set_org_id(X_org_id);
752: cn_utils.proc_begin(x_procedure_name, 'Y', body_code);
753:
754: -- Generate code to update who information
755: -- who(x_procedure_name, body_code);
748: -- Generate code for declaring local variables
749: local_variables(x_procedure_name, x_event_id, body_code,l_org_id);
750:
751: cn_utils.set_org_id(X_org_id);
752: cn_utils.proc_begin(x_procedure_name, 'Y', body_code);
753:
754: -- Generate code to update who information
755: -- who(x_procedure_name, body_code);
756:
767: -- package, is used.
768: IF NOT x_generic THEN
769:
770: -- Insert any User Code specified for the 'Pre-Notification' location
771: cn_utils.unset_org_id();
772:
773: cn_collection_custom_gen.Generate_User_Code(
774: p_table_map_id => x_table_map_id,
775: p_location_name => 'Pre-Notification',
782: call_notify(x_package_id, x_procedure_name, x_module_id,x_repository_id, x_event_id, body_code,X_ORG_ID);
783: END IF;
784:
785: ELSE
786: cn_utils.unset_org_id();
787: cn_collection_custom_gen.insert_cn_not_trx (
788: x_table_map_id => x_table_map_id,
789: x_event_id => x_event_id,
790: code => body_code,
792: END IF;
793:
794:
795: -- Insert any User Code specified for the 'Post-Notification' location
796: cn_utils.unset_org_id();
797: cn_collection_custom_gen.Generate_User_Code(
798: p_table_map_id => x_table_map_id,
799: p_location_name => 'Post-Notification',
800: code => body_code,
803: IF (x_event_id = cn_global.ram_event_id) THEN -- RAM identify process
804: call_negate(x_package_id, x_procedure_name, x_module_id,x_repository_id, x_event_id, body_code,X_org_id);
805: END IF;
806:
807: cn_utils.set_org_id(X_org_id);
808: cn_utils.appendcr(body_code, '--******** COLLECT PROCESS ********-- ');
809: cn_utils.appendcr(body_code);
810: cn_utils.appindcr(body_code, 'cn_message_pkg.debug('''|| x_procedure_name || ': start collection process.'');');
811:
804: call_negate(x_package_id, x_procedure_name, x_module_id,x_repository_id, x_event_id, body_code,X_org_id);
805: END IF;
806:
807: cn_utils.set_org_id(X_org_id);
808: cn_utils.appendcr(body_code, '--******** COLLECT PROCESS ********-- ');
809: cn_utils.appendcr(body_code);
810: cn_utils.appindcr(body_code, 'cn_message_pkg.debug('''|| x_procedure_name || ': start collection process.'');');
811:
812: /* -- Generate code to record start of the collection
805: END IF;
806:
807: cn_utils.set_org_id(X_org_id);
808: cn_utils.appendcr(body_code, '--******** COLLECT PROCESS ********-- ');
809: cn_utils.appendcr(body_code);
810: cn_utils.appindcr(body_code, 'cn_message_pkg.debug('''|| x_procedure_name || ': start collection process.'');');
811:
812: /* -- Generate code to record start of the collection
813: cn_utils.record_process_start('COL', '''Collection run''', 'NULL', body_code);
806:
807: cn_utils.set_org_id(X_org_id);
808: cn_utils.appendcr(body_code, '--******** COLLECT PROCESS ********-- ');
809: cn_utils.appendcr(body_code);
810: cn_utils.appindcr(body_code, 'cn_message_pkg.debug('''|| x_procedure_name || ': start collection process.'');');
811:
812: /* -- Generate code to record start of the collection
813: cn_utils.record_process_start('COL', '''Collection run''', 'NULL', body_code);
814:
809: cn_utils.appendcr(body_code);
810: cn_utils.appindcr(body_code, 'cn_message_pkg.debug('''|| x_procedure_name || ': start collection process.'');');
811:
812: /* -- Generate code to record start of the collection
813: cn_utils.record_process_start('COL', '''Collection run''', 'NULL', body_code);
814:
815: cn_utils.appindcr(body_code, 'x_col_audit_id := x_proc_audit_id;'); --AE 08-10-95
816: cn_utils.appendcr(body_code); */ -- JC 01-26-97
817:
811:
812: /* -- Generate code to record start of the collection
813: cn_utils.record_process_start('COL', '''Collection run''', 'NULL', body_code);
814:
815: cn_utils.appindcr(body_code, 'x_col_audit_id := x_proc_audit_id;'); --AE 08-10-95
816: cn_utils.appendcr(body_code); */ -- JC 01-26-97
817:
818: cn_utils.appindcr(body_code, 'x_conc_program_id := fnd_global.conc_program_id;'); --AE 01-18-96
819:
812: /* -- Generate code to record start of the collection
813: cn_utils.record_process_start('COL', '''Collection run''', 'NULL', body_code);
814:
815: cn_utils.appindcr(body_code, 'x_col_audit_id := x_proc_audit_id;'); --AE 08-10-95
816: cn_utils.appendcr(body_code); */ -- JC 01-26-97
817:
818: cn_utils.appindcr(body_code, 'x_conc_program_id := fnd_global.conc_program_id;'); --AE 01-18-96
819:
820: --Condition added to fix bug 6203234
814:
815: cn_utils.appindcr(body_code, 'x_col_audit_id := x_proc_audit_id;'); --AE 08-10-95
816: cn_utils.appendcr(body_code); */ -- JC 01-26-97
817:
818: cn_utils.appindcr(body_code, 'x_conc_program_id := fnd_global.conc_program_id;'); --AE 01-18-96
819:
820: --Condition added to fix bug 6203234
821: IF(x_event_id < 0)
822: THEN
819:
820: --Condition added to fix bug 6203234
821: IF(x_event_id < 0)
822: THEN
823: cn_utils.appindcr(body_code, 'cn_message_pkg.debug('''|| x_procedure_name || ': entering cursor Batches loop.'');');
824: cn_utils.appindcr(body_code, 'fnd_file.put_line(fnd_file.Log, '''|| x_procedure_name || ': entering cursor Batches loop.'');');
825: cn_utils.appendcr(body_code);
826:
827: cn_utils.appindcr(body_code, 'FOR b IN batches LOOP');
820: --Condition added to fix bug 6203234
821: IF(x_event_id < 0)
822: THEN
823: cn_utils.appindcr(body_code, 'cn_message_pkg.debug('''|| x_procedure_name || ': entering cursor Batches loop.'');');
824: cn_utils.appindcr(body_code, 'fnd_file.put_line(fnd_file.Log, '''|| x_procedure_name || ': entering cursor Batches loop.'');');
825: cn_utils.appendcr(body_code);
826:
827: cn_utils.appindcr(body_code, 'FOR b IN batches LOOP');
828: cn_utils.appendcr(body_code);
821: IF(x_event_id < 0)
822: THEN
823: cn_utils.appindcr(body_code, 'cn_message_pkg.debug('''|| x_procedure_name || ': entering cursor Batches loop.'');');
824: cn_utils.appindcr(body_code, 'fnd_file.put_line(fnd_file.Log, '''|| x_procedure_name || ': entering cursor Batches loop.'');');
825: cn_utils.appendcr(body_code);
826:
827: cn_utils.appindcr(body_code, 'FOR b IN batches LOOP');
828: cn_utils.appendcr(body_code);
829: cn_utils.indent(body_code, 1);
823: cn_utils.appindcr(body_code, 'cn_message_pkg.debug('''|| x_procedure_name || ': entering cursor Batches loop.'');');
824: cn_utils.appindcr(body_code, 'fnd_file.put_line(fnd_file.Log, '''|| x_procedure_name || ': entering cursor Batches loop.'');');
825: cn_utils.appendcr(body_code);
826:
827: cn_utils.appindcr(body_code, 'FOR b IN batches LOOP');
828: cn_utils.appendcr(body_code);
829: cn_utils.indent(body_code, 1);
830:
831: IF (x_event_id = cn_global.ram_event_id) THEN -- RAM identify process
824: cn_utils.appindcr(body_code, 'fnd_file.put_line(fnd_file.Log, '''|| x_procedure_name || ': entering cursor Batches loop.'');');
825: cn_utils.appendcr(body_code);
826:
827: cn_utils.appindcr(body_code, 'FOR b IN batches LOOP');
828: cn_utils.appendcr(body_code);
829: cn_utils.indent(body_code, 1);
830:
831: IF (x_event_id = cn_global.ram_event_id) THEN -- RAM identify process
832: cn_utils.appindcr(body_code, 'x_adj_batch_id := b.adj_batch_id;');
825: cn_utils.appendcr(body_code);
826:
827: cn_utils.appindcr(body_code, 'FOR b IN batches LOOP');
828: cn_utils.appendcr(body_code);
829: cn_utils.indent(body_code, 1);
830:
831: IF (x_event_id = cn_global.ram_event_id) THEN -- RAM identify process
832: cn_utils.appindcr(body_code, 'x_adj_batch_id := b.adj_batch_id;');
833: cn_utils.appendcr(body_code);
828: cn_utils.appendcr(body_code);
829: cn_utils.indent(body_code, 1);
830:
831: IF (x_event_id = cn_global.ram_event_id) THEN -- RAM identify process
832: cn_utils.appindcr(body_code, 'x_adj_batch_id := b.adj_batch_id;');
833: cn_utils.appendcr(body_code);
834: cn_utils.record_process_start('COL', '''RAM Adjustments Collection run for batch '' || x_adj_batch_id', 'x_col_audit_id', body_code);
835: ELSE
836: cn_utils.appindcr(body_code, 'x_batch_id := b.batch_id;');
829: cn_utils.indent(body_code, 1);
830:
831: IF (x_event_id = cn_global.ram_event_id) THEN -- RAM identify process
832: cn_utils.appindcr(body_code, 'x_adj_batch_id := b.adj_batch_id;');
833: cn_utils.appendcr(body_code);
834: cn_utils.record_process_start('COL', '''RAM Adjustments Collection run for batch '' || x_adj_batch_id', 'x_col_audit_id', body_code);
835: ELSE
836: cn_utils.appindcr(body_code, 'x_batch_id := b.batch_id;');
837: cn_utils.appendcr(body_code);
830:
831: IF (x_event_id = cn_global.ram_event_id) THEN -- RAM identify process
832: cn_utils.appindcr(body_code, 'x_adj_batch_id := b.adj_batch_id;');
833: cn_utils.appendcr(body_code);
834: cn_utils.record_process_start('COL', '''RAM Adjustments Collection run for batch '' || x_adj_batch_id', 'x_col_audit_id', body_code);
835: ELSE
836: cn_utils.appindcr(body_code, 'x_batch_id := b.batch_id;');
837: cn_utils.appendcr(body_code);
838: cn_utils.record_process_start('COL', '''Collection run for batch '' || x_batch_id', 'x_col_audit_id', body_code);
832: cn_utils.appindcr(body_code, 'x_adj_batch_id := b.adj_batch_id;');
833: cn_utils.appendcr(body_code);
834: cn_utils.record_process_start('COL', '''RAM Adjustments Collection run for batch '' || x_adj_batch_id', 'x_col_audit_id', body_code);
835: ELSE
836: cn_utils.appindcr(body_code, 'x_batch_id := b.batch_id;');
837: cn_utils.appendcr(body_code);
838: cn_utils.record_process_start('COL', '''Collection run for batch '' || x_batch_id', 'x_col_audit_id', body_code);
839: END IF;
840:
833: cn_utils.appendcr(body_code);
834: cn_utils.record_process_start('COL', '''RAM Adjustments Collection run for batch '' || x_adj_batch_id', 'x_col_audit_id', body_code);
835: ELSE
836: cn_utils.appindcr(body_code, 'x_batch_id := b.batch_id;');
837: cn_utils.appendcr(body_code);
838: cn_utils.record_process_start('COL', '''Collection run for batch '' || x_batch_id', 'x_col_audit_id', body_code);
839: END IF;
840:
841: cn_utils.appindcr(body_code, 'BEGIN');
834: cn_utils.record_process_start('COL', '''RAM Adjustments Collection run for batch '' || x_adj_batch_id', 'x_col_audit_id', body_code);
835: ELSE
836: cn_utils.appindcr(body_code, 'x_batch_id := b.batch_id;');
837: cn_utils.appendcr(body_code);
838: cn_utils.record_process_start('COL', '''Collection run for batch '' || x_batch_id', 'x_col_audit_id', body_code);
839: END IF;
840:
841: cn_utils.appindcr(body_code, 'BEGIN');
842: cn_utils.indent(body_code, 1);
837: cn_utils.appendcr(body_code);
838: cn_utils.record_process_start('COL', '''Collection run for batch '' || x_batch_id', 'x_col_audit_id', body_code);
839: END IF;
840:
841: cn_utils.appindcr(body_code, 'BEGIN');
842: cn_utils.indent(body_code, 1);
843: cn_utils.appindcr(body_code, 'SAVEPOINT start_transaction;');
844: cn_utils.appendcr(body_code);
845: END IF;
838: cn_utils.record_process_start('COL', '''Collection run for batch '' || x_batch_id', 'x_col_audit_id', body_code);
839: END IF;
840:
841: cn_utils.appindcr(body_code, 'BEGIN');
842: cn_utils.indent(body_code, 1);
843: cn_utils.appindcr(body_code, 'SAVEPOINT start_transaction;');
844: cn_utils.appendcr(body_code);
845: END IF;
846: cn_utils.unset_org_id();
839: END IF;
840:
841: cn_utils.appindcr(body_code, 'BEGIN');
842: cn_utils.indent(body_code, 1);
843: cn_utils.appindcr(body_code, 'SAVEPOINT start_transaction;');
844: cn_utils.appendcr(body_code);
845: END IF;
846: cn_utils.unset_org_id();
847: cn_debug.print_msg('pkg_proc_init<<', 1);
840:
841: cn_utils.appindcr(body_code, 'BEGIN');
842: cn_utils.indent(body_code, 1);
843: cn_utils.appindcr(body_code, 'SAVEPOINT start_transaction;');
844: cn_utils.appendcr(body_code);
845: END IF;
846: cn_utils.unset_org_id();
847: cn_debug.print_msg('pkg_proc_init<<', 1);
848: fnd_file.put_line(fnd_file.Log, 'pkg_proc_init<<');
842: cn_utils.indent(body_code, 1);
843: cn_utils.appindcr(body_code, 'SAVEPOINT start_transaction;');
844: cn_utils.appendcr(body_code);
845: END IF;
846: cn_utils.unset_org_id();
847: cn_debug.print_msg('pkg_proc_init<<', 1);
848: fnd_file.put_line(fnd_file.Log, 'pkg_proc_init<<');
849:
850:
866: x_module_id cn_modules.module_id%TYPE,
867: x_repository_id cn_repositories.repository_id%TYPE,
868: x_generic BOOLEAN,
869: x_event_id cn_events.event_id%TYPE,
870: code IN OUT NOCOPY cn_utils.code_type,
871: x_org_id IN NUMBER) IS
872:
873: BEGIN
874:
930:
931: ELSE -- Receivables package
932: IF (x_event_id = cn_global.ram_event_id) THEN -- RAM Collection
933:
934: cn_utils.set_org_id(X_org_id);
935: cn_utils.appendcr(code);
936: cn_utils.appendcr(code, '--******** UPDATE CN_TRX CN_TRX_LINES ********-- ');
937: cn_utils.appindcr(code, 'cn_message_pkg.debug(''' || x_procedure_name || ': update CN_TRX and CN_TRX_LINES.''); ');
938: cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, ''' || x_procedure_name || ': update CN_TRX and CN_TRX_LINES.''); ');
931: ELSE -- Receivables package
932: IF (x_event_id = cn_global.ram_event_id) THEN -- RAM Collection
933:
934: cn_utils.set_org_id(X_org_id);
935: cn_utils.appendcr(code);
936: cn_utils.appendcr(code, '--******** UPDATE CN_TRX CN_TRX_LINES ********-- ');
937: cn_utils.appindcr(code, 'cn_message_pkg.debug(''' || x_procedure_name || ': update CN_TRX and CN_TRX_LINES.''); ');
938: cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, ''' || x_procedure_name || ': update CN_TRX and CN_TRX_LINES.''); ');
939: cn_utils.appendcr(code);
932: IF (x_event_id = cn_global.ram_event_id) THEN -- RAM Collection
933:
934: cn_utils.set_org_id(X_org_id);
935: cn_utils.appendcr(code);
936: cn_utils.appendcr(code, '--******** UPDATE CN_TRX CN_TRX_LINES ********-- ');
937: cn_utils.appindcr(code, 'cn_message_pkg.debug(''' || x_procedure_name || ': update CN_TRX and CN_TRX_LINES.''); ');
938: cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, ''' || x_procedure_name || ': update CN_TRX and CN_TRX_LINES.''); ');
939: cn_utils.appendcr(code);
940: cn_utils.appindcr(code, 'UPDATE cn_trx ');
933:
934: cn_utils.set_org_id(X_org_id);
935: cn_utils.appendcr(code);
936: cn_utils.appendcr(code, '--******** UPDATE CN_TRX CN_TRX_LINES ********-- ');
937: cn_utils.appindcr(code, 'cn_message_pkg.debug(''' || x_procedure_name || ': update CN_TRX and CN_TRX_LINES.''); ');
938: cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, ''' || x_procedure_name || ': update CN_TRX and CN_TRX_LINES.''); ');
939: cn_utils.appendcr(code);
940: cn_utils.appindcr(code, 'UPDATE cn_trx ');
941: cn_utils.appindcr(code, ' SET adj_collection_run_id = x_proc_audit_id ');
934: cn_utils.set_org_id(X_org_id);
935: cn_utils.appendcr(code);
936: cn_utils.appendcr(code, '--******** UPDATE CN_TRX CN_TRX_LINES ********-- ');
937: cn_utils.appindcr(code, 'cn_message_pkg.debug(''' || x_procedure_name || ': update CN_TRX and CN_TRX_LINES.''); ');
938: cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, ''' || x_procedure_name || ': update CN_TRX and CN_TRX_LINES.''); ');
939: cn_utils.appendcr(code);
940: cn_utils.appindcr(code, 'UPDATE cn_trx ');
941: cn_utils.appindcr(code, ' SET adj_collection_run_id = x_proc_audit_id ');
942: cn_utils.appindcr(code, ' WHERE trx_id IN (SELECT trx_id from cn_trx_lines ');
935: cn_utils.appendcr(code);
936: cn_utils.appendcr(code, '--******** UPDATE CN_TRX CN_TRX_LINES ********-- ');
937: cn_utils.appindcr(code, 'cn_message_pkg.debug(''' || x_procedure_name || ': update CN_TRX and CN_TRX_LINES.''); ');
938: cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, ''' || x_procedure_name || ': update CN_TRX and CN_TRX_LINES.''); ');
939: cn_utils.appendcr(code);
940: cn_utils.appindcr(code, 'UPDATE cn_trx ');
941: cn_utils.appindcr(code, ' SET adj_collection_run_id = x_proc_audit_id ');
942: cn_utils.appindcr(code, ' WHERE trx_id IN (SELECT trx_id from cn_trx_lines ');
943: cn_utils.appindcr(code, ' WHERE adjusted_flag = ''Y'' ');
936: cn_utils.appendcr(code, '--******** UPDATE CN_TRX CN_TRX_LINES ********-- ');
937: cn_utils.appindcr(code, 'cn_message_pkg.debug(''' || x_procedure_name || ': update CN_TRX and CN_TRX_LINES.''); ');
938: cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, ''' || x_procedure_name || ': update CN_TRX and CN_TRX_LINES.''); ');
939: cn_utils.appendcr(code);
940: cn_utils.appindcr(code, 'UPDATE cn_trx ');
941: cn_utils.appindcr(code, ' SET adj_collection_run_id = x_proc_audit_id ');
942: cn_utils.appindcr(code, ' WHERE trx_id IN (SELECT trx_id from cn_trx_lines ');
943: cn_utils.appindcr(code, ' WHERE adjusted_flag = ''Y'' ');
944: cn_utils.appindcr(code, ' AND negated_flag = ''Y'' ');
937: cn_utils.appindcr(code, 'cn_message_pkg.debug(''' || x_procedure_name || ': update CN_TRX and CN_TRX_LINES.''); ');
938: cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, ''' || x_procedure_name || ': update CN_TRX and CN_TRX_LINES.''); ');
939: cn_utils.appendcr(code);
940: cn_utils.appindcr(code, 'UPDATE cn_trx ');
941: cn_utils.appindcr(code, ' SET adj_collection_run_id = x_proc_audit_id ');
942: cn_utils.appindcr(code, ' WHERE trx_id IN (SELECT trx_id from cn_trx_lines ');
943: cn_utils.appindcr(code, ' WHERE adjusted_flag = ''Y'' ');
944: cn_utils.appindcr(code, ' AND negated_flag = ''Y'' ');
945: cn_utils.appindcr(code, ' AND collected_flag = ''N'' ');
938: cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, ''' || x_procedure_name || ': update CN_TRX and CN_TRX_LINES.''); ');
939: cn_utils.appendcr(code);
940: cn_utils.appindcr(code, 'UPDATE cn_trx ');
941: cn_utils.appindcr(code, ' SET adj_collection_run_id = x_proc_audit_id ');
942: cn_utils.appindcr(code, ' WHERE trx_id IN (SELECT trx_id from cn_trx_lines ');
943: cn_utils.appindcr(code, ' WHERE adjusted_flag = ''Y'' ');
944: cn_utils.appindcr(code, ' AND negated_flag = ''Y'' ');
945: cn_utils.appindcr(code, ' AND collected_flag = ''N'' ');
946: cn_utils.appindcr(code, ' AND event_id = cn_global.inv_event_id ');
939: cn_utils.appendcr(code);
940: cn_utils.appindcr(code, 'UPDATE cn_trx ');
941: cn_utils.appindcr(code, ' SET adj_collection_run_id = x_proc_audit_id ');
942: cn_utils.appindcr(code, ' WHERE trx_id IN (SELECT trx_id from cn_trx_lines ');
943: cn_utils.appindcr(code, ' WHERE adjusted_flag = ''Y'' ');
944: cn_utils.appindcr(code, ' AND negated_flag = ''Y'' ');
945: cn_utils.appindcr(code, ' AND collected_flag = ''N'' ');
946: cn_utils.appindcr(code, ' AND event_id = cn_global.inv_event_id ');
947: cn_utils.appindcr(code, ' AND adj_batch_id = x_adj_batch_id ');
940: cn_utils.appindcr(code, 'UPDATE cn_trx ');
941: cn_utils.appindcr(code, ' SET adj_collection_run_id = x_proc_audit_id ');
942: cn_utils.appindcr(code, ' WHERE trx_id IN (SELECT trx_id from cn_trx_lines ');
943: cn_utils.appindcr(code, ' WHERE adjusted_flag = ''Y'' ');
944: cn_utils.appindcr(code, ' AND negated_flag = ''Y'' ');
945: cn_utils.appindcr(code, ' AND collected_flag = ''N'' ');
946: cn_utils.appindcr(code, ' AND event_id = cn_global.inv_event_id ');
947: cn_utils.appindcr(code, ' AND adj_batch_id = x_adj_batch_id ');
948: cn_utils.appindcr(code, ' AND org_id = '||x_org_id||')');
941: cn_utils.appindcr(code, ' SET adj_collection_run_id = x_proc_audit_id ');
942: cn_utils.appindcr(code, ' WHERE trx_id IN (SELECT trx_id from cn_trx_lines ');
943: cn_utils.appindcr(code, ' WHERE adjusted_flag = ''Y'' ');
944: cn_utils.appindcr(code, ' AND negated_flag = ''Y'' ');
945: cn_utils.appindcr(code, ' AND collected_flag = ''N'' ');
946: cn_utils.appindcr(code, ' AND event_id = cn_global.inv_event_id ');
947: cn_utils.appindcr(code, ' AND adj_batch_id = x_adj_batch_id ');
948: cn_utils.appindcr(code, ' AND org_id = '||x_org_id||')');
949: cn_utils.appindcr(code, ' AND org_id = '||x_org_id||';');
942: cn_utils.appindcr(code, ' WHERE trx_id IN (SELECT trx_id from cn_trx_lines ');
943: cn_utils.appindcr(code, ' WHERE adjusted_flag = ''Y'' ');
944: cn_utils.appindcr(code, ' AND negated_flag = ''Y'' ');
945: cn_utils.appindcr(code, ' AND collected_flag = ''N'' ');
946: cn_utils.appindcr(code, ' AND event_id = cn_global.inv_event_id ');
947: cn_utils.appindcr(code, ' AND adj_batch_id = x_adj_batch_id ');
948: cn_utils.appindcr(code, ' AND org_id = '||x_org_id||')');
949: cn_utils.appindcr(code, ' AND org_id = '||x_org_id||';');
950: cn_utils.appendcr(code);
943: cn_utils.appindcr(code, ' WHERE adjusted_flag = ''Y'' ');
944: cn_utils.appindcr(code, ' AND negated_flag = ''Y'' ');
945: cn_utils.appindcr(code, ' AND collected_flag = ''N'' ');
946: cn_utils.appindcr(code, ' AND event_id = cn_global.inv_event_id ');
947: cn_utils.appindcr(code, ' AND adj_batch_id = x_adj_batch_id ');
948: cn_utils.appindcr(code, ' AND org_id = '||x_org_id||')');
949: cn_utils.appindcr(code, ' AND org_id = '||x_org_id||';');
950: cn_utils.appendcr(code);
951: cn_utils.appindcr(code, 'trx_update_count := SQL%ROWCOUNT; ');
944: cn_utils.appindcr(code, ' AND negated_flag = ''Y'' ');
945: cn_utils.appindcr(code, ' AND collected_flag = ''N'' ');
946: cn_utils.appindcr(code, ' AND event_id = cn_global.inv_event_id ');
947: cn_utils.appindcr(code, ' AND adj_batch_id = x_adj_batch_id ');
948: cn_utils.appindcr(code, ' AND org_id = '||x_org_id||')');
949: cn_utils.appindcr(code, ' AND org_id = '||x_org_id||';');
950: cn_utils.appendcr(code);
951: cn_utils.appindcr(code, 'trx_update_count := SQL%ROWCOUNT; ');
952: cn_utils.appindcr(code, 'cn_message_pkg.debug(''' || x_procedure_name || ': Updated '' || trx_update_count || '' records in cn_trx.''); ');
945: cn_utils.appindcr(code, ' AND collected_flag = ''N'' ');
946: cn_utils.appindcr(code, ' AND event_id = cn_global.inv_event_id ');
947: cn_utils.appindcr(code, ' AND adj_batch_id = x_adj_batch_id ');
948: cn_utils.appindcr(code, ' AND org_id = '||x_org_id||')');
949: cn_utils.appindcr(code, ' AND org_id = '||x_org_id||';');
950: cn_utils.appendcr(code);
951: cn_utils.appindcr(code, 'trx_update_count := SQL%ROWCOUNT; ');
952: cn_utils.appindcr(code, 'cn_message_pkg.debug(''' || x_procedure_name || ': Updated '' || trx_update_count || '' records in cn_trx.''); ');
953: cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, ''' || x_procedure_name || ': Updated '' || trx_update_count || '' records in cn_trx.''); ');
946: cn_utils.appindcr(code, ' AND event_id = cn_global.inv_event_id ');
947: cn_utils.appindcr(code, ' AND adj_batch_id = x_adj_batch_id ');
948: cn_utils.appindcr(code, ' AND org_id = '||x_org_id||')');
949: cn_utils.appindcr(code, ' AND org_id = '||x_org_id||';');
950: cn_utils.appendcr(code);
951: cn_utils.appindcr(code, 'trx_update_count := SQL%ROWCOUNT; ');
952: cn_utils.appindcr(code, 'cn_message_pkg.debug(''' || x_procedure_name || ': Updated '' || trx_update_count || '' records in cn_trx.''); ');
953: cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, ''' || x_procedure_name || ': Updated '' || trx_update_count || '' records in cn_trx.''); ');
954: cn_utils.appendcr(code);
947: cn_utils.appindcr(code, ' AND adj_batch_id = x_adj_batch_id ');
948: cn_utils.appindcr(code, ' AND org_id = '||x_org_id||')');
949: cn_utils.appindcr(code, ' AND org_id = '||x_org_id||';');
950: cn_utils.appendcr(code);
951: cn_utils.appindcr(code, 'trx_update_count := SQL%ROWCOUNT; ');
952: cn_utils.appindcr(code, 'cn_message_pkg.debug(''' || x_procedure_name || ': Updated '' || trx_update_count || '' records in cn_trx.''); ');
953: cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, ''' || x_procedure_name || ': Updated '' || trx_update_count || '' records in cn_trx.''); ');
954: cn_utils.appendcr(code);
955: cn_utils.appindcr(code, 'UPDATE cn_trx_lines ');
948: cn_utils.appindcr(code, ' AND org_id = '||x_org_id||')');
949: cn_utils.appindcr(code, ' AND org_id = '||x_org_id||';');
950: cn_utils.appendcr(code);
951: cn_utils.appindcr(code, 'trx_update_count := SQL%ROWCOUNT; ');
952: cn_utils.appindcr(code, 'cn_message_pkg.debug(''' || x_procedure_name || ': Updated '' || trx_update_count || '' records in cn_trx.''); ');
953: cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, ''' || x_procedure_name || ': Updated '' || trx_update_count || '' records in cn_trx.''); ');
954: cn_utils.appendcr(code);
955: cn_utils.appindcr(code, 'UPDATE cn_trx_lines ');
956: cn_utils.appindcr(code, ' SET adj_collection_run_id = x_proc_audit_id ');
949: cn_utils.appindcr(code, ' AND org_id = '||x_org_id||';');
950: cn_utils.appendcr(code);
951: cn_utils.appindcr(code, 'trx_update_count := SQL%ROWCOUNT; ');
952: cn_utils.appindcr(code, 'cn_message_pkg.debug(''' || x_procedure_name || ': Updated '' || trx_update_count || '' records in cn_trx.''); ');
953: cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, ''' || x_procedure_name || ': Updated '' || trx_update_count || '' records in cn_trx.''); ');
954: cn_utils.appendcr(code);
955: cn_utils.appindcr(code, 'UPDATE cn_trx_lines ');
956: cn_utils.appindcr(code, ' SET adj_collection_run_id = x_proc_audit_id ');
957: cn_utils.appindcr(code, ' WHERE adjusted_flag = ''Y'' ');
950: cn_utils.appendcr(code);
951: cn_utils.appindcr(code, 'trx_update_count := SQL%ROWCOUNT; ');
952: cn_utils.appindcr(code, 'cn_message_pkg.debug(''' || x_procedure_name || ': Updated '' || trx_update_count || '' records in cn_trx.''); ');
953: cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, ''' || x_procedure_name || ': Updated '' || trx_update_count || '' records in cn_trx.''); ');
954: cn_utils.appendcr(code);
955: cn_utils.appindcr(code, 'UPDATE cn_trx_lines ');
956: cn_utils.appindcr(code, ' SET adj_collection_run_id = x_proc_audit_id ');
957: cn_utils.appindcr(code, ' WHERE adjusted_flag = ''Y'' ');
958: cn_utils.appindcr(code, ' AND negated_flag = ''Y'' ');
951: cn_utils.appindcr(code, 'trx_update_count := SQL%ROWCOUNT; ');
952: cn_utils.appindcr(code, 'cn_message_pkg.debug(''' || x_procedure_name || ': Updated '' || trx_update_count || '' records in cn_trx.''); ');
953: cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, ''' || x_procedure_name || ': Updated '' || trx_update_count || '' records in cn_trx.''); ');
954: cn_utils.appendcr(code);
955: cn_utils.appindcr(code, 'UPDATE cn_trx_lines ');
956: cn_utils.appindcr(code, ' SET adj_collection_run_id = x_proc_audit_id ');
957: cn_utils.appindcr(code, ' WHERE adjusted_flag = ''Y'' ');
958: cn_utils.appindcr(code, ' AND negated_flag = ''Y'' ');
959: cn_utils.appindcr(code, ' AND collected_flag = ''N'' ');
952: cn_utils.appindcr(code, 'cn_message_pkg.debug(''' || x_procedure_name || ': Updated '' || trx_update_count || '' records in cn_trx.''); ');
953: cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, ''' || x_procedure_name || ': Updated '' || trx_update_count || '' records in cn_trx.''); ');
954: cn_utils.appendcr(code);
955: cn_utils.appindcr(code, 'UPDATE cn_trx_lines ');
956: cn_utils.appindcr(code, ' SET adj_collection_run_id = x_proc_audit_id ');
957: cn_utils.appindcr(code, ' WHERE adjusted_flag = ''Y'' ');
958: cn_utils.appindcr(code, ' AND negated_flag = ''Y'' ');
959: cn_utils.appindcr(code, ' AND collected_flag = ''N'' ');
960: cn_utils.appindcr(code, ' AND event_id = cn_global.inv_event_id ');
953: cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, ''' || x_procedure_name || ': Updated '' || trx_update_count || '' records in cn_trx.''); ');
954: cn_utils.appendcr(code);
955: cn_utils.appindcr(code, 'UPDATE cn_trx_lines ');
956: cn_utils.appindcr(code, ' SET adj_collection_run_id = x_proc_audit_id ');
957: cn_utils.appindcr(code, ' WHERE adjusted_flag = ''Y'' ');
958: cn_utils.appindcr(code, ' AND negated_flag = ''Y'' ');
959: cn_utils.appindcr(code, ' AND collected_flag = ''N'' ');
960: cn_utils.appindcr(code, ' AND event_id = cn_global.inv_event_id ');
961: cn_utils.appindcr(code, ' AND adj_batch_id = x_adj_batch_id ');
954: cn_utils.appendcr(code);
955: cn_utils.appindcr(code, 'UPDATE cn_trx_lines ');
956: cn_utils.appindcr(code, ' SET adj_collection_run_id = x_proc_audit_id ');
957: cn_utils.appindcr(code, ' WHERE adjusted_flag = ''Y'' ');
958: cn_utils.appindcr(code, ' AND negated_flag = ''Y'' ');
959: cn_utils.appindcr(code, ' AND collected_flag = ''N'' ');
960: cn_utils.appindcr(code, ' AND event_id = cn_global.inv_event_id ');
961: cn_utils.appindcr(code, ' AND adj_batch_id = x_adj_batch_id ');
962: cn_utils.appindcr(code, ' AND org_id = '||x_org_id||';');
955: cn_utils.appindcr(code, 'UPDATE cn_trx_lines ');
956: cn_utils.appindcr(code, ' SET adj_collection_run_id = x_proc_audit_id ');
957: cn_utils.appindcr(code, ' WHERE adjusted_flag = ''Y'' ');
958: cn_utils.appindcr(code, ' AND negated_flag = ''Y'' ');
959: cn_utils.appindcr(code, ' AND collected_flag = ''N'' ');
960: cn_utils.appindcr(code, ' AND event_id = cn_global.inv_event_id ');
961: cn_utils.appindcr(code, ' AND adj_batch_id = x_adj_batch_id ');
962: cn_utils.appindcr(code, ' AND org_id = '||x_org_id||';');
963: cn_utils.appendcr(code);
956: cn_utils.appindcr(code, ' SET adj_collection_run_id = x_proc_audit_id ');
957: cn_utils.appindcr(code, ' WHERE adjusted_flag = ''Y'' ');
958: cn_utils.appindcr(code, ' AND negated_flag = ''Y'' ');
959: cn_utils.appindcr(code, ' AND collected_flag = ''N'' ');
960: cn_utils.appindcr(code, ' AND event_id = cn_global.inv_event_id ');
961: cn_utils.appindcr(code, ' AND adj_batch_id = x_adj_batch_id ');
962: cn_utils.appindcr(code, ' AND org_id = '||x_org_id||';');
963: cn_utils.appendcr(code);
964: cn_utils.appindcr(code, 'trx_line_update_count := SQL%ROWCOUNT; ');
957: cn_utils.appindcr(code, ' WHERE adjusted_flag = ''Y'' ');
958: cn_utils.appindcr(code, ' AND negated_flag = ''Y'' ');
959: cn_utils.appindcr(code, ' AND collected_flag = ''N'' ');
960: cn_utils.appindcr(code, ' AND event_id = cn_global.inv_event_id ');
961: cn_utils.appindcr(code, ' AND adj_batch_id = x_adj_batch_id ');
962: cn_utils.appindcr(code, ' AND org_id = '||x_org_id||';');
963: cn_utils.appendcr(code);
964: cn_utils.appindcr(code, 'trx_line_update_count := SQL%ROWCOUNT; ');
965: cn_utils.appindcr(code, 'cn_message_pkg.debug(''' || x_procedure_name || ': Updated '' || trx_line_update_count || '' records in cn_trx_lines.''); ');
958: cn_utils.appindcr(code, ' AND negated_flag = ''Y'' ');
959: cn_utils.appindcr(code, ' AND collected_flag = ''N'' ');
960: cn_utils.appindcr(code, ' AND event_id = cn_global.inv_event_id ');
961: cn_utils.appindcr(code, ' AND adj_batch_id = x_adj_batch_id ');
962: cn_utils.appindcr(code, ' AND org_id = '||x_org_id||';');
963: cn_utils.appendcr(code);
964: cn_utils.appindcr(code, 'trx_line_update_count := SQL%ROWCOUNT; ');
965: cn_utils.appindcr(code, 'cn_message_pkg.debug(''' || x_procedure_name || ': Updated '' || trx_line_update_count || '' records in cn_trx_lines.''); ');
966: cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, ''' || x_procedure_name || ': Updated '' || trx_line_update_count || '' records in cn_trx_lines.''); ');
959: cn_utils.appindcr(code, ' AND collected_flag = ''N'' ');
960: cn_utils.appindcr(code, ' AND event_id = cn_global.inv_event_id ');
961: cn_utils.appindcr(code, ' AND adj_batch_id = x_adj_batch_id ');
962: cn_utils.appindcr(code, ' AND org_id = '||x_org_id||';');
963: cn_utils.appendcr(code);
964: cn_utils.appindcr(code, 'trx_line_update_count := SQL%ROWCOUNT; ');
965: cn_utils.appindcr(code, 'cn_message_pkg.debug(''' || x_procedure_name || ': Updated '' || trx_line_update_count || '' records in cn_trx_lines.''); ');
966: cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, ''' || x_procedure_name || ': Updated '' || trx_line_update_count || '' records in cn_trx_lines.''); ');
967: cn_utils.appendcr(code);
960: cn_utils.appindcr(code, ' AND event_id = cn_global.inv_event_id ');
961: cn_utils.appindcr(code, ' AND adj_batch_id = x_adj_batch_id ');
962: cn_utils.appindcr(code, ' AND org_id = '||x_org_id||';');
963: cn_utils.appendcr(code);
964: cn_utils.appindcr(code, 'trx_line_update_count := SQL%ROWCOUNT; ');
965: cn_utils.appindcr(code, 'cn_message_pkg.debug(''' || x_procedure_name || ': Updated '' || trx_line_update_count || '' records in cn_trx_lines.''); ');
966: cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, ''' || x_procedure_name || ': Updated '' || trx_line_update_count || '' records in cn_trx_lines.''); ');
967: cn_utils.appendcr(code);
968: cn_utils.indent(code, 1);
961: cn_utils.appindcr(code, ' AND adj_batch_id = x_adj_batch_id ');
962: cn_utils.appindcr(code, ' AND org_id = '||x_org_id||';');
963: cn_utils.appendcr(code);
964: cn_utils.appindcr(code, 'trx_line_update_count := SQL%ROWCOUNT; ');
965: cn_utils.appindcr(code, 'cn_message_pkg.debug(''' || x_procedure_name || ': Updated '' || trx_line_update_count || '' records in cn_trx_lines.''); ');
966: cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, ''' || x_procedure_name || ': Updated '' || trx_line_update_count || '' records in cn_trx_lines.''); ');
967: cn_utils.appendcr(code);
968: cn_utils.indent(code, 1);
969:
962: cn_utils.appindcr(code, ' AND org_id = '||x_org_id||';');
963: cn_utils.appendcr(code);
964: cn_utils.appindcr(code, 'trx_line_update_count := SQL%ROWCOUNT; ');
965: cn_utils.appindcr(code, 'cn_message_pkg.debug(''' || x_procedure_name || ': Updated '' || trx_line_update_count || '' records in cn_trx_lines.''); ');
966: cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, ''' || x_procedure_name || ': Updated '' || trx_line_update_count || '' records in cn_trx_lines.''); ');
967: cn_utils.appendcr(code);
968: cn_utils.indent(code, 1);
969:
970: ELSE -- Regular Receivables Collection
963: cn_utils.appendcr(code);
964: cn_utils.appindcr(code, 'trx_line_update_count := SQL%ROWCOUNT; ');
965: cn_utils.appindcr(code, 'cn_message_pkg.debug(''' || x_procedure_name || ': Updated '' || trx_line_update_count || '' records in cn_trx_lines.''); ');
966: cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, ''' || x_procedure_name || ': Updated '' || trx_line_update_count || '' records in cn_trx_lines.''); ');
967: cn_utils.appendcr(code);
968: cn_utils.indent(code, 1);
969:
970: ELSE -- Regular Receivables Collection
971:
964: cn_utils.appindcr(code, 'trx_line_update_count := SQL%ROWCOUNT; ');
965: cn_utils.appindcr(code, 'cn_message_pkg.debug(''' || x_procedure_name || ': Updated '' || trx_line_update_count || '' records in cn_trx_lines.''); ');
966: cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, ''' || x_procedure_name || ': Updated '' || trx_line_update_count || '' records in cn_trx_lines.''); ');
967: cn_utils.appendcr(code);
968: cn_utils.indent(code, 1);
969:
970: ELSE -- Regular Receivables Collection
971:
972: -- Call procedure to generate code for updating trx headers
969:
970: ELSE -- Regular Receivables Collection
971:
972: -- Call procedure to generate code for updating trx headers
973: cn_utils.unset_org_id();
974: cn_collection_ar_gen.insert_trx(x_procedure_name, x_module_id, x_event_id, code,X_org_id);
975:
976: cn_utils.set_org_id(X_org_id);
977: cn_utils.appindcr(code, 'IF (trx_count <> 0) THEN -- Any New Transactions?');
972: -- Call procedure to generate code for updating trx headers
973: cn_utils.unset_org_id();
974: cn_collection_ar_gen.insert_trx(x_procedure_name, x_module_id, x_event_id, code,X_org_id);
975:
976: cn_utils.set_org_id(X_org_id);
977: cn_utils.appindcr(code, 'IF (trx_count <> 0) THEN -- Any New Transactions?');
978: cn_utils.appendcr(code);
979: cn_utils.indent(code, 1);
980: cn_utils.unset_org_id();
973: cn_utils.unset_org_id();
974: cn_collection_ar_gen.insert_trx(x_procedure_name, x_module_id, x_event_id, code,X_org_id);
975:
976: cn_utils.set_org_id(X_org_id);
977: cn_utils.appindcr(code, 'IF (trx_count <> 0) THEN -- Any New Transactions?');
978: cn_utils.appendcr(code);
979: cn_utils.indent(code, 1);
980: cn_utils.unset_org_id();
981:
974: cn_collection_ar_gen.insert_trx(x_procedure_name, x_module_id, x_event_id, code,X_org_id);
975:
976: cn_utils.set_org_id(X_org_id);
977: cn_utils.appindcr(code, 'IF (trx_count <> 0) THEN -- Any New Transactions?');
978: cn_utils.appendcr(code);
979: cn_utils.indent(code, 1);
980: cn_utils.unset_org_id();
981:
982: -- Generate code to update headers foreign key columns
975:
976: cn_utils.set_org_id(X_org_id);
977: cn_utils.appindcr(code, 'IF (trx_count <> 0) THEN -- Any New Transactions?');
978: cn_utils.appendcr(code);
979: cn_utils.indent(code, 1);
980: cn_utils.unset_org_id();
981:
982: -- Generate code to update headers foreign key columns
983: cn_collection_ar_gen.update_trx(x_procedure_name, x_module_id, x_event_id, code,X_org_id);
976: cn_utils.set_org_id(X_org_id);
977: cn_utils.appindcr(code, 'IF (trx_count <> 0) THEN -- Any New Transactions?');
978: cn_utils.appendcr(code);
979: cn_utils.indent(code, 1);
980: cn_utils.unset_org_id();
981:
982: -- Generate code to update headers foreign key columns
983: cn_collection_ar_gen.update_trx(x_procedure_name, x_module_id, x_event_id, code,X_org_id);
984:
992: cn_collection_ar_gen.update_lines(x_procedure_name, x_module_id, x_event_id, code,X_org_id);
993:
994: END IF; --IF (x_event_id = cn_global.ram_event_id)
995:
996: cn_utils.unset_org_id();
997: -- Generate code to insert into sales lines --AE 11-16-95
998: cn_collection_ar_gen.insert_sales_lines(x_procedure_name, x_module_id, x_event_id, code,X_org_id);
999:
1000: -- Generate code to update sales_lines
1032: code => code,
1033: X_ORG_ID => X_ORG_ID);
1034:
1035: IF (x_event_id <> cn_global.ram_event_id) THEN
1036: cn_utils.set_org_id(X_org_id);
1037: cn_utils.unindent(code, 1);
1038: cn_utils.appindcr(code, 'END IF; -- Any New Transactions?');
1039: cn_utils.appendcr(code);
1040: END IF;
1033: X_ORG_ID => X_ORG_ID);
1034:
1035: IF (x_event_id <> cn_global.ram_event_id) THEN
1036: cn_utils.set_org_id(X_org_id);
1037: cn_utils.unindent(code, 1);
1038: cn_utils.appindcr(code, 'END IF; -- Any New Transactions?');
1039: cn_utils.appendcr(code);
1040: END IF;
1041: END IF;
1034:
1035: IF (x_event_id <> cn_global.ram_event_id) THEN
1036: cn_utils.set_org_id(X_org_id);
1037: cn_utils.unindent(code, 1);
1038: cn_utils.appindcr(code, 'END IF; -- Any New Transactions?');
1039: cn_utils.appendcr(code);
1040: END IF;
1041: END IF;
1042: cn_utils.unset_org_id();
1035: IF (x_event_id <> cn_global.ram_event_id) THEN
1036: cn_utils.set_org_id(X_org_id);
1037: cn_utils.unindent(code, 1);
1038: cn_utils.appindcr(code, 'END IF; -- Any New Transactions?');
1039: cn_utils.appendcr(code);
1040: END IF;
1041: END IF;
1042: cn_utils.unset_org_id();
1043:
1038: cn_utils.appindcr(code, 'END IF; -- Any New Transactions?');
1039: cn_utils.appendcr(code);
1040: END IF;
1041: END IF;
1042: cn_utils.unset_org_id();
1043:
1044: cn_debug.print_msg('collect_stmts<<', 1);
1045: fnd_file.put_line(fnd_file.Log, 'collect_stmts<<');
1046:
1059: PROCEDURE pkg_proc_end (
1060: x_table_map_id cn_table_maps.table_map_id%TYPE,
1061: x_procedure_name cn_objects.NAME%TYPE,
1062: x_event_id cn_events.event_id%TYPE,
1063: code IN OUT NOCOPY cn_utils.code_type,
1064: x_org_id IN NUMBER) IS
1065: BEGIN
1066:
1067: cn_debug.print_msg('pkg_proc_end>>', 1);
1065: BEGIN
1066:
1067: cn_debug.print_msg('pkg_proc_end>>', 1);
1068: fnd_file.put_line(fnd_file.Log, 'pkg_proc_end>>');
1069: cn_utils.set_org_id(x_org_id);
1070: -- Generate code to record success or failure of batch
1071: IF(x_event_id < 0)
1072: THEN
1073: IF (x_event_id = cn_global.ram_event_id) THEN
1070: -- Generate code to record success or failure of batch
1071: IF(x_event_id < 0)
1072: THEN
1073: IF (x_event_id = cn_global.ram_event_id) THEN
1074: cn_utils.record_process_success('''Finished collection run for batch '' || x_adj_batch_id', code);
1075: ELSE
1076: cn_utils.record_process_success('''Finished collection run for batch '' || x_batch_id', code);
1077: END IF;
1078:
1072: THEN
1073: IF (x_event_id = cn_global.ram_event_id) THEN
1074: cn_utils.record_process_success('''Finished collection run for batch '' || x_adj_batch_id', code);
1075: ELSE
1076: cn_utils.record_process_success('''Finished collection run for batch '' || x_batch_id', code);
1077: END IF;
1078:
1079: cn_utils.appindcr(code, 'cn_message_pkg.debug('''|| x_procedure_name || ': inside loop<<'');');
1080: cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, '''|| x_procedure_name || ': inside loop<<'');');
1075: ELSE
1076: cn_utils.record_process_success('''Finished collection run for batch '' || x_batch_id', code);
1077: END IF;
1078:
1079: cn_utils.appindcr(code, 'cn_message_pkg.debug('''|| x_procedure_name || ': inside loop<<'');');
1080: cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, '''|| x_procedure_name || ': inside loop<<'');');
1081: cn_utils.appindcr(code, 'cn_message_pkg.end_batch(x_proc_audit_id);');
1082: cn_utils.appindcr(code, 'COMMIT;');
1083: cn_utils.appendcr(code);
1076: cn_utils.record_process_success('''Finished collection run for batch '' || x_batch_id', code);
1077: END IF;
1078:
1079: cn_utils.appindcr(code, 'cn_message_pkg.debug('''|| x_procedure_name || ': inside loop<<'');');
1080: cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, '''|| x_procedure_name || ': inside loop<<'');');
1081: cn_utils.appindcr(code, 'cn_message_pkg.end_batch(x_proc_audit_id);');
1082: cn_utils.appindcr(code, 'COMMIT;');
1083: cn_utils.appendcr(code);
1084:
1077: END IF;
1078:
1079: cn_utils.appindcr(code, 'cn_message_pkg.debug('''|| x_procedure_name || ': inside loop<<'');');
1080: cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, '''|| x_procedure_name || ': inside loop<<'');');
1081: cn_utils.appindcr(code, 'cn_message_pkg.end_batch(x_proc_audit_id);');
1082: cn_utils.appindcr(code, 'COMMIT;');
1083: cn_utils.appendcr(code);
1084:
1085: -- cn_utils.record_process_exception(x_procedure_name, 'start_transaction', code);
1078:
1079: cn_utils.appindcr(code, 'cn_message_pkg.debug('''|| x_procedure_name || ': inside loop<<'');');
1080: cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, '''|| x_procedure_name || ': inside loop<<'');');
1081: cn_utils.appindcr(code, 'cn_message_pkg.end_batch(x_proc_audit_id);');
1082: cn_utils.appindcr(code, 'COMMIT;');
1083: cn_utils.appendcr(code);
1084:
1085: -- cn_utils.record_process_exception(x_procedure_name, 'start_transaction', code);
1086: -- proc_exception(x_procedure_name, 'start_transaction', 'inside the loop', code);
1079: cn_utils.appindcr(code, 'cn_message_pkg.debug('''|| x_procedure_name || ': inside loop<<'');');
1080: cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, '''|| x_procedure_name || ': inside loop<<'');');
1081: cn_utils.appindcr(code, 'cn_message_pkg.end_batch(x_proc_audit_id);');
1082: cn_utils.appindcr(code, 'COMMIT;');
1083: cn_utils.appendcr(code);
1084:
1085: -- cn_utils.record_process_exception(x_procedure_name, 'start_transaction', code);
1086: -- proc_exception(x_procedure_name, 'start_transaction', 'inside the loop', code);
1087:
1081: cn_utils.appindcr(code, 'cn_message_pkg.end_batch(x_proc_audit_id);');
1082: cn_utils.appindcr(code, 'COMMIT;');
1083: cn_utils.appendcr(code);
1084:
1085: -- cn_utils.record_process_exception(x_procedure_name, 'start_transaction', code);
1086: -- proc_exception(x_procedure_name, 'start_transaction', 'inside the loop', code);
1087:
1088: cn_utils.unindent(code, 1);
1089: cn_utils.appindcr(code, 'END;');
1084:
1085: -- cn_utils.record_process_exception(x_procedure_name, 'start_transaction', code);
1086: -- proc_exception(x_procedure_name, 'start_transaction', 'inside the loop', code);
1087:
1088: cn_utils.unindent(code, 1);
1089: cn_utils.appindcr(code, 'END;');
1090: cn_utils.unindent(code, 1);
1091: cn_utils.appindcr(code, 'END LOOP;');
1092: cn_utils.appendcr(code);
1085: -- cn_utils.record_process_exception(x_procedure_name, 'start_transaction', code);
1086: -- proc_exception(x_procedure_name, 'start_transaction', 'inside the loop', code);
1087:
1088: cn_utils.unindent(code, 1);
1089: cn_utils.appindcr(code, 'END;');
1090: cn_utils.unindent(code, 1);
1091: cn_utils.appindcr(code, 'END LOOP;');
1092: cn_utils.appendcr(code);
1093: END IF;
1086: -- proc_exception(x_procedure_name, 'start_transaction', 'inside the loop', code);
1087:
1088: cn_utils.unindent(code, 1);
1089: cn_utils.appindcr(code, 'END;');
1090: cn_utils.unindent(code, 1);
1091: cn_utils.appindcr(code, 'END LOOP;');
1092: cn_utils.appendcr(code);
1093: END IF;
1094: cn_utils.unset_org_id();
1087:
1088: cn_utils.unindent(code, 1);
1089: cn_utils.appindcr(code, 'END;');
1090: cn_utils.unindent(code, 1);
1091: cn_utils.appindcr(code, 'END LOOP;');
1092: cn_utils.appendcr(code);
1093: END IF;
1094: cn_utils.unset_org_id();
1095: --+
1088: cn_utils.unindent(code, 1);
1089: cn_utils.appindcr(code, 'END;');
1090: cn_utils.unindent(code, 1);
1091: cn_utils.appindcr(code, 'END LOOP;');
1092: cn_utils.appendcr(code);
1093: END IF;
1094: cn_utils.unset_org_id();
1095: --+
1096: -- Insert any User Code specified for the 'Post-Collection' location
1090: cn_utils.unindent(code, 1);
1091: cn_utils.appindcr(code, 'END LOOP;');
1092: cn_utils.appendcr(code);
1093: END IF;
1094: cn_utils.unset_org_id();
1095: --+
1096: -- Insert any User Code specified for the 'Post-Collection' location
1097: --+
1098: cn_collection_custom_gen.Generate_User_Code(
1100: p_location_name => 'Post-Collection',
1101: code => code,
1102: X_ORG_ID => X_ORG_ID);
1103:
1104: cn_utils.set_org_id(x_org_id);
1105: cn_utils.appindcr(code, 'COMMIT;');
1106:
1107: IF(x_event_id > 0)
1108: THEN
1101: code => code,
1102: X_ORG_ID => X_ORG_ID);
1103:
1104: cn_utils.set_org_id(x_org_id);
1105: cn_utils.appindcr(code, 'COMMIT;');
1106:
1107: IF(x_event_id > 0)
1108: THEN
1109: IF CN_COLLECTION_GEN.isparallelenabled THEN
1106:
1107: IF(x_event_id > 0)
1108: THEN
1109: IF CN_COLLECTION_GEN.isparallelenabled THEN
1110: cn_utils.appindcr(code, 'EXECUTE IMMEDIATE ''ALTER SESSION DISABLE PARALLEL DML'';');
1111: END IF;
1112: cn_utils.record_process_success('''Finished collection run for batch '' || x_proc_audit_id', code);
1113: END IF;
1114:
1108: THEN
1109: IF CN_COLLECTION_GEN.isparallelenabled THEN
1110: cn_utils.appindcr(code, 'EXECUTE IMMEDIATE ''ALTER SESSION DISABLE PARALLEL DML'';');
1111: END IF;
1112: cn_utils.record_process_success('''Finished collection run for batch '' || x_proc_audit_id', code);
1113: END IF;
1114:
1115: cn_utils.appendcr(code);
1116:
1111: END IF;
1112: cn_utils.record_process_success('''Finished collection run for batch '' || x_proc_audit_id', code);
1113: END IF;
1114:
1115: cn_utils.appendcr(code);
1116:
1117: cn_utils.appindcr(code, 'x_proc_audit_id := x_col_audit_id;'); --AE 08-01-95
1118:
1119: cn_utils.appindcr(code, 'cn_message_pkg.debug('''|| x_procedure_name ||'<<'');');
1113: END IF;
1114:
1115: cn_utils.appendcr(code);
1116:
1117: cn_utils.appindcr(code, 'x_proc_audit_id := x_col_audit_id;'); --AE 08-01-95
1118:
1119: cn_utils.appindcr(code, 'cn_message_pkg.debug('''|| x_procedure_name ||'<<'');');
1120: cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, '''|| x_procedure_name ||'<<'');');
1121:
1115: cn_utils.appendcr(code);
1116:
1117: cn_utils.appindcr(code, 'x_proc_audit_id := x_col_audit_id;'); --AE 08-01-95
1118:
1119: cn_utils.appindcr(code, 'cn_message_pkg.debug('''|| x_procedure_name ||'<<'');');
1120: cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, '''|| x_procedure_name ||'<<'');');
1121:
1122: cn_utils.appindcr(code, 'cn_message_pkg.end_batch(x_proc_audit_id);');
1123: cn_utils.appendcr(code);
1116:
1117: cn_utils.appindcr(code, 'x_proc_audit_id := x_col_audit_id;'); --AE 08-01-95
1118:
1119: cn_utils.appindcr(code, 'cn_message_pkg.debug('''|| x_procedure_name ||'<<'');');
1120: cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, '''|| x_procedure_name ||'<<'');');
1121:
1122: cn_utils.appindcr(code, 'cn_message_pkg.end_batch(x_proc_audit_id);');
1123: cn_utils.appendcr(code);
1124:
1118:
1119: cn_utils.appindcr(code, 'cn_message_pkg.debug('''|| x_procedure_name ||'<<'');');
1120: cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, '''|| x_procedure_name ||'<<'');');
1121:
1122: cn_utils.appindcr(code, 'cn_message_pkg.end_batch(x_proc_audit_id);');
1123: cn_utils.appendcr(code);
1124:
1125: -- cn_utils.proc_end(x_procedure_name, 'Y', code);
1126:
1119: cn_utils.appindcr(code, 'cn_message_pkg.debug('''|| x_procedure_name ||'<<'');');
1120: cn_utils.appindcr(code, 'fnd_file.put_line(fnd_file.Log, '''|| x_procedure_name ||'<<'');');
1121:
1122: cn_utils.appindcr(code, 'cn_message_pkg.end_batch(x_proc_audit_id);');
1123: cn_utils.appendcr(code);
1124:
1125: -- cn_utils.proc_end(x_procedure_name, 'Y', code);
1126:
1127: --proc_exception(x_procedure_name, NULL, 'outside the loop', code);
1121:
1122: cn_utils.appindcr(code, 'cn_message_pkg.end_batch(x_proc_audit_id);');
1123: cn_utils.appendcr(code);
1124:
1125: -- cn_utils.proc_end(x_procedure_name, 'Y', code);
1126:
1127: --proc_exception(x_procedure_name, NULL, 'outside the loop', code);
1128:
1129: -- Generate end of procedure statement
1126:
1127: --proc_exception(x_procedure_name, NULL, 'outside the loop', code);
1128:
1129: -- Generate end of procedure statement
1130: cn_utils.appendcr(code);
1131: cn_utils.unindent(code, 1);
1132: cn_utils.appindcr(code, 'END ' ||x_procedure_name || ';');
1133: cn_utils.appendcr(code);
1134: cn_utils.unset_org_id();
1127: --proc_exception(x_procedure_name, NULL, 'outside the loop', code);
1128:
1129: -- Generate end of procedure statement
1130: cn_utils.appendcr(code);
1131: cn_utils.unindent(code, 1);
1132: cn_utils.appindcr(code, 'END ' ||x_procedure_name || ';');
1133: cn_utils.appendcr(code);
1134: cn_utils.unset_org_id();
1135:
1128:
1129: -- Generate end of procedure statement
1130: cn_utils.appendcr(code);
1131: cn_utils.unindent(code, 1);
1132: cn_utils.appindcr(code, 'END ' ||x_procedure_name || ';');
1133: cn_utils.appendcr(code);
1134: cn_utils.unset_org_id();
1135:
1136: cn_debug.print_msg('pkg_proc_end<<', 1);
1129: -- Generate end of procedure statement
1130: cn_utils.appendcr(code);
1131: cn_utils.unindent(code, 1);
1132: cn_utils.appindcr(code, 'END ' ||x_procedure_name || ';');
1133: cn_utils.appendcr(code);
1134: cn_utils.unset_org_id();
1135:
1136: cn_debug.print_msg('pkg_proc_end<<', 1);
1137: fnd_file.put_line(fnd_file.Log, 'pkg_proc_end<<');
1130: cn_utils.appendcr(code);
1131: cn_utils.unindent(code, 1);
1132: cn_utils.appindcr(code, 'END ' ||x_procedure_name || ';');
1133: cn_utils.appendcr(code);
1134: cn_utils.unset_org_id();
1135:
1136: cn_debug.print_msg('pkg_proc_end<<', 1);
1137: fnd_file.put_line(fnd_file.Log, 'pkg_proc_end<<');
1138:
1155: module_id cn_modules.module_id%TYPE,
1156: repository_id cn_repositories.repository_id%TYPE,
1157: event_id cn_events.event_id%TYPE,
1158: x_generic BOOLEAN,
1159: spec_code IN OUT NOCOPY cn_utils.code_type,
1160: body_code IN OUT NOCOPY cn_utils.code_type,
1161: x_org_id IN NUMBER) IS
1162:
1163: -- Declare and initialize procedure variables
1156: repository_id cn_repositories.repository_id%TYPE,
1157: event_id cn_events.event_id%TYPE,
1158: x_generic BOOLEAN,
1159: spec_code IN OUT NOCOPY cn_utils.code_type,
1160: body_code IN OUT NOCOPY cn_utils.code_type,
1161: x_org_id IN NUMBER) IS
1162:
1163: -- Declare and initialize procedure variables
1164:
1227: package_id cn_obj_packages_v.package_id%TYPE,
1228: module_id cn_modules.module_id%TYPE,
1229: repository_id cn_repositories.repository_id%TYPE,
1230: event_id cn_events.event_id%TYPE,
1231: spec_code IN OUT NOCOPY cn_utils.code_type,
1232: body_code IN OUT NOCOPY cn_utils.code_type,
1233: x_org_id IN NUMBER) IS
1234:
1235: -- Declare and initialize procedure variables
1228: module_id cn_modules.module_id%TYPE,
1229: repository_id cn_repositories.repository_id%TYPE,
1230: event_id cn_events.event_id%TYPE,
1231: spec_code IN OUT NOCOPY cn_utils.code_type,
1232: body_code IN OUT NOCOPY cn_utils.code_type,
1233: x_org_id IN NUMBER) IS
1234:
1235: -- Declare and initialize procedure variables
1236:
1249: fnd_file.put_line(fnd_file.Log, 'null_proc>>');
1250:
1251: -- Generate procedure definition, boilerplate text, local variables etc.
1252:
1253: cn_utils.set_org_id(X_org_id);
1254: cn_utils.proc_init(procedure_name, description, parameter_list,
1255: 'P', NULL, package_id, repository_id, spec_code, body_code);
1256:
1257: -- generate local variables.
1250:
1251: -- Generate procedure definition, boilerplate text, local variables etc.
1252:
1253: cn_utils.set_org_id(X_org_id);
1254: cn_utils.proc_init(procedure_name, description, parameter_list,
1255: 'P', NULL, package_id, repository_id, spec_code, body_code);
1256:
1257: -- generate local variables.
1258: cn_utils.indent(body_code, 1);
1254: cn_utils.proc_init(procedure_name, description, parameter_list,
1255: 'P', NULL, package_id, repository_id, spec_code, body_code);
1256:
1257: -- generate local variables.
1258: cn_utils.indent(body_code, 1);
1259: cn_utils.appindcr(body_code, 'x_proc_audit_id NUMBER := NULL ;');
1260: cn_utils.appindcr(body_code, 'x_col_audit_id NUMBER;');
1261: cn_utils.appindcr(body_code, 'debug_pipe VARCHAR2(30);'); --J.C 02-FEB-97
1262: cn_utils.appindcr(body_code, 'debug_level NUMBER := 1 ;'); --J.C 02-FEB-97
1255: 'P', NULL, package_id, repository_id, spec_code, body_code);
1256:
1257: -- generate local variables.
1258: cn_utils.indent(body_code, 1);
1259: cn_utils.appindcr(body_code, 'x_proc_audit_id NUMBER := NULL ;');
1260: cn_utils.appindcr(body_code, 'x_col_audit_id NUMBER;');
1261: cn_utils.appindcr(body_code, 'debug_pipe VARCHAR2(30);'); --J.C 02-FEB-97
1262: cn_utils.appindcr(body_code, 'debug_level NUMBER := 1 ;'); --J.C 02-FEB-97
1263: cn_utils.appindcr(body_code, 'dummy_num NUMBER ;');
1256:
1257: -- generate local variables.
1258: cn_utils.indent(body_code, 1);
1259: cn_utils.appindcr(body_code, 'x_proc_audit_id NUMBER := NULL ;');
1260: cn_utils.appindcr(body_code, 'x_col_audit_id NUMBER;');
1261: cn_utils.appindcr(body_code, 'debug_pipe VARCHAR2(30);'); --J.C 02-FEB-97
1262: cn_utils.appindcr(body_code, 'debug_level NUMBER := 1 ;'); --J.C 02-FEB-97
1263: cn_utils.appindcr(body_code, 'dummy_num NUMBER ;');
1264: cn_utils.appendcr(body_code);
1257: -- generate local variables.
1258: cn_utils.indent(body_code, 1);
1259: cn_utils.appindcr(body_code, 'x_proc_audit_id NUMBER := NULL ;');
1260: cn_utils.appindcr(body_code, 'x_col_audit_id NUMBER;');
1261: cn_utils.appindcr(body_code, 'debug_pipe VARCHAR2(30);'); --J.C 02-FEB-97
1262: cn_utils.appindcr(body_code, 'debug_level NUMBER := 1 ;'); --J.C 02-FEB-97
1263: cn_utils.appindcr(body_code, 'dummy_num NUMBER ;');
1264: cn_utils.appendcr(body_code);
1265: cn_utils.unindent(body_code, 1);
1258: cn_utils.indent(body_code, 1);
1259: cn_utils.appindcr(body_code, 'x_proc_audit_id NUMBER := NULL ;');
1260: cn_utils.appindcr(body_code, 'x_col_audit_id NUMBER;');
1261: cn_utils.appindcr(body_code, 'debug_pipe VARCHAR2(30);'); --J.C 02-FEB-97
1262: cn_utils.appindcr(body_code, 'debug_level NUMBER := 1 ;'); --J.C 02-FEB-97
1263: cn_utils.appindcr(body_code, 'dummy_num NUMBER ;');
1264: cn_utils.appendcr(body_code);
1265: cn_utils.unindent(body_code, 1);
1266:
1259: cn_utils.appindcr(body_code, 'x_proc_audit_id NUMBER := NULL ;');
1260: cn_utils.appindcr(body_code, 'x_col_audit_id NUMBER;');
1261: cn_utils.appindcr(body_code, 'debug_pipe VARCHAR2(30);'); --J.C 02-FEB-97
1262: cn_utils.appindcr(body_code, 'debug_level NUMBER := 1 ;'); --J.C 02-FEB-97
1263: cn_utils.appindcr(body_code, 'dummy_num NUMBER ;');
1264: cn_utils.appendcr(body_code);
1265: cn_utils.unindent(body_code, 1);
1266:
1267: cn_utils.proc_begin(procedure_name, 'Y', body_code);
1260: cn_utils.appindcr(body_code, 'x_col_audit_id NUMBER;');
1261: cn_utils.appindcr(body_code, 'debug_pipe VARCHAR2(30);'); --J.C 02-FEB-97
1262: cn_utils.appindcr(body_code, 'debug_level NUMBER := 1 ;'); --J.C 02-FEB-97
1263: cn_utils.appindcr(body_code, 'dummy_num NUMBER ;');
1264: cn_utils.appendcr(body_code);
1265: cn_utils.unindent(body_code, 1);
1266:
1267: cn_utils.proc_begin(procedure_name, 'Y', body_code);
1268: call_start_debug(procedure_name, event_id, body_code,X_org_id);
1261: cn_utils.appindcr(body_code, 'debug_pipe VARCHAR2(30);'); --J.C 02-FEB-97
1262: cn_utils.appindcr(body_code, 'debug_level NUMBER := 1 ;'); --J.C 02-FEB-97
1263: cn_utils.appindcr(body_code, 'dummy_num NUMBER ;');
1264: cn_utils.appendcr(body_code);
1265: cn_utils.unindent(body_code, 1);
1266:
1267: cn_utils.proc_begin(procedure_name, 'Y', body_code);
1268: call_start_debug(procedure_name, event_id, body_code,X_org_id);
1269:
1263: cn_utils.appindcr(body_code, 'dummy_num NUMBER ;');
1264: cn_utils.appendcr(body_code);
1265: cn_utils.unindent(body_code, 1);
1266:
1267: cn_utils.proc_begin(procedure_name, 'Y', body_code);
1268: call_start_debug(procedure_name, event_id, body_code,X_org_id);
1269:
1270: cn_utils.set_org_id(X_org_id);
1271: cn_utils.appindcr(body_code, 'NULL;');
1266:
1267: cn_utils.proc_begin(procedure_name, 'Y', body_code);
1268: call_start_debug(procedure_name, event_id, body_code,X_org_id);
1269:
1270: cn_utils.set_org_id(X_org_id);
1271: cn_utils.appindcr(body_code, 'NULL;');
1272: cn_utils.appendcr(body_code);
1273:
1274: cn_utils.appindcr(body_code, 'cn_message_pkg.debug('''|| procedure_name || ': Nothing is being collected.'');');
1267: cn_utils.proc_begin(procedure_name, 'Y', body_code);
1268: call_start_debug(procedure_name, event_id, body_code,X_org_id);
1269:
1270: cn_utils.set_org_id(X_org_id);
1271: cn_utils.appindcr(body_code, 'NULL;');
1272: cn_utils.appendcr(body_code);
1273:
1274: cn_utils.appindcr(body_code, 'cn_message_pkg.debug('''|| procedure_name || ': Nothing is being collected.'');');
1275: cn_utils.appindcr(body_code, 'fnd_file.put_line(fnd_file.Log, '''|| procedure_name || ': Nothing is being collected.'');');
1268: call_start_debug(procedure_name, event_id, body_code,X_org_id);
1269:
1270: cn_utils.set_org_id(X_org_id);
1271: cn_utils.appindcr(body_code, 'NULL;');
1272: cn_utils.appendcr(body_code);
1273:
1274: cn_utils.appindcr(body_code, 'cn_message_pkg.debug('''|| procedure_name || ': Nothing is being collected.'');');
1275: cn_utils.appindcr(body_code, 'fnd_file.put_line(fnd_file.Log, '''|| procedure_name || ': Nothing is being collected.'');');
1276: cn_utils.appindcr(body_code, 'cn_message_pkg.debug('''|| procedure_name ||'<<'');');
1270: cn_utils.set_org_id(X_org_id);
1271: cn_utils.appindcr(body_code, 'NULL;');
1272: cn_utils.appendcr(body_code);
1273:
1274: cn_utils.appindcr(body_code, 'cn_message_pkg.debug('''|| procedure_name || ': Nothing is being collected.'');');
1275: cn_utils.appindcr(body_code, 'fnd_file.put_line(fnd_file.Log, '''|| procedure_name || ': Nothing is being collected.'');');
1276: cn_utils.appindcr(body_code, 'cn_message_pkg.debug('''|| procedure_name ||'<<'');');
1277: cn_utils.appindcr(body_code, 'fnd_file.put_line(fnd_file.Log, '''|| procedure_name ||'<<'');');
1278: cn_utils.appindcr(body_code, 'cn_message_pkg.end_batch(x_proc_audit_id);');
1271: cn_utils.appindcr(body_code, 'NULL;');
1272: cn_utils.appendcr(body_code);
1273:
1274: cn_utils.appindcr(body_code, 'cn_message_pkg.debug('''|| procedure_name || ': Nothing is being collected.'');');
1275: cn_utils.appindcr(body_code, 'fnd_file.put_line(fnd_file.Log, '''|| procedure_name || ': Nothing is being collected.'');');
1276: cn_utils.appindcr(body_code, 'cn_message_pkg.debug('''|| procedure_name ||'<<'');');
1277: cn_utils.appindcr(body_code, 'fnd_file.put_line(fnd_file.Log, '''|| procedure_name ||'<<'');');
1278: cn_utils.appindcr(body_code, 'cn_message_pkg.end_batch(x_proc_audit_id);');
1279: cn_utils.appendcr(body_code);
1272: cn_utils.appendcr(body_code);
1273:
1274: cn_utils.appindcr(body_code, 'cn_message_pkg.debug('''|| procedure_name || ': Nothing is being collected.'');');
1275: cn_utils.appindcr(body_code, 'fnd_file.put_line(fnd_file.Log, '''|| procedure_name || ': Nothing is being collected.'');');
1276: cn_utils.appindcr(body_code, 'cn_message_pkg.debug('''|| procedure_name ||'<<'');');
1277: cn_utils.appindcr(body_code, 'fnd_file.put_line(fnd_file.Log, '''|| procedure_name ||'<<'');');
1278: cn_utils.appindcr(body_code, 'cn_message_pkg.end_batch(x_proc_audit_id);');
1279: cn_utils.appendcr(body_code);
1280:
1273:
1274: cn_utils.appindcr(body_code, 'cn_message_pkg.debug('''|| procedure_name || ': Nothing is being collected.'');');
1275: cn_utils.appindcr(body_code, 'fnd_file.put_line(fnd_file.Log, '''|| procedure_name || ': Nothing is being collected.'');');
1276: cn_utils.appindcr(body_code, 'cn_message_pkg.debug('''|| procedure_name ||'<<'');');
1277: cn_utils.appindcr(body_code, 'fnd_file.put_line(fnd_file.Log, '''|| procedure_name ||'<<'');');
1278: cn_utils.appindcr(body_code, 'cn_message_pkg.end_batch(x_proc_audit_id);');
1279: cn_utils.appendcr(body_code);
1280:
1281:
1274: cn_utils.appindcr(body_code, 'cn_message_pkg.debug('''|| procedure_name || ': Nothing is being collected.'');');
1275: cn_utils.appindcr(body_code, 'fnd_file.put_line(fnd_file.Log, '''|| procedure_name || ': Nothing is being collected.'');');
1276: cn_utils.appindcr(body_code, 'cn_message_pkg.debug('''|| procedure_name ||'<<'');');
1277: cn_utils.appindcr(body_code, 'fnd_file.put_line(fnd_file.Log, '''|| procedure_name ||'<<'');');
1278: cn_utils.appindcr(body_code, 'cn_message_pkg.end_batch(x_proc_audit_id);');
1279: cn_utils.appendcr(body_code);
1280:
1281:
1282: -- Generate procedure end.
1275: cn_utils.appindcr(body_code, 'fnd_file.put_line(fnd_file.Log, '''|| procedure_name || ': Nothing is being collected.'');');
1276: cn_utils.appindcr(body_code, 'cn_message_pkg.debug('''|| procedure_name ||'<<'');');
1277: cn_utils.appindcr(body_code, 'fnd_file.put_line(fnd_file.Log, '''|| procedure_name ||'<<'');');
1278: cn_utils.appindcr(body_code, 'cn_message_pkg.end_batch(x_proc_audit_id);');
1279: cn_utils.appendcr(body_code);
1280:
1281:
1282: -- Generate procedure end.
1283: -- Generate end of procedure statement
1280:
1281:
1282: -- Generate procedure end.
1283: -- Generate end of procedure statement
1284: cn_utils.appendcr(body_code);
1285: cn_utils.unindent(body_code, 1);
1286: cn_utils.appindcr(body_code, 'END ' || procedure_name || ';');
1287: cn_utils.appendcr(body_code);
1288: cn_utils.unset_org_id();
1281:
1282: -- Generate procedure end.
1283: -- Generate end of procedure statement
1284: cn_utils.appendcr(body_code);
1285: cn_utils.unindent(body_code, 1);
1286: cn_utils.appindcr(body_code, 'END ' || procedure_name || ';');
1287: cn_utils.appendcr(body_code);
1288: cn_utils.unset_org_id();
1289:
1282: -- Generate procedure end.
1283: -- Generate end of procedure statement
1284: cn_utils.appendcr(body_code);
1285: cn_utils.unindent(body_code, 1);
1286: cn_utils.appindcr(body_code, 'END ' || procedure_name || ';');
1287: cn_utils.appendcr(body_code);
1288: cn_utils.unset_org_id();
1289:
1290: cn_debug.print_msg('null_proc<<', 1);
1283: -- Generate end of procedure statement
1284: cn_utils.appendcr(body_code);
1285: cn_utils.unindent(body_code, 1);
1286: cn_utils.appindcr(body_code, 'END ' || procedure_name || ';');
1287: cn_utils.appendcr(body_code);
1288: cn_utils.unset_org_id();
1289:
1290: cn_debug.print_msg('null_proc<<', 1);
1291: fnd_file.put_line(fnd_file.Log, 'null_proc<<');
1284: cn_utils.appendcr(body_code);
1285: cn_utils.unindent(body_code, 1);
1286: cn_utils.appindcr(body_code, 'END ' || procedure_name || ';');
1287: cn_utils.appendcr(body_code);
1288: cn_utils.unset_org_id();
1289:
1290: cn_debug.print_msg('null_proc<<', 1);
1291: fnd_file.put_line(fnd_file.Log, 'null_proc<<');
1292:
1317: l_package_body_id cn_obj_packages_v.package_id%TYPE;
1318: l_package_spec_desc cn_obj_packages_v.description%TYPE;
1319: l_package_body_desc cn_obj_packages_v.description%TYPE;
1320: l_repository_id cn_repositories.repository_id%TYPE
1321: := cn_utils.get_repository(X_MODULE_ID,x_org_id);
1322: l_spec_code cn_utils.code_type;
1323: l_body_code cn_utils.code_type;
1324: l_event_id cn_events.event_id%TYPE
1325: := cn_utils.get_event(x_module_id,x_org_id);
1318: l_package_spec_desc cn_obj_packages_v.description%TYPE;
1319: l_package_body_desc cn_obj_packages_v.description%TYPE;
1320: l_repository_id cn_repositories.repository_id%TYPE
1321: := cn_utils.get_repository(X_MODULE_ID,x_org_id);
1322: l_spec_code cn_utils.code_type;
1323: l_body_code cn_utils.code_type;
1324: l_event_id cn_events.event_id%TYPE
1325: := cn_utils.get_event(x_module_id,x_org_id);
1326:
1319: l_package_body_desc cn_obj_packages_v.description%TYPE;
1320: l_repository_id cn_repositories.repository_id%TYPE
1321: := cn_utils.get_repository(X_MODULE_ID,x_org_id);
1322: l_spec_code cn_utils.code_type;
1323: l_body_code cn_utils.code_type;
1324: l_event_id cn_events.event_id%TYPE
1325: := cn_utils.get_event(x_module_id,x_org_id);
1326:
1327: BEGIN
1321: := cn_utils.get_repository(X_MODULE_ID,x_org_id);
1322: l_spec_code cn_utils.code_type;
1323: l_body_code cn_utils.code_type;
1324: l_event_id cn_events.event_id%TYPE
1325: := cn_utils.get_event(x_module_id,x_org_id);
1326:
1327: BEGIN
1328:
1329:
1339: fnd_file.put_line(fnd_file.Log, 'collection_pkg_code>>');
1340:
1341: --+
1342: -- Define package in Commissions dictionary, initialize code etc.
1343: -- Note: pkg_init calls delete_module in cn_utils to delete current mod.
1344: -- Note: l_package_type can be left NULL - it's not actually used.
1345: --+
1346:
1347: cn_utils.set_org_id(x_org_id);
1343: -- Note: pkg_init calls delete_module in cn_utils to delete current mod.
1344: -- Note: l_package_type can be left NULL - it's not actually used.
1345: --+
1346:
1347: cn_utils.set_org_id(x_org_id);
1348:
1349: cn_utils.pkg_init(x_module_id, x_package_name, x_org_append, l_package_type,
1350: l_package_spec_id, l_package_body_id, l_package_spec_desc,
1351: l_package_body_desc, l_spec_code, l_body_code);
1345: --+
1346:
1347: cn_utils.set_org_id(x_org_id);
1348:
1349: cn_utils.pkg_init(x_module_id, x_package_name, x_org_append, l_package_type,
1350: l_package_spec_id, l_package_body_id, l_package_spec_desc,
1351: l_package_body_desc, l_spec_code, l_body_code);
1352:
1353: IF x_collect_flag = 'YES' THEN
1361: END IF;
1362:
1363: -- Generate end package statements, dump code into cn_objects
1364:
1365: cn_utils.set_org_id(X_org_id);
1366: cn_utils.pkg_end(x_package_name, l_package_spec_id, l_package_body_id,
1367: l_spec_code, l_body_code);
1368:
1369: cn_utils.unset_org_id();
1362:
1363: -- Generate end package statements, dump code into cn_objects
1364:
1365: cn_utils.set_org_id(X_org_id);
1366: cn_utils.pkg_end(x_package_name, l_package_spec_id, l_package_body_id,
1367: l_spec_code, l_body_code);
1368:
1369: cn_utils.unset_org_id();
1370: cn_debug.print_msg('collection_pkg_code<<', 1);
1365: cn_utils.set_org_id(X_org_id);
1366: cn_utils.pkg_end(x_package_name, l_package_spec_id, l_package_body_id,
1367: l_spec_code, l_body_code);
1368:
1369: cn_utils.unset_org_id();
1370: cn_debug.print_msg('collection_pkg_code<<', 1);
1371: fnd_file.put_line(fnd_file.Log, 'collection_pkg_code<<');
1372:
1373: END collection_pkg_code;