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
) AS
CURSOR cur_old_ref_values IS
SELECT *
FROM IGS_OR_REL_PS_TYPE
WHERE rowid = x_rowid;
IF (cur_old_ref_values%NOTFOUND) AND (p_action <> 'INSERT') THEN
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;
Fnd_Message.Set_Name ('FND', 'FORM_RECORD_DELETED');
Fnd_Message.Set_Name ('FND', 'FORM_RECORD_DELETED');
SELECT rowid
FROM IGS_OR_REL_PS_TYPE
WHERE parent_org_unit_cd = x_parent_org_unit_cd
AND parent_start_dt = x_parent_start_dt
AND child_org_unit_cd = x_child_org_unit_cd
AND child_start_dt = x_child_start_dt
AND our_create_dt = x_our_create_dt
AND course_type = x_course_type
FOR UPDATE NOWAIT;
SELECT rowid
FROM IGS_OR_REL_PS_TYPE
WHERE parent_org_unit_cd = x_parent_org_unit_cd
AND parent_start_dt = x_parent_start_dt
AND child_org_unit_cd = x_child_org_unit_cd
AND child_start_dt = x_child_start_dt
AND our_create_dt = x_create_dt ;
x_last_update_date IN DATE DEFAULT NULL,
x_last_updated_by IN NUMBER DEFAULT NULL,
x_last_update_login IN NUMBER DEFAULT NULL
) AS
BEGIN
Set_Column_Values (
p_action,
x_rowid,
x_parent_org_unit_cd,
x_parent_start_dt,
x_child_org_unit_cd,
x_child_start_dt,
x_our_create_dt,
x_course_type,
x_creation_date,
x_created_by,
x_last_update_date,
x_last_updated_by,
x_last_update_login
);
IF (p_action = 'INSERT') THEN
-- Call all the procedures related to Before Insert.
IF Get_PK_For_Validation (
new_references.parent_org_unit_cd ,
new_references.parent_start_dt,
new_references.child_org_unit_cd,
new_references.child_start_dt,
new_references.our_create_dt,
new_references.course_type
) THEN
Fnd_Message.Set_Name('IGS','IGS_GE_RECORD_ALREADY_EXISTS');
ELSIF (p_action = 'UPDATE') THEN
-- Call all the procedures related to Before Update.
Check_Parent_Existance;
ELSIF (p_action = 'DELETE') THEN
-- Call all the procedures related to Before Delete.
Null;
ELSIF (p_action = 'VALIDATE_INSERT') THEN
IF Get_PK_For_Validation (
new_references.parent_org_unit_cd ,
new_references.parent_start_dt,
new_references.child_org_unit_cd,
new_references.child_start_dt,
new_references.our_create_dt,
new_references.course_type
) THEN
Fnd_Message.Set_Name('IGS','IGS_GE_RECORD_ALREADY_EXISTS');
ELSIF (p_action = 'VALIDATE_UPDATE') THEN
Check_Constraints ;
ELSIF (p_action = 'VALIDATE_DELETE') THEN
null ;
procedure INSERT_ROW (
X_ROWID in out NOCOPY VARCHAR2,
X_PARENT_ORG_UNIT_CD in VARCHAR2,
X_PARENT_START_DT in DATE,
X_CHILD_ORG_UNIT_CD in VARCHAR2,
X_CHILD_START_DT in DATE,
X_OUR_CREATE_DT in DATE,
X_COURSE_TYPE in VARCHAR2,
X_MODE in VARCHAR2 default 'R'
) AS
cursor C is select ROWID from IGS_OR_REL_PS_TYPE
where PARENT_ORG_UNIT_CD = X_PARENT_ORG_UNIT_CD
and PARENT_START_DT = X_PARENT_START_DT
and CHILD_ORG_UNIT_CD = X_CHILD_ORG_UNIT_CD
and CHILD_START_DT = X_CHILD_START_DT
and OUR_CREATE_DT = X_OUR_CREATE_DT
and COURSE_TYPE = X_COURSE_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_child_org_unit_cd=>X_CHILD_ORG_UNIT_CD,
x_child_start_dt=>X_CHILD_START_DT,
x_course_type=>X_COURSE_TYPE,
x_our_create_dt=>X_OUR_CREATE_DT,
x_parent_org_unit_cd=>X_PARENT_ORG_UNIT_CD,
x_parent_start_dt=>X_PARENT_START_DT,
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
);
insert into IGS_OR_REL_PS_TYPE (
PARENT_ORG_UNIT_CD,
PARENT_START_DT,
CHILD_ORG_UNIT_CD,
CHILD_START_DT,
OUR_CREATE_DT,
COURSE_TYPE,
CREATION_DATE,
CREATED_BY,
LAST_UPDATE_DATE,
LAST_UPDATED_BY,
LAST_UPDATE_LOGIN
) values (
NEW_REFERENCES.PARENT_ORG_UNIT_CD,
NEW_REFERENCES.PARENT_START_DT,
NEW_REFERENCES.CHILD_ORG_UNIT_CD,
NEW_REFERENCES.CHILD_START_DT,
NEW_REFERENCES.OUR_CREATE_DT,
NEW_REFERENCES.COURSE_TYPE,
X_LAST_UPDATE_DATE,
X_LAST_UPDATED_BY,
X_LAST_UPDATE_DATE,
X_LAST_UPDATED_BY,
X_LAST_UPDATE_LOGIN
);
p_action=>'INSERT',
x_rowid=>X_ROWID
);
end INSERT_ROW;
cursor c1 is select rowid
from IGS_OR_REL_PS_TYPE
where ROWID = X_ROWID
for update nowait ;
fnd_message.set_name('FND', 'FORM_RECORD_DELETED');
procedure DELETE_ROW (
X_ROWID in VARCHAR2
) AS
begin
Before_DML(
p_action=>'DELETE',
x_rowid=>X_ROWID
);
delete from IGS_OR_REL_PS_TYPE
where ROWID = X_ROWID ;
p_action=>'DELETE',
x_rowid=>X_ROWID
);
end DELETE_ROW;