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_student_party_id IN NUMBER,
x_source_invoice_id IN NUMBER
) AS
/*
|| Created By : [email protected]
|| Created On : 21-APR-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)
|| pathipat 22-Apr-2004 Enh 3558549 - FI224 - Comm Rec Enhancements
|| Added 2 new columns student_party_id and source_invoice_id
*/
CURSOR cur_old_ref_values IS
SELECT *
FROM igs_fi_com_recs_int
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;
SELECT rowid
FROM igs_fi_com_recs_int
WHERE transaction_category = x_transaction_category
AND transaction_header_id = x_transaction_header_id
FOR UPDATE NOWAIT;
x_last_update_date IN DATE,
x_last_updated_by IN NUMBER,
x_last_update_login IN NUMBER,
x_student_party_id IN NUMBER,
x_source_invoice_id IN NUMBER
) AS
/*
|| Created By : [email protected]
|| Created On : 21-APR-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)
|| pathipat 22-Apr-2004 Enh 3558549 - FI224 - Comm Rec Enhancements
|| Added 2 new columns student_party_id and source_invoice_id
*/
BEGIN
set_column_values (
p_action,
x_rowid,
x_transaction_category,
x_transaction_header_id,
x_transaction_number,
x_party_id,
x_transaction_date,
x_effective_date,
x_fee_type,
x_s_fee_type,
x_fee_cal_type,
x_fee_ci_sequence_number,
x_fee_category,
x_course_cd,
x_attendance_mode,
x_attendance_type,
x_course_description,
x_reversal_flag,
x_reversal_reason,
x_line_number,
x_transaction_line_id,
x_charge_method_type,
x_description,
x_charge_elements,
x_amount,
x_credit_points,
x_unit_offering_option_id,
x_cr_gl_code_combination_id,
x_dr_gl_code_combination_id,
x_credit_account_code,
x_debit_account_code,
x_org_unit_cd,
x_location_cd,
x_gl_date,
x_credit_type_id,
x_credit_class,
x_currency_cd,
x_extract_flag,
x_creation_date,
x_created_by,
x_last_update_date,
x_last_updated_by,
x_last_update_login,
x_student_party_id,
x_source_invoice_id
);
IF (p_action = 'INSERT') THEN
-- Call all the procedures related to Before Insert.
IF ( get_pk_for_validation(
new_references.transaction_category,
new_references.transaction_header_id
)
) THEN
fnd_message.set_name('IGS','IGS_GE_RECORD_ALREADY_EXISTS');
ELSIF (p_action = 'VALIDATE_INSERT') THEN
-- Call all the procedures related to Before Insert.
IF ( get_pk_for_validation (
new_references.transaction_category,
new_references.transaction_header_id
)
) THEN
fnd_message.set_name('IGS','IGS_GE_RECORD_ALREADY_EXISTS');
PROCEDURE insert_row (
x_rowid IN OUT NOCOPY VARCHAR2,
x_transaction_category IN VARCHAR2,
x_transaction_header_id IN NUMBER,
x_transaction_number IN VARCHAR2,
x_party_id IN NUMBER,
x_transaction_date IN DATE,
x_effective_date IN DATE,
x_fee_type IN VARCHAR2,
x_s_fee_type IN VARCHAR2,
x_fee_cal_type IN VARCHAR2,
x_fee_ci_sequence_number IN NUMBER,
x_fee_category IN VARCHAR2,
x_course_cd IN VARCHAR2,
x_attendance_mode IN VARCHAR2,
x_attendance_type IN VARCHAR2,
x_course_description IN VARCHAR2,
x_reversal_flag IN VARCHAR2,
x_reversal_reason IN VARCHAR2,
x_line_number IN NUMBER,
x_transaction_line_id IN NUMBER,
x_charge_method_type IN VARCHAR2,
x_description IN VARCHAR2,
x_charge_elements IN NUMBER,
x_amount IN NUMBER,
x_credit_points IN NUMBER,
x_unit_offering_option_id IN NUMBER,
x_cr_gl_code_combination_id IN NUMBER,
x_dr_gl_code_combination_id IN NUMBER,
x_credit_account_code IN VARCHAR2,
x_debit_account_code IN VARCHAR2,
x_org_unit_cd IN VARCHAR2,
x_location_cd IN VARCHAR2,
x_gl_date IN DATE,
x_credit_type_id IN NUMBER,
x_credit_class IN VARCHAR2,
x_currency_cd IN VARCHAR2,
x_extract_flag IN VARCHAR2,
x_mode IN VARCHAR2,
x_student_party_id IN NUMBER,
x_source_invoice_id IN NUMBER
) AS
/*
|| Created By : [email protected]
|| Created On : 21-APR-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)
|| pathipat 22-Apr-2004 Enh 3558549 - FI224 - Comm Rec Enhancements
|| Added 2 new columns student_party_id and source_invoice_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;
fnd_message.set_token ('ROUTINE', 'IGS_FI_COM_RECS_INT_PKG.INSERT_ROW');
p_action => 'INSERT',
x_rowid => x_rowid,
x_transaction_category => x_transaction_category,
x_transaction_header_id => x_transaction_header_id,
x_transaction_number => x_transaction_number,
x_party_id => x_party_id,
x_transaction_date => x_transaction_date,
x_effective_date => x_effective_date,
x_fee_type => x_fee_type,
x_s_fee_type => x_s_fee_type,
x_fee_cal_type => x_fee_cal_type,
x_fee_ci_sequence_number => x_fee_ci_sequence_number,
x_fee_category => x_fee_category,
x_course_cd => x_course_cd,
x_attendance_mode => x_attendance_mode,
x_attendance_type => x_attendance_type,
x_course_description => x_course_description,
x_reversal_flag => x_reversal_flag,
x_reversal_reason => x_reversal_reason,
x_line_number => x_line_number,
x_transaction_line_id => x_transaction_line_id,
x_charge_method_type => x_charge_method_type,
x_description => x_description,
x_charge_elements => x_charge_elements,
x_amount => x_amount,
x_credit_points => x_credit_points,
x_unit_offering_option_id => x_unit_offering_option_id,
x_cr_gl_code_combination_id => x_cr_gl_code_combination_id,
x_dr_gl_code_combination_id => x_dr_gl_code_combination_id,
x_credit_account_code => x_credit_account_code,
x_debit_account_code => x_debit_account_code,
x_org_unit_cd => x_org_unit_cd,
x_location_cd => x_location_cd,
x_gl_date => x_gl_date,
x_credit_type_id => x_credit_type_id,
x_credit_class => x_credit_class,
x_currency_cd => x_currency_cd,
x_extract_flag => x_extract_flag,
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_student_party_id => x_student_party_id,
x_source_invoice_id => x_source_invoice_id
);
INSERT INTO igs_fi_com_recs_int (
transaction_category,
transaction_header_id,
transaction_number,
party_id,
transaction_date,
effective_date,
fee_type,
s_fee_type,
fee_cal_type,
fee_ci_sequence_number,
fee_category,
course_cd,
attendance_mode,
attendance_type,
course_description,
reversal_flag,
reversal_reason,
line_number,
transaction_line_id,
charge_method_type,
description,
charge_elements,
amount,
credit_points,
unit_offering_option_id,
credit_gl_code_combination_id,
debit_gl_code_combination_id,
credit_account_code,
debit_account_code,
org_unit_cd,
location_cd,
gl_date,
credit_type_id,
credit_class,
currency_cd,
extract_flag,
creation_date,
created_by,
last_update_date,
last_updated_by,
last_update_login,
request_id,
program_id,
program_application_id,
program_update_date,
student_party_id,
source_invoice_id
) VALUES (
new_references.transaction_category,
new_references.transaction_header_id,
new_references.transaction_number,
new_references.party_id,
new_references.transaction_date,
new_references.effective_date,
new_references.fee_type,
new_references.s_fee_type,
new_references.fee_cal_type,
new_references.fee_ci_sequence_number,
new_references.fee_category,
new_references.course_cd,
new_references.attendance_mode,
new_references.attendance_type,
new_references.course_description,
new_references.reversal_flag,
new_references.reversal_reason,
new_references.line_number,
new_references.transaction_line_id,
new_references.charge_method_type,
new_references.description,
new_references.charge_elements,
new_references.amount,
new_references.credit_points,
new_references.unit_offering_option_id,
new_references.credit_gl_code_combination_id,
new_references.debit_gl_code_combination_id,
new_references.credit_account_code,
new_references.debit_account_code,
new_references.org_unit_cd,
new_references.location_cd,
new_references.gl_date,
new_references.credit_type_id,
new_references.credit_class,
new_references.currency_cd,
new_references.extract_flag,
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.student_party_id,
new_references.source_invoice_id
) RETURNING ROWID INTO x_rowid;
END insert_row;
SELECT
transaction_number,
party_id,
transaction_date,
effective_date,
fee_type,
s_fee_type,
fee_cal_type,
fee_ci_sequence_number,
fee_category,
course_cd,
attendance_mode,
attendance_type,
course_description,
reversal_flag,
reversal_reason,
line_number,
transaction_line_id,
charge_method_type,
description,
charge_elements,
amount,
credit_points,
unit_offering_option_id,
credit_gl_code_combination_id,
debit_gl_code_combination_id,
credit_account_code,
debit_account_code,
org_unit_cd,
location_cd,
gl_date,
credit_type_id,
credit_class,
currency_cd,
extract_flag,
student_party_id,
source_invoice_id
FROM igs_fi_com_recs_int
WHERE rowid = x_rowid
FOR UPDATE NOWAIT;
fnd_message.set_name('FND', 'FORM_RECORD_DELETED');
PROCEDURE update_row (
x_rowid IN VARCHAR2,
x_transaction_category IN VARCHAR2,
x_transaction_header_id IN NUMBER,
x_transaction_number IN VARCHAR2,
x_party_id IN NUMBER,
x_transaction_date IN DATE,
x_effective_date IN DATE,
x_fee_type IN VARCHAR2,
x_s_fee_type IN VARCHAR2,
x_fee_cal_type IN VARCHAR2,
x_fee_ci_sequence_number IN NUMBER,
x_fee_category IN VARCHAR2,
x_course_cd IN VARCHAR2,
x_attendance_mode IN VARCHAR2,
x_attendance_type IN VARCHAR2,
x_course_description IN VARCHAR2,
x_reversal_flag IN VARCHAR2,
x_reversal_reason IN VARCHAR2,
x_line_number IN NUMBER,
x_transaction_line_id IN NUMBER,
x_charge_method_type IN VARCHAR2,
x_description IN VARCHAR2,
x_charge_elements IN NUMBER,
x_amount IN NUMBER,
x_credit_points IN NUMBER,
x_unit_offering_option_id IN NUMBER,
x_cr_gl_code_combination_id IN NUMBER,
x_dr_gl_code_combination_id IN NUMBER,
x_credit_account_code IN VARCHAR2,
x_debit_account_code IN VARCHAR2,
x_org_unit_cd IN VARCHAR2,
x_location_cd IN VARCHAR2,
x_gl_date IN DATE,
x_credit_type_id IN NUMBER,
x_credit_class IN VARCHAR2,
x_currency_cd IN VARCHAR2,
x_extract_flag IN VARCHAR2,
x_mode IN VARCHAR2 ,
x_student_party_id IN NUMBER,
x_source_invoice_id IN NUMBER
) AS
/*
|| Created By : [email protected]
|| Created On : 21-APR-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)
|| pathipat 22-Apr-2004 Enh 3558549 - FI224 - Comm Rec Enhancements
|| Added 2 new columns student_party_id and source_invoice_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;
fnd_message.set_token ('ROUTINE', 'IGS_FI_COM_RECS_INT_PKG.UPDATE_ROW');
p_action => 'UPDATE',
x_rowid => x_rowid,
x_transaction_category => x_transaction_category,
x_transaction_header_id => x_transaction_header_id,
x_transaction_number => x_transaction_number,
x_party_id => x_party_id,
x_transaction_date => x_transaction_date,
x_effective_date => x_effective_date,
x_fee_type => x_fee_type,
x_s_fee_type => x_s_fee_type,
x_fee_cal_type => x_fee_cal_type,
x_fee_ci_sequence_number => x_fee_ci_sequence_number,
x_fee_category => x_fee_category,
x_course_cd => x_course_cd,
x_attendance_mode => x_attendance_mode,
x_attendance_type => x_attendance_type,
x_course_description => x_course_description,
x_reversal_flag => x_reversal_flag,
x_reversal_reason => x_reversal_reason,
x_line_number => x_line_number,
x_transaction_line_id => x_transaction_line_id,
x_charge_method_type => x_charge_method_type,
x_description => x_description,
x_charge_elements => x_charge_elements,
x_amount => x_amount,
x_credit_points => x_credit_points,
x_unit_offering_option_id => x_unit_offering_option_id,
x_cr_gl_code_combination_id => x_cr_gl_code_combination_id,
x_dr_gl_code_combination_id => x_dr_gl_code_combination_id,
x_credit_account_code => x_credit_account_code,
x_debit_account_code => x_debit_account_code,
x_org_unit_cd => x_org_unit_cd,
x_location_cd => x_location_cd,
x_gl_date => x_gl_date,
x_credit_type_id => x_credit_type_id,
x_credit_class => x_credit_class,
x_currency_cd => x_currency_cd,
x_extract_flag => x_extract_flag,
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_student_party_id => x_student_party_id,
x_source_invoice_id => x_source_invoice_id
);
x_program_update_date := old_references.program_update_date;
x_program_update_date := SYSDATE;
UPDATE igs_fi_com_recs_int
SET
transaction_number = new_references.transaction_number,
party_id = new_references.party_id,
transaction_date = new_references.transaction_date,
effective_date = new_references.effective_date,
fee_type = new_references.fee_type,
s_fee_type = new_references.s_fee_type,
fee_cal_type = new_references.fee_cal_type,
fee_ci_sequence_number = new_references.fee_ci_sequence_number,
fee_category = new_references.fee_category,
course_cd = new_references.course_cd,
attendance_mode = new_references.attendance_mode,
attendance_type = new_references.attendance_type,
course_description = new_references.course_description,
reversal_flag = new_references.reversal_flag,
reversal_reason = new_references.reversal_reason,
line_number = new_references.line_number,
transaction_line_id = new_references.transaction_line_id,
charge_method_type = new_references.charge_method_type,
description = new_references.description,
charge_elements = new_references.charge_elements,
amount = new_references.amount,
credit_points = new_references.credit_points,
unit_offering_option_id = new_references.unit_offering_option_id,
credit_gl_code_combination_id = new_references.credit_gl_code_combination_id,
debit_gl_code_combination_id = new_references.debit_gl_code_combination_id,
credit_account_code = new_references.credit_account_code,
debit_account_code = new_references.debit_account_code,
org_unit_cd = new_references.org_unit_cd,
location_cd = new_references.location_cd,
gl_date = new_references.gl_date,
credit_type_id = new_references.credit_type_id,
credit_class = new_references.credit_class,
currency_cd = new_references.currency_cd,
extract_flag = new_references.extract_flag,
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,
student_party_id = new_references.student_party_id,
source_invoice_id = new_references.source_invoice_id
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)
|| pathipat 22-Apr-2004 Enh 3558549 - FI224 - Comm Rec Enhancements
|| Added 2 new columns student_party_id and source_invoice_id
*/
CURSOR c1 IS
SELECT rowid
FROM igs_fi_com_recs_int
WHERE transaction_category = x_transaction_category
AND transaction_header_id = x_transaction_header_id;
insert_row (
x_rowid,
x_transaction_category,
x_transaction_header_id,
x_transaction_number,
x_party_id,
x_transaction_date,
x_effective_date,
x_fee_type,
x_s_fee_type,
x_fee_cal_type,
x_fee_ci_sequence_number,
x_fee_category,
x_course_cd,
x_attendance_mode,
x_attendance_type,
x_course_description,
x_reversal_flag,
x_reversal_reason,
x_line_number,
x_transaction_line_id,
x_charge_method_type,
x_description,
x_charge_elements,
x_amount,
x_credit_points,
x_unit_offering_option_id,
x_cr_gl_code_combination_id,
x_dr_gl_code_combination_id,
x_credit_account_code,
x_debit_account_code,
x_org_unit_cd,
x_location_cd,
x_gl_date,
x_credit_type_id,
x_credit_class,
x_currency_cd,
x_extract_flag,
x_mode,
x_student_party_id,
x_source_invoice_id
);
update_row (
x_rowid,
x_transaction_category,
x_transaction_header_id,
x_transaction_number,
x_party_id,
x_transaction_date,
x_effective_date,
x_fee_type,
x_s_fee_type,
x_fee_cal_type,
x_fee_ci_sequence_number,
x_fee_category,
x_course_cd,
x_attendance_mode,
x_attendance_type,
x_course_description,
x_reversal_flag,
x_reversal_reason,
x_line_number,
x_transaction_line_id,
x_charge_method_type,
x_description,
x_charge_elements,
x_amount,
x_credit_points,
x_unit_offering_option_id,
x_cr_gl_code_combination_id,
x_dr_gl_code_combination_id,
x_credit_account_code,
x_debit_account_code,
x_org_unit_cd,
x_location_cd,
x_gl_date,
x_credit_type_id,
x_credit_class,
x_currency_cd,
x_extract_flag,
x_mode,
x_student_party_id,
x_source_invoice_id
);
PROCEDURE delete_row (
x_rowid IN VARCHAR2
) AS
/*
|| Created By : [email protected]
|| Created On : 21-APR-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
before_dml (
p_action => 'DELETE',
x_rowid => x_rowid
);
DELETE FROM igs_fi_com_recs_int
WHERE rowid = x_rowid;
END delete_row;