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_uoo_id IN NUMBER DEFAULT NULL,
x_mark_capped_flag IN VARCHAR2 DEFAULT NULL,
x_show_on_academic_histry_flag IN VARCHAR2 DEFAULT NULL,
x_release_date IN DATE DEFAULT NULL,
x_manual_override_flag IN VARCHAR2 DEFAULT NULL
) AS
CURSOR cur_old_ref_values IS
SELECT *
FROM igs_as_su_atmptout_h_all
WHERE ROWID = x_rowid;
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;
SELECT ROWID
FROM igs_as_su_atmptout_h_all
WHERE person_id = x_person_id
AND course_cd = x_course_cd
AND outcome_dt = x_outcome_dt
AND hist_start_dt = x_hist_start_dt
AND uoo_id = x_uoo_id
FOR UPDATE NOWAIT;
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_uoo_id IN NUMBER DEFAULT NULL,
x_mark_capped_flag IN VARCHAR2 DEFAULT NULL,
x_show_on_academic_histry_flag IN VARCHAR2 DEFAULT NULL,
x_release_date IN DATE DEFAULT NULL,
x_manual_override_flag IN VARCHAR2 DEFAULT NULL
) AS
BEGIN
set_column_values (
p_action,
x_rowid,
x_org_id,
x_person_id,
x_course_cd,
x_unit_cd,
x_cal_type,
x_ci_sequence_number,
x_outcome_dt,
x_hist_start_dt,
x_hist_end_dt,
x_hist_who,
x_grading_schema_cd,
x_version_number,
x_grade,
x_s_grade_creation_method_type,
x_finalised_outcome_ind,
x_mark,
x_number_times_keyed,
x_translated_grading_schema_cd,
x_translated_version_number,
x_translated_grade,
x_translated_dt,
x_creation_date,
x_created_by,
x_last_update_date,
x_last_updated_by,
x_last_update_login,
x_uoo_id,
x_mark_capped_flag,
x_show_on_academic_histry_flag,
x_release_date,
x_manual_override_flag
);
IF (p_action = 'INSERT') THEN
-- Call all the procedures related to Before Insert.
IF get_pk_for_validation (
new_references.person_id,
new_references.course_cd,
new_references.outcome_dt,
new_references.hist_start_dt,
new_references.uoo_id
) THEN
fnd_message.set_name ('IGS', 'IGS_GE_MULTI_ORG_DUP_REC');
ELSIF (p_action = 'UPDATE') THEN
-- Call all the procedures related to Before Update.
check_constraints;
ELSIF (p_action = 'VALIDATE_INSERT') THEN
IF get_pk_for_validation (
new_references.person_id,
new_references.course_cd,
new_references.outcome_dt,
new_references.hist_start_dt,
new_references.uoo_id
) THEN
fnd_message.set_name ('IGS', 'IGS_GE_MULTI_ORG_DUP_REC');
ELSIF (p_action = 'VALIDATE_UPDATE') THEN
check_constraints;
PROCEDURE insert_row (
x_rowid IN OUT NOCOPY VARCHAR2,
x_org_id IN NUMBER,
x_person_id IN NUMBER,
x_course_cd IN VARCHAR2,
x_unit_cd IN VARCHAR2,
x_cal_type IN VARCHAR2,
x_ci_sequence_number IN NUMBER,
x_outcome_dt IN DATE,
x_hist_start_dt IN DATE,
x_hist_end_dt IN DATE,
x_hist_who IN NUMBER,
x_grading_schema_cd IN VARCHAR2,
x_version_number IN NUMBER,
x_grade IN VARCHAR2,
x_s_grade_creation_method_type IN VARCHAR2,
x_finalised_outcome_ind IN VARCHAR2,
x_mark IN NUMBER,
x_number_times_keyed IN NUMBER,
x_translated_grading_schema_cd IN VARCHAR2,
x_translated_version_number IN NUMBER,
x_translated_grade IN VARCHAR2,
x_translated_dt IN DATE,
x_mode IN VARCHAR2 DEFAULT 'R',
x_uoo_id IN NUMBER,
x_mark_capped_flag IN VARCHAR2 DEFAULT 'N',
x_show_on_academic_histry_flag IN VARCHAR2 DEFAULT 'Y',
x_release_date IN DATE DEFAULT NULL,
x_manual_override_flag IN VARCHAR2 DEFAULT 'N'
) IS
CURSOR c IS
SELECT ROWID
FROM igs_as_su_atmptout_h_all
WHERE person_id = x_person_id
AND course_cd = x_course_cd
AND uoo_id = x_uoo_id
AND outcome_dt = x_outcome_dt
AND hist_start_dt = x_hist_start_dt;
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_org_id => igs_ge_gen_003.get_org_id,
x_cal_type => x_cal_type,
x_ci_sequence_number => x_ci_sequence_number,
x_course_cd => x_course_cd,
x_finalised_outcome_ind => x_finalised_outcome_ind,
x_grade => x_grade,
x_grading_schema_cd => x_grading_schema_cd,
x_hist_end_dt => x_hist_end_dt,
x_hist_start_dt => x_hist_start_dt,
x_hist_who => x_hist_who,
x_mark => x_mark,
x_number_times_keyed => x_number_times_keyed,
x_outcome_dt => x_outcome_dt,
x_person_id => x_person_id,
x_s_grade_creation_method_type => x_s_grade_creation_method_type,
x_translated_dt => x_translated_dt,
x_translated_grade => x_translated_grade,
x_translated_grading_schema_cd => x_translated_grading_schema_cd,
x_translated_version_number => x_translated_version_number,
x_unit_cd => x_unit_cd,
x_version_number => x_version_number,
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_uoo_id => x_uoo_id,
x_mark_capped_flag => x_mark_capped_flag,
x_show_on_academic_histry_flag => x_show_on_academic_histry_flag,
x_release_date => x_release_date,
x_manual_override_flag => x_manual_override_flag
);
INSERT INTO igs_as_su_atmptout_h_all
(org_id, person_id, course_cd, unit_cd,
cal_type, ci_sequence_number, outcome_dt,
hist_start_dt, hist_end_dt, hist_who,
grading_schema_cd, version_number, grade,
s_grade_creation_method_type, finalised_outcome_ind, mark,
number_times_keyed, translated_grading_schema_cd,
translated_version_number, translated_grade,
translated_dt, creation_date, created_by, last_update_date,
last_updated_by, last_update_login, uoo_id, mark_capped_flag,
show_on_academic_histry_flag, release_date, manual_override_flag)
VALUES (new_references.org_id, new_references.person_id, new_references.course_cd, new_references.unit_cd,
new_references.cal_type, new_references.ci_sequence_number, new_references.outcome_dt,
new_references.hist_start_dt, new_references.hist_end_dt, new_references.hist_who,
new_references.grading_schema_cd, new_references.version_number, new_references.grade,
new_references.s_grade_creation_method_type, new_references.finalised_outcome_ind, new_references.mark,
new_references.number_times_keyed, new_references.translated_grading_schema_cd,
new_references.translated_version_number, new_references.translated_grade,
new_references.translated_dt, x_last_update_date, x_last_updated_by, x_last_update_date,
x_last_updated_by, x_last_update_login, new_references.uoo_id,
new_references.mark_capped_flag, new_references.show_on_academic_histry_flag,
new_references.release_date, new_references.manual_override_flag);
END insert_row;
SELECT hist_end_dt,
hist_who,
grading_schema_cd,
version_number,
grade,
s_grade_creation_method_type,
finalised_outcome_ind,
mark,
number_times_keyed,
translated_grading_schema_cd,
translated_version_number,
translated_grade,
translated_dt,
mark_capped_flag,
show_on_academic_histry_flag,
release_date,
manual_override_flag
FROM igs_as_su_atmptout_h_all
WHERE ROWID = x_rowid
FOR UPDATE NOWAIT;
fnd_message.set_name ('FND', 'FORM_RECORD_DELETED');
PROCEDURE update_row (
x_rowid IN VARCHAR2,
x_person_id IN NUMBER,
x_course_cd IN VARCHAR2,
x_unit_cd IN VARCHAR2,
x_cal_type IN VARCHAR2,
x_ci_sequence_number IN NUMBER,
x_outcome_dt IN DATE,
x_hist_start_dt IN DATE,
x_hist_end_dt IN DATE,
x_hist_who IN NUMBER,
x_grading_schema_cd IN VARCHAR2,
x_version_number IN NUMBER,
x_grade IN VARCHAR2,
x_s_grade_creation_method_type IN VARCHAR2,
x_finalised_outcome_ind IN VARCHAR2,
x_mark IN NUMBER,
x_number_times_keyed IN NUMBER,
x_translated_grading_schema_cd IN VARCHAR2,
x_translated_version_number IN NUMBER,
x_translated_grade IN VARCHAR2,
x_translated_dt IN DATE,
x_mode IN VARCHAR2 DEFAULT 'R',
x_uoo_id IN NUMBER,
x_mark_capped_flag IN VARCHAR2 DEFAULT 'N',
x_show_on_academic_histry_flag IN VARCHAR2 DEFAULT 'Y',
x_release_date IN DATE DEFAULT NULL,
x_manual_override_flag IN VARCHAR2 DEFAULT 'N'
) IS
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_cal_type => x_cal_type,
x_ci_sequence_number => x_ci_sequence_number,
x_course_cd => x_course_cd,
x_finalised_outcome_ind => x_finalised_outcome_ind,
x_grade => x_grade,
x_grading_schema_cd => x_grading_schema_cd,
x_hist_end_dt => x_hist_end_dt,
x_hist_start_dt => x_hist_start_dt,
x_hist_who => x_hist_who,
x_mark => x_mark,
x_number_times_keyed => x_number_times_keyed,
x_outcome_dt => x_outcome_dt,
x_person_id => x_person_id,
x_s_grade_creation_method_type => x_s_grade_creation_method_type,
x_translated_dt => x_translated_dt,
x_translated_grade => x_translated_grade,
x_translated_grading_schema_cd => x_translated_grading_schema_cd,
x_translated_version_number => x_translated_version_number,
x_unit_cd => x_unit_cd,
x_version_number => x_version_number,
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_uoo_id => x_uoo_id,
x_mark_capped_flag => x_mark_capped_flag,
x_show_on_academic_histry_flag => x_show_on_academic_histry_flag,
x_release_date => x_release_date,
x_manual_override_flag => x_manual_override_flag
);
UPDATE igs_as_su_atmptout_h_all
SET hist_end_dt = new_references.hist_end_dt,
hist_who = new_references.hist_who,
grading_schema_cd = new_references.grading_schema_cd,
version_number = new_references.version_number,
grade = new_references.grade,
s_grade_creation_method_type = new_references.s_grade_creation_method_type,
finalised_outcome_ind = new_references.finalised_outcome_ind,
mark = new_references.mark,
number_times_keyed = new_references.number_times_keyed,
translated_grading_schema_cd = new_references.translated_grading_schema_cd,
translated_version_number = new_references.translated_version_number,
translated_grade = new_references.translated_grade,
translated_dt = new_references.translated_dt,
last_update_date = x_last_update_date,
last_updated_by = x_last_updated_by,
last_update_login = x_last_update_login,
mark_capped_flag = x_mark_capped_flag,
show_on_academic_histry_flag = x_show_on_academic_histry_flag,
release_date = x_release_date,
manual_override_flag = x_manual_override_flag
WHERE ROWID = x_rowid;
END update_row;
SELECT ROWID
FROM igs_as_su_atmptout_h_all
WHERE person_id = x_person_id
AND course_cd = x_course_cd
AND uoo_id = x_uoo_id
AND outcome_dt = x_outcome_dt
AND hist_start_dt = x_hist_start_dt;
insert_row (
x_rowid,
x_org_id,
x_person_id,
x_course_cd,
x_unit_cd,
x_cal_type,
x_ci_sequence_number,
x_outcome_dt,
x_hist_start_dt,
x_hist_end_dt,
x_hist_who,
x_grading_schema_cd,
x_version_number,
x_grade,
x_s_grade_creation_method_type,
x_finalised_outcome_ind,
x_mark,
x_number_times_keyed,
x_translated_grading_schema_cd,
x_translated_version_number,
x_translated_grade,
x_translated_dt,
x_mode,
x_uoo_id,
x_mark_capped_flag,
x_show_on_academic_histry_flag,
x_release_date,
x_manual_override_flag
);
update_row (
x_rowid,
x_person_id,
x_course_cd,
x_unit_cd,
x_cal_type,
x_ci_sequence_number,
x_outcome_dt,
x_hist_start_dt,
x_hist_end_dt,
x_hist_who,
x_grading_schema_cd,
x_version_number,
x_grade,
x_s_grade_creation_method_type,
x_finalised_outcome_ind,
x_mark,
x_number_times_keyed,
x_translated_grading_schema_cd,
x_translated_version_number,
x_translated_grade,
x_translated_dt,
x_mode,
x_uoo_id,
x_mark_capped_flag,
x_show_on_academic_histry_flag,
x_release_date,
x_manual_override_flag
);
PROCEDURE delete_row (x_rowid IN VARCHAR2) IS
BEGIN
before_dml (p_action => 'DELETE', x_rowid => x_rowid);
DELETE FROM igs_as_su_atmptout_h_all
WHERE ROWID = x_rowid;
END delete_row;