[Home] [Help]
1: PACKAGE BODY igs_fi_balances_hst_pkg AS
2: /* $Header: IGSSIC6B.pls 115.5 2003/03/04 10:00:48 shtatiko noship $ */
3:
4: l_rowid VARCHAR2(25);
5: old_references igs_fi_balances_hst%ROWTYPE;
1: PACKAGE BODY igs_fi_balances_hst_pkg AS
2: /* $Header: IGSSIC6B.pls 115.5 2003/03/04 10:00:48 shtatiko noship $ */
3:
4: l_rowid VARCHAR2(25);
5: old_references igs_fi_balances_hst%ROWTYPE;
6: new_references igs_fi_balances_hst%ROWTYPE;
7:
8: PROCEDURE set_column_values (
9: p_action IN VARCHAR2,
2: /* $Header: IGSSIC6B.pls 115.5 2003/03/04 10:00:48 shtatiko noship $ */
3:
4: l_rowid VARCHAR2(25);
5: old_references igs_fi_balances_hst%ROWTYPE;
6: new_references igs_fi_balances_hst%ROWTYPE;
7:
8: PROCEDURE set_column_values (
9: p_action IN VARCHAR2,
10: x_rowid IN VARCHAR2,
30: */
31:
32: CURSOR cur_old_ref_values IS
33: SELECT *
34: FROM igs_fi_balances_hst
35: WHERE rowid = x_rowid;
36:
37: BEGIN
38:
112: || (reverse chronological order - newest change first)
113: */
114: CURSOR cur_rowid IS
115: SELECT rowid
116: FROM igs_fi_balances_hst
117: WHERE balance_hist_id = x_balance_hist_id
118: FOR UPDATE NOWAIT;
119:
120: lv_rowid cur_rowid%RowType;
147: || (reverse chronological order - newest change first)
148: */
149: CURSOR cur_rowid IS
150: SELECT rowid
151: FROM igs_fi_balances_hst
152: WHERE ((balance_id = x_balance_id));
153:
154: lv_rowid cur_rowid%RowType;
155:
254: || Purpose : Handles the INSERT DML logic for the table.
255: || Known limitations, enhancements or remarks :
256: || Change History :
257: || Who When What
258: || shtatiko 27-FEB-2003 Bug# 2815373, Next value of the sequence (igs_fi_balances_hst_s.NEXTVAL)
259: || is fetched before the call to before_dml. Previously, this was done in the
260: || insert statement itself.
261: || (reverse chronological order - newest change first)
262: */
304:
305: -- Added this as part of Bug fix 2815373.
306: -- Sequence's NEXTVAL should be fetched before calling before_dml.
307:
308: SELECT igs_fi_balances_hst_s.NEXTVAL INTO x_balance_hist_id
309: FROM dual;
310:
311: -- Fetched value is passed to before_dml so that check for existence of id is done for the
312: -- newly generated Id.
326: x_last_update_login => x_last_update_login
327: );
328:
329: -- Bug# 2815373, Removed x_balance_hist_id from RETURNING clause as it is determined above.
330: INSERT INTO igs_fi_balances_hst (
331: balance_hist_id,
332: balance_id,
333: balance_type,
334: balance_amount,
384: balance_id,
385: balance_type,
386: balance_amount,
387: balance_rule_id
388: FROM igs_fi_balances_hst
389: WHERE rowid = x_rowid
390: FOR UPDATE NOWAIT;
391:
392: tlinfo c1%ROWTYPE;
497: x_program_update_date := SYSDATE;
498: END IF;
499: END IF;
500:
501: UPDATE igs_fi_balances_hst
502: SET
503: balance_id = new_references.balance_id,
504: balance_type = new_references.balance_type,
505: balance_amount = new_references.balance_amount,
539: || (reverse chronological order - newest change first)
540: */
541: CURSOR c1 IS
542: SELECT rowid
543: FROM igs_fi_balances_hst
544: WHERE balance_hist_id = x_balance_hist_id;
545:
546: BEGIN
547:
594: p_action => 'DELETE',
595: x_rowid => x_rowid
596: );
597:
598: DELETE FROM igs_fi_balances_hst
599: WHERE rowid = x_rowid;
600:
601: IF (SQL%NOTFOUND) THEN
602: RAISE NO_DATA_FOUND;
604:
605: END delete_row;
606:
607:
608: END igs_fi_balances_hst_pkg;