1: PACKAGE BODY igs_ps_usec_cps_pkg AS
2: /* $Header: IGSPI1AB.pls 120.2 2006/05/15 00:48:09 sarakshi ship $ */
3: l_rowid VARCHAR2(25);
4: old_references igs_ps_usec_cps%RowType;
5: new_references igs_ps_usec_cps%RowType;
1: PACKAGE BODY igs_ps_usec_cps_pkg AS
2: /* $Header: IGSPI1AB.pls 120.2 2006/05/15 00:48:09 sarakshi ship $ */
3: l_rowid VARCHAR2(25);
4: old_references igs_ps_usec_cps%RowType;
5: new_references igs_ps_usec_cps%RowType;
6:
7: PROCEDURE Set_Column_Values (
8: p_action IN VARCHAR2,
1: PACKAGE BODY igs_ps_usec_cps_pkg AS
2: /* $Header: IGSPI1AB.pls 120.2 2006/05/15 00:48:09 sarakshi ship $ */
3: l_rowid VARCHAR2(25);
4: old_references igs_ps_usec_cps%RowType;
5: new_references igs_ps_usec_cps%RowType;
6:
7: PROCEDURE Set_Column_Values (
8: p_action IN VARCHAR2,
9: x_rowid IN VARCHAR2 DEFAULT NULL,
49: ***************************************************************/
50:
51: CURSOR cur_old_ref_values IS
52: SELECT *
53: FROM IGS_PS_USEC_CPS
54: WHERE rowid = x_rowid;
55:
56: BEGIN
57:
455: ***************************************************************/
456:
457: CURSOR cur_rowid IS
458: SELECT rowid
459: FROM igs_ps_usec_cps
460: WHERE unit_sec_credit_points_id = x_unit_sec_credit_points_id
461: FOR UPDATE NOWAIT;
462:
463: lv_rowid cur_rowid%RowType;
491: ***************************************************************/
492:
493: CURSOR cur_rowid IS
494: SELECT rowid
495: FROM igs_ps_usec_cps
496: WHERE uoo_id = x_uoo_id and ((l_rowid is null) or (rowid <> l_rowid))
497:
498: ;
499: lv_rowid cur_rowid%RowType;
526: ***************************************************************/
527:
528: CURSOR cur_rowid IS
529: SELECT rowid
530: FROM igs_ps_usec_cps
531: WHERE uoo_id = x_uoo_id ;
532:
533: lv_rowid cur_rowid%RowType;
534:
735:
736: (reverse chronological order - newest change first)
737: ***************************************************************/
738:
739: cursor C is select ROWID from IGS_PS_USEC_CPS
740: where UNIT_SEC_CREDIT_POINTS_ID= X_UNIT_SEC_CREDIT_POINTS_ID
741: ;
742: X_LAST_UPDATE_DATE DATE ;
743: X_LAST_UPDATED_BY NUMBER ;
761: IGS_GE_MSG_STACK.ADD;
762: app_exception.raise_exception;
763: end if;
764: SELECT
765: IGS_PS_USEC_CPS_S.NextVal
766: INTO
767: x_UNIT_SEC_CREDIT_POINTS_ID
768: FROM
769: dual;
799: x_billing_credit_points => x_billing_credit_points,
800: x_billing_hrs => x_billing_hrs
801: );
802:
803: insert into IGS_PS_USEC_CPS (
804: UNIT_SEC_CREDIT_POINTS_ID
805: ,UOO_ID
806: ,MINIMUM_CREDIT_POINTS
807: ,MAXIMUM_CREDIT_POINTS
928: , achievable_credit_points
929: , enrolled_credit_points
930: , billing_credit_points
931: , billing_hrs
932: from IGS_PS_USEC_CPS
933: where ROWID = X_ROWID
934: for update nowait;
935: tlinfo c1%rowtype;
936: begin
1111: x_billing_hrs => x_billing_hrs
1112: );
1113:
1114:
1115: update IGS_PS_USEC_CPS set
1116: UOO_ID = NEW_REFERENCES.UOO_ID,
1117: MINIMUM_CREDIT_POINTS = NEW_REFERENCES.MINIMUM_CREDIT_POINTS,
1118: MAXIMUM_CREDIT_POINTS = NEW_REFERENCES.MAXIMUM_CREDIT_POINTS,
1119: VARIABLE_INCREMENT = NEW_REFERENCES.VARIABLE_INCREMENT,
1186:
1187: (reverse chronological order - newest change first)
1188: ***************************************************************/
1189:
1190: cursor c1 is select ROWID from IGS_PS_USEC_CPS
1191: where UNIT_SEC_CREDIT_POINTS_ID= X_UNIT_SEC_CREDIT_POINTS_ID
1192: ;
1193: begin
1194: open c1;
1270: Before_DML (
1271: p_action => 'DELETE',
1272: x_rowid => X_ROWID
1273: );
1274: delete from IGS_PS_USEC_CPS
1275: where ROWID = X_ROWID;
1276: if (sql%notfound) then
1277: raise no_data_found;
1278: end if;
1280: p_action => 'DELETE',
1281: x_rowid => X_ROWID
1282: );
1283: END DELETE_ROW;
1284: END igs_ps_usec_cps_pkg;