[Home] [Help]
492: l_prog_label VARCHAR2(100);
493: l_label VARCHAR2(100);
494: l_debug_str VARCHAR2(2000);
495: l_request_id NUMBER;
496: l_error_code igs_ad_unitsets_int.error_code%TYPE;
497:
498:
499: PROCEDURE crt_upd_apcnt_uset_apl(p_interface_run_id NUMBER) AS
500:
497:
498:
499: PROCEDURE crt_upd_apcnt_uset_apl(p_interface_run_id NUMBER) AS
500:
501: CURSOR c_igs_ad_unitsets_int IS
502: SELECT cst_insert dmlmode, rowid, in_rec.*
503: FROM igs_ad_unitsets_int in_rec
504: WHERE interface_run_id = p_interface_run_id
505: AND status = cst_s_val_2
499: PROCEDURE crt_upd_apcnt_uset_apl(p_interface_run_id NUMBER) AS
500:
501: CURSOR c_igs_ad_unitsets_int IS
502: SELECT cst_insert dmlmode, rowid, in_rec.*
503: FROM igs_ad_unitsets_int in_rec
504: WHERE interface_run_id = p_interface_run_id
505: AND status = cst_s_val_2
506: AND ( ( NVL(match_ind,'15') = '15'
507: AND NOT EXISTS ( SELECT 1
515: OR (p_rule = cst_rule_val_R
516: AND match_ind IN (cst_mi_val_16, cst_mi_val_25)))
517: UNION ALL
518: SELECT cst_update dmlmode, rowid, in_rec.*
519: FROM igs_ad_unitsets_int in_rec
520: WHERE interface_run_id = p_interface_run_id
521: AND status = cst_s_val_2
522: AND ( (p_rule = cst_rule_val_I)
523: OR (p_rule = cst_rule_val_R AND match_ind = cst_mi_val_21))
529: AND mn_rec.version_number = in_rec.version_number
530: AND mn_rec.admission_appl_number = in_rec.admission_appl_number
531: AND mn_rec.nominated_course_cd = in_rec.nominated_course_cd);
532:
533: CURSOR c_null_hdlg_unitsets_cur_rec(cp_unit_set_cur c_igs_ad_unitsets_int%ROWTYPE) IS
534: SELECT ROWID, mn_rec.*
535: FROM igs_ad_unit_sets mn_rec
536: WHERE mn_rec.person_id = cp_unit_set_cur.person_id
537: AND mn_rec.sequence_number = cp_unit_set_cur.sequence_number
568: NULL,NULL,NULL,NULL,TO_CHAR(l_request_id));
569: END IF;
570: l_records_processed := 0;
571:
572: FOR unitsets_rec IN c_igs_ad_unitsets_int
573: LOOP
574: IF igs_ad_gen_016.get_appl_type_apc (p_application_type => unitsets_rec.admission_application_type,
575: p_admission_cat => l_admission_cat,
576: p_s_admission_process_type => l_s_admission_process_type) = 'TRUE' THEN
582: FND_MESSAGE.SET_TOKEN ('CATEGORY', p_category_meaning);
583: FND_MESSAGE.SET_TOKEN ('APPLTYPE', unitsets_rec.admission_application_type);
584: l_error_text := FND_MESSAGE.GET;
585:
586: UPDATE igs_ad_unitsets_int
587: SET status = cst_s_val_3
588: ,match_ind = DECODE (unitsets_rec.dmlmode, cst_update, DECODE (match_ind,NULL, cst_mi_val_12,match_ind),
589: cst_insert, DECODE (match_ind,NULL, cst_mi_val_11,match_ind))
590: ,error_code = cst_ec_val_E701
627: x_rank => NVL(unitsets_rec.rank,c_null_hdlg_unitsets_rec.rank),
628: x_mode =>'R');
629: END IF;
630:
631: UPDATE igs_ad_unitsets_int
632: SET
633: status = cst_s_val_1
634: , match_ind = DECODE (unitsets_rec.dmlmode,cst_update, cst_mi_val_18,cst_insert, cst_mi_val_11)
635: WHERE rowid = unitsets_rec.rowid;
660: l_error_text := NVL(l_msg_data,igs_ad_gen_016.get_lkup_meaning ('IMPORT_ERROR_CODE', l_error_code, 8405));
661:
662: IF l_hash_msg_name_text_type_tab(l_msg_count-1).name <> 'ORA' THEN
663: IF p_enable_log = 'Y' THEN
664: igs_ad_imp_001.logerrormessage(unitsets_rec.interface_unitsets_id,l_msg_data,'IGS_AD_UNITSETS_INT');
665: END IF;
666: ELSE
667: IF fnd_log.test(fnd_log.level_exception,l_prog_label) THEN
668:
680: END IF;
681:
682: END IF;
683:
684: UPDATE igs_ad_unitsets_int
685: SET status = cst_s_val_3
686: , match_ind = DECODE ( unitsets_rec.dmlmode
687: ,cst_update, DECODE ( match_ind, NULL, cst_mi_val_12, match_ind)
688: ,cst_insert, DECODE ( p_rule
700: FND_MESSAGE.SET_TOKEN ('CATEGORY', p_category_meaning);
701: FND_MESSAGE.SET_TOKEN ('APPLTYPE', unitsets_rec.admission_application_type);
702: l_error_text := FND_MESSAGE.GET;
703:
704: UPDATE igs_ad_unitsets_int
705: SET status = cst_s_val_3
706: , match_ind = DECODE (unitsets_rec.dmlmode, cst_update, DECODE (match_ind,NULL, cst_mi_val_12,match_ind),
707: cst_insert, DECODE (match_ind,NULL, cst_mi_val_11,match_ind))
708: , error_code = cst_ec_val_E701
742: END IF;
743:
744: -- Set STATUS to 3 for interface records with RULE = E or I and MATCH IND
745: IF p_rule IN ('E','I') THEN
746: UPDATE igs_ad_unitsets_int
747: SET status = cst_s_val_3
748: , error_code = cst_ec_val_E700
749: , error_text = cst_et_val_E700
750: WHERE interface_run_id = p_interface_run_id
755:
756: -- Set STATUS to 1 for interface records with RULE = R and
757: -- MATCH IND = 17,18,19,22,23,24,27
758: IF p_rule IN ('R') THEN
759: UPDATE igs_ad_unitsets_int
760: SET status = cst_s_val_1
761: WHERE interface_run_id = p_interface_run_id
762: AND status = cst_s_val_2
763: AND match_ind IN (cst_mi_val_17, cst_mi_val_18, cst_mi_val_19,
767:
768: -- Set STATUS to 1 and MATCH IND to 19 for interface records with RULE =
769: -- E matching OSS record(s)
770: IF p_rule IN ('E') THEN
771: UPDATE igs_ad_unitsets_int in_rec
772: SET status = cst_s_val_1
773: , match_ind = cst_mi_val_19
774: WHERE interface_run_id = p_interface_run_id
775: AND status = cst_s_val_2
802: -- Set STATUS to 1 and MATCH IND to 23 for interface records with RULE = R matching
803: -- OSS record(s) in ALL updateable column values, if column nullification is not
804: -- allowed then the 2 DECODE should be replaced by a single NVL
805: IF p_rule IN ('R') THEN
806: UPDATE igs_ad_unitsets_int in_rec
807: SET status = cst_s_val_1
808: , match_ind = cst_mi_val_23
809: WHERE interface_run_id = p_interface_run_id
810: AND status = cst_s_val_2
824:
825: -- Set STATUS to 3 and MATCH IND = 20 for interface records with RULE = R and MATCH IND
826: -- <> 21, 25, ones failed discrepancy check
827: IF p_rule IN ('R') THEN
828: UPDATE igs_ad_unitsets_int in_rec
829: SET
830: status = cst_s_val_3
831: , match_ind = cst_mi_val_20
832: WHERE interface_run_id = p_interface_run_id
844: END IF;
845:
846: -- Set STATUS to 3 for interface records with RULE = R and invalid MATCH IND
847: IF p_rule IN ('R') THEN
848: UPDATE igs_ad_unitsets_int
849: SET status = cst_s_val_3
850: , error_code = cst_ec_val_E700
851: , error_text = cst_et_val_E700
852: WHERE interface_run_id = p_interface_run_id