1: PACKAGE BODY igi_rpi_line_audit_det_all_pkg AS
2: /* $Header: igirladb.pls 120.4.12000000.1 2007/08/31 05:52:52 mbremkum noship $ */
3:
4: l_debug_level number:=FND_LOG.G_CURRENT_RUNTIME_LEVEL;
5:
10: l_error_level number:=FND_LOG.LEVEL_ERROR;
11: l_unexp_level number:=FND_LOG.LEVEL_UNEXPECTED;
12:
13: l_rowid VARCHAR2(25);
14: old_references igi_rpi_line_audit_det_all%ROWTYPE;
15: new_references igi_rpi_line_audit_det_all%ROWTYPE;
16:
17: PROCEDURE set_column_values (
18: p_action IN VARCHAR2,
11: l_unexp_level number:=FND_LOG.LEVEL_UNEXPECTED;
12:
13: l_rowid VARCHAR2(25);
14: old_references igi_rpi_line_audit_det_all%ROWTYPE;
15: new_references igi_rpi_line_audit_det_all%ROWTYPE;
16:
17: PROCEDURE set_column_values (
18: p_action IN VARCHAR2,
19: x_rowid IN VARCHAR2,
45: */
46:
47: CURSOR cur_old_ref_values IS
48: SELECT *
49: FROM IGI_RPI_LINE_AUDIT_DET_ALL
50: WHERE rowid = x_rowid;
51:
52: BEGIN
53:
63: --igs_ge_msg_stack.add;
64:
65: --Bug 3199481 (start)
66: If (l_unexp_level >= l_debug_level) then
67: FND_LOG.MESSAGE(l_unexp_level,'igi.plsql.igi_rpi_line_audit_det_all_pkg.set_column_values.Msg1',FALSE);
68: End if;
69: --Bug 3199481 (end)
70: app_exception.raise_exception;
71: RETURN;
134: --igs_ge_msg_stack.add;
135:
136: --Bug 3199481 (start)
137: If (l_unexp_level >= l_debug_level) then
138: FND_LOG.MESSAGE(l_unexp_level,'igi.plsql.igi_rpi_line_audit_det_all_pkg.check_parent_existence.Msg1',FALSE);
139: End if;
140: --Bug 3199481 (end)
141: app_exception.raise_exception;
142: END IF;
149: fnd_message.set_name ('FND', 'FORM_RECORD_DELETED');
150: --igs_ge_msg_stack.add;
151: --Bug 3199481 (start)
152: If (l_unexp_level >= l_debug_level) then
153: FND_LOG.MESSAGE(l_unexp_level,'igi.rpi_line_audit_det_all_pkg.check_parent_existence.Msg2',FALSE);
154: End if;
155: --Bug 3199481 (end)
156: app_exception.raise_exception;
157: END IF;
175: || (reverse chronological order - newest change first)
176: */
177: CURSOR cur_rowid IS
178: SELECT rowid
179: FROM igi_rpi_line_audit_det_all
180: WHERE ((line_item_id = x_line_item_id));
181:
182: lv_rowid cur_rowid%RowType;
183:
190: -- fnd_message.set_name ('IGS', 'IGS_FOREIGN_KEY_REFERENCE');
191: --igs_ge_msg_stack.add;
192: --Bug 3199481 (start)
193: If (l_unexp_level >= l_debug_level) then
194: FND_LOG.MESSAGE(l_unexp_level,'igi.plsql.igi_rpi_line_audit_det_all_pkg.get_fk_igi_rpi_line_det_all.Msg1',FALSE);
195: End if;
196: --Bug 3199481 (end)
197: app_exception.raise_exception;
198: RETURN;
215: || (reverse chronological order - newest change first)
216: */
217: CURSOR cur_rowid IS
218: SELECT rowid
219: FROM igi_rpi_line_audit_det_all
220: WHERE ((item_id = x_item_id));
221:
222: lv_rowid cur_rowid%RowType;
223:
346: || (reverse chronological order - newest change first)
347: */
348: CURSOR c IS
349: SELECT rowid
350: FROM igi_rpi_line_audit_det_all
351: WHERE item_id=x_item_id and line_item_id=x_line_item_id;
352:
353: x_last_update_date DATE;
354: x_last_updated_by NUMBER;
373: fnd_message.set_name ('FND', 'SYSTEM-INVALID ARGS');
374: --igs_ge_msg_stack.add;
375: --Bug 3199481 (start)
376: If (l_unexp_level >= l_debug_level) then
377: FND_LOG.MESSAGE(l_unexp_level,'igi.plsql.igi_rpi_line_audit_det_all_pkg.insert_row.Msg1',FALSE);
378: End if;
379: --Bug 3199481 (end)
380: app_exception.raise_exception;
381: END IF;
401: x_last_updated_by => x_last_updated_by,
402: x_last_update_login => x_last_update_login
403: );
404:
405: INSERT INTO igi_rpi_line_audit_det_all (
406: standing_charge_id,
407: line_item_id,
408: charge_item_number,
409: item_id,
488: run_id,
489: org_id,
490: previous_price,
491: previous_effective_date
492: FROM igi_rpi_line_audit_det_all
493: WHERE rowid = x_rowid
494: FOR UPDATE NOWAIT;
495:
496: tlinfo c1%ROWTYPE;
504: --igs_ge_msg_stack.add;
505:
506: --Bug 3199481 (start)
507: If (l_unexp_level >= l_debug_level) then
508: FND_LOG.MESSAGE(l_unexp_level,'igi.plsql.igi_rpi_line_audit_det_all_pkg.lock_row.Msg1',FALSE);
509: End if;
510: --Bug 3199481 (end)
511: CLOSE c1;
512: app_exception.raise_exception;
534: --igs_ge_msg_stack.add;
535:
536: --Bug 3199481 (start)
537: If (l_unexp_level >= l_debug_level) then
538: FND_LOG.MESSAGE(l_unexp_level,'igi.plsql.igi_rpi_line_audit_det_all_pkg.lock_row.Msg1',FALSE);
539: End if;
540: --Bug 3199481 (end)
541: app_exception.raise_exception;
542: END IF;
593: fnd_message.set_name( 'FND', 'SYSTEM-INVALID ARGS');
594: --igs_ge_msg_stack.add;
595: --Bug 3199481 (start)
596: If (l_unexp_level >= l_debug_level) then
597: FND_LOG.MESSAGE(l_unexp_level,'igi.plsql.igi_rpi_line_audit_det_all_pkg.update_row.Msg1',FALSE);
598: End if;
599: --Bug 3199481 (end)
600: app_exception.raise_exception;
601: END IF;
621: x_last_updated_by => x_last_updated_by,
622: x_last_update_login => x_last_update_login
623: );
624:
625: UPDATE igi_rpi_line_audit_det_all
626: SET
627: standing_charge_id = new_references.standing_charge_id,
628: line_item_id = new_references.line_item_id,
629: charge_item_number = new_references.charge_item_number,
673: || (reverse chronological order - newest change first)
674: */
675: CURSOR c1 IS
676: SELECT rowid
677: FROM igi_rpi_line_audit_det_all
678: WHERE item_id=x_item_id and line_item_id=x_line_item_id;
679:
680: BEGIN
681:
742: p_action => 'DELETE',
743: x_rowid => x_rowid
744: );
745:
746: DELETE FROM igi_rpi_line_audit_det_all
747: WHERE rowid = x_rowid;
748:
749: IF (SQL%NOTFOUND) THEN
750: RAISE NO_DATA_FOUND;
752:
753: END delete_row;
754:
755:
756: END igi_rpi_line_audit_det_all_pkg;