1: PACKAGE BODY igi_rpi_line_audit_det_all_pkg AS
2: /* $Header: igirladb.pls 120.4.12010000.2 2010/02/08 23:21:26 gaprasad ship $ */
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:
349: || (reverse chronological order - newest change first)
350: */
351: CURSOR c IS
352: SELECT rowid
353: FROM igi_rpi_line_audit_det_all
354: WHERE item_id=x_item_id and line_item_id=x_line_item_id;
355:
356: x_last_update_date DATE;
357: x_last_updated_by NUMBER;
376: fnd_message.set_name ('FND', 'SYSTEM-INVALID ARGS');
377: --igs_ge_msg_stack.add;
378: --Bug 3199481 (start)
379: If (l_unexp_level >= l_debug_level) then
380: FND_LOG.MESSAGE(l_unexp_level,'igi.plsql.igi_rpi_line_audit_det_all_pkg.insert_row.Msg1',FALSE);
381: End if;
382: --Bug 3199481 (end)
383: app_exception.raise_exception;
384: END IF;
404: x_last_updated_by => x_last_updated_by,
405: x_last_update_login => x_last_update_login
406: );
407:
408: INSERT INTO igi_rpi_line_audit_det_all (
409: standing_charge_id,
410: line_item_id,
411: charge_item_number,
412: item_id,
497: run_id,
498: org_id,
499: previous_price,
500: previous_effective_date
501: FROM igi_rpi_line_audit_det_all
502: WHERE rowid = x_rowid
503: FOR UPDATE NOWAIT;
504:
505: tlinfo c1%ROWTYPE;
513: --igs_ge_msg_stack.add;
514:
515: --Bug 3199481 (start)
516: If (l_unexp_level >= l_debug_level) then
517: FND_LOG.MESSAGE(l_unexp_level,'igi.plsql.igi_rpi_line_audit_det_all_pkg.lock_row.Msg1',FALSE);
518: End if;
519: --Bug 3199481 (end)
520: CLOSE c1;
521: app_exception.raise_exception;
543: --igs_ge_msg_stack.add;
544:
545: --Bug 3199481 (start)
546: If (l_unexp_level >= l_debug_level) then
547: FND_LOG.MESSAGE(l_unexp_level,'igi.plsql.igi_rpi_line_audit_det_all_pkg.lock_row.Msg1',FALSE);
548: End if;
549: --Bug 3199481 (end)
550: app_exception.raise_exception;
551: END IF;
602: fnd_message.set_name( 'FND', 'SYSTEM-INVALID ARGS');
603: --igs_ge_msg_stack.add;
604: --Bug 3199481 (start)
605: If (l_unexp_level >= l_debug_level) then
606: FND_LOG.MESSAGE(l_unexp_level,'igi.plsql.igi_rpi_line_audit_det_all_pkg.update_row.Msg1',FALSE);
607: End if;
608: --Bug 3199481 (end)
609: app_exception.raise_exception;
610: END IF;
630: x_last_updated_by => x_last_updated_by,
631: x_last_update_login => x_last_update_login
632: );
633:
634: UPDATE igi_rpi_line_audit_det_all
635: SET
636: standing_charge_id = new_references.standing_charge_id,
637: line_item_id = new_references.line_item_id,
638: charge_item_number = new_references.charge_item_number,
682: || (reverse chronological order - newest change first)
683: */
684: CURSOR c1 IS
685: SELECT rowid
686: FROM igi_rpi_line_audit_det_all
687: WHERE item_id=x_item_id and line_item_id=x_line_item_id;
688:
689: BEGIN
690:
751: p_action => 'DELETE',
752: x_rowid => x_rowid
753: );
754:
755: DELETE FROM igi_rpi_line_audit_det_all
756: WHERE rowid = x_rowid;
757:
758: IF (SQL%NOTFOUND) THEN
759: RAISE NO_DATA_FOUND;
761:
762: END delete_row;
763:
764:
765: END igi_rpi_line_audit_det_all_pkg;