[Home] [Help]
7733:
7734: BEGIN
7735: IF p_insert = 'I' THEN
7736: -- Unique Key Validation
7737: IF igs_ps_usec_ocur_ref_pkg.get_uk_for_validation( p_ref_cd_rec.reference_cd_type ,
7738: p_ref_cd_rec.reference_cd ,
7739: l_n_uso_id ) THEN
7740: igs_ps_validate_lgcy_pkg.set_msg('IGS_PS_LGCY_REC_EXISTS',
7741: igs_ps_validate_lgcy_pkg.get_lkup_meaning('USEC_OCCUR','LEGACY_TOKENS') || ' ' ||
7806: AND urr.reference_cd_type = p_ref_cd_rec.reference_cd_type
7807: AND urr.reference_code = p_ref_cd_rec.reference_cd
7808: AND urr.reference_cd_type=rc.reference_cd_type;
7809:
7810: --For IGS_PS_USEC_OCUR_REF record
7811: CURSOR c_occr IS
7812: SELECT rc.restricted_flag,uo.reference_code_desc
7813: FROM igs_ps_usec_ocur_ref uo,igs_ge_ref_cd_type_all rc
7814: WHERE uo.reference_code_type = p_ref_cd_rec.reference_cd_type
7809:
7810: --For IGS_PS_USEC_OCUR_REF record
7811: CURSOR c_occr IS
7812: SELECT rc.restricted_flag,uo.reference_code_desc
7813: FROM igs_ps_usec_ocur_ref uo,igs_ge_ref_cd_type_all rc
7814: WHERE uo.reference_code_type = p_ref_cd_rec.reference_cd_type
7815: AND uo.reference_code = p_ref_cd_rec.reference_cd
7816: AND uo.unit_section_occurrence_id = l_n_uso_id
7817: AND uo.reference_code_type=rc.reference_cd_type;
8187: ELSIF p_tab_ref_cd(i).data_type = 'OCCURRENCE' THEN
8188:
8189: --Enh Bug#2972950
8190: --For the PSP Enhancements TD:
8191: --Added the reference_code_desc column in the INSERT of table igs_ps_usec_ocur_ref
8192:
8193: --Creating the unit section occurrence refernce code if the datatype is OCCURRENCE.
8194: IF l_insert_update = 'I' THEN
8195:
8192:
8193: --Creating the unit section occurrence refernce code if the datatype is OCCURRENCE.
8194: IF l_insert_update = 'I' THEN
8195:
8196: INSERT INTO igs_ps_usec_ocur_ref (
8197: unit_sec_occur_reference_id,
8198: unit_section_occurrence_id,
8199: reference_code_type,
8200: reference_code,
8216: g_n_login_id,
8217: p_tab_ref_cd(i).description
8218: );
8219: IF (fnd_log.level_statement >= fnd_log.g_current_runtime_level) THEN
8220: fnd_log.string( fnd_log.level_statement, 'igs.plsql.igs_ps_unit_lgcy_pkg.create_unit_ref_code.Record_inserted_igs_ps_usec_ocur_ref',
8221: 'Data Type:'||p_tab_ref_cd(i).data_type||' '||'Unit code:'||p_tab_ref_cd(i).unit_cd||' '||'Version number:'
8222: ||p_tab_ref_cd(i).version_number||' '||'teach_cal_alternate_code:'||p_tab_ref_cd(i).teach_cal_alternate_code
8223: ||' '||'Location_cd:'||p_tab_ref_cd(i).location_cd||' '||'Unit Class:'||p_tab_ref_cd(i).unit_class||' '||
8224: 'reference_cd_type:'||p_tab_ref_cd(i).reference_cd_type||' '||'reference_cd:'||p_tab_ref_cd(i).reference_cd||
8226: ||' '||'production_uso_id:'||p_tab_ref_cd(i).production_uso_id);
8227: END IF;
8228: ELSE
8229:
8230: UPDATE igs_ps_usec_ocur_ref SET reference_code_desc=p_tab_ref_cd(i).description,last_updated_by=g_n_user_id,
8231: last_update_date=SYSDATE WHERE unit_section_occurrence_id=l_n_uso_id AND
8232: reference_code_type=p_tab_ref_cd(i).reference_cd_type AND reference_code=p_tab_ref_cd(i).reference_cd;
8233:
8234: IF (fnd_log.level_statement >= fnd_log.g_current_runtime_level) THEN
8231: last_update_date=SYSDATE WHERE unit_section_occurrence_id=l_n_uso_id AND
8232: reference_code_type=p_tab_ref_cd(i).reference_cd_type AND reference_code=p_tab_ref_cd(i).reference_cd;
8233:
8234: IF (fnd_log.level_statement >= fnd_log.g_current_runtime_level) THEN
8235: fnd_log.string( fnd_log.level_statement, 'igs.plsql.igs_ps_unit_lgcy_pkg.create_unit_ref_code.Record_updated_igs_ps_usec_ocur_ref',
8236: 'Data Type:'||p_tab_ref_cd(i).data_type||' '||'Unit code:'||p_tab_ref_cd(i).unit_cd||' '||'Version number:'
8237: ||p_tab_ref_cd(i).version_number||' '||'teach_cal_alternate_code:'||p_tab_ref_cd(i).teach_cal_alternate_code
8238: ||' '||'Location_cd:'||p_tab_ref_cd(i).location_cd||' '||'Unit Class:'||p_tab_ref_cd(i).unit_class||' '||
8239: 'reference_cd_type:'||p_tab_ref_cd(i).reference_cd_type||' '||'reference_cd:'||p_tab_ref_cd(i).reference_cd||