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 : [email protected]
|| Created On : 27-SEP-2001
|| 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_LOOKUPS_VAL
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;
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 : [email protected]
|| Created On : 27-SEP-2001
|| 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_lookup_type,
x_lookup_code,
x_closed_ind,
x_security_allowed_ind,
x_step_type_restriction_num_in,
x_unit_outcome_ind,
x_display_name,
x_display_order,
x_step_order_applicable_ind,
x_academic_transcript_ind,
x_cmpltn_requirements_ind,
x_fee_ass_ind,
x_step_group_type,
x_final_result_ind,
x_system_generated_ind,
x_transaction_cat,
x_encumbrance_level,
x_open_for_enrollments,
x_system_calculated,
x_system_mandatory_ind,
x_default_display_seq,
x_av_transcript_disp_options,
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 Insertlinfo.
/*IF ( get_pk_for_validation(x_lookup_type,x_lookup_code
)
) THEN
fnd_message.set_name('IGS','IGS_GE_RECORD_ALREADY_EXISTS');
ELSIF (p_action = 'VALIDATE_INSERT') THEN
-- Call all the procedures related to Before Insertlinfo.
IF ( get_pk_for_validation (x_lookup_type,x_lookup_code
)
) THEN
fnd_message.set_name('IGS','IGS_GE_RECORD_ALREADY_EXISTS');
PROCEDURE insert_row (
x_rowid IN OUT NOCOPY VARCHAR2,
x_lookup_type IN OUT NOCOPY VARCHAR2,
x_lookup_code IN VARCHAR2,
x_closed_ind IN VARCHAR2,
x_security_allowed_ind IN VARCHAR2,
x_step_type_restriction_num_in IN VARCHAR2,
x_unit_outcome_ind IN VARCHAR2,
x_display_name IN VARCHAR2,
x_display_order IN NUMBER,
x_step_order_applicable_ind IN VARCHAR2,
x_academic_transcript_ind IN VARCHAR2,
x_cmpltn_requirements_ind IN VARCHAR2,
x_fee_ass_ind IN VARCHAR2,
x_step_group_type IN VARCHAR2,
x_final_result_ind IN VARCHAR2,
x_system_generated_ind IN VARCHAR2,
x_transaction_cat IN VARCHAR2,
x_encumbrance_level IN NUMBER,
x_open_for_enrollments IN VARCHAR2,
x_system_calculated IN VARCHAR2,
x_system_mandatory_ind IN VARCHAR2,
x_default_display_seq IN NUMBER,
x_av_transcript_disp_options IN VARCHAR2,
x_mode IN VARCHAR2
) AS
/*
|| Created By : [email protected]
|| Created On : 27-SEP-2001
|| 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)
|| ssawhney For perf reasons, used DML returning to return the ROWID
*/
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_lookup_type => x_lookup_type,
x_lookup_code => x_lookup_code,
x_closed_ind => x_closed_ind,
x_security_allowed_ind => x_security_allowed_ind,
x_step_type_restriction_num_in => x_step_type_restriction_num_in,
x_unit_outcome_ind => x_unit_outcome_ind,
x_display_name => x_display_name,
x_display_order => x_display_order,
x_step_order_applicable_ind => x_step_order_applicable_ind,
x_academic_transcript_ind => x_academic_transcript_ind,
x_cmpltn_requirements_ind => x_cmpltn_requirements_ind,
x_fee_ass_ind => x_fee_ass_ind,
x_step_group_type => x_step_group_type,
x_final_result_ind => x_final_result_ind,
x_system_generated_ind => x_system_generated_ind,
x_transaction_cat => x_transaction_cat,
x_encumbrance_level => x_encumbrance_level,
x_open_for_enrollments => x_open_for_enrollments,
x_system_calculated => x_system_calculated,
x_system_mandatory_ind => x_system_mandatory_ind,
x_default_display_seq => x_default_display_seq,
x_av_transcript_disp_options => x_av_transcript_disp_options,
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_lookups_val (
lookup_type,
lookup_code,
closed_ind,
security_allowed_ind,
step_type_restriction_num_ind,
unit_outcome_ind,
display_name,
display_order,
step_order_applicable_ind,
academic_transcript_ind,
cmpltn_requirements_ind,
fee_ass_ind,
step_group_type,
final_result_ind,
system_generated_ind,
transaction_cat,
encumbrance_level,
open_for_enrollments,
system_calculated,
system_mandatory_ind,
default_display_seq,
av_transcript_disp_options,
creation_date,
created_by,
last_update_date,
last_updated_by,
last_update_login
) VALUES (
new_references.lookup_type,
new_references.lookup_code,
new_references.closed_ind,
new_references.security_allowed_ind,
new_references.step_type_restriction_num_ind,
new_references.unit_outcome_ind,
new_references.display_name,
new_references.display_order,
new_references.step_order_applicable_ind,
new_references.academic_transcript_ind,
new_references.cmpltn_requirements_ind,
new_references.fee_ass_ind,
new_references.step_group_type,
new_references.final_result_ind,
new_references.system_generated_ind,
new_references.transaction_cat,
new_references.encumbrance_level,
new_references.open_for_enrollments,
new_references.system_calculated,
new_references.system_mandatory_ind,
new_references.default_display_seq,
new_references.av_transcript_disp_options,
x_last_update_date,
x_last_updated_by,
x_last_update_date,
x_last_updated_by,
x_last_update_login
) RETURNING ROWID INTO x_rowid;
END insert_row;
SELECT
lookup_type,
lookup_code,
closed_ind,
security_allowed_ind,
step_type_restriction_num_ind,
unit_outcome_ind,
display_name,
display_order,
step_order_applicable_ind,
academic_transcript_ind,
cmpltn_requirements_ind,
fee_ass_ind,
step_group_type,
final_result_ind,
system_generated_ind,
transaction_cat,
encumbrance_level,
open_for_enrollments,
system_calculated,
system_mandatory_ind,
default_display_seq,
av_transcript_disp_options
FROM igs_lookups_val
WHERE rowid = x_rowid
FOR UPDATE NOWAIT;
fnd_message.set_name('FND', 'FORM_RECORD_DELETED');
PROCEDURE update_row (
x_rowid IN VARCHAR2,
x_lookup_type IN VARCHAR2,
x_lookup_code IN VARCHAR2,
x_closed_ind IN VARCHAR2,
x_security_allowed_ind IN VARCHAR2,
x_step_type_restriction_num_in IN VARCHAR2,
x_unit_outcome_ind IN VARCHAR2,
x_display_name IN VARCHAR2,
x_display_order IN NUMBER,
x_step_order_applicable_ind IN VARCHAR2,
x_academic_transcript_ind IN VARCHAR2,
x_cmpltn_requirements_ind IN VARCHAR2,
x_fee_ass_ind IN VARCHAR2,
x_step_group_type IN VARCHAR2,
x_final_result_ind IN VARCHAR2,
x_system_generated_ind IN VARCHAR2,
x_transaction_cat IN VARCHAR2,
x_encumbrance_level IN NUMBER,
x_open_for_enrollments IN VARCHAR2,
x_system_calculated IN VARCHAR2,
x_system_mandatory_ind IN VARCHAR2,
x_default_display_seq IN NUMBER,
x_av_transcript_disp_options IN VARCHAR2,
x_mode IN VARCHAR2
) AS
/*
|| Created By : [email protected]
|| Created On : 27-SEP-2001
|| 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;
p_action => 'UPDATE',
x_rowid => x_rowid,
x_lookup_type => x_lookup_type,
x_lookup_code => x_lookup_code,
x_closed_ind => x_closed_ind,
x_security_allowed_ind => x_security_allowed_ind,
x_step_type_restriction_num_in => x_step_type_restriction_num_in,
x_unit_outcome_ind => x_unit_outcome_ind,
x_display_name => x_display_name,
x_display_order => x_display_order,
x_step_order_applicable_ind => x_step_order_applicable_ind,
x_academic_transcript_ind => x_academic_transcript_ind,
x_cmpltn_requirements_ind => x_cmpltn_requirements_ind,
x_fee_ass_ind => x_fee_ass_ind,
x_step_group_type => x_step_group_type,
x_final_result_ind => x_final_result_ind,
x_system_generated_ind => x_system_generated_ind,
x_transaction_cat => x_transaction_cat,
x_encumbrance_level => x_encumbrance_level,
x_open_for_enrollments => x_open_for_enrollments,
x_system_calculated => x_system_calculated,
x_system_mandatory_ind => x_system_mandatory_ind,
x_default_display_seq => x_default_display_seq,
x_av_transcript_disp_options => x_av_transcript_disp_options,
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_lookups_val
SET
av_transcript_disp_options = new_references.av_transcript_disp_options,
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;
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_lookups_val
WHERE lookup_type = x_lookup_type AND
lookup_code = x_lookup_code ;
insert_row (
x_rowid,
x_lookup_type,
x_lookup_code,
x_closed_ind,
x_security_allowed_ind,
x_step_type_restriction_num_in,
x_unit_outcome_ind,
x_display_name,
x_display_order,
x_step_order_applicable_ind,
x_academic_transcript_ind,
x_cmpltn_requirements_ind,
x_fee_ass_ind,
x_step_group_type,
x_final_result_ind,
x_system_generated_ind,
x_transaction_cat,
x_encumbrance_level,
x_open_for_enrollments,
x_system_calculated,
x_system_mandatory_ind,
x_default_display_seq,
x_av_transcript_disp_options,
x_mode
);
update_row (
x_rowid,
x_lookup_type,
x_lookup_code,
x_closed_ind,
x_security_allowed_ind,
x_step_type_restriction_num_in,
x_unit_outcome_ind,
x_display_name,
x_display_order,
x_step_order_applicable_ind,
x_academic_transcript_ind,
x_cmpltn_requirements_ind,
x_fee_ass_ind,
x_step_group_type,
x_final_result_ind,
x_system_generated_ind,
x_transaction_cat,
x_encumbrance_level,
x_open_for_enrollments,
x_system_calculated,
x_system_mandatory_ind,
x_default_display_seq,
x_av_transcript_disp_options,
x_mode
);
PROCEDURE delete_row (
x_rowid IN VARCHAR2
) AS
/*
|| Created By : [email protected]
|| Created On : 27-SEP-2001
|| 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
before_dml (
p_action => 'DELETE',
x_rowid => x_rowid
);
DELETE FROM igs_lookups_val
WHERE rowid = x_rowid;
END delete_row;