The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT 'X'
FROM igs_lookup_values
WHERE lookup_type = 'IGS_HE_FTE_CALC_TYPE'
AND lookup_code = p_hesa_susa_rec.fte_calc_type
AND enabled_flag='Y';
|| jtmathew 21-Sep-2004 Modified INSERT statement to accommodate the new
|| fields described in HEFD350.
------------------------------------------------------------------------------*/
l_api_name CONSTANT VARCHAR2(30) := 'create_hesa_susa';
l_insert_flag BOOLEAN := TRUE;
l_last_update_date igs_he_en_susa.last_update_date%TYPE;
l_last_updated_by igs_he_en_susa.last_updated_by%TYPE;
l_last_update_login igs_he_en_susa.last_update_login%TYPE;
l_insert_flag := FALSE;
IF l_insert_flag THEN
IF NOT validate_parameters(p_hesa_susa_rec) THEN
x_return_status := FND_API.G_RET_STS_ERROR;
l_insert_flag := FALSE;
IF l_insert_flag THEN
l_person_id := igs_ge_gen_003.get_person_id (p_person_number => p_hesa_susa_rec.person_number);
l_insert_flag := FALSE;
IF l_insert_flag THEN
igs_ge_gen_003.get_susa_sequence_num (p_person_id => l_person_id,
p_program_cd => p_hesa_susa_rec.program_cd,
p_unit_set_cd => p_hesa_susa_rec.unit_set_cd,
p_us_version_number => l_us_version_number,
p_sequence_number => l_sequence_number);
l_insert_flag := FALSE;
IF l_insert_flag THEN
l_ret_val := validate_db_cons(p_person_id => l_person_id,
p_sequence_number => l_sequence_number,
p_hesa_susa_rec => p_hesa_susa_rec);
l_insert_flag := FALSE;
l_insert_flag := FALSE;
IF l_insert_flag THEN
IF NOT validate_hesa_susa (p_us_version_number => l_us_version_number,
p_hesa_susa_rec => p_hesa_susa_rec) THEN
x_return_status := FND_API.G_RET_STS_ERROR;
l_insert_flag := FALSE;
IF l_insert_flag THEN
l_creation_date := SYSDATE;
l_last_update_date := SYSDATE;
l_last_updated_by := FND_GLOBAL.USER_ID;
l_last_update_login :=FND_GLOBAL.LOGIN_ID;
IF l_last_updated_by IS NULL THEN
l_last_updated_by := -1;
IF l_last_update_login IS NULL THEN
l_last_update_login := -1;
SELECT igs_he_en_susa_s.NEXTVAL
INTO l_hesa_en_susa_id
FROM dual;
INSERT INTO igs_he_en_susa (
hesa_en_susa_id,
person_id,
course_cd,
unit_set_cd,
us_version_number,
sequence_number,
new_he_entrant_cd,
term_time_accom,
disability_allow,
additional_sup_band,
sldd_discrete_prov,
study_mode,
study_location,
fte_perc_override,
franchising_activity,
completion_status,
good_stand_marker,
complete_pyr_study_cd,
credit_value_yop1,
credit_value_yop2,
credit_value_yop3,
credit_value_yop4,
credit_level_achieved1,
credit_level_achieved2,
credit_level_achieved3,
credit_level_achieved4,
credit_pt_achieved1,
credit_pt_achieved2,
credit_pt_achieved3,
credit_pt_achieved4,
credit_level1,
credit_level2,
credit_level3,
credit_level4,
grad_sch_grade,
mark,
teaching_inst1,
teaching_inst2,
pro_not_taught,
fundability_code,
fee_eligibility,
fee_band,
non_payment_reason,
student_fee,
fte_intensity,
calculated_fte,
fte_calc_type,
type_of_year,
year_stu,
enh_fund_elig_cd,
additional_sup_cost,
disadv_uplift_factor,
creation_date,
created_by,
last_update_date,
last_updated_by,
last_update_login)
VALUES (
l_hesa_en_susa_id,
l_person_id,
p_hesa_susa_rec.program_cd,
p_hesa_susa_rec.unit_set_cd,
l_us_version_number,
l_sequence_number,
p_hesa_susa_rec.new_he_entrant_cd,
p_hesa_susa_rec.term_time_accom,
p_hesa_susa_rec.disability_allow,
p_hesa_susa_rec.additional_sup_band,
p_hesa_susa_rec.sldd_discrete_prov,
p_hesa_susa_rec.study_mode,
p_hesa_susa_rec.study_location,
p_hesa_susa_rec.fte_perc_override,
p_hesa_susa_rec.franchising_activity,
p_hesa_susa_rec.completion_status,
p_hesa_susa_rec.good_stand_marker,
p_hesa_susa_rec.complete_pyr_study_cd,
p_hesa_susa_rec.credit_value_yop1,
p_hesa_susa_rec.credit_value_yop2,
p_hesa_susa_rec.credit_value_yop3,
p_hesa_susa_rec.credit_value_yop4,
p_hesa_susa_rec.credit_level_achieved1,
p_hesa_susa_rec.credit_level_achieved2,
p_hesa_susa_rec.credit_level_achieved3,
p_hesa_susa_rec.credit_level_achieved4,
p_hesa_susa_rec.credit_pt_achieved1,
p_hesa_susa_rec.credit_pt_achieved2,
p_hesa_susa_rec.credit_pt_achieved3,
p_hesa_susa_rec.credit_pt_achieved4,
p_hesa_susa_rec.credit_level1,
p_hesa_susa_rec.credit_level2,
p_hesa_susa_rec.credit_level3,
p_hesa_susa_rec.credit_level4,
p_hesa_susa_rec.grad_sch_grade,
p_hesa_susa_rec.mark,
p_hesa_susa_rec.teaching_inst1,
p_hesa_susa_rec.teaching_inst2,
p_hesa_susa_rec.pro_not_taught,
p_hesa_susa_rec.fundability_code,
p_hesa_susa_rec.fee_eligibility,
p_hesa_susa_rec.fee_band,
p_hesa_susa_rec.non_payment_reason,
p_hesa_susa_rec.student_fee,
p_hesa_susa_rec.fte_intensity,
p_hesa_susa_rec.calculated_fte,
p_hesa_susa_rec.fte_calc_type,
p_hesa_susa_rec.type_of_year,
p_hesa_susa_rec.year_stu,
p_hesa_susa_rec.enh_fund_elig_cd,
p_hesa_susa_rec.additional_sup_cost,
p_hesa_susa_rec.disadv_uplift_factor,
l_creation_date,
l_created_by,
l_last_update_date,
l_last_updated_by,
l_last_update_login);
IF ( (FND_API.TO_BOOLEAN(p_commit)) AND (l_insert_flag) ) THEN
COMMIT WORK;