[Home] [Help]
1: package body IGS_PS_UNIT_OFR_PKG as
2: /* $Header: IGSPI82B.pls 115.5 2002/11/29 02:39:10 nsidana ship $ */
3:
4: l_rowid VARCHAR2(25);
5: old_references IGS_PS_UNIT_OFR%RowType;
1: package body IGS_PS_UNIT_OFR_PKG as
2: /* $Header: IGSPI82B.pls 115.5 2002/11/29 02:39:10 nsidana ship $ */
3:
4: l_rowid VARCHAR2(25);
5: old_references IGS_PS_UNIT_OFR%RowType;
6: new_references IGS_PS_UNIT_OFR%RowType;
7:
8: PROCEDURE Set_Column_Values (
9: p_action IN VARCHAR2,
2: /* $Header: IGSPI82B.pls 115.5 2002/11/29 02:39:10 nsidana ship $ */
3:
4: l_rowid VARCHAR2(25);
5: old_references IGS_PS_UNIT_OFR%RowType;
6: new_references IGS_PS_UNIT_OFR%RowType;
7:
8: PROCEDURE Set_Column_Values (
9: p_action IN VARCHAR2,
10: x_rowid IN VARCHAR2 DEFAULT NULL,
19: ) IS
20:
21: CURSOR cur_old_ref_values IS
22: SELECT *
23: FROM IGS_PS_UNIT_OFR
24: WHERE rowid = x_rowid;
25:
26: BEGIN
27:
61: p_inserting IN BOOLEAN DEFAULT FALSE,
62: p_updating IN BOOLEAN DEFAULT FALSE,
63: p_deleting IN BOOLEAN DEFAULT FALSE
64: ) IS
65: v_unit_cd IGS_PS_UNIT_OFR.unit_cd%TYPE;
66: v_version_number IGS_PS_UNIT_OFR.version_number%TYPE;
67: v_message_name Varchar2(30);
68: BEGIN
69: -- Set variables.
62: p_updating IN BOOLEAN DEFAULT FALSE,
63: p_deleting IN BOOLEAN DEFAULT FALSE
64: ) IS
65: v_unit_cd IGS_PS_UNIT_OFR.unit_cd%TYPE;
66: v_version_number IGS_PS_UNIT_OFR.version_number%TYPE;
67: v_message_name Varchar2(30);
68: BEGIN
69: -- Set variables.
70: IF p_deleting THEN
166:
167: PROCEDURE Check_Child_Existance AS
168: BEGIN
169:
170: IGS_ST_UNT_LOAD_APPO_PKG.GET_FK_IGS_PS_UNIT_OFR (
171: old_references.unit_cd,
172: old_references.version_number,
173: old_references.cal_type
174: );
172: old_references.version_number,
173: old_references.cal_type
174: );
175:
176: IGS_PS_UNIT_OFR_NOTE_PKG.GET_FK_IGS_PS_UNIT_OFR (
177: old_references.unit_cd,
178: old_references.version_number,
179: old_references.cal_type
180: );
178: old_references.version_number,
179: old_references.cal_type
180: );
181:
182: IGS_PS_UNIT_OFR_PAT_PKG.GET_FK_IGS_PS_UNIT_OFR (
183: old_references.unit_cd,
184: old_references.version_number,
185: old_references.cal_type
186: );
194: ) RETURN BOOLEAN AS
195:
196: CURSOR cur_rowid IS
197: SELECT rowid
198: FROM IGS_PS_UNIT_OFR
199: WHERE unit_cd = x_unit_cd
200: AND version_number = x_version_number
201: AND cal_type = x_cal_type
202: FOR UPDATE NOWAIT;
221: ) IS
222:
223: CURSOR cur_rowid IS
224: SELECT rowid
225: FROM IGS_PS_UNIT_OFR
226: WHERE cal_type = x_cal_type ;
227:
228: lv_rowid cur_rowid%RowType;
229:
248: ) IS
249:
250: CURSOR cur_rowid IS
251: SELECT rowid
252: FROM IGS_PS_UNIT_OFR
253: WHERE unit_cd = x_unit_cd
254: AND version_number = x_version_number ;
255:
256: lv_rowid cur_rowid%RowType;
352: X_VERSION_NUMBER in NUMBER,
353: X_CAL_TYPE in VARCHAR2,
354: X_MODE in VARCHAR2 default 'R'
355: ) is
356: cursor C is select ROWID from IGS_PS_UNIT_OFR
357: where UNIT_CD = X_UNIT_CD
358: and VERSION_NUMBER = X_VERSION_NUMBER
359: and CAL_TYPE = X_CAL_TYPE;
360: X_LAST_UPDATE_DATE DATE;
392: x_last_updated_by => X_LAST_UPDATED_BY,
393: x_last_update_login => X_LAST_UPDATE_LOGIN
394: );
395:
396: insert into IGS_PS_UNIT_OFR (
397: UNIT_CD,
398: VERSION_NUMBER,
399: CAL_TYPE,
400: CREATION_DATE,
433: X_VERSION_NUMBER in NUMBER,
434: X_CAL_TYPE in VARCHAR2
435: ) is
436: cursor c1 is select ROWID
437: from IGS_PS_UNIT_OFR
438: where ROWID = X_ROWID
439: for update nowait;
440: tlinfo c1%rowtype;
441:
461: Before_DML (
462: p_action => 'DELETE',
463: x_rowid => X_ROWID
464: );
465: delete from IGS_PS_UNIT_OFR
466: where ROWID = X_ROWID;
467: if (sql%notfound) then
468: raise no_data_found;
469: end if;
472: x_rowid => X_ROWID
473: );
474: end DELETE_ROW;
475:
476: end IGS_PS_UNIT_OFR_PKG;