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_est_alt_orig_fee_perct IN NUMBER DEFAULT NULL,
x_est_alt_guarnt_fee_perct IN NUMBER DEFAULT NULL,
x_relationship_cd IN VARCHAR2 DEFAULT NULL,
x_default_flag IN VARCHAR2 DEFAULT NULL,
x_party_id IN NUMBER DEFAULT NULL,
x_plus_processing_type_code IN VARCHAR2 DEFAULT NULL,
x_fund_return_method_code IN VARCHAR2 DEFAULT NULL
) AS
/*
|| Created By : venagara
|| Created On : 02-DEC-2000
|| Purpose : Initialises the Old and New references for the columns of the table.
|| Known limitations, enhancements or remarks :
|| Change History :
|| Who When What
|| veramach 5-SEP-2003 Added x_relationship_code_txt,x_default_flag,x_party_id for the newly added columns
|| (reverse chronological order - newest change first)
*/
CURSOR cur_old_ref_values IS
SELECT *
FROM IGF_SL_CL_SETUP_ALL
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');
SELECT rowid
FROM igf_sl_cl_setup_all
WHERE clset_id = x_clset_id
FOR UPDATE NOWAIT;
SELECT rowid
FROM igf_sl_cl_setup_all
WHERE ci_cal_type = x_ci_cal_type
AND ci_sequence_number = x_ci_sequence_number
AND relationship_cd = x_relationship_cd
AND NVL(party_id,-100) = NVL(x_party_id,-100)
AND ((l_rowid IS NULL) OR (rowid <> l_rowid));
SELECT rowid
FROM igf_sl_cl_setup_all
WHERE ((ci_cal_type = x_cal_type) AND
(ci_sequence_number = x_sequence_number));
SELECT rowid
FROM igf_sl_cl_setup_all
WHERE ((relationship_cd = x_relationship_cd ));
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_est_alt_orig_fee_perct IN NUMBER DEFAULT NULL,
x_est_alt_guarnt_fee_perct IN NUMBER DEFAULT NULL,
x_relationship_cd IN VARCHAR2 DEFAULT NULL,
x_default_flag IN VARCHAR2 DEFAULT NULL,
x_party_id IN NUMBER DEFAULT NULL,
x_plus_processing_type_code IN VARCHAR2 DEFAULT NULL,
x_fund_return_method_code IN VARCHAR2 DEFAULT NULL
) AS
/*
|| Created By : venagara
|| Created On : 02-DEC-2000
|| 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
|| veramach 5-SEP-2003 Added x_relationship_code_txt,x_default_flag,x_party_id for the newly added columns
|| (reverse chronological order - newest change first)
*/
BEGIN
set_column_values (
p_action,
x_rowid,
x_clset_id,
x_ci_cal_type,
x_ci_sequence_number,
x_borw_interest_ind,
x_sch_non_ed_brc_id,
x_lender_id,
x_duns_lender_id,
x_lend_non_ed_brc_id,
x_guarantor_id,
x_duns_guarnt_id,
x_recipient_id,
x_recipient_type,
x_duns_recip_id,
x_recip_non_ed_brc_id,
x_est_orig_fee_perct,
x_est_guarnt_fee_perct,
x_hold_rel_ind,
x_req_serial_loan_code,
x_loan_award_method,
x_prc_type_code,
x_pnote_delivery_code,
x_media_type,
x_eft_authorization,
x_auto_late_disb_ind,
x_cl_version,
x_creation_date,
x_created_by,
x_last_update_date,
x_last_updated_by,
x_last_update_login,
x_est_alt_orig_fee_perct,
x_est_alt_guarnt_fee_perct,
x_relationship_cd ,
x_default_flag,
x_party_id,
x_plus_processing_type_code,
x_fund_return_method_code
);
IF (p_action = 'INSERT') THEN
-- Call all the procedures related to Before Insert.
IF ( get_pk_for_validation(
new_references.clset_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_uniqueness;
ELSIF (p_action = 'VALIDATE_INSERT') THEN
-- Call all the procedures related to Before Insert.
IF ( get_pk_for_validation (
new_references.clset_id
)
) THEN
fnd_message.set_name('IGS','IGS_GE_RECORD_ALREADY_EXISTS');
ELSIF (p_action = 'VALIDATE_UPDATE') THEN
check_uniqueness;
PROCEDURE insert_row (
x_rowid IN OUT NOCOPY VARCHAR2,
x_clset_id IN OUT NOCOPY NUMBER,
x_ci_cal_type IN VARCHAR2,
x_ci_sequence_number IN NUMBER,
x_borw_interest_ind IN VARCHAR2,
x_sch_non_ed_brc_id IN VARCHAR2 DEFAULT NULL,
x_lender_id IN VARCHAR2,
x_duns_lender_id IN VARCHAR2 DEFAULT NULL,
x_lend_non_ed_brc_id IN VARCHAR2,
x_guarantor_id IN VARCHAR2,
x_duns_guarnt_id IN VARCHAR2 DEFAULT NULL,
x_recipient_id IN VARCHAR2,
x_recipient_type IN VARCHAR2,
x_duns_recip_id IN VARCHAR2 DEFAULT NULL,
x_recip_non_ed_brc_id IN VARCHAR2,
x_est_orig_fee_perct IN NUMBER DEFAULT NULL,
x_est_guarnt_fee_perct IN NUMBER DEFAULT NULL,
x_hold_rel_ind IN VARCHAR2,
x_req_serial_loan_code IN VARCHAR2,
x_loan_award_method IN VARCHAR2,
x_prc_type_code IN VARCHAR2,
x_pnote_delivery_code IN VARCHAR2,
x_media_type IN VARCHAR2,
x_eft_authorization IN VARCHAR2,
x_auto_late_disb_ind IN VARCHAR2,
x_cl_version IN VARCHAR2 DEFAULT NULL,
x_mode IN VARCHAR2 DEFAULT 'R',
x_est_alt_orig_fee_perct IN NUMBER DEFAULT NULL,
x_est_alt_guarnt_fee_perct IN NUMBER DEFAULT NULL,
x_relationship_cd IN VARCHAR2 DEFAULT NULL,
x_default_flag IN VARCHAR2 DEFAULT NULL,
x_party_id IN NUMBER DEFAULT NULL,
x_plus_processing_type_code IN VARCHAR2 DEFAULT NULL,
x_fund_return_method_code IN VARCHAR2 DEFAULT NULL
) AS
/*
|| Created By : venagara
|| Created On : 02-DEC-2000
|| Purpose : Handles the INSERT DML logic for the table.
|| Known limitations, enhancements or remarks :
|| Change History :
|| Who When What
|| veramach 5-SEP-2003 Added x_relationship_code_txt,x_default_flag,x_party_id for the newly added columns
|| (reverse chronological order - newest change first)
*/
CURSOR c IS
SELECT rowid
FROM igf_sl_cl_setup_all
WHERE clset_id = x_clset_id;
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;
SELECT igf_sl_cl_setup_s.nextval INTO x_clset_id FROM DUAL;
p_action => 'INSERT',
x_rowid => x_rowid,
x_clset_id => x_clset_id,
x_ci_cal_type => x_ci_cal_type,
x_ci_sequence_number => x_ci_sequence_number,
x_borw_interest_ind => x_borw_interest_ind,
x_sch_non_ed_brc_id => x_sch_non_ed_brc_id,
x_lender_id => x_lender_id,
x_duns_lender_id => x_duns_lender_id,
x_lend_non_ed_brc_id => x_lend_non_ed_brc_id,
x_guarantor_id => x_guarantor_id,
x_duns_guarnt_id => x_duns_guarnt_id,
x_recipient_id => x_recipient_id,
x_recipient_type => x_recipient_type,
x_duns_recip_id => x_duns_recip_id,
x_recip_non_ed_brc_id => x_recip_non_ed_brc_id,
x_est_orig_fee_perct => x_est_orig_fee_perct,
x_est_guarnt_fee_perct => x_est_guarnt_fee_perct,
x_hold_rel_ind => x_hold_rel_ind,
x_req_serial_loan_code => x_req_serial_loan_code,
x_loan_award_method => x_loan_award_method,
x_prc_type_code => x_prc_type_code,
x_pnote_delivery_code => x_pnote_delivery_code,
x_media_type => x_media_type,
x_eft_authorization => x_eft_authorization,
x_auto_late_disb_ind => x_auto_late_disb_ind,
x_cl_version => x_cl_version,
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_est_alt_orig_fee_perct => x_est_alt_orig_fee_perct,
x_est_alt_guarnt_fee_perct => x_est_alt_guarnt_fee_perct,
x_relationship_cd => x_relationship_cd ,
x_default_flag => x_default_flag,
x_party_id => x_party_id,
x_plus_processing_type_code => x_plus_processing_type_code,
x_fund_return_method_code => x_fund_return_method_code
);
INSERT INTO igf_sl_cl_setup_all(
clset_id,
ci_cal_type,
ci_sequence_number,
borw_interest_ind,
est_orig_fee_perct,
est_guarnt_fee_perct,
hold_rel_ind,
req_serial_loan_code,
prc_type_code,
pnote_delivery_code,
eft_authorization,
auto_late_disb_ind,
creation_date,
created_by,
last_update_date,
last_updated_by,
last_update_login,
org_id,
est_alt_orig_fee_perct,
est_alt_guarnt_fee_perct,
relationship_cd ,
default_flag,
party_id,
cl_version,
plus_processing_type_code,
fund_return_method_code
) VALUES (
new_references.clset_id,
new_references.ci_cal_type,
new_references.ci_sequence_number,
new_references.borw_interest_ind,
new_references.est_orig_fee_perct,
new_references.est_guarnt_fee_perct,
new_references.hold_rel_ind,
new_references.req_serial_loan_code,
new_references.prc_type_code,
new_references.pnote_delivery_code,
new_references.eft_authorization,
new_references.auto_late_disb_ind,
x_last_update_date,
x_last_updated_by,
x_last_update_date,
x_last_updated_by,
x_last_update_login ,
l_org_id,
new_references.est_alt_orig_fee_perct,
new_references.est_alt_guarnt_fee_perct,
new_references.relationship_cd ,
new_references.default_flag,
new_references.party_id,
new_references.cl_version,
new_references.plus_processing_type_code,
new_references.fund_return_method_code
);
END insert_row;
SELECT
ci_cal_type,
ci_sequence_number,
borw_interest_ind,
est_orig_fee_perct,
est_guarnt_fee_perct,
hold_rel_ind,
req_serial_loan_code,
prc_type_code,
pnote_delivery_code,
eft_authorization,
auto_late_disb_ind,
org_id,
est_alt_orig_fee_perct,
est_alt_guarnt_fee_perct,
relationship_cd ,
default_flag,
party_id,
cl_version,
plus_processing_type_code,
fund_return_method_code
FROM igf_sl_cl_setup_all
WHERE rowid = x_rowid
FOR UPDATE NOWAIT;
fnd_message.set_name('FND', 'FORM_RECORD_DELETED');
PROCEDURE update_row (
x_rowid IN VARCHAR2,
x_clset_id IN NUMBER,
x_ci_cal_type IN VARCHAR2,
x_ci_sequence_number IN NUMBER,
x_borw_interest_ind IN VARCHAR2,
x_sch_non_ed_brc_id IN VARCHAR2 DEFAULT NULL,
x_lender_id IN VARCHAR2,
x_duns_lender_id IN VARCHAR2 DEFAULT NULL,
x_lend_non_ed_brc_id IN VARCHAR2,
x_guarantor_id IN VARCHAR2,
x_duns_guarnt_id IN VARCHAR2 DEFAULT NULL,
x_recipient_id IN VARCHAR2,
x_recipient_type IN VARCHAR2,
x_duns_recip_id IN VARCHAR2 DEFAULT NULL,
x_recip_non_ed_brc_id IN VARCHAR2,
x_est_orig_fee_perct IN NUMBER DEFAULT NULL,
x_est_guarnt_fee_perct IN NUMBER DEFAULT NULL,
x_hold_rel_ind IN VARCHAR2,
x_req_serial_loan_code IN VARCHAR2,
x_loan_award_method IN VARCHAR2,
x_prc_type_code IN VARCHAR2,
x_pnote_delivery_code IN VARCHAR2,
x_media_type IN VARCHAR2,
x_eft_authorization IN VARCHAR2,
x_auto_late_disb_ind IN VARCHAR2,
x_cl_version IN VARCHAR2 DEFAULT NULL,
x_mode IN VARCHAR2 DEFAULT 'R',
x_est_alt_orig_fee_perct IN NUMBER DEFAULT NULL,
x_est_alt_guarnt_fee_perct IN NUMBER DEFAULT NULL,
x_relationship_cd IN VARCHAR2 DEFAULT NULL,
x_default_flag IN VARCHAR2 DEFAULT NULL,
x_party_id IN NUMBER DEFAULT NULL,
x_plus_processing_type_code IN VARCHAR2 DEFAULT NULL,
x_fund_return_method_code IN VARCHAR2 DEFAULT NULL
) AS
/*
|| Created By : venagara
|| Created On : 02-DEC-2000
|| Purpose : Handles the UPDATE DML logic for the table.
|| Known limitations, enhancements or remarks :
|| Change History :
|| Who When What
|| veramach 5-SEP-2003 Added x_relationship_code_txt,x_default_flag,x_party_id for the newly added columns
|| (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_clset_id => x_clset_id,
x_ci_cal_type => x_ci_cal_type,
x_ci_sequence_number => x_ci_sequence_number,
x_borw_interest_ind => x_borw_interest_ind,
x_sch_non_ed_brc_id => x_sch_non_ed_brc_id,
x_lender_id => x_lender_id,
x_duns_lender_id => x_duns_lender_id,
x_lend_non_ed_brc_id => x_lend_non_ed_brc_id,
x_guarantor_id => x_guarantor_id,
x_duns_guarnt_id => x_duns_guarnt_id,
x_recipient_id => x_recipient_id,
x_recipient_type => x_recipient_type,
x_duns_recip_id => x_duns_recip_id,
x_recip_non_ed_brc_id => x_recip_non_ed_brc_id,
x_est_orig_fee_perct => x_est_orig_fee_perct,
x_est_guarnt_fee_perct => x_est_guarnt_fee_perct,
x_hold_rel_ind => x_hold_rel_ind,
x_req_serial_loan_code => x_req_serial_loan_code,
x_loan_award_method => x_loan_award_method,
x_prc_type_code => x_prc_type_code,
x_pnote_delivery_code => x_pnote_delivery_code,
x_media_type => x_media_type,
x_eft_authorization => x_eft_authorization,
x_auto_late_disb_ind => x_auto_late_disb_ind,
x_cl_version => x_cl_version,
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_est_alt_orig_fee_perct => x_est_alt_orig_fee_perct,
x_est_alt_guarnt_fee_perct => x_est_alt_guarnt_fee_perct,
x_relationship_cd => x_relationship_cd ,
x_default_flag => x_default_flag,
x_party_id => x_party_id,
x_plus_processing_type_code => x_plus_processing_type_code,
x_fund_return_method_code => x_fund_return_method_code
);
UPDATE igf_sl_cl_setup_all
SET
ci_cal_type = new_references.ci_cal_type,
ci_sequence_number = new_references.ci_sequence_number,
borw_interest_ind = new_references.borw_interest_ind,
est_orig_fee_perct = new_references.est_orig_fee_perct,
est_guarnt_fee_perct = new_references.est_guarnt_fee_perct,
hold_rel_ind = new_references.hold_rel_ind,
req_serial_loan_code = new_references.req_serial_loan_code,
prc_type_code = new_references.prc_type_code,
pnote_delivery_code = new_references.pnote_delivery_code,
eft_authorization = new_references.eft_authorization,
auto_late_disb_ind = new_references.auto_late_disb_ind,
last_update_date = x_last_update_date,
last_updated_by = x_last_updated_by,
last_update_login = x_last_update_login,
est_alt_orig_fee_perct = x_est_alt_orig_fee_perct,
est_alt_guarnt_fee_perct = x_est_alt_guarnt_fee_perct,
relationship_cd = x_relationship_cd,
default_flag = x_default_flag,
party_id = x_party_id,
cl_version = x_cl_version,
plus_processing_type_code = x_plus_processing_type_code,
fund_return_method_code = x_fund_return_method_code
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
|| veramach 5-SEP-2003 Added x_relationship_code_txt,x_default_flag,x_party_id for the newly added columns
|| (reverse chronological order - newest change first)
*/
CURSOR c1 IS
SELECT rowid
FROM igf_sl_cl_setup_all
WHERE clset_id = x_clset_id;
insert_row (
x_rowid,
x_clset_id,
x_ci_cal_type,
x_ci_sequence_number,
x_borw_interest_ind,
x_sch_non_ed_brc_id,
x_lender_id,
x_duns_lender_id,
x_lend_non_ed_brc_id,
x_guarantor_id,
x_duns_guarnt_id,
x_recipient_id,
x_recipient_type,
x_duns_recip_id,
x_recip_non_ed_brc_id,
x_est_orig_fee_perct,
x_est_guarnt_fee_perct,
x_hold_rel_ind,
x_req_serial_loan_code,
x_loan_award_method,
x_prc_type_code,
x_pnote_delivery_code,
x_media_type,
x_eft_authorization,
x_auto_late_disb_ind,
x_cl_version,
x_mode,
x_est_alt_orig_fee_perct,
x_est_alt_guarnt_fee_perct,
x_relationship_cd ,
x_default_flag,
x_party_id,
x_plus_processing_type_code,
x_fund_return_method_code
);
update_row (
x_rowid,
x_clset_id,
x_ci_cal_type,
x_ci_sequence_number,
x_borw_interest_ind,
x_sch_non_ed_brc_id,
x_lender_id,
x_duns_lender_id,
x_lend_non_ed_brc_id,
x_guarantor_id,
x_duns_guarnt_id,
x_recipient_id,
x_recipient_type,
x_duns_recip_id,
x_recip_non_ed_brc_id,
x_est_orig_fee_perct,
x_est_guarnt_fee_perct,
x_hold_rel_ind,
x_req_serial_loan_code,
x_loan_award_method,
x_prc_type_code,
x_pnote_delivery_code,
x_media_type,
x_eft_authorization,
x_auto_late_disb_ind,
x_cl_version,
x_mode,
x_est_alt_orig_fee_perct,
x_est_alt_guarnt_fee_perct,
x_relationship_cd ,
x_default_flag,
x_party_id,
x_plus_processing_type_code,
x_fund_return_method_code
);
PROCEDURE delete_row (
x_rowid IN VARCHAR2
) AS
/*
|| Created By : venagara
|| Created On : 02-DEC-2000
|| 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 igf_sl_cl_setup_all
WHERE rowid = x_rowid;
END delete_row;