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_reference_code_type IN VARCHAR2 ,
x_reference_code IN VARCHAR2 ,
x_reference_code_desc IN VARCHAR2
) AS
/*************************************************************
Created By :
Date Created By :
Purpose :
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_ps_usec_ref_cd
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;
SELECT 'X'
FROM igs_ge_ref_cd_type_all
WHERE restricted_flag='Y'
AND reference_cd_type=cp_reference_cd_type;
fnd_message.set_name ('FND','FORM_RECORD_DELETED');
fnd_message.set_name ('FND', 'FORM_RECORD_DELETED');
SELECT ROWID
FROM igs_ps_usec_ref_cd
WHERE unit_section_reference_cd_id = x_unit_section_reference_cd_id
FOR UPDATE NOWAIT;
SELECT ROWID
FROM igs_ps_usec_ref_cd
WHERE reference_code_type = x_reference_code_type
AND reference_code = x_reference_code
AND unit_section_reference_id = x_unit_section_reference_id
AND ((l_rowid IS NULL) OR (ROWID <> l_rowid));
SELECT ROWID
FROM igs_ps_usec_ref_cd
WHERE unit_section_reference_id = x_unit_section_reference_id ;
SELECT ROWID
FROM igs_ps_usec_ref_cd
WHERE reference_code_type = x_reference_code_type;
SELECT ROWID
FROM igs_ps_usec_ref_cd
WHERE reference_code_type = x_reference_code_type
AND reference_code = x_reference_code ;
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_reference_code_type IN VARCHAR2 ,
x_reference_code IN VARCHAR2 ,
x_reference_code_desc IN VARCHAR2
) AS
/*************************************************************
Created By :
Date Created By :
Purpose :
Know limitations, enhancements or remarks
Change History
Who When What
(reverse chronological order - newest change first)
***************************************************************/
CURSOR cur_ps_usec_ref_cd_v IS
SELECT reference_code_type
FROM igs_ps_usec_ref_cd_v
WHERE unit_section_reference_cd_id = x_unit_section_reference_cd_id;
x_last_update_date,
x_last_updated_by,
x_last_update_login ,
x_reference_code_type ,
x_reference_code ,
x_reference_code_desc
);
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.unit_section_reference_cd_id) THEN
fnd_message.set_name('IGS','IGS_GE_RECORD_ALREADY_EXISTS');
ELSIF (p_action = 'VALIDATE_UPDATE') THEN
check_uniqueness;
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_unit_section_reference_cd_id IN OUT NOCOPY NUMBER,
x_unit_section_reference_id IN NUMBER,
x_mode IN VARCHAR2 DEFAULT 'R' ,
x_reference_code_type IN VARCHAR2 ,
x_reference_code IN VARCHAR2 ,
x_reference_code_desc IN VARCHAR2
) AS
/*************************************************************
Created By :
Date Created By :
Purpose :
Know limitations, enhancements or remarks
Change History
Who When What
(reverse chronological order - newest change first)
***************************************************************/
CURSOR c IS SELECT ROWID FROM igs_ps_usec_ref_cd
WHERE unit_section_reference_cd_id= x_unit_section_reference_cd_id;
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;
SELECT igs_ps_usec_ref_cd_s.nextval
INTO x_unit_section_reference_cd_id
FROM dual;
p_action=>'INSERT',
x_rowid=>x_rowid,
x_unit_section_reference_cd_id=>x_unit_section_reference_cd_id,
x_unit_section_reference_id=>x_unit_section_reference_id,
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_reference_code_type=>x_reference_code_type);
INSERT INTO igs_ps_usec_ref_cd (
unit_section_reference_cd_id
,unit_section_reference_id
,creation_date
,created_by
,last_update_date
,last_updated_by
,last_update_login
,reference_code_type
,reference_code
,reference_code_desc
) VALUES (
new_references.unit_section_reference_cd_id
,new_references.unit_section_reference_id
,x_last_update_date
,x_last_updated_by
,x_last_update_date
,x_last_updated_by
,x_last_update_login
,x_reference_code_type
,x_reference_code
,x_reference_code_desc
);
p_action => 'INSERT' ,
x_rowid => x_rowid );
END insert_row;
CURSOR c1 IS SELECT
unit_section_reference_id,
reference_code_type,
reference_code,
reference_code_desc
FROM igs_ps_usec_ref_cd
WHERE ROWID = x_rowid
FOR UPDATE NOWAIT;
fnd_message.set_name('FND', 'FORM_RECORD_DELETED');
PROCEDURE update_row (
x_rowid IN VARCHAR2,
x_unit_section_reference_cd_id IN NUMBER,
x_unit_section_reference_id IN NUMBER,
x_mode IN VARCHAR2 DEFAULT 'R' ,
x_reference_code_type IN VARCHAR2,
x_reference_code IN VARCHAR2 ,
x_reference_code_desc IN VARCHAR2
) AS
/*************************************************************
Created By :
Date Created By :
Purpose :
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_unit_section_reference_cd_id=>x_unit_section_reference_cd_id,
x_unit_section_reference_id=>x_unit_section_reference_id,
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_reference_code_type=>x_reference_code_type,
x_reference_code=>x_reference_code,
x_reference_code_desc=>x_reference_code_desc
);
UPDATE igs_ps_usec_ref_cd SET
unit_section_reference_id = new_references.unit_section_reference_id,
last_update_date = x_last_update_date,
last_updated_by = x_last_updated_by,
last_update_login = x_last_update_login,
reference_code_type= x_reference_code_type,
reference_code = x_reference_code,
reference_code_desc = x_reference_code_desc
WHERE ROWID = x_rowid;
p_action => 'UPDATE' ,
x_rowid => x_rowid
);
END update_row;
CURSOR c1 IS SELECT ROWID FROM igs_ps_usec_ref_cd
WHERE unit_section_reference_cd_id= x_unit_section_reference_cd_id;
insert_row (
x_rowid,
x_unit_section_reference_cd_id,
x_unit_section_reference_id,
x_mode ,
x_reference_code_type,
x_reference_code,
x_reference_code_desc);
update_row (
x_rowid,
x_unit_section_reference_cd_id,
x_unit_section_reference_id,
x_mode,
x_reference_code_type,
x_reference_code,
x_reference_code_desc);
PROCEDURE delete_row (
x_rowid IN VARCHAR2
) AS
/*************************************************************
Created By :
Date Created By :
Purpose :
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_ps_usec_ref_cd
WHERE ROWID = x_rowid;
p_action => 'DELETE',
x_rowid => x_rowid
);
END delete_row;