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_fee_type IN VARCHAR2 ,
x_offset_days IN NUMBER ,
x_payment_plan_threshold_amt IN NUMBER ,
x_payment_plan_threshold_pcent IN NUMBER
) 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
|| vvutukur 12-Sep-2003 Enh#3045007.Payment Plans Build. Changes as specified in TD.
|| smadathi 18-dec-2002 Enh Bug 2566615. Added new column - fee type
|| (reverse chronological order - newest change first)
*/
CURSOR cur_old_ref_values IS
SELECT *
FROM igs_fi_hold_plan
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 igs_fi_hold_plan
WHERE hold_plan_name = x_hold_plan_name
FOR UPDATE NOWAIT;
SELECT rowid
FROM igs_fi_hold_plan
WHERE ((hold_type = x_encumbrance_type));
PROCEDURE BeforeInsertUpdate(p_inserting BOOLEAN , p_updating BOOLEAN) AS
/*
|| Created By : [email protected]
|| Created On : 29-NOV-2001
|| Purpose : Validates the Primary Key of the table.
|| Known limitations, enhancements or remarks :
|| Change History :
|| Who When What
|| (reverse chronological order - newest change first)
*/
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_fee_type IN VARCHAR2 ,
x_offset_days IN NUMBER ,
x_payment_plan_threshold_amt IN NUMBER ,
x_payment_plan_threshold_pcent IN NUMBER
) 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 12-Sep-2003 Enh#3045007.Payment Plans Build. Changes as specified in TD.
|| smadathi 18-dec-2002 Enh Bug 2566615. Added new column - fee type
|| vvutukur 12-May-2002 removed calls to check_constraints procedure
|| as it is removed.bug#2344826.
*/
BEGIN
set_column_values (
p_action,
x_rowid,
x_hold_plan_name,
x_hold_plan_desc,
x_hold_plan_level,
x_hold_type,
x_threshold_amount,
x_threshold_percent,
x_closed_ind,
x_creation_date,
x_created_by,
x_last_update_date,
x_last_updated_by,
x_last_update_login ,
x_fee_type,
x_offset_days,
x_payment_plan_threshold_amt,
x_payment_plan_threshold_pcent
);
IF (p_action = 'INSERT') THEN
BeforeInsertUpdate(TRUE,FALSE);
ELSIF (p_action = 'UPDATE') THEN
BeforeInsertUpdate(FALSE,TRUE);
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.hold_plan_name
)
) 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_hold_plan_name IN VARCHAR2,
x_hold_plan_desc IN VARCHAR2,
x_hold_plan_level IN VARCHAR2,
x_hold_type IN VARCHAR2,
x_threshold_amount IN NUMBER,
x_threshold_percent IN NUMBER,
x_closed_ind IN VARCHAR2,
x_mode IN VARCHAR2,
x_fee_type IN VARCHAR2,
x_offset_days IN NUMBER,
x_payment_plan_threshold_amt IN NUMBER,
x_payment_plan_threshold_pcent IN NUMBER
) 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
|| vvutukur 12-Sep-2003 Enh#3045007.Payment Plans Build. Changes as specified in TD.
|| smadathi 18-dec-2002 Enh Bug 2566615. Added new column - fee type
|| (reverse chronological order - newest change first)
*/
CURSOR c IS
SELECT rowid
FROM igs_fi_hold_plan
WHERE hold_plan_name = x_hold_plan_name;
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_hold_plan_name => x_hold_plan_name,
x_hold_plan_desc => x_hold_plan_desc,
x_hold_plan_level => x_hold_plan_level,
x_hold_type => x_hold_type,
x_threshold_amount => x_threshold_amount,
x_threshold_percent => x_threshold_percent,
x_closed_ind => x_closed_ind,
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_fee_type => x_fee_type,
x_offset_days => x_offset_days,
x_payment_plan_threshold_amt => x_payment_plan_threshold_amt,
x_payment_plan_threshold_pcent => x_payment_plan_threshold_pcent
);
INSERT INTO igs_fi_hold_plan (
hold_plan_name,
hold_plan_desc,
hold_plan_level,
hold_type,
threshold_amount,
threshold_percent,
closed_ind,
creation_date,
created_by,
last_update_date,
last_updated_by,
last_update_login,
fee_type,
offset_days,
payment_plan_threshold_amt,
payment_plan_threshold_pcent
) VALUES (
new_references.hold_plan_name,
new_references.hold_plan_desc,
new_references.hold_plan_level,
new_references.hold_type,
new_references.threshold_amount,
new_references.threshold_percent,
new_references.closed_ind,
x_last_update_date,
x_last_updated_by,
x_last_update_date,
x_last_updated_by,
x_last_update_login ,
new_references.fee_type,
new_references.offset_days,
new_references.payment_plan_threshold_amt,
new_references.payment_plan_threshold_pcent
);
END insert_row;
SELECT
hold_plan_desc,
hold_plan_level,
hold_type,
threshold_amount,
threshold_percent,
closed_ind,
fee_type,
offset_days,
payment_plan_threshold_amt,
payment_plan_threshold_pcent
FROM igs_fi_hold_plan
WHERE rowid = x_rowid
FOR UPDATE NOWAIT;
fnd_message.set_name('FND', 'FORM_RECORD_DELETED');
PROCEDURE update_row (
x_rowid IN VARCHAR2,
x_hold_plan_name IN VARCHAR2,
x_hold_plan_desc IN VARCHAR2,
x_hold_plan_level IN VARCHAR2,
x_hold_type IN VARCHAR2,
x_threshold_amount IN NUMBER,
x_threshold_percent IN NUMBER,
x_closed_ind IN VARCHAR2,
x_mode IN VARCHAR2 ,
x_fee_type IN VARCHAR2,
x_offset_days IN NUMBER,
x_payment_plan_threshold_amt IN NUMBER,
x_payment_plan_threshold_pcent IN NUMBER
) 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
|| vvutukur 12-Sep-2003 Enh#3045007.Payment Plans Build. Changes as specified in TD.
|| smadathi 18-dec-2002 Enh Bug 2566615. Added new column - fee type
|| (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_hold_plan_name => x_hold_plan_name,
x_hold_plan_desc => x_hold_plan_desc,
x_hold_plan_level => x_hold_plan_level,
x_hold_type => x_hold_type,
x_threshold_amount => x_threshold_amount,
x_threshold_percent => x_threshold_percent,
x_closed_ind => x_closed_ind,
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_fee_type => x_fee_type,
x_offset_days => x_offset_days,
x_payment_plan_threshold_amt => x_payment_plan_threshold_amt,
x_payment_plan_threshold_pcent => x_payment_plan_threshold_pcent
);
UPDATE igs_fi_hold_plan
SET
hold_plan_desc = new_references.hold_plan_desc,
hold_plan_level = new_references.hold_plan_level,
hold_type = new_references.hold_type,
threshold_amount = new_references.threshold_amount,
threshold_percent = new_references.threshold_percent,
closed_ind = new_references.closed_ind,
last_update_date = x_last_update_date,
last_updated_by = x_last_updated_by,
last_update_login = x_last_update_login ,
fee_type = new_references.fee_type,
offset_days = new_references.offset_days,
payment_plan_threshold_amt = new_references.payment_plan_threshold_amt,
payment_plan_threshold_pcent = new_references.payment_plan_threshold_pcent
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
|| vvutukur 12-Sep-2003 Enh#3045007.Payment Plans Build. Changes as specified in TD.
|| smadathi 18-dec-2002 Enh Bug 2566615. Added new column - fee type
|| (reverse chronological order - newest change first)
*/
CURSOR c1 IS
SELECT rowid
FROM igs_fi_hold_plan
WHERE hold_plan_name = x_hold_plan_name;
insert_row (
x_rowid,
x_hold_plan_name,
x_hold_plan_desc,
x_hold_plan_level,
x_hold_type,
x_threshold_amount,
x_threshold_percent,
x_closed_ind,
x_mode ,
x_fee_type,
x_offset_days,
x_payment_plan_threshold_amt,
x_payment_plan_threshold_pcent
);
update_row (
x_rowid,
x_hold_plan_name,
x_hold_plan_desc,
x_hold_plan_level,
x_hold_type,
x_threshold_amount,
x_threshold_percent,
x_closed_ind,
x_mode,
x_fee_type,
x_offset_days,
x_payment_plan_threshold_amt,
x_payment_plan_threshold_pcent
);
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_hold_plan
WHERE rowid = x_rowid;
END delete_row;