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_PE_PERS_RELATION
WHERE rowid = x_rowid;
IF (cur_old_ref_values%NOTFOUND) AND (p_action NOT IN ('INSERT','VALIDATE_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');
Fnd_Message.Set_Name ('FND', 'FORM_RECORD_DELETED');
SELECT rowid
FROM IGS_PE_PERS_RELATION
WHERE person_id = x_person_id
AND person_id_also_related_to = x_person_id_also_related_to
AND person_relation_type = x_person_relation_type
FOR UPDATE NOWAIT;
SELECT rowid
FROM IGS_PE_PERS_RELATION
WHERE person_id = x_person_id OR
person_id_also_related_to = x_person_id ;
SELECT rowid
FROM IGS_PE_PERS_RELATION
WHERE person_relation_type = x_person_relation_type ;
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_person_id,
x_person_id_also_related_to,
x_person_relation_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.person_id ,
new_references.person_id_also_related_to ,
new_references.person_relation_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_Constraints; -- if procedure present
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.person_id ,
new_references.person_id_also_related_to ,
new_references.person_relation_type ) THEN
Fnd_Message.Set_Name ('IGS', 'IGS_GE_RECORD_ALREADY_EXISTS');
ELSIF (p_action = 'VALIDATE_UPDATE') THEN
Check_Constraints; -- if procedure present
ELSIF (p_action = 'VALIDATE_DELETE') THEN
NULL;
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_PERSON_ID in NUMBER,
X_PERSON_ID_ALSO_RELATED_TO in NUMBER,
X_PERSON_RELATION_TYPE in VARCHAR2,
X_MODE in VARCHAR2 default 'R'
) AS
cursor C is select ROWID from IGS_PE_PERS_RELATION
where PERSON_ID = X_PERSON_ID
and PERSON_ID_ALSO_RELATED_TO = X_PERSON_ID_ALSO_RELATED_TO
and PERSON_RELATION_TYPE = X_PERSON_RELATION_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_person_id=>X_PERSON_ID,
x_person_id_also_related_to=>X_PERSON_ID_ALSO_RELATED_TO,
x_person_relation_type=>X_PERSON_RELATION_TYPE,
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_PE_PERS_RELATION (
PERSON_ID,
PERSON_ID_ALSO_RELATED_TO,
PERSON_RELATION_TYPE,
CREATION_DATE,
CREATED_BY,
LAST_UPDATE_DATE,
LAST_UPDATED_BY,
LAST_UPDATE_LOGIN
) values (
NEW_REFERENCES.PERSON_ID,
NEW_REFERENCES.PERSON_ID_ALSO_RELATED_TO,
NEW_REFERENCES.PERSON_RELATION_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_PE_PERS_RELATION
where ROWID = X_ROWID
for update nowait;
fnd_message.set_name('FND', 'FORM_RECORD_DELETED');
procedure DELETE_ROW (
X_ROWID in VARCHAR2,
x_mode IN VARCHAR2
) AS
begin
Before_DML(
p_action => 'DELETE',
x_rowid => X_ROWID
);
delete from IGS_PE_PERS_RELATION
where ROWID = X_ROWID;
p_action => 'DELETE',
x_rowid => X_ROWID
);
end DELETE_ROW;