The following lines contain the word 'select', 'insert', 'update' or 'delete':
x_last_update_date IN DATE DEFAULT NULL,
x_last_updated_by IN NUMBER DEFAULT NULL,
x_last_update_login IN NUMBER DEFAULT NULL ,
X_ORG_ID in NUMBER DEFAULT NULL
) AS
/*************************************************************
Created By : ssahai
Date Created By : 11/05/2000
Purpose : Populating the new_references columns to be used by other functions.
Know limitations, enhancements or remarks
Change History
Who When What
(reverse chronological order - newest change first)
***************************************************************/
CURSOR cur_old_ref_values IS
SELECT *
FROM igs_or_org_inst_type_all
WHERE rowid = x_rowid;
IF (cur_old_ref_values%NOTFOUND) AND (p_action NOT IN ('INSERT','VALIDATE_INSERT')) THEN
Close cur_old_ref_values;
Fnd_Message.Set_Name ('FND', 'FORM_RECORD_DELETED');
IF (p_action = 'UPDATE') THEN
new_references.creation_date := old_references.creation_date;
new_references.last_update_date := x_last_update_date;
new_references.last_updated_by := x_last_updated_by;
new_references.last_update_login := x_last_update_login;
Purpose : To check for the existance of Parent values before inserting into foreign key columns.
Know limitations, enhancements or remarks
Change History
Who When What
(reverse chronological order - newest change first)
***************************************************************/
BEGIN
IF column_name IS NULL THEN
NULL;
Gmaheswa 18-Mar-2005 Modified for bug 4207144. Deleted the reference to IGS_RC_I_ENT_STATS_PKG
as it is obsoleted.
(reverse chronological order - newest change first)
***************************************************************/
BEGIN
Igs_Or_Institution_Pkg.Get_FK_Igs_Or_Org_Inst_Type (
old_references.institution_type
);
SELECT rowid
FROM igs_or_org_inst_type_all
WHERE institution_type = x_institution_type
FOR UPDATE NOWAIT;
x_last_update_date IN DATE DEFAULT NULL,
x_last_updated_by IN NUMBER DEFAULT NULL,
x_last_update_login IN NUMBER DEFAULT NULL,
X_ORG_ID in NUMBER DEFAULT NULL
) AS
/*************************************************************
Created By : ssahai
Date Created By : 11/5/2000
Purpose : This procedure is called before any DML operation as a parameter.
This is a function which is called from other functions like insert_row/ add_row etc.
Know limitations, enhancements or remarks
Change History
Who When What
(reverse chronological order - newest change first)
***************************************************************/
BEGIN
Set_Column_Values (
p_action,
x_rowid,
x_institution_type,
x_description,
x_SYSTEM_INST_TYPE,
x_close_ind,
x_creation_date,
x_created_by,
x_last_update_date,
x_last_updated_by,
x_last_update_login ,
x_org_id
);
IF (p_action = 'INSERT') THEN
-- Call all the procedures related to Before Insert.
Null;
ELSIF (p_action = 'UPDATE') THEN
-- Call all the procedures related to Before Update.
Null;
ELSIF (p_action = 'DELETE') THEN
-- Call all the procedures related to Before Delete.
Null;
ELSIF (p_action = 'VALIDATE_INSERT') THEN
-- Call all the procedures related to Before Insert.
IF Get_PK_For_Validation (
new_references.institution_type) THEN
Fnd_Message.Set_name('IGS','IGS_GE_MULTI_ORG_DUP_REC');
ELSIF (p_action = 'VALIDATE_UPDATE') THEN
Check_Constraints;
ELSIF (p_action = 'VALIDATE_DELETE') THEN
Check_Child_Existance;
IF (p_action = 'INSERT') THEN
-- Call all the procedures related to After Insert.
Null;
ELSIF (p_action = 'UPDATE') THEN
-- Call all the procedures related to After Update.
Null;
ELSIF (p_action = 'DELETE') THEN
-- Call all the procedures related to After Delete.
Null;
procedure INSERT_ROW (
X_ROWID in out NOCOPY VARCHAR2,
x_INSTITUTION_TYPE IN VARCHAR2,
x_DESCRIPTION IN VARCHAR2,
x_SYSTEM_INST_TYPE VARCHAR2,
x_CLOSE_IND IN VARCHAR2,
X_MODE in VARCHAR2 default 'R' ,
X_ORG_ID in NUMBER
) AS
/*************************************************************
Created By : ssahai
Date Created By : 11/5/2000
Purpose : This procedure is called from forms during an insert_row (ON_INSERT) operation.
This in turn calls before_dml.
Know limitations, enhancements or remarks
Change History
Who When What
(reverse chronological order - newest change first)
***************************************************************/
cursor C is select ROWID from igs_or_org_inst_type_all
where INSTITUTION_TYPE= X_INSTITUTION_TYPE
;
X_LAST_UPDATE_DATE DATE ;
X_LAST_UPDATED_BY NUMBER ;
X_LAST_UPDATE_LOGIN NUMBER ;
X_LAST_UPDATE_DATE := SYSDATE;
X_LAST_UPDATED_BY := 1;
X_LAST_UPDATE_LOGIN := 0;
X_LAST_UPDATED_BY := FND_GLOBAL.USER_ID;
if X_LAST_UPDATED_BY is NULL then
X_LAST_UPDATED_BY := -1;
X_LAST_UPDATE_LOGIN :=FND_GLOBAL.LOGIN_ID;
if X_LAST_UPDATE_LOGIN is NULL then
X_LAST_UPDATE_LOGIN := -1;
p_action=>'INSERT',
x_rowid=>X_ROWID,
x_institution_type=>X_INSTITUTION_TYPE,
x_description=>X_DESCRIPTION,
x_SYSTEM_INST_TYPE=>x_system_inst_type,
x_close_ind=>X_CLOSE_IND,
x_creation_date=>X_LAST_UPDATE_DATE,
x_created_by=>X_LAST_UPDATED_BY,
x_last_update_date=>X_LAST_UPDATE_DATE,
x_last_updated_by=>X_LAST_UPDATED_BY,
x_last_update_login=>X_LAST_UPDATE_LOGIN,
x_org_id=>igs_ge_gen_003.get_org_id);
insert into igs_or_org_inst_type_all (
INSTITUTION_TYPE
,DESCRIPTION
,SYSTEM_INST_TYPE
,CLOSE_IND
,CREATION_DATE
,CREATED_BY
,LAST_UPDATE_DATE
,LAST_UPDATED_BY
,LAST_UPDATE_LOGIN
,ORG_ID
) values (
NEW_REFERENCES.INSTITUTION_TYPE
,NEW_REFERENCES.DESCRIPTION
,NEW_REFERENCES.SYSTEM_INST_TYPE
,NEW_REFERENCES.CLOSE_IND
,X_LAST_UPDATE_DATE
,X_LAST_UPDATED_BY
,X_LAST_UPDATE_DATE
,X_LAST_UPDATED_BY
,X_LAST_UPDATE_LOGIN,
NEW_REFERENCES.ORG_ID
);
p_action => 'INSERT' ,
x_rowid => X_ROWID );
end INSERT_ROW;
cursor c1 is select
DESCRIPTION
, CLOSE_IND
, SYSTEM_INST_TYPE
from igs_or_org_inst_type_all
where ROWID = X_ROWID
for update nowait;
fnd_message.set_name('FND', 'FORM_RECORD_DELETED');
Procedure UPDATE_ROW (
X_ROWID in VARCHAR2,
x_INSTITUTION_TYPE IN VARCHAR2,
x_DESCRIPTION IN VARCHAR2,
x_SYSTEM_INST_TYPE VARCHAR2,
x_CLOSE_IND IN VARCHAR2,
X_MODE in VARCHAR2 default 'R'
) AS
/*************************************************************
Created By : ssahai
Date Created By : 11/5/2000
Purpose : This procedure is used to update a row in case the PK of the row being updated is present. It is called from ADD_ROW.
Know limitations, enhancements or remarks
Change History
Who When What
(reverse chronological order - newest change first)
***************************************************************/
X_LAST_UPDATE_DATE DATE ;
X_LAST_UPDATED_BY NUMBER ;
X_LAST_UPDATE_LOGIN NUMBER ;
X_LAST_UPDATE_DATE := SYSDATE;
X_LAST_UPDATED_BY := 1;
X_LAST_UPDATE_LOGIN := 0;
X_LAST_UPDATED_BY := FND_GLOBAL.USER_ID;
if X_LAST_UPDATED_BY is NULL then
X_LAST_UPDATED_BY := -1;
X_LAST_UPDATE_LOGIN :=FND_GLOBAL.LOGIN_ID;
if X_LAST_UPDATE_LOGIN is NULL then
X_LAST_UPDATE_LOGIN := -1;
p_action=>'UPDATE',
x_rowid=>X_ROWID,
x_institution_type=>X_INSTITUTION_TYPE,
x_description=>X_DESCRIPTION,
x_SYSTEM_INST_TYPE => X_SYSTEM_INST_TYPE,
x_close_ind=>X_CLOSE_IND,
x_creation_date=>X_LAST_UPDATE_DATE,
x_created_by=>X_LAST_UPDATED_BY,
x_last_update_date=>X_LAST_UPDATE_DATE,
x_last_updated_by=>X_LAST_UPDATED_BY,
x_last_update_login=>X_LAST_UPDATE_LOGIN);
update igs_or_org_inst_type_all set
DESCRIPTION = NEW_REFERENCES.DESCRIPTION,
SYSTEM_INST_TYPE = NEW_REFERENCES.SYSTEM_INST_TYPE,
CLOSE_IND = NEW_REFERENCES.CLOSE_IND,
LAST_UPDATE_DATE = X_LAST_UPDATE_DATE,
LAST_UPDATED_BY = X_LAST_UPDATED_BY,
LAST_UPDATE_LOGIN = X_LAST_UPDATE_LOGIN
where ROWID = X_ROWID;
p_action => 'UPDATE' ,
x_rowid => X_ROWID
);
end UPDATE_ROW;
Purpose : This procedure is called from forms during an insert_row (INSERT_ROW) - It checks if there is a
row for the given PK and if there isn't then it inserts it as a new row. If there is a existing Pk then it
uses update_row to update the same row.
Know limitations, enhancements or remarks
Change History
Who When What
(reverse chronological order - newest change first)
***************************************************************/
cursor c1 is select ROWID from igs_or_org_inst_type_all
where INSTITUTION_TYPE= X_INSTITUTION_TYPE
;
INSERT_ROW (
X_ROWID,
X_INSTITUTION_TYPE,
X_DESCRIPTION,
x_SYSTEM_INST_TYPE,
X_CLOSE_IND,
X_MODE ,
x_org_id);
UPDATE_ROW (
X_ROWID,
X_INSTITUTION_TYPE,
X_DESCRIPTION,
x_SYSTEM_INST_TYPE,
X_CLOSE_IND,
X_MODE );
procedure DELETE_ROW (
X_ROWID in VARCHAR2
) AS
/*************************************************************
Created By : ssahai
Date Created By : 11/5/2000
Purpose : This procedure is called from forms during an delete_row (ON_DELETE) operation.
Know limitations, enhancements or remarks
Change History
Who When What
(reverse chronological order - newest change first)
***************************************************************/
begin
Before_DML (
p_action => 'DELETE',
x_rowid => X_ROWID
);
delete from igs_or_org_inst_type_all
where ROWID = X_ROWID;
p_action => 'DELETE',
x_rowid => X_ROWID
);
end DELETE_ROW;