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 : 01-MAY-2005
|| 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_1098t_data
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 'x'
FROM hz_parties
WHERE party_id = cp_party_id;
fnd_message.set_name ('FND', 'FORM_RECORD_DELETED');
fnd_message.set_name ('FND', 'FORM_RECORD_DELETED');
SELECT rowid
FROM igs_fi_1098t_data
WHERE stu_1098t_id = x_stu_1098t_id
FOR UPDATE NOWAIT;
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 : 01-MAY-2005
|| 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_object_version_number,
x_stu_1098t_id,
x_tax_year_name,
x_party_id,
x_extract_date,
x_party_name,
x_taxid,
x_stu_name_control,
x_country,
x_address1,
x_address2,
x_refund_amt,
x_half_time_flag,
x_grad_flag,
x_special_data_entry,
x_status_code,
x_error_code,
x_file_name,
x_irs_filed_flag,
x_correction_flag,
x_correction_type_code,
x_stmnt_print_flag,
x_override_flag,
x_address3,
x_address4,
x_city,
x_postal_code,
x_state,
x_province,
x_county,
x_delivery_point_code,
x_payment_amt,
x_billed_amt,
x_adj_amt,
x_fin_aid_amt,
x_fin_aid_adj_amt,
x_next_acad_flag,
x_batch_id,
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.stu_1098t_id
)
) 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.stu_1098t_id
)
) 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_stu_1098t_id IN OUT NOCOPY NUMBER,
x_tax_year_name IN VARCHAR2,
x_party_id IN NUMBER,
x_extract_date IN DATE,
x_party_name IN VARCHAR2,
x_taxid IN VARCHAR2,
x_stu_name_control IN VARCHAR2,
x_country IN VARCHAR2,
x_address1 IN VARCHAR2,
x_address2 IN VARCHAR2,
x_refund_amt IN NUMBER,
x_half_time_flag IN VARCHAR2,
x_grad_flag IN VARCHAR2,
x_special_data_entry IN VARCHAR2,
x_status_code IN VARCHAR2,
x_error_code IN VARCHAR2,
x_file_name IN VARCHAR2,
x_irs_filed_flag IN VARCHAR2,
x_correction_flag IN VARCHAR2,
x_correction_type_code IN VARCHAR2,
x_stmnt_print_flag IN VARCHAR2,
x_override_flag IN VARCHAR2,
x_address3 IN VARCHAR2,
x_address4 IN VARCHAR2,
x_city IN VARCHAR2,
x_postal_code IN VARCHAR2,
x_state IN VARCHAR2,
x_province IN VARCHAR2,
x_county IN VARCHAR2,
x_delivery_point_code IN VARCHAR2,
x_payment_amt IN NUMBER,
x_billed_amt IN NUMBER,
x_adj_amt IN NUMBER,
x_fin_aid_amt IN NUMBER,
x_fin_aid_adj_amt IN NUMBER,
x_next_acad_flag IN VARCHAR2,
x_batch_id IN NUMBER,
x_mode IN VARCHAR2
) AS
/*
|| Created By : [email protected]
|| Created On : 01-MAY-2005
|| 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_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_1098T_DATA_PKG.INSERT_ROW');
p_action => 'INSERT',
x_rowid => x_rowid,
x_object_version_number => 1,
x_stu_1098t_id => x_stu_1098t_id,
x_tax_year_name => x_tax_year_name,
x_party_id => x_party_id,
x_extract_date => x_extract_date,
x_party_name => x_party_name,
x_taxid => x_taxid,
x_stu_name_control => x_stu_name_control,
x_country => x_country,
x_address1 => x_address1,
x_address2 => x_address2,
x_refund_amt => x_refund_amt,
x_half_time_flag => x_half_time_flag,
x_grad_flag => x_grad_flag,
x_special_data_entry => x_special_data_entry,
x_status_code => x_status_code,
x_error_code => x_error_code,
x_file_name => x_file_name,
x_irs_filed_flag => x_irs_filed_flag,
x_correction_flag => x_correction_flag,
x_correction_type_code => x_correction_type_code,
x_stmnt_print_flag => x_stmnt_print_flag,
x_override_flag => x_override_flag,
x_address3 => x_address3,
x_address4 => x_address4,
x_city => x_city,
x_postal_code => x_postal_code,
x_state => x_state,
x_province => x_province,
x_county => x_county,
x_delivery_point_code => x_delivery_point_code,
x_payment_amt => x_payment_amt,
x_billed_amt => x_billed_amt,
x_adj_amt => x_adj_amt,
x_fin_aid_amt => x_fin_aid_amt,
x_fin_aid_adj_amt => x_fin_aid_adj_amt,
x_next_acad_flag => x_next_acad_flag,
x_batch_id => x_batch_id,
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_fi_1098t_data (
object_version_number,
stu_1098t_id,
tax_year_name,
party_id,
extract_date,
party_name,
taxid,
stu_name_control,
country,
address1,
address2,
refund_amt,
half_time_flag,
grad_flag,
special_data_entry,
status_code,
error_code,
file_name,
irs_filed_flag,
correction_flag,
correction_type_code,
stmnt_print_flag,
override_flag,
address3,
address4,
city,
postal_code,
state,
province,
county,
delivery_point_code,
payment_amt,
billed_amt,
adj_amt,
fin_aid_amt,
fin_aid_adj_amt,
next_acad_flag,
batch_id,
creation_date,
created_by,
last_update_date,
last_updated_by,
last_update_login,
request_id,
program_id,
program_application_id,
program_update_date
) VALUES (
new_references.object_version_number,
igs_fi_1098t_data_s.NEXTVAL,
new_references.tax_year_name,
new_references.party_id,
new_references.extract_date,
new_references.party_name,
new_references.taxid,
new_references.stu_name_control,
new_references.country,
new_references.address1,
new_references.address2,
new_references.refund_amt,
new_references.half_time_flag,
new_references.grad_flag,
new_references.special_data_entry,
new_references.status_code,
new_references.error_code,
new_references.file_name,
new_references.irs_filed_flag,
new_references.correction_flag,
new_references.correction_type_code,
new_references.stmnt_print_flag,
new_references.override_flag,
new_references.address3,
new_references.address4,
new_references.city,
new_references.postal_code,
new_references.state,
new_references.province,
new_references.county,
new_references.delivery_point_code,
new_references.payment_amt,
new_references.billed_amt,
new_references.adj_amt,
new_references.fin_aid_amt,
new_references.fin_aid_adj_amt,
new_references.next_acad_flag,
new_references.batch_id,
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
) RETURNING ROWID, stu_1098t_id INTO x_rowid, x_stu_1098t_id;
END insert_row;
SELECT
object_version_number,
tax_year_name,
party_id,
extract_date,
party_name,
taxid,
stu_name_control,
country,
address1,
address2,
refund_amt,
half_time_flag,
grad_flag,
special_data_entry,
status_code,
error_code,
file_name,
irs_filed_flag,
correction_flag,
correction_type_code,
stmnt_print_flag,
override_flag,
address3,
address4,
city,
postal_code,
state,
province,
county,
delivery_point_code,
payment_amt,
billed_amt,
adj_amt,
fin_aid_amt,
fin_aid_adj_amt,
next_acad_flag,
batch_id
FROM igs_fi_1098t_data
WHERE rowid = x_rowid
FOR UPDATE NOWAIT;
fnd_message.set_name('FND', 'FORM_RECORD_DELETED');
PROCEDURE update_row (
x_rowid IN VARCHAR2,
x_stu_1098t_id IN NUMBER,
x_tax_year_name IN VARCHAR2,
x_party_id IN NUMBER,
x_extract_date IN DATE,
x_party_name IN VARCHAR2,
x_taxid IN VARCHAR2,
x_stu_name_control IN VARCHAR2,
x_country IN VARCHAR2,
x_address1 IN VARCHAR2,
x_address2 IN VARCHAR2,
x_refund_amt IN NUMBER,
x_half_time_flag IN VARCHAR2,
x_grad_flag IN VARCHAR2,
x_special_data_entry IN VARCHAR2,
x_status_code IN VARCHAR2,
x_error_code IN VARCHAR2,
x_file_name IN VARCHAR2,
x_irs_filed_flag IN VARCHAR2,
x_correction_flag IN VARCHAR2,
x_correction_type_code IN VARCHAR2,
x_stmnt_print_flag IN VARCHAR2,
x_override_flag IN VARCHAR2,
x_address3 IN VARCHAR2,
x_address4 IN VARCHAR2,
x_city IN VARCHAR2,
x_postal_code IN VARCHAR2,
x_state IN VARCHAR2,
x_province IN VARCHAR2,
x_county IN VARCHAR2,
x_delivery_point_code IN VARCHAR2,
x_payment_amt IN NUMBER,
x_billed_amt IN NUMBER,
x_adj_amt IN NUMBER,
x_fin_aid_amt IN NUMBER,
x_fin_aid_adj_amt IN NUMBER,
x_next_acad_flag IN VARCHAR2,
x_batch_id IN NUMBER,
x_mode IN VARCHAR2
) AS
/*
|| Created By : [email protected]
|| Created On : 01-MAY-2005
|| 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;
SELECT object_version_number
FROM igs_fi_1098t_data
WHERE rowid = cp_rowid
FOR UPDATE NOWAIT;
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_1098T_DATA_PKG.UPDATE_ROW');
p_action => 'UPDATE',
x_rowid => x_rowid,
x_object_version_number => l_n_object_version_number,
x_stu_1098t_id => x_stu_1098t_id,
x_tax_year_name => x_tax_year_name,
x_party_id => x_party_id,
x_extract_date => x_extract_date,
x_party_name => x_party_name,
x_taxid => x_taxid,
x_stu_name_control => x_stu_name_control,
x_country => x_country,
x_address1 => x_address1,
x_address2 => x_address2,
x_refund_amt => x_refund_amt,
x_half_time_flag => x_half_time_flag,
x_grad_flag => x_grad_flag,
x_special_data_entry => x_special_data_entry,
x_status_code => x_status_code,
x_error_code => x_error_code,
x_file_name => x_file_name,
x_irs_filed_flag => x_irs_filed_flag,
x_correction_flag => x_correction_flag,
x_correction_type_code => x_correction_type_code,
x_stmnt_print_flag => x_stmnt_print_flag,
x_override_flag => x_override_flag,
x_address3 => x_address3,
x_address4 => x_address4,
x_city => x_city,
x_postal_code => x_postal_code,
x_state => x_state,
x_province => x_province,
x_county => x_county,
x_delivery_point_code => x_delivery_point_code,
x_payment_amt => x_payment_amt,
x_billed_amt => x_billed_amt,
x_adj_amt => x_adj_amt,
x_fin_aid_amt => x_fin_aid_amt,
x_fin_aid_adj_amt => x_fin_aid_adj_amt,
x_next_acad_flag => x_next_acad_flag,
x_batch_id => x_batch_id,
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_program_update_date := old_references.program_update_date;
x_program_update_date := SYSDATE;
UPDATE igs_fi_1098t_data
SET
object_version_number = new_references.object_version_number,
tax_year_name = new_references.tax_year_name,
party_id = new_references.party_id,
extract_date = new_references.extract_date,
party_name = new_references.party_name,
taxid = new_references.taxid,
stu_name_control = new_references.stu_name_control,
country = new_references.country,
address1 = new_references.address1,
address2 = new_references.address2,
refund_amt = new_references.refund_amt,
half_time_flag = new_references.half_time_flag,
grad_flag = new_references.grad_flag,
special_data_entry = new_references.special_data_entry,
status_code = new_references.status_code,
error_code = new_references.error_code,
file_name = new_references.file_name,
irs_filed_flag = new_references.irs_filed_flag,
correction_flag = new_references.correction_flag,
correction_type_code = new_references.correction_type_code,
stmnt_print_flag = new_references.stmnt_print_flag,
override_flag = new_references.override_flag,
address3 = new_references.address3,
address4 = new_references.address4,
city = new_references.city,
postal_code = new_references.postal_code,
state = new_references.state,
province = new_references.province,
county = new_references.county,
delivery_point_code = new_references.delivery_point_code,
payment_amt = new_references.payment_amt,
billed_amt = new_references.billed_amt,
adj_amt = new_references.adj_amt,
fin_aid_amt = new_references.fin_aid_amt,
fin_aid_adj_amt = new_references.fin_aid_adj_amt,
next_acad_flag = new_references.next_acad_flag,
batch_id = new_references.batch_id,
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
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_1098t_data
WHERE stu_1098t_id = x_stu_1098t_id;
insert_row (
x_rowid,
x_stu_1098t_id,
x_tax_year_name,
x_party_id,
x_extract_date,
x_party_name,
x_taxid,
x_stu_name_control,
x_country,
x_address1,
x_address2,
x_refund_amt,
x_half_time_flag,
x_grad_flag,
x_special_data_entry,
x_status_code,
x_error_code,
x_file_name,
x_irs_filed_flag,
x_correction_flag,
x_correction_type_code,
x_stmnt_print_flag,
x_override_flag,
x_address3,
x_address4,
x_city,
x_postal_code,
x_state,
x_province,
x_county,
x_delivery_point_code,
x_payment_amt,
x_billed_amt,
x_adj_amt,
x_fin_aid_amt,
x_fin_aid_adj_amt,
x_next_acad_flag,
x_batch_id,
x_mode
);
update_row (
x_rowid,
x_stu_1098t_id,
x_tax_year_name,
x_party_id,
x_extract_date,
x_party_name,
x_taxid,
x_stu_name_control,
x_country,
x_address1,
x_address2,
x_refund_amt,
x_half_time_flag,
x_grad_flag,
x_special_data_entry,
x_status_code,
x_error_code,
x_file_name,
x_irs_filed_flag,
x_correction_flag,
x_correction_type_code,
x_stmnt_print_flag,
x_override_flag,
x_address3,
x_address4,
x_city,
x_postal_code,
x_state,
x_province,
x_county,
x_delivery_point_code,
x_payment_amt,
x_billed_amt,
x_adj_amt,
x_fin_aid_amt,
x_fin_aid_adj_amt,
x_next_acad_flag,
x_batch_id,
x_mode
);
PROCEDURE delete_row (
x_rowid IN VARCHAR2
) AS
/*
|| Created By : [email protected]
|| Created On : 01-MAY-2005
|| 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_1098t_data
WHERE rowid = x_rowid;
END delete_row;