The following lines contain the word 'select', 'insert', 'update' or 'delete':
x_last_update_date IN DATE,
x_last_updated_by IN NUMBER,
x_last_update_login IN NUMBER
) AS
/*
|| Created By : [email protected]
|| Created On : 15-MAY-2003
|| Purpose : Initialises the Old and New references for the columns of the table.
|| 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_az_groups
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');
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_az_groups
WHERE group_name = x_group_name;
SELECT rowid
FROM igs_az_groups
WHERE ((location_cd = x_location_cd));
SELECT rowid
FROM igs_az_groups
WHERE ((advisor_group_id = x_group_id))
OR ((student_group_id = x_group_id));
SELECT rowid
FROM igs_az_groups
WHERE ((advising_hold_type = x_encumbrance_type));
x_last_update_date IN DATE,
x_last_updated_by IN NUMBER,
x_last_update_login IN NUMBER
) AS
/*
|| Created By : [email protected]
|| Created On : 15-MAY-2003
|| Purpose : Initialises the columns, Checks Constraints, Calls the
|| Trigger Handlers for the table, before any DML operation.
|| 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_group_name,
x_group_desc,
x_advising_code,
x_resp_org_unit_cd,
x_resp_person_id,
x_location_cd,
x_delivery_method_code,
x_advisor_group_id,
x_student_group_id,
x_default_advisor_load_num,
x_mandatory_flag,
x_advising_sessions_num,
x_advising_hold_type,
x_closed_flag,
x_comments_txt,
x_auto_refresh_flag,
x_last_auto_refresh_date,
x_auto_stdnt_add_flag,
x_auto_stdnt_remove_flag,
x_auto_advisor_add_flag,
x_auto_advisor_remove_flag,
x_auto_match_flag,
x_auto_apply_hold_flag,
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.
IF ( get_pk_for_validation(
new_references.group_name
)
) 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.
check_child_existance;
ELSIF (p_action = 'VALIDATE_INSERT') THEN
-- Call all the procedures related to Before Insert.
IF ( get_pk_for_validation (
new_references.group_name
)
) THEN
fnd_message.set_name('IGS','IGS_GE_RECORD_ALREADY_EXISTS');
ELSIF (p_action = 'VALIDATE_DELETE') THEN
check_child_existance;
PROCEDURE insert_row (
x_rowid IN OUT NOCOPY VARCHAR2,
x_group_name IN OUT NOCOPY VARCHAR2,
x_group_desc IN VARCHAR2,
x_advising_code IN VARCHAR2,
x_resp_org_unit_cd IN VARCHAR2,
x_resp_person_id IN NUMBER,
x_location_cd IN VARCHAR2,
x_delivery_method_code IN VARCHAR2,
x_advisor_group_id IN NUMBER,
x_student_group_id IN NUMBER,
x_default_advisor_load_num IN NUMBER,
x_mandatory_flag IN VARCHAR2,
x_advising_sessions_num IN NUMBER,
x_advising_hold_type IN VARCHAR2,
x_closed_flag IN VARCHAR2,
x_comments_txt IN VARCHAR2,
x_auto_refresh_flag IN VARCHAR2,
x_last_auto_refresh_date IN DATE,
x_auto_stdnt_add_flag IN VARCHAR2,
x_auto_stdnt_remove_flag IN VARCHAR2,
x_auto_advisor_add_flag IN VARCHAR2,
x_auto_advisor_remove_flag IN VARCHAR2,
x_auto_match_flag IN VARCHAR2,
x_auto_apply_hold_flag 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,
x_return_status OUT NOCOPY VARCHAR2,
x_msg_data OUT NOCOPY VARCHAR2,
x_msg_count OUT NOCOPY NUMBER
) AS
/*
|| Created By : [email protected]
|| Created On : 15-MAY-2003
|| Purpose : Handles the INSERT DML logic for the table.
|| 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_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;
fnd_message.set_token ('ROUTINE', 'IGS_AZ_GROUPS_PKG.INSERT_ROW');
p_action => 'INSERT',
x_rowid => x_rowid,
x_group_name => x_group_name,
x_group_desc => x_group_desc,
x_advising_code => x_advising_code,
x_resp_org_unit_cd => x_resp_org_unit_cd,
x_resp_person_id => x_resp_person_id,
x_location_cd => x_location_cd,
x_delivery_method_code => x_delivery_method_code,
x_advisor_group_id => x_advisor_group_id,
x_student_group_id => x_student_group_id,
x_default_advisor_load_num => x_default_advisor_load_num,
x_mandatory_flag => x_mandatory_flag,
x_advising_sessions_num => x_advising_sessions_num,
x_advising_hold_type => x_advising_hold_type,
x_closed_flag => x_closed_flag,
x_comments_txt => x_comments_txt,
x_auto_refresh_flag => x_auto_refresh_flag,
x_last_auto_refresh_date => x_last_auto_refresh_date,
x_auto_stdnt_add_flag => x_auto_stdnt_add_flag,
x_auto_stdnt_remove_flag => x_auto_stdnt_remove_flag,
x_auto_advisor_add_flag => x_auto_advisor_add_flag,
x_auto_advisor_remove_flag => x_auto_advisor_remove_flag,
x_auto_match_flag => x_auto_match_flag,
x_auto_apply_hold_flag => x_auto_apply_hold_flag,
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_az_groups (
group_name,
group_desc,
advising_code,
resp_org_unit_cd,
resp_person_id,
location_cd,
delivery_method_code,
advisor_group_id,
student_group_id,
default_advisor_load_num,
mandatory_flag,
advising_sessions_num,
advising_hold_type,
closed_flag,
comments_txt,
auto_refresh_flag,
last_auto_refresh_date,
auto_stdnt_add_flag,
auto_stdnt_remove_flag,
auto_advisor_add_flag,
auto_advisor_remove_flag,
auto_match_flag,
auto_apply_hold_flag,
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
) VALUES (
UPPER(new_references.group_name),
new_references.group_desc,
new_references.advising_code,
new_references.resp_org_unit_cd,
new_references.resp_person_id,
new_references.location_cd,
new_references.delivery_method_code,
new_references.advisor_group_id,
new_references.student_group_id,
new_references.default_advisor_load_num,
new_references.mandatory_flag,
new_references.advising_sessions_num,
new_references.advising_hold_type,
new_references.closed_flag,
new_references.comments_txt,
new_references.auto_refresh_flag,
new_references.last_auto_refresh_date,
new_references.auto_stdnt_add_flag,
new_references.auto_stdnt_remove_flag,
new_references.auto_advisor_add_flag,
new_references.auto_advisor_remove_flag,
new_references.auto_match_flag,
new_references.auto_apply_hold_flag,
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
) RETURNING ROWID, group_name INTO x_rowid, x_group_name;
FND_MESSAGE.SET_TOKEN('NAME','Insert_Row : '||SQLERRM);
END insert_row;
SELECT
group_desc,
advising_code,
resp_org_unit_cd,
resp_person_id,
location_cd,
delivery_method_code,
advisor_group_id,
student_group_id,
default_advisor_load_num,
mandatory_flag,
advising_sessions_num,
advising_hold_type,
closed_flag,
comments_txt,
auto_refresh_flag,
last_auto_refresh_date,
auto_stdnt_add_flag,
auto_stdnt_remove_flag,
auto_advisor_add_flag,
auto_advisor_remove_flag,
auto_match_flag,
auto_apply_hold_flag,
attribute_category,
attribute1,
attribute2,
attribute3,
attribute4,
attribute5,
attribute6,
attribute7,
attribute8,
attribute9,
attribute10,
attribute11,
attribute12,
attribute13,
attribute14,
attribute15,
attribute16,
attribute17,
attribute18,
attribute19,
attribute20
FROM igs_az_groups
WHERE rowid = x_rowid
FOR UPDATE NOWAIT;
fnd_message.set_name('FND', 'FORM_RECORD_DELETED');
FND_MESSAGE.SET_TOKEN('NAME','Insert_Row : '||SQLERRM);
PROCEDURE update_row (
x_rowid IN VARCHAR2,
x_group_name IN VARCHAR2,
x_group_desc IN VARCHAR2,
x_advising_code IN VARCHAR2,
x_resp_org_unit_cd IN VARCHAR2,
x_resp_person_id IN NUMBER,
x_location_cd IN VARCHAR2,
x_delivery_method_code IN VARCHAR2,
x_advisor_group_id IN NUMBER,
x_student_group_id IN NUMBER,
x_default_advisor_load_num IN NUMBER,
x_mandatory_flag IN VARCHAR2,
x_advising_sessions_num IN NUMBER,
x_advising_hold_type IN VARCHAR2,
x_closed_flag IN VARCHAR2,
x_comments_txt IN VARCHAR2,
x_auto_refresh_flag IN VARCHAR2,
x_last_auto_refresh_date IN DATE,
x_auto_stdnt_add_flag IN VARCHAR2,
x_auto_stdnt_remove_flag IN VARCHAR2,
x_auto_advisor_add_flag IN VARCHAR2,
x_auto_advisor_remove_flag IN VARCHAR2,
x_auto_match_flag IN VARCHAR2,
x_auto_apply_hold_flag 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,
x_return_status OUT NOCOPY VARCHAR2,
x_msg_data OUT NOCOPY VARCHAR2,
x_msg_count OUT NOCOPY NUMBER
) AS
/*
|| Created By : [email protected]
|| Created On : 15-MAY-2003
|| Purpose : Handles the UPDATE DML logic for the table.
|| 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_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;
fnd_message.set_token ('ROUTINE', 'IGS_AZ_GROUPS_PKG.UPDATE_ROW');
p_action => 'UPDATE',
x_rowid => x_rowid,
x_group_name => x_group_name,
x_group_desc => x_group_desc,
x_advising_code => x_advising_code,
x_resp_org_unit_cd => x_resp_org_unit_cd,
x_resp_person_id => x_resp_person_id,
x_location_cd => x_location_cd,
x_delivery_method_code => x_delivery_method_code,
x_advisor_group_id => x_advisor_group_id,
x_student_group_id => x_student_group_id,
x_default_advisor_load_num => x_default_advisor_load_num,
x_mandatory_flag => x_mandatory_flag,
x_advising_sessions_num => x_advising_sessions_num,
x_advising_hold_type => x_advising_hold_type,
x_closed_flag => x_closed_flag,
x_comments_txt => x_comments_txt,
x_auto_refresh_flag => x_auto_refresh_flag,
x_last_auto_refresh_date => x_last_auto_refresh_date,
x_auto_stdnt_add_flag => x_auto_stdnt_add_flag,
x_auto_stdnt_remove_flag => x_auto_stdnt_remove_flag,
x_auto_advisor_add_flag => x_auto_advisor_add_flag,
x_auto_advisor_remove_flag => x_auto_advisor_remove_flag,
x_auto_match_flag => x_auto_match_flag,
x_auto_apply_hold_flag => x_auto_apply_hold_flag,
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
);
UPDATE igs_az_groups
SET
group_desc = new_references.group_desc,
advising_code = new_references.advising_code,
resp_org_unit_cd = new_references.resp_org_unit_cd,
resp_person_id = new_references.resp_person_id,
location_cd = new_references.location_cd,
delivery_method_code = new_references.delivery_method_code,
advisor_group_id = new_references.advisor_group_id,
student_group_id = new_references.student_group_id,
default_advisor_load_num = new_references.default_advisor_load_num,
mandatory_flag = new_references.mandatory_flag,
advising_sessions_num = new_references.advising_sessions_num,
advising_hold_type = new_references.advising_hold_type,
closed_flag = new_references.closed_flag,
comments_txt = new_references.comments_txt,
auto_refresh_flag = new_references.auto_refresh_flag,
last_auto_refresh_date = new_references.last_auto_refresh_date,
auto_stdnt_add_flag = new_references.auto_stdnt_add_flag,
auto_stdnt_remove_flag = new_references.auto_stdnt_remove_flag,
auto_advisor_add_flag = new_references.auto_advisor_add_flag,
auto_advisor_remove_flag = new_references.auto_advisor_remove_flag,
auto_match_flag = new_references.auto_match_flag,
auto_apply_hold_flag = new_references.auto_apply_hold_flag,
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
WHERE rowid = x_rowid;
FND_MESSAGE.SET_TOKEN('NAME','Update_Row : '||SQLERRM);
END update_row;
|| Purpose : Adds a row if there is no existing row, otherwise updates existing row in the table.
|| Known limitations, enhancements or remarks :
|| Change History :
|| Who When What
|| (reverse chronological order - newest change first)
*/
CURSOR c1 IS
SELECT rowid
FROM igs_az_groups
WHERE group_name = x_group_name;
insert_row (
x_rowid,
x_group_name,
x_group_desc,
x_advising_code,
x_resp_org_unit_cd,
x_resp_person_id,
x_location_cd,
x_delivery_method_code,
x_advisor_group_id,
x_student_group_id,
x_default_advisor_load_num,
x_mandatory_flag,
x_advising_sessions_num,
x_advising_hold_type,
x_closed_flag,
x_comments_txt,
x_auto_refresh_flag,
x_last_auto_refresh_date,
x_auto_stdnt_add_flag,
x_auto_stdnt_remove_flag,
x_auto_advisor_add_flag,
x_auto_advisor_remove_flag,
x_auto_match_flag,
x_auto_apply_hold_flag,
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,
l_return_status,
l_msg_data,
l_msg_count
);
update_row (
x_rowid,
x_group_name,
x_group_desc,
x_advising_code,
x_resp_org_unit_cd,
x_resp_person_id,
x_location_cd,
x_delivery_method_code,
x_advisor_group_id,
x_student_group_id,
x_default_advisor_load_num,
x_mandatory_flag,
x_advising_sessions_num,
x_advising_hold_type,
x_closed_flag,
x_comments_txt,
x_auto_refresh_flag,
x_last_auto_refresh_date,
x_auto_stdnt_add_flag,
x_auto_stdnt_remove_flag,
x_auto_advisor_add_flag,
x_auto_advisor_remove_flag,
x_auto_match_flag,
x_auto_apply_hold_flag,
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,
l_return_status,
l_msg_data,
l_msg_count
);
PROCEDURE delete_row (
x_rowid IN VARCHAR2,
x_return_status OUT NOCOPY VARCHAR2,
x_msg_data OUT NOCOPY VARCHAR2,
x_msg_count OUT NOCOPY NUMBER
) AS
/*
|| Created By : [email protected]
|| Created On : 15-MAY-2003
|| Purpose : Handles the DELETE DML logic for the table.
|| Known limitations, enhancements or remarks :
|| Change History :
|| Who When What
|| (reverse chronological order - newest change first)
*/
BEGIN
FND_MSG_PUB.initialize;
p_action => 'DELETE',
x_rowid => x_rowid
);
DELETE FROM igs_az_groups
WHERE rowid = x_rowid;
FND_MESSAGE.SET_TOKEN('NAME','Insert_Row : '||SQLERRM);
END delete_row;