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
/*
|| Created By :
|| Date Created By :
|| Purpose :
|| Known limitations, enhancements or remarks :
|| Change History :
|| Who When What
|| (reverse chronological order - newest change first)
*/
CURSOR cur_old_ref_values IS
SELECT *
FROM IGS_PE_CONTACT_DTLS
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;
fnd_message.set_name ('FND', 'FORM_RECORD_DELETED');
SELECT rowid
FROM igs_pe_contact_dtls
WHERE contact_point_id = x_contact_point_id
FOR UPDATE NOWAIT;
SELECT rowid
FROM igs_pe_contact_dtls
WHERE location_venue_addr_id = x_location_venue_addr_id ;
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
/*
|| Created By :
|| Date Created By :
|| Purpose :
|| Known limitations, enhancements or remarks :
|| Change History :
|| Who When What
|| (reverse chronological order - newest change first)
*/
BEGIN
set_column_values (
p_action,
x_rowid,
x_phone_line_type,
x_contact_point_id,
x_location_venue_addr_id,
x_contact_point_type,
x_status,
x_primary_flag,
x_email_format,
x_email_address,
x_telephone_type,
x_phone_area_code,
x_phone_country_code,
x_phone_number,
x_phone_extension,
x_attribute_category,
x_attribute1,
x_attribute2,
x_attribute3,
x_attribute4,
x_attribute5,
x_attribute6,
x_attribute7,
x_attribute8,
x_attribute9,
x_attribute10,
x_attribute11,
x_attribute12,
x_attribute13,
x_attribute14,
x_attribute15,
x_attribute16,
x_attribute17,
x_attribute18,
x_attribute19,
x_attribute20,
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.
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.contact_point_id)) 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;
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_phone_line_type IN VARCHAR2,
x_contact_point_id IN OUT NOCOPY NUMBER,
x_location_venue_addr_id IN NUMBER,
x_contact_point_type IN VARCHAR2,
x_status IN VARCHAR2,
x_primary_flag IN VARCHAR2,
x_email_format IN VARCHAR2,
x_email_address IN VARCHAR2,
x_telephone_type IN VARCHAR2,
x_phone_area_code IN VARCHAR2,
x_phone_country_code IN VARCHAR2,
x_phone_number IN VARCHAR2,
x_phone_extension IN VARCHAR2,
x_attribute_category IN VARCHAR2,
x_attribute1 IN VARCHAR2,
x_attribute2 IN VARCHAR2,
x_attribute3 IN VARCHAR2,
x_attribute4 IN VARCHAR2,
x_attribute5 IN VARCHAR2,
x_attribute6 IN VARCHAR2,
x_attribute7 IN VARCHAR2,
x_attribute8 IN VARCHAR2,
x_attribute9 IN VARCHAR2,
x_attribute10 IN VARCHAR2,
x_attribute11 IN VARCHAR2,
x_attribute12 IN VARCHAR2,
x_attribute13 IN VARCHAR2,
x_attribute14 IN VARCHAR2,
x_attribute15 IN VARCHAR2,
x_attribute16 IN VARCHAR2,
x_attribute17 IN VARCHAR2,
x_attribute18 IN VARCHAR2,
x_attribute19 IN VARCHAR2,
x_attribute20 IN VARCHAR2,
x_mode IN VARCHAR2 DEFAULT 'R'
) AS
/*
|| Created By :
|| Date Created By :
|| Purpose :
|| Known limitations, enhancements or remarks :
|| Change History :
|| Who When What
|| (reverse chronological order - newest change first)
*/
CURSOR c IS
SELECT rowid
FROM igs_pe_contact_dtls
WHERE contact_point_id = x_contact_point_id
;
x_last_update_date DATE;
x_last_updated_by NUMBER;
x_last_update_login NUMBER;
x_program_update_date DATE;
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;
x_program_update_date := NULL;
x_program_update_date := SYSDATE;
SELECT igs_pe_contact_dtls_s.nextval INTO x_contact_point_id
FROM dual;
p_action => 'INSERT',
x_rowid => X_ROWID,
x_phone_line_type => x_phone_line_type,
x_contact_point_id => x_contact_point_id,
x_location_venue_addr_id => x_location_venue_addr_id,
x_contact_point_type => x_contact_point_type,
x_status => x_status,
x_primary_flag => x_primary_flag,
x_email_format => x_email_format,
x_email_address => x_email_address,
x_telephone_type => x_telephone_type,
x_phone_area_code => x_phone_area_code,
x_phone_country_code => x_phone_country_code,
x_phone_number => x_phone_number,
x_phone_extension => x_phone_extension,
x_attribute_category => x_attribute_category,
x_attribute1 => x_attribute1,
x_attribute2 => x_attribute2,
x_attribute3 => x_attribute3,
x_attribute4 => x_attribute4,
x_attribute5 => x_attribute5,
x_attribute6 => x_attribute6,
x_attribute7 => x_attribute7,
x_attribute8 => x_attribute8,
x_attribute9 => x_attribute9,
x_attribute10 => x_attribute10,
x_attribute11 => x_attribute11,
x_attribute12 => x_attribute12,
x_attribute13 => x_attribute13,
x_attribute14 => x_attribute14,
x_attribute15 => x_attribute15,
x_attribute16 => x_attribute16,
x_attribute17 => x_attribute17,
x_attribute18 => x_attribute18,
x_attribute19 => x_attribute19,
x_attribute20 => x_attribute20,
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_contact_dtls (
phone_line_type
,contact_point_id
,location_venue_addr_id
,contact_point_type
,status
,primary_flag
,email_format
,email_address
,telephone_type
,phone_area_code
,phone_country_code
,phone_number
,phone_extension
,attribute_category
,attribute1
,attribute2
,attribute3
,attribute4
,attribute5
,attribute6
,attribute7
,attribute8
,attribute9
,attribute10
,attribute11
,attribute12
,attribute13
,attribute14
,attribute15
,attribute16
,attribute17
,attribute18
,attribute19
,attribute20
,creation_date
,created_by
,last_update_date
,last_updated_by
,last_update_login
,request_id
,program_id
,program_application_id
,program_update_date
) VALUES (
new_references.phone_line_type
,new_references.contact_point_id
,new_references.location_venue_addr_id
,new_references.contact_point_type
,new_references.status
,new_references.primary_flag
,new_references.email_format
,new_references.email_address
,new_references.telephone_type
,new_references.phone_area_code
,new_references.phone_country_code
,new_references.phone_number
,new_references.phone_extension
,new_references.attribute_category
,new_references.attribute1
,new_references.attribute2
,new_references.attribute3
,new_references.attribute4
,new_references.attribute5
,new_references.attribute6
,new_references.attribute7
,new_references.attribute8
,new_references.attribute9
,new_references.attribute10
,new_references.attribute11
,new_references.attribute12
,new_references.attribute13
,new_references.attribute14
,new_references.attribute15
,new_references.attribute16
,new_references.attribute17
,new_references.attribute18
,new_references.attribute19
,new_references.attribute20
,x_last_update_date
,x_last_updated_by
,x_last_update_date
,x_last_updated_by
,x_last_update_login
,x_request_id
,x_program_id
,x_program_application_id
,x_program_update_date
);
p_action => 'INSERT' ,
x_rowid => X_ROWID
);
END insert_row;
CURSOR c1 IS SELECT
phone_line_type
, location_venue_addr_id
, contact_point_type
, status
, primary_flag
, email_format
, email_address
, telephone_type
, phone_area_code
, phone_country_code
, phone_number
, phone_extension
, attribute_category
, attribute1
, attribute2
, attribute3
, attribute4
, attribute5
, attribute6
, attribute7
, attribute8
, attribute9
, attribute10
, attribute11
, attribute12
, attribute13
, attribute14
, attribute15
, attribute16
, attribute17
, attribute18
, attribute19
, attribute20
FROM igs_pe_contact_dtls
WHERE ROWID = x_rowid
FOR UPDATE NOWAIT;
fnd_message.set_name('FND', 'FORM_RECORD_DELETED');
PROCEDURE update_row (
x_rowid IN VARCHAR2,
x_PHONE_LINE_TYPE IN VARCHAR2,
x_CONTACT_POINT_ID IN NUMBER,
x_LOCATION_VENUE_ADDR_ID IN NUMBER,
x_CONTACT_POINT_TYPE IN VARCHAR2,
x_STATUS IN VARCHAR2,
x_PRIMARY_FLAG IN VARCHAR2,
x_EMAIL_FORMAT IN VARCHAR2,
x_EMAIL_ADDRESS IN VARCHAR2,
x_TELEPHONE_TYPE IN VARCHAR2,
x_PHONE_AREA_CODE IN VARCHAR2,
x_PHONE_COUNTRY_CODE IN VARCHAR2,
x_PHONE_NUMBER IN VARCHAR2,
x_PHONE_EXTENSION IN VARCHAR2,
x_ATTRIBUTE_CATEGORY IN VARCHAR2,
x_ATTRIBUTE1 IN VARCHAR2,
x_ATTRIBUTE2 IN VARCHAR2,
x_ATTRIBUTE3 IN VARCHAR2,
x_ATTRIBUTE4 IN VARCHAR2,
x_ATTRIBUTE5 IN VARCHAR2,
x_ATTRIBUTE6 IN VARCHAR2,
x_ATTRIBUTE7 IN VARCHAR2,
x_ATTRIBUTE8 IN VARCHAR2,
x_ATTRIBUTE9 IN VARCHAR2,
x_ATTRIBUTE10 IN VARCHAR2,
x_ATTRIBUTE11 IN VARCHAR2,
x_ATTRIBUTE12 IN VARCHAR2,
x_ATTRIBUTE13 IN VARCHAR2,
x_ATTRIBUTE14 IN VARCHAR2,
x_ATTRIBUTE15 IN VARCHAR2,
x_ATTRIBUTE16 IN VARCHAR2,
x_ATTRIBUTE17 IN VARCHAR2,
x_ATTRIBUTE18 IN VARCHAR2,
x_ATTRIBUTE19 IN VARCHAR2,
x_ATTRIBUTE20 IN VARCHAR2,
x_mode IN VARCHAR2 DEFAULT 'R'
) AS
/*
|| Created By :
|| Date Created By :
|| Purpose :
|| Known 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_program_update_date DATE;
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_phone_line_type => x_PHONE_LINE_TYPE,
x_contact_point_id => x_CONTACT_POINT_ID,
x_location_venue_addr_id => x_LOCATION_VENUE_ADDR_ID,
x_contact_point_type => x_CONTACT_POINT_TYPE,
x_status => x_STATUS,
x_primary_flag => x_PRIMARY_FLAG,
x_email_format => x_EMAIL_FORMAT,
x_email_address => x_EMAIL_ADDRESS,
x_telephone_type => x_TELEPHONE_TYPE,
x_phone_area_code => x_PHONE_AREA_CODE,
x_phone_country_code => x_PHONE_COUNTRY_CODE,
x_phone_number => x_PHONE_NUMBER,
x_phone_extension => x_PHONE_EXTENSION,
x_attribute_category => x_ATTRIBUTE_CATEGORY,
x_attribute1 => x_ATTRIBUTE1,
x_attribute2 => x_ATTRIBUTE2,
x_attribute3 => x_ATTRIBUTE3,
x_attribute4 => x_ATTRIBUTE4,
x_attribute5 => x_ATTRIBUTE5,
x_attribute6 => x_ATTRIBUTE6,
x_attribute7 => x_ATTRIBUTE7,
x_attribute8 => x_ATTRIBUTE8,
x_attribute9 => x_ATTRIBUTE9,
x_attribute10 => x_ATTRIBUTE10,
x_attribute11 => x_ATTRIBUTE11,
x_attribute12 => x_ATTRIBUTE12,
x_attribute13 => x_ATTRIBUTE13,
x_attribute14 => x_ATTRIBUTE14,
x_attribute15 => x_ATTRIBUTE15,
x_attribute16 => x_ATTRIBUTE16,
x_attribute17 => x_ATTRIBUTE17,
x_attribute18 => x_ATTRIBUTE18,
x_attribute19 => x_ATTRIBUTE19,
x_attribute20 => x_ATTRIBUTE20,
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_program_update_date := old_references.program_update_date;
x_program_update_date := SYSDATE;
UPDATE igs_pe_contact_dtls SET
phone_line_type = new_references.phone_line_type,
location_venue_addr_id = new_references.location_venue_addr_id,
contact_point_type = new_references.contact_point_type,
status = new_references.status,
primary_flag = new_references.primary_flag,
email_format = new_references.email_format,
email_address = new_references.email_address,
telephone_type = new_references.telephone_type,
phone_area_code = new_references.phone_area_code,
phone_country_code = new_references.phone_country_code,
phone_number = new_references.phone_number,
phone_extension = new_references.phone_extension,
attribute_category = new_references.attribute_category,
attribute1 = new_references.attribute1,
attribute2 = new_references.attribute2,
attribute3 = new_references.attribute3,
attribute4 = new_references.attribute4,
attribute5 = new_references.attribute5,
attribute6 = new_references.attribute6,
attribute7 = new_references.attribute7,
attribute8 = new_references.attribute8,
attribute9 = new_references.attribute9,
attribute10 = new_references.attribute10,
attribute11 = new_references.attribute11,
attribute12 = new_references.attribute12,
attribute13 = new_references.attribute13,
attribute14 = new_references.attribute14,
attribute15 = new_references.attribute15,
attribute16 = new_references.attribute16,
attribute17 = new_references.attribute17,
attribute18 = new_references.attribute18,
attribute19 = new_references.attribute19,
attribute20 = new_references.attribute20,
last_update_date = x_last_update_date,
last_updated_by = x_last_updated_by,
last_update_login = x_last_update_login ,
request_id = x_request_id,
program_id = x_program_id,
program_application_id = x_program_application_id,
program_update_date = x_program_update_date
WHERE ROWID = x_rowid;
p_action => 'UPDATE',
x_rowid => X_ROWID
);
END update_row;
CURSOR c1 IS SELECT rowid FROM igs_pe_contact_dtls
WHERE contact_point_id = x_contact_point_id
;
insert_row (
x_rowid,
x_phone_line_type,
x_contact_point_id,
x_location_venue_addr_id,
x_contact_point_type,
x_status,
x_primary_flag,
x_email_format,
x_email_address,
x_telephone_type,
x_phone_area_code,
x_phone_country_code,
x_phone_number,
x_phone_extension,
x_attribute_category,
x_attribute1,
x_attribute2,
x_attribute3,
x_attribute4,
x_attribute5,
x_attribute6,
x_attribute7,
x_attribute8,
x_attribute9,
x_attribute10,
x_attribute11,
x_attribute12,
x_attribute13,
x_attribute14,
x_attribute15,
x_attribute16,
x_attribute17,
x_attribute18,
x_attribute19,
x_attribute20,
x_mode
);
update_row (
x_rowid,
x_phone_line_type,
x_contact_point_id,
x_location_venue_addr_id,
x_contact_point_type,
x_status,
x_primary_flag,
x_email_format,
x_email_address,
x_telephone_type,
x_phone_area_code,
x_phone_country_code,
x_phone_number,
x_phone_extension,
x_attribute_category,
x_attribute1,
x_attribute2,
x_attribute3,
x_attribute4,
x_attribute5,
x_attribute6,
x_attribute7,
x_attribute8,
x_attribute9,
x_attribute10,
x_attribute11,
x_attribute12,
x_attribute13,
x_attribute14,
x_attribute15,
x_attribute16,
x_attribute17,
x_attribute18,
x_attribute19,
x_attribute20,
x_mode
);
PROCEDURE delete_row (
x_rowid IN VARCHAR2,
x_mode IN VARCHAR2
) AS
/*
|| Created By :
|| Date Created By :
|| Purpose :
|| Known 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_pe_contact_dtls
WHERE ROWID = x_rowid;
p_action => 'DELETE',
x_rowid => X_ROWID
);
END delete_row;