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 : 15-MAY-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)
*/
CURSOR cur_old_ref_values IS
SELECT *
FROM igs_en_elgb_ovr_uoo
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;
Purpose : This procedure updates Enrolled_Cp and achieveable_Cp in SUA record
when Approved Credit Points is created.
Known limitations,
enhancements,
remarks :
Change History
Who When What
jbegum 25-Jun-2003 BUG#2930935 - Modified cursor cur_unit_ver.
Added the parameter p_uoo_id in the call to IGS_EN_PRC_LOAD.ENRP_CLC_SUA_LOAD
rvivekan 18-Jun-2003 added reenroll step as per Reenrollmen and repeat enhacement.Modified cur_note_flag
cursor to accept step_group_type as a prameter too.
smanglm 22-Jan-2003 call igs_en_gen_017.enrp_get_enr_method to decide enrollment method type
svenkata 8-Jan-2003 Modified the message handling for eval_min_cp.
Nishikant 01NOV2002 SEVIS Build. Enh Bug#2641905. notification flag was
being fetched from cursor, now modified to get it by
calling the function igs_ss_enr_details.get_notification.
Nishikant 18-OCT-2002 The call to the function Igs_En_Elgbl_Program.eval_min_cp got modified since the signatue
got modified. Enrl Elgbl and Validation Build. Bug#2616692.
mesriniv 12-sep-2002 Added a new parameter waitlist_manual_ind in update row of IGS_EN_SU_ATTEMPT
for Bug 2554109 MINI Waitlist Build for Jan 03 Release
ayedubat 11-APR-2002 Changed the cursor,cur_note_flag to add an extra 'OR'
condition(eru.s_student_comm_type = 'ALL') for s_student_comm_type as part of the bug fix: 2315245
Nishikant 10-Oct-2001 Added the column session_id in all Tbh calls of IGS_EN_SU_ATTEMPT_PKG
as a part of the bug 2172380.
myoganat 16-JUN-2003 Bug# 2855870 Modified ENRP_VAL_APPR_CR_PT procedure by removing the IF clause
before the call to EVAL_MIN_CP and EVAL_MAX_CP. Profile IGS_EN_INCL_AUDIT_CP
was made obsolete. In the call to igs_en_val_sua.enrp_val_sua_ovrd_cp, the value of
no_assessment_ind was hardcoded to 'N'.
rvangala 07-OCT-03 Passing core_indicator_code to IGS_EN_SUA-API.UPDATE_UNIT_ATTEMPT added as part of Prevent Dropping Core
Units. Enh Bug# 3052432
stutta 21-NOV-2003 Replaced a program attempt cursor with a terms api function to return program version.
vkarthik 22-Jul-2004 Added three dummy variables l_audit_cp, l_billing_cp, l_enrolled_cp for all the calls to
igs_en_prc_load.enrp_clc_sua_load towards EN308 Billable credit points build Enh#3782329
******************************************************************/
CURSOR cur_unit_ver(cp_uoo_id igs_ps_unit_ofr_opt.uoo_id%TYPE)IS
SELECT NVL(cps.enrolled_credit_points,uv.enrolled_credit_points)
FROM igs_ps_unit_ver uv ,igs_ps_unit_ofr_opt uoo,igs_ps_usec_cps cps
WHERE uoo.uoo_id = cps.uoo_id(+) AND
uoo.unit_cd = uv.unit_cd AND
uoo.version_number = uv.version_number AND
uoo.uoo_id = cp_uoo_id;
SELECT person_id,cal_type,ci_sequence_number
FROM igs_en_elgb_ovr eo ,igs_en_elgb_ovr_step eos
WHERE eos.elgb_override_id = eo.elgb_override_id AND
eos.elgb_ovr_step_id = new_references.elgb_ovr_step_id;
SELECT 'x'
FROM igs_ca_inst ci,
igs_ca_type ct
WHERE ci.cal_type = cp_cal_type AND
ci.cal_type = ct.cal_type AND
ct.s_cal_cat = 'TEACHING';
SELECT load_cal_type,load_ci_sequence_number
FROM igs_ca_teach_to_load_v
WHERE teach_cal_type = cp_cal_type AND
teach_ci_sequence_number = cp_sequence_number AND
load_end_dt >= TRUNC(SYSDATE)
ORDER BY load_start_dt ;
SELECT coo_id coo_id
FROM igs_en_stdnt_ps_att
WHERE person_id = cp_person_id
AND course_cd = cp_program_cd ;
cursor c_dummy is SELECT plan.rowid, plan.*
FROM igs_en_plan_units plan
WHERE plan.person_id = plan.person_id;
SELECT sua.rowid row_id, sua.*
FROM igs_en_su_attempt_all sua
WHERE person_id = cp_person_id
and course_cd = cp_course_cd
and uoo_id = cp_uoo_id;
l_sua_def_query := 'SELECT sua.rowid row_id, sua.*
FROM igs_en_su_attempt_all sua
WHERE unit_attempt_status IN (''ENROLLED'',''WAITLISTED'') AND uoo_id = :1 AND person_id = :2 AND no_assessment_ind<>''Y''';
l_sua_def_query := 'SELECT sua.rowid row_id, sua.*
FROM igs_en_su_attempt_all sua
WHERE sua.unit_attempt_status IN (''ENROLLED'',''WAITLISTED'') AND sua.unit_cd = :1 AND sua.version_number = :2 AND person_id = :3 AND
((sua.cal_type = :4 AND
sua.ci_sequence_number = :5 ) OR
((sua.cal_type,sua.ci_sequence_number) IN
(SELECT teach_cal_type,teach_ci_sequence_number
FROM igs_ca_load_to_teach_v
WHERE load_cal_type = :6 AND load_ci_sequence_number = :7 )))
AND no_assessment_ind<>''Y''';
l_sua_def_query := 'SELECT sua.rowid row_id, sua.*
FROM igs_en_su_attempt_all sua
WHERE sua.unit_attempt_status IN (''ENROLLED'',''WAITLISTED'') AND sua.person_id = :1 AND
((sua.cal_type = :2 AND
sua.ci_sequence_number = :3 ) OR
((sua.cal_type,sua.ci_sequence_number) IN
(SELECT teach_cal_type,teach_ci_sequence_number
FROM igs_ca_load_to_teach_v
WHERE load_cal_type = :4 AND load_ci_sequence_number = :5 ))) AND no_assessment_ind<>''Y''';
igs_en_sua_api.update_unit_attempt (
X_ROWID => cur_sua_def_var_rec.row_id ,
X_PERSON_ID => cur_sua_def_var_rec.person_id ,
X_COURSE_CD => cur_sua_def_var_rec.course_cd ,
X_UNIT_CD => cur_sua_def_var_rec.unit_cd ,
X_CAL_TYPE => cur_sua_def_var_rec.cal_type ,
X_CI_SEQUENCE_NUMBER => cur_sua_def_var_rec.ci_sequence_number ,
X_VERSION_NUMBER => cur_sua_def_var_rec.version_number ,
X_LOCATION_CD => cur_sua_def_var_rec.location_cd ,
X_UNIT_CLASS => cur_sua_def_var_rec.unit_class ,
X_CI_START_DT => cur_sua_def_var_rec.ci_start_dt ,
X_CI_END_DT => cur_sua_def_var_rec.ci_end_dt ,
X_UOO_ID => cur_sua_def_var_rec.uoo_id ,
X_ENROLLED_DT => cur_sua_def_var_rec.enrolled_dt ,
X_UNIT_ATTEMPT_STATUS => cur_sua_def_var_rec.unit_attempt_status ,
X_ADMINISTRATIVE_UNIT_STATUS => cur_sua_def_var_rec.administrative_unit_status ,
X_DISCONTINUED_DT => cur_sua_def_var_rec.discontinued_dt ,
X_RULE_WAIVED_DT => cur_sua_def_var_rec.rule_waived_dt ,
X_RULE_WAIVED_PERSON_ID => cur_sua_def_var_rec.rule_waived_person_id ,
X_NO_ASSESSMENT_IND => cur_sua_def_var_rec.no_assessment_ind ,
X_SUP_UNIT_CD => cur_sua_def_var_rec.sup_unit_cd ,
X_SUP_VERSION_NUMBER => cur_sua_def_var_rec.sup_version_number ,
X_EXAM_LOCATION_CD => cur_sua_def_var_rec.exam_location_cd ,
X_ALTERNATIVE_TITLE => cur_sua_def_var_rec.alternative_title ,
X_OVERRIDE_ENROLLED_CP => new_references.step_override_limit ,
X_OVERRIDE_EFTSU => cur_sua_def_var_rec.override_eftsu ,
-- as part of ENCR026 Changed the below col value. The new value was being
-- set to the override limit, now setting to the original value in the db and not changing it
X_OVERRIDE_ACHIEVABLE_CP => cur_sua_def_var_rec.override_achievable_cp ,
X_OVERRIDE_OUTCOME_DUE_DT => cur_sua_def_var_rec.override_outcome_due_dt ,
X_OVERRIDE_CREDIT_REASON => cur_sua_def_var_rec.override_credit_reason ,
X_ADMINISTRATIVE_PRIORITY => cur_sua_def_var_rec.administrative_priority ,
X_WAITLIST_DT => cur_sua_def_var_rec.waitlist_dt ,
X_DCNT_REASON_CD => cur_sua_def_var_rec.dcnt_reason_cd ,
X_MODE => 'R' ,
X_GS_VERSION_NUMBER => cur_sua_def_var_rec.gs_version_number ,
X_ENR_METHOD_TYPE => cur_sua_def_var_rec.enr_method_type ,
X_FAILED_UNIT_RULE => cur_sua_def_var_rec.failed_unit_rule ,
X_CART => cur_sua_def_var_rec.cart ,
X_RSV_SEAT_EXT_ID => cur_sua_def_var_rec.RSV_SEAT_EXT_ID ,
X_ORG_UNIT_CD => cur_sua_def_var_rec.ORG_UNIT_CD,
-- session_id added by Nishikant 28JAN2002 - Enh Bug#2172380.
X_SESSION_ID => cur_sua_def_var_rec.session_id,
X_DEG_AUD_DETAIL_ID => cur_sua_def_var_rec.deg_aud_detail_id,
X_GRADING_SCHEMA_CODE => cur_sua_def_var_rec.grading_schema_code,
X_STUDENT_CAREER_STATISTICS => cur_sua_def_var_rec.student_career_statistics,
X_STUDENT_CAREER_TRANSCRIPT => cur_sua_def_var_rec.student_career_transcript,
X_SUBTITLE => cur_sua_def_var_rec.subtitle ,
X_ATTRIBUTE_CATEGORY => cur_sua_def_var_rec.attribute_category,
X_ATTRIBUTE1 => cur_sua_def_var_rec.attribute1,
X_ATTRIBUTE2 => cur_sua_def_var_rec.attribute2,
X_ATTRIBUTE3 => cur_sua_def_var_rec.attribute3,
X_ATTRIBUTE4 => cur_sua_def_var_rec.attribute4,
X_ATTRIBUTE5 => cur_sua_def_var_rec.attribute5,
X_ATTRIBUTE6 => cur_sua_def_var_rec.attribute6,
X_ATTRIBUTE7 => cur_sua_def_var_rec.attribute7,
X_ATTRIBUTE8 => cur_sua_def_var_rec.attribute8,
X_ATTRIBUTE9 => cur_sua_def_var_rec.attribute9,
X_ATTRIBUTE10 => cur_sua_def_var_rec.attribute10,
X_ATTRIBUTE11 => cur_sua_def_var_rec.attribute11,
X_ATTRIBUTE12 => cur_sua_def_var_rec.attribute12,
X_ATTRIBUTE13 => cur_sua_def_var_rec.attribute13,
X_ATTRIBUTE14 => cur_sua_def_var_rec.attribute14,
X_ATTRIBUTE15 => cur_sua_def_var_rec.attribute15,
X_ATTRIBUTE16 => cur_sua_def_var_rec.attribute16,
X_ATTRIBUTE17 => cur_sua_def_var_rec.attribute17,
X_ATTRIBUTE18 => cur_sua_def_var_rec.attribute18,
X_ATTRIBUTE19 => cur_sua_def_var_rec.attribute19,
X_ATTRIBUTE20 => cur_sua_def_var_rec.attribute20,
X_WAITLIST_MANUAL_IND => cur_sua_def_var_rec.waitlist_manual_ind ,--Added by mesriniv for Bug 2554109 Mini Waitlist Build.,
X_WLST_PRIORITY_WEIGHT_NUM => cur_sua_def_var_rec.wlst_priority_weight_num,
X_WLST_PREFERENCE_WEIGHT_NUM => cur_sua_def_var_rec.wlst_preference_weight_num,
-- CORE_INDICATOR_CODE --added by rvangala 07-OCT-2003. Enh Bug# 3052432
X_CORE_INDICATOR_CODE => cur_sua_def_var_rec.core_indicator_code
) ;
l_plan_def_query := 'SELECT plan.rowid, plan.*
FROM igs_en_plan_units plan
WHERE plan.uoo_id = :1 AND plan.person_id = :2
AND plan.no_assessment_ind <> ''Y''
AND EXISTS(SELECT ''x'' FROM igs_en_spa_terms spa
where spa.person_id=plan.person_id
and spa.program_cd=plan.course_cd
and spa.term_cal_type=plan.term_cal_type
and spa.term_sequence_number=plan.term_ci_sequence_number
and spa.plan_sht_status IN (''PLAN'',''NONE''))
';
l_plan_def_query := 'SELECT plan.rowid,plan.*
FROM igs_en_plan_units plan , igs_ps_unit_ofr_opt_all b
WHERE plan.person_id = :1
AND plan.uoo_id = b.uoo_id
AND b.unit_cd = :2 AND b.version_number = :3
AND plan.no_assessment_ind <> ''Y''
AND ((plan.term_cal_type = :4 AND
plan.term_ci_sequence_number = :5 ) OR
((plan.term_cal_type,plan.term_ci_sequence_number) IN
(SELECT load_cal_type,load_ci_sequence_number
FROM igs_ca_teach_to_load_v
WHERE teach_cal_type = :6 AND teach_ci_sequence_number = :7 )))
AND EXISTS(SELECT ''x'' FROM igs_en_spa_terms spa
where spa.person_id=plan.person_id
and spa.program_cd=plan.course_cd
and spa.term_cal_type=plan.term_cal_type
and spa.term_sequence_number=plan.term_ci_sequence_number
and spa.plan_sht_status IN (''PLAN'',''NONE''))
';
l_plan_def_query := 'SELECT DISTINCT plan.rowid, plan.*
FROM igs_en_plan_units plan
WHERE plan.person_id = :1
AND plan.no_assessment_ind <> ''Y''
AND ((plan.term_cal_type = :2 AND
plan.term_ci_sequence_number = :3 ) OR
((plan.term_cal_type,plan.term_ci_sequence_number) IN
(SELECT load_cal_type,load_ci_sequence_number
FROM igs_ca_teach_to_load_v
WHERE teach_cal_type = :4 AND teach_ci_sequence_number = :5 )))
AND EXISTS(SELECT ''x'' FROM igs_en_spa_terms spa
WHERE spa.person_id=plan.person_id
and spa.program_cd=plan.course_cd
and spa.term_cal_type=plan.term_cal_type
and spa.term_sequence_number=plan.term_ci_sequence_number
and spa.plan_sht_status IN (''PLAN'',''NONE''))
';
-- call IGS_EN_PLAN_UNITS_PKG.UPDATE_ROW
igs_en_plan_units_pkg.update_row(
x_rowid => cur_plan_def_var_rec.rowid,
x_person_id => cur_plan_def_var_rec.person_id,
x_course_cd => cur_plan_def_var_rec.course_cd,
x_uoo_id => cur_plan_def_var_rec.uoo_id,
x_term_cal_type => cur_plan_def_var_rec.term_cal_type,
x_term_ci_sequence_number => cur_plan_def_var_rec.term_ci_sequence_number,
x_no_assessment_ind => cur_plan_def_var_rec.no_assessment_ind,
x_sup_uoo_id => cur_plan_def_var_rec.sup_uoo_id,
x_override_enrolled_cp => new_references.step_override_limit,
x_grading_schema_code => cur_plan_def_var_rec.grading_schema_code,
x_gs_version_number => cur_plan_def_var_rec.gs_version_number,
x_core_indicator_code => cur_plan_def_var_rec.core_indicator_code,
x_alternative_title => cur_plan_def_var_rec.alternative_title,
x_cart_error_flag => cur_plan_def_var_rec.cart_error_flag,
x_session_id => cur_plan_def_var_rec.session_id,
x_mode => 'R'
);
PROCEDURE AfterRowInsertUpdate(
p_inserting IN BOOLEAN ,
p_updating IN BOOLEAN
) AS
CURSOR get_step_type is
SELECT eos.step_override_type
FROM igs_en_elgb_ovr_step eos
WHERE eos.elgb_ovr_step_id = NEW_REFERENCES.elgb_ovr_step_id ;
IF p_inserting OR p_updating THEN
OPEN get_step_type ;
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_en_elgb_ovr_uoo
WHERE ((elgb_ovr_step_id = x_elgb_ovr_step_id ));
SELECT rowid
FROM igs_en_elgb_ovr_step
WHERE ((uoo_id = x_uoo_id));
SELECT rowid
FROM igs_en_elgb_ovr_step
WHERE ((unit_cd = x_unit_cd) AND
(version_number = x_version_number));
SELECT rowid
FROM igs_en_elgb_ovr_uoo
WHERE elgb_ovr_step_uoo_id = x_elgb_ovr_step_uoo_id
FOR UPDATE NOWAIT;
SELECT rowid
FROM igs_en_elgb_ovr_uoo
WHERE elgb_ovr_step_id = x_elgb_ovr_step_id
AND unit_cd = x_unit_cd
AND version_number = x_version_number
AND ( uoo_id = x_uoo_id or ( x_uoo_id IS NULL AND uoo_id = -1))
AND ((l_rowid IS NULL) OR (rowid <> l_rowid));
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 : 15-MAY-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)
*/
BEGIN
set_column_values (
p_action,
x_rowid,
x_elgb_ovr_step_uoo_id,
x_elgb_ovr_step_id,
x_unit_cd,
x_version_number,
x_uoo_id,
x_step_override_limit,
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.elgb_ovr_step_uoo_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.elgb_ovr_step_uoo_id
)
) THEN
fnd_message.set_name('IGS','IGS_GE_RECORD_ALREADY_EXISTS');
ELSIF (p_action = 'VALIDATE_UPDATE') THEN
check_uniqueness;
IF (p_action = 'INSERT') THEN
-- Call all the procedures related to After Insert.
AfterRowInsertUpdate( p_inserting => TRUE ,p_updating=>FALSE);
ELSIF (p_action = 'UPDATE') THEN
-- Call all the procedures related to After Update.
AfterRowInsertUpdate( p_inserting=>FALSE,p_updating => TRUE );
ELSIF (p_action = 'DELETE') THEN
null;
PROCEDURE insert_row (
x_rowid IN OUT NOCOPY VARCHAR2,
x_elgb_ovr_step_uoo_id IN OUT NOCOPY NUMBER,
x_elgb_ovr_step_id IN NUMBER,
x_unit_cd IN VARCHAR2,
x_version_number IN NUMBER,
x_uoo_id IN NUMBER,
x_step_override_limit IN NUMBER,
x_mode IN VARCHAR2
) AS
/*
|| Created By : [email protected]
|| Created On : 15-MAY-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)
*/
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;
fnd_message.set_token ('ROUTINE', 'IGS_EN_ELGB_OVR_UOO_PKG.INSERT_ROW');
p_action => 'INSERT',
x_rowid => x_rowid,
x_elgb_ovr_step_uoo_id => x_elgb_ovr_step_uoo_id,
x_elgb_ovr_step_id => x_elgb_ovr_step_id,
x_unit_cd => x_unit_cd,
x_version_number => x_version_number,
x_uoo_id => x_uoo_id,
x_step_override_limit => x_step_override_limit,
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_en_elgb_ovr_uoo (
elgb_ovr_step_uoo_id,
elgb_ovr_step_id,
unit_cd,
version_number,
uoo_id,
step_override_limit,
creation_date,
created_by,
last_update_date,
last_updated_by,
last_update_login
) VALUES (
igs_en_elgb_ovr_step_uoo_s.NEXTVAL,
new_references.elgb_ovr_step_id,
new_references.unit_cd,
new_references.version_number,
new_references.uoo_id,
new_references.step_override_limit,
x_last_update_date,
x_last_updated_by,
x_last_update_date,
x_last_updated_by,
x_last_update_login
) RETURNING ROWID, elgb_ovr_step_uoo_id INTO x_rowid, x_elgb_ovr_step_uoo_id;
p_action => 'INSERT',
x_rowid => X_ROWID
);
END insert_row;
SELECT
elgb_ovr_step_id,
unit_cd,
version_number,
uoo_id,
step_override_limit
FROM igs_en_elgb_ovr_uoo
WHERE rowid = x_rowid
FOR UPDATE NOWAIT;
fnd_message.set_name('FND', 'FORM_RECORD_DELETED');
PROCEDURE update_row (
x_rowid IN VARCHAR2,
x_elgb_ovr_step_uoo_id IN NUMBER,
x_elgb_ovr_step_id IN NUMBER,
x_unit_cd IN VARCHAR2,
x_version_number IN NUMBER,
x_uoo_id IN NUMBER,
x_step_override_limit IN NUMBER,
x_mode IN VARCHAR2
) AS
/*
|| Created By : [email protected]
|| Created On : 15-MAY-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)
*/
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;
fnd_message.set_token ('ROUTINE', 'IGS_EN_ELGB_OVR_UOO_PKG.UPDATE_ROW');
p_action => 'UPDATE',
x_rowid => x_rowid,
x_elgb_ovr_step_uoo_id => x_elgb_ovr_step_uoo_id,
x_elgb_ovr_step_id => x_elgb_ovr_step_id,
x_unit_cd => x_unit_cd,
x_version_number => x_version_number,
x_uoo_id => x_uoo_id,
x_step_override_limit => x_step_override_limit,
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
);
UPDATE igs_en_elgb_ovr_uoo
SET
elgb_ovr_step_id = new_references.elgb_ovr_step_id,
unit_cd = new_references.unit_cd,
version_number = new_references.version_number,
uoo_id = new_references.uoo_id,
step_override_limit = new_references.step_override_limit,
last_update_date = x_last_update_date,
last_updated_by = x_last_updated_by,
last_update_login = x_last_update_login
WHERE rowid = x_rowid;
p_action => 'UPDATE',
x_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_en_elgb_ovr_uoo
WHERE elgb_ovr_step_uoo_id = x_elgb_ovr_step_uoo_id;
insert_row (
x_rowid,
x_elgb_ovr_step_uoo_id,
x_elgb_ovr_step_id,
x_unit_cd,
x_version_number,
x_uoo_id,
x_step_override_limit,
x_mode
);
update_row (
x_rowid,
x_elgb_ovr_step_uoo_id,
x_elgb_ovr_step_id,
x_unit_cd,
x_version_number,
x_uoo_id,
x_step_override_limit,
x_mode
);
PROCEDURE delete_row (
x_rowid IN VARCHAR2
) AS
/*
|| Created By : [email protected]
|| Created On : 15-MAY-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_en_elgb_ovr_uoo
WHERE rowid = x_rowid;
p_action => 'DELETE',
x_rowid => X_ROWID );
END delete_row;