[Home] [Help]
1: PACKAGE BODY igs_ps_unit_location_pkg AS
2: /* $Header: IGSPI0LB.pls 115.8 2003/10/30 13:30:23 rghosh ship $ */
3: l_rowid VARCHAR2(25);
4: old_references igs_ps_unit_location%RowType;
5: new_references igs_ps_unit_location%RowType;
1: PACKAGE BODY igs_ps_unit_location_pkg AS
2: /* $Header: IGSPI0LB.pls 115.8 2003/10/30 13:30:23 rghosh ship $ */
3: l_rowid VARCHAR2(25);
4: old_references igs_ps_unit_location%RowType;
5: new_references igs_ps_unit_location%RowType;
6:
7: PROCEDURE Set_Column_Values (
8: p_action IN VARCHAR2,
1: PACKAGE BODY igs_ps_unit_location_pkg AS
2: /* $Header: IGSPI0LB.pls 115.8 2003/10/30 13:30:23 rghosh ship $ */
3: l_rowid VARCHAR2(25);
4: old_references igs_ps_unit_location%RowType;
5: new_references igs_ps_unit_location%RowType;
6:
7: PROCEDURE Set_Column_Values (
8: p_action IN VARCHAR2,
9: x_rowid IN VARCHAR2 DEFAULT NULL,
32: ***************************************************************/
33:
34: CURSOR cur_old_ref_values IS
35: SELECT *
36: FROM IGS_PS_UNIT_LOCATION
37: WHERE rowid = x_rowid;
38:
39: BEGIN
40:
206: ***************************************************************/
207:
208: CURSOR cur_rowid IS
209: SELECT rowid
210: FROM igs_ps_unit_location
211: WHERE unit_location_id = x_unit_location_id
212: FOR UPDATE NOWAIT;
213:
214: lv_rowid cur_rowid%RowType;
246: ***************************************************************/
247:
248: CURSOR cur_rowid IS
249: SELECT rowid
250: FROM igs_ps_unit_location
251: WHERE location_code = x_location_code
252: AND unit_code = x_unit_code
253: AND unit_version_number = x_unit_version_number
254: AND nvl(room_id,0) = nvl(x_room_id,0)
286: ***************************************************************/
287:
288: CURSOR cur_rowid IS
289: SELECT rowid
290: FROM igs_ps_unit_location
291: WHERE location_code = x_location_cd ;
292:
293: lv_rowid cur_rowid%RowType;
294:
324: ***************************************************************/
325:
326: CURSOR cur_rowid IS
327: SELECT rowid
328: FROM igs_ps_unit_location
329: WHERE unit_code = x_unit_cd
330: AND unit_version_number = x_version_number ;
331:
332: lv_rowid cur_rowid%RowType;
362: ***************************************************************/
363:
364: CURSOR cur_rowid IS
365: SELECT rowid
366: FROM igs_ps_unit_location
367: WHERE room_id = x_room_id ;
368:
369: lv_rowid cur_rowid%RowType;
370:
399: ***************************************************************/
400:
401: CURSOR cur_rowid IS
402: SELECT rowid
403: FROM igs_ps_unit_location
404: WHERE building_id = x_building_id ;
405:
406: lv_rowid cur_rowid%RowType;
407:
556:
557: (reverse chronological order - newest change first)
558: ***************************************************************/
559:
560: cursor C is select ROWID from IGS_PS_UNIT_LOCATION
561: where UNIT_LOCATION_ID= X_UNIT_LOCATION_ID
562: ;
563: X_LAST_UPDATE_DATE DATE ;
564: X_LAST_UPDATED_BY NUMBER ;
581: FND_MESSAGE.SET_NAME( 'FND', 'SYSTEM-INVALID ARGS');
582: IGS_GE_MSG_STACK.ADD;
583: app_exception.raise_exception;
584: end if;
585: Select IGS_PS_UNIT_LOCATION_S.NEXTVAL into x_unit_location_id from dual;
586:
587: Before_DML(
588: p_action=>'INSERT',
589: x_rowid=>X_ROWID,
597: x_created_by=>X_LAST_UPDATED_BY,
598: x_last_update_date=>X_LAST_UPDATE_DATE,
599: x_last_updated_by=>X_LAST_UPDATED_BY,
600: x_last_update_login=>X_LAST_UPDATE_LOGIN);
601: insert into IGS_PS_UNIT_LOCATION (
602: UNIT_LOCATION_ID
603: ,UNIT_CODE
604: ,UNIT_VERSION_NUMBER
605: ,LOCATION_CODE
658: , UNIT_VERSION_NUMBER
659: , LOCATION_CODE
660: , BUILDING_ID
661: , ROOM_ID
662: from IGS_PS_UNIT_LOCATION
663: where ROWID = X_ROWID
664: for update nowait;
665: tlinfo c1%rowtype;
666: begin
748: x_created_by=>X_LAST_UPDATED_BY,
749: x_last_update_date=>X_LAST_UPDATE_DATE,
750: x_last_updated_by=>X_LAST_UPDATED_BY,
751: x_last_update_login=>X_LAST_UPDATE_LOGIN);
752: update IGS_PS_UNIT_LOCATION set
753: UNIT_CODE = NEW_REFERENCES.UNIT_CODE,
754: UNIT_VERSION_NUMBER = NEW_REFERENCES.UNIT_VERSION_NUMBER,
755: LOCATION_CODE = NEW_REFERENCES.LOCATION_CODE,
756: BUILDING_ID = NEW_REFERENCES.BUILDING_ID,
788:
789: (reverse chronological order - newest change first)
790: ***************************************************************/
791:
792: cursor c1 is select ROWID from IGS_PS_UNIT_LOCATION
793: where UNIT_LOCATION_ID= X_UNIT_LOCATION_ID
794: ;
795: begin
796: open c1;
837: Before_DML (
838: p_action => 'DELETE',
839: x_rowid => X_ROWID
840: );
841: delete from IGS_PS_UNIT_LOCATION
842: where ROWID = X_ROWID;
843: if (sql%notfound) then
844: raise no_data_found;
845: end if;
847: p_action => 'DELETE',
848: x_rowid => X_ROWID
849: );
850: end DELETE_ROW;
851: END igs_ps_unit_location_pkg;