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 ,
x_release_credit_id IN NUMBER ,
x_student_plan_id IN NUMBER ,
x_last_instlmnt_due_date IN DATE
) AS
/*
|| Created By : [email protected]
|| Created On : 29-NOV-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_fi_person_holds
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');
fnd_message.set_name ('FND','FORM_RECORD_DELETED');
SELECT rowid
FROM igs_fi_person_holds
WHERE person_id = x_person_id
AND hold_type = x_hold_type
AND hold_start_dt = x_hold_start_dt
FOR UPDATE NOWAIT;
SELECT rowid
FROM igs_fi_person_holds
WHERE ((hold_plan_name = x_hold_plan_name));
SELECT rowid
FROM igs_fi_person_holds
WHERE ((hold_type = x_encumbrance_type));
SELECT rowid
FROM igs_fi_credits_all
WHERE credit_id = x_release_credit_id;
SELECT rowid
FROM igs_fi_person_holds
WHERE ((fee_cal_type = x_cal_type) AND
(fee_ci_sequence_number = x_sequence_number));
PROCEDURE BeforeInsertUpdate(p_inserting BOOLEAN , p_updating BOOLEAN) AS
p_message_name VARCHAR2(30);
IF ( p_inserting = TRUE OR (p_updating = TRUE AND new_references.hold_type <> old_references.hold_type) ) THEN
IF NOT igs_en_val_etde.enrp_val_et_closed(new_references.hold_type,p_message_name) THEN
Fnd_Message.Set_Name('IGS', p_message_name);
END BeforeInsertUpdate;
x_last_update_date IN DATE ,
x_last_updated_by IN NUMBER ,
x_last_update_login IN NUMBER ,
x_release_credit_id IN NUMBER ,
x_student_plan_id IN NUMBER ,
x_last_instlmnt_due_date IN DATE
) AS
/*
|| Created By : [email protected]
|| Created On : 29-NOV-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)
|| vvutukur 17-May-2002 Removed calls to check_constraints procedure
|| as this procedure is removed from body and
|| spec.also. BUG#2344826.
*/
BEGIN
set_column_values (
p_action,
x_rowid,
x_person_id,
x_hold_plan_name,
x_hold_type,
x_hold_start_dt,
x_process_start_dt,
x_process_end_dt,
x_offset_days,
x_past_due_amount,
x_fee_cal_type,
x_fee_ci_sequence_number,
x_fee_type_invoice_amount,
x_creation_date,
x_created_by,
x_last_update_date,
x_last_updated_by,
x_last_update_login,
x_release_credit_id,
x_student_plan_id,
x_last_instlmnt_due_date
);
IF (p_action = 'INSERT') THEN
BeforeInsertUpdate(TRUE,FALSE);
ELSIF (p_action = 'UPDATE') THEN
BeforeInsertUpdate(FALSE,TRUE);
ELSIF (p_action = 'VALIDATE_INSERT') THEN
-- Call all the procedures related to Before Insert.
IF ( get_pk_for_validation (
new_references.person_id,
new_references.hold_type,
new_references.hold_start_dt
)
) THEN
fnd_message.set_name('IGS','IGS_GE_RECORD_ALREADY_EXISTS');
PROCEDURE insert_row (
x_rowid IN OUT NOCOPY VARCHAR2,
x_person_id IN NUMBER,
x_hold_plan_name IN VARCHAR2,
x_hold_type IN VARCHAR2,
x_hold_start_dt IN DATE,
x_process_start_dt IN DATE,
x_process_end_dt IN DATE,
x_offset_days IN NUMBER,
x_past_due_amount IN NUMBER,
x_fee_cal_type IN VARCHAR2,
x_fee_ci_sequence_number IN NUMBER,
x_fee_type_invoice_amount IN NUMBER,
x_mode IN VARCHAR2,
x_release_credit_id IN NUMBER,
x_student_plan_id IN NUMBER,
x_last_instlmnt_due_date IN DATE
) AS
/*
|| Created By : [email protected]
|| Created On : 29-NOV-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)
*/
CURSOR c IS
SELECT rowid
FROM igs_fi_person_holds
WHERE person_id = x_person_id
AND hold_type = x_hold_type
AND hold_start_dt = x_hold_start_dt;
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;
p_action => 'INSERT',
x_rowid => x_rowid,
x_person_id => x_person_id,
x_hold_plan_name => x_hold_plan_name,
x_hold_type => x_hold_type,
x_hold_start_dt => x_hold_start_dt,
x_process_start_dt => x_process_start_dt,
x_process_end_dt => x_process_end_dt,
x_offset_days => x_offset_days,
x_past_due_amount => x_past_due_amount,
x_fee_cal_type => x_fee_cal_type,
x_fee_ci_sequence_number => x_fee_ci_sequence_number,
x_fee_type_invoice_amount => x_fee_type_invoice_amount,
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_release_credit_id => x_release_credit_id,
x_student_plan_id => x_student_plan_id,
x_last_instlmnt_due_date => x_last_instlmnt_due_date
);
INSERT INTO igs_fi_person_holds (
person_id,
hold_plan_name,
hold_type,
hold_start_dt,
process_start_dt,
process_end_dt,
offset_days,
past_due_amount,
fee_cal_type,
fee_ci_sequence_number,
fee_type_invoice_amount,
creation_date,
created_by,
last_update_date,
last_updated_by,
last_update_login,
request_id,
program_id,
program_application_id,
program_update_date,
release_credit_id,
student_plan_id ,
last_instlmnt_due_date
) VALUES (
new_references.person_id,
new_references.hold_plan_name,
new_references.hold_type,
new_references.hold_start_dt,
new_references.process_start_dt,
new_references.process_end_dt,
new_references.offset_days,
new_references.past_due_amount,
new_references.fee_cal_type,
new_references.fee_ci_sequence_number,
new_references.fee_type_invoice_amount,
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,
new_references.release_credit_id,
new_references.student_plan_id ,
new_references.last_instlmnt_due_date
);
END insert_row;
SELECT
hold_plan_name,
process_start_dt,
process_end_dt,
offset_days,
past_due_amount,
fee_cal_type,
fee_ci_sequence_number,
fee_type_invoice_amount,
release_credit_id,
student_plan_id ,
last_instlmnt_due_date
FROM igs_fi_person_holds
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_hold_plan_name IN VARCHAR2,
x_hold_type IN VARCHAR2,
x_hold_start_dt IN DATE,
x_process_start_dt IN DATE,
x_process_end_dt IN DATE,
x_offset_days IN NUMBER,
x_past_due_amount IN NUMBER,
x_fee_cal_type IN VARCHAR2,
x_fee_ci_sequence_number IN NUMBER,
x_fee_type_invoice_amount IN NUMBER,
x_mode IN VARCHAR2,
x_release_credit_id IN NUMBER,
x_student_plan_id IN NUMBER,
x_last_instlmnt_due_date IN DATE
) AS
/*
|| Created By : [email protected]
|| Created On : 29-NOV-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_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_person_id => x_person_id,
x_hold_plan_name => x_hold_plan_name,
x_hold_type => x_hold_type,
x_hold_start_dt => x_hold_start_dt,
x_process_start_dt => x_process_start_dt,
x_process_end_dt => x_process_end_dt,
x_offset_days => x_offset_days,
x_past_due_amount => x_past_due_amount,
x_fee_cal_type => x_fee_cal_type,
x_fee_ci_sequence_number => x_fee_ci_sequence_number,
x_fee_type_invoice_amount => x_fee_type_invoice_amount,
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_release_credit_id => x_release_credit_id,
x_student_plan_id => x_student_plan_id,
x_last_instlmnt_due_date => x_last_instlmnt_due_date
);
x_program_update_date := old_references.program_update_date;
x_program_update_date := SYSDATE;
UPDATE igs_fi_person_holds
SET
hold_plan_name = new_references.hold_plan_name,
process_start_dt = new_references.process_start_dt,
process_end_dt = new_references.process_end_dt,
offset_days = new_references.offset_days,
past_due_amount = new_references.past_due_amount,
fee_cal_type = new_references.fee_cal_type,
fee_ci_sequence_number = new_references.fee_ci_sequence_number,
fee_type_invoice_amount = new_references.fee_type_invoice_amount,
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,
release_credit_id = new_references.release_credit_id,
student_plan_id = new_references.student_plan_id,
last_instlmnt_due_date = new_references.last_instlmnt_due_date
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_fi_person_holds
WHERE person_id = x_person_id
AND hold_type = x_hold_type
AND hold_start_dt = x_hold_start_dt;
insert_row (
x_rowid,
x_person_id,
x_hold_plan_name,
x_hold_type,
x_hold_start_dt,
x_process_start_dt,
x_process_end_dt,
x_offset_days,
x_past_due_amount,
x_fee_cal_type,
x_fee_ci_sequence_number,
x_fee_type_invoice_amount,
x_mode,
x_release_credit_id,
x_student_plan_id ,
x_last_instlmnt_due_date
);
update_row (
x_rowid,
x_person_id,
x_hold_plan_name,
x_hold_type,
x_hold_start_dt,
x_process_start_dt,
x_process_end_dt,
x_offset_days,
x_past_due_amount,
x_fee_cal_type,
x_fee_ci_sequence_number,
x_fee_type_invoice_amount,
x_mode,
x_release_credit_id,
x_student_plan_id ,
x_last_instlmnt_due_date
);
PROCEDURE delete_row (
x_rowid IN VARCHAR2
) AS
/*
|| Created By : [email protected]
|| Created On : 29-NOV-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_fi_person_holds
WHERE rowid = x_rowid;
END delete_row;