338: EXCEPTION
339: WHEN OTHERS THEN
340: fnd_message.set_name('IGS','IGS_GE_UNHANDLED_EXP');
341: fnd_message.set_token('NAME','IGF_AW_COA_CALC.ISCOALOCKED' || ' '|| SQLERRM);
342: IF fnd_log.level_exception >= fnd_log.g_current_runtime_level THEN
343: fnd_log.string(fnd_log.level_exception,'igf.plsql.igf_aw_coa_calc.iscoalocked.exception','sql error: '||SQLERRM);
344: END IF;
345: igs_ge_msg_stack.conc_exception_hndl;
346: app_exception.raise_exception;
339: WHEN OTHERS THEN
340: fnd_message.set_name('IGS','IGS_GE_UNHANDLED_EXP');
341: fnd_message.set_token('NAME','IGF_AW_COA_CALC.ISCOALOCKED' || ' '|| SQLERRM);
342: IF fnd_log.level_exception >= fnd_log.g_current_runtime_level THEN
343: fnd_log.string(fnd_log.level_exception,'igf.plsql.igf_aw_coa_calc.iscoalocked.exception','sql error: '||SQLERRM);
344: END IF;
345: igs_ge_msg_stack.conc_exception_hndl;
346: app_exception.raise_exception;
347: END iscoalocked;
383: AND item_code = cp_item_code;
384:
385:
386: BEGIN
387: IF fnd_log.level_statement >= fnd_log.g_current_runtime_level THEN
388: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.delete_coa.debug','Starting delete_coa with base_id:'||p_base_id);
389: END IF;
390: FOR coa_rec IN c_coa(p_base_id) LOOP
391:
384:
385:
386: BEGIN
387: IF fnd_log.level_statement >= fnd_log.g_current_runtime_level THEN
388: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.delete_coa.debug','Starting delete_coa with base_id:'||p_base_id);
389: END IF;
390: FOR coa_rec IN c_coa(p_base_id) LOOP
391:
392: IF fnd_log.level_statement >= fnd_log.g_current_runtime_level THEN
388: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.delete_coa.debug','Starting delete_coa with base_id:'||p_base_id);
389: END IF;
390: FOR coa_rec IN c_coa(p_base_id) LOOP
391:
392: IF fnd_log.level_statement >= fnd_log.g_current_runtime_level THEN
393: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.delete_coa.debug','deleting item '||coa_rec.item_code);
394: END IF;
395: FOR coa_terms_rec IN c_coa_terms(p_base_id,coa_rec.item_code) LOOP
396:
389: END IF;
390: FOR coa_rec IN c_coa(p_base_id) LOOP
391:
392: IF fnd_log.level_statement >= fnd_log.g_current_runtime_level THEN
393: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.delete_coa.debug','deleting item '||coa_rec.item_code);
394: END IF;
395: FOR coa_terms_rec IN c_coa_terms(p_base_id,coa_rec.item_code) LOOP
396:
397: igf_aw_coa_itm_terms_pkg.delete_row(
406: fnd_message.set_token('ITEM_CODE',coa_rec.item_code);
407: fnd_file.put_line(fnd_file.log,RPAD(' ',10) || fnd_message.get);
408:
409: END LOOP;
410: IF fnd_log.level_statement >= fnd_log.g_current_runtime_level THEN
411: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.delete_coa.debug','delete_coa done');
412: END IF;
413:
414: EXCEPTION
407: fnd_file.put_line(fnd_file.log,RPAD(' ',10) || fnd_message.get);
408:
409: END LOOP;
410: IF fnd_log.level_statement >= fnd_log.g_current_runtime_level THEN
411: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.delete_coa.debug','delete_coa done');
412: END IF;
413:
414: EXCEPTION
415: WHEN OTHERS THEN
414: EXCEPTION
415: WHEN OTHERS THEN
416: fnd_message.set_name('IGS','IGS_GE_UNHANDLED_EXP');
417: fnd_message.set_token('NAME','IGF_AW_COA_CALC.DELETE_COA' || ' '|| SQLERRM);
418: IF fnd_log.level_exception >= fnd_log.g_current_runtime_level THEN
419: fnd_log.string(fnd_log.level_exception,'igf.plsql.igf_aw_coa_calc.delete_coa.exception','sql error: '||SQLERRM);
420: END IF;
421: igs_ge_msg_stack.conc_exception_hndl;
422: app_exception.raise_exception;
415: WHEN OTHERS THEN
416: fnd_message.set_name('IGS','IGS_GE_UNHANDLED_EXP');
417: fnd_message.set_token('NAME','IGF_AW_COA_CALC.DELETE_COA' || ' '|| SQLERRM);
418: IF fnd_log.level_exception >= fnd_log.g_current_runtime_level THEN
419: fnd_log.string(fnd_log.level_exception,'igf.plsql.igf_aw_coa_calc.delete_coa.exception','sql error: '||SQLERRM);
420: END IF;
421: igs_ge_msg_stack.conc_exception_hndl;
422: app_exception.raise_exception;
423: END delete_coa;
491: l_sl_number NUMBER(15);
492:
493: BEGIN
494:
495: IF fnd_log.level_statement >= fnd_log.g_current_runtime_level THEN
496: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.populate_setup_table.debug','starting populate_setup_table with ' ||
497: 'p_grp_coa_code->'||p_grp_coa_code||
498: 'p_ci_cal_type->'||p_ci_cal_type||
499: 'p_ci_sequence_number->'||p_ci_sequence_number);
492:
493: BEGIN
494:
495: IF fnd_log.level_statement >= fnd_log.g_current_runtime_level THEN
496: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.populate_setup_table.debug','starting populate_setup_table with ' ||
497: 'p_grp_coa_code->'||p_grp_coa_code||
498: 'p_ci_cal_type->'||p_ci_cal_type||
499: 'p_ci_sequence_number->'||p_ci_sequence_number);
500: END IF;
511: ELSE
512: item_term_amount := NULL;
513: END IF;
514:
515: IF fnd_log.level_statement >= fnd_log.g_current_runtime_level THEN
516: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.populate_setup_table.debug','inserting item->'||items_rec.item_code||
517: 'item_term_amount->'||item_term_amount||
518: 'ld_cal->'||items_rec.ld_cal_type||
519: 'ld_seq->'||items_rec.ld_sequence_number);
512: item_term_amount := NULL;
513: END IF;
514:
515: IF fnd_log.level_statement >= fnd_log.g_current_runtime_level THEN
516: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.populate_setup_table.debug','inserting item->'||items_rec.item_code||
517: 'item_term_amount->'||item_term_amount||
518: 'ld_cal->'||items_rec.ld_cal_type||
519: 'ld_seq->'||items_rec.ld_sequence_number);
520: END IF;
557: EXCEPTION
558: WHEN OTHERS THEN
559: fnd_message.set_name('IGS','IGS_GE_UNHANDLED_EXP');
560: fnd_message.set_token('NAME','IGF_AW_COA_CALC.POPULATE_SETUP_TABLE' || ' '|| SQLERRM);
561: IF fnd_log.level_exception >= fnd_log.g_current_runtime_level THEN
562: fnd_log.string(fnd_log.level_exception,'igf.plsql.igf_aw_coa_calc.populate_setup_table.exception','sql error message: '||SQLERRM);
563: END IF;
564: igs_ge_msg_stack.conc_exception_hndl;
565: app_exception.raise_exception;
558: WHEN OTHERS THEN
559: fnd_message.set_name('IGS','IGS_GE_UNHANDLED_EXP');
560: fnd_message.set_token('NAME','IGF_AW_COA_CALC.POPULATE_SETUP_TABLE' || ' '|| SQLERRM);
561: IF fnd_log.level_exception >= fnd_log.g_current_runtime_level THEN
562: fnd_log.string(fnd_log.level_exception,'igf.plsql.igf_aw_coa_calc.populate_setup_table.exception','sql error message: '||SQLERRM);
563: END IF;
564: igs_ge_msg_stack.conc_exception_hndl;
565: app_exception.raise_exception;
566: END populate_setup_table;
745:
746:
747: BEGIN
748:
749: IF fnd_log.level_statement >= fnd_log.g_current_runtime_level THEN
750: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.add_coa_items.debug','starting add_coa_items with '||
751: 'p_base_id/p_grp_code/exeorder/l_process_id:'||
752: p_base_id || ' / ' || p_grp_code || ' / ' || exeorder || ' /' || l_process_id);
753: END IF;
746:
747: BEGIN
748:
749: IF fnd_log.level_statement >= fnd_log.g_current_runtime_level THEN
750: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.add_coa_items.debug','starting add_coa_items with '||
751: 'p_base_id/p_grp_code/exeorder/l_process_id:'||
752: p_base_id || ' / ' || p_grp_code || ' / ' || exeorder || ' /' || l_process_id);
753: END IF;
754:
757: lv_term_not_asgn := 'Y';
758:
759:
760: IF (exeorder='FIRST') THEN
761: IF fnd_log.level_statement >= fnd_log.g_current_runtime_level THEN
762: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.add_coa_items.debug','exeorder:'||exeorder);
763: END IF;
764: result:='Y';
765:
758:
759:
760: IF (exeorder='FIRST') THEN
761: IF fnd_log.level_statement >= fnd_log.g_current_runtime_level THEN
762: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.add_coa_items.debug','exeorder:'||exeorder);
763: END IF;
764: result:='Y';
765:
766: FOR first_coa_rec IN c_first_coa(l_process_id) LOOP
766: FOR first_coa_rec IN c_first_coa(l_process_id) LOOP
767: l_rowid := NULL;
768: lv_item_assigned := 'N';
769:
770: IF fnd_log.level_statement >= fnd_log.g_current_runtime_level THEN
771: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.add_coa_items.debug','calling items.insert with base_id/item_code -> ' ||
772: p_base_id || ' / '|| first_coa_rec.item_code);
773: END IF;
774: g_coa_updated := 'Y' ;
767: l_rowid := NULL;
768: lv_item_assigned := 'N';
769:
770: IF fnd_log.level_statement >= fnd_log.g_current_runtime_level THEN
771: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.add_coa_items.debug','calling items.insert with base_id/item_code -> ' ||
772: p_base_id || ' / '|| first_coa_rec.item_code);
773: END IF;
774: g_coa_updated := 'Y' ;
775:
788:
789:
790: FOR first_itm_term_rec IN c_first_itm_term(first_coa_rec.item_code,l_process_id) LOOP
791: l_rowid := NULL;
792: IF fnd_log.level_statement >= fnd_log.g_current_runtime_level THEN
793: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.add_coa_items.debug','calling items.insert with base_id/item_code/ld_cal/ld_seq -> ' ||
794: p_base_id || ' / '|| first_itm_term_rec.item_code ||
795: ' / ' || first_itm_term_rec.ld_cal_type || ' / ' || first_itm_term_rec.ld_sequence_number);
796: END IF;
789:
790: FOR first_itm_term_rec IN c_first_itm_term(first_coa_rec.item_code,l_process_id) LOOP
791: l_rowid := NULL;
792: IF fnd_log.level_statement >= fnd_log.g_current_runtime_level THEN
793: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.add_coa_items.debug','calling items.insert with base_id/item_code/ld_cal/ld_seq -> ' ||
794: p_base_id || ' / '|| first_itm_term_rec.item_code ||
795: ' / ' || first_itm_term_rec.ld_cal_type || ' / ' || first_itm_term_rec.ld_sequence_number);
796: END IF;
797:
796: END IF;
797:
798: --if the amount is NULL Rate Order Setup is used
799: IF first_itm_term_rec.item_term_amount IS NULL THEN
800: IF fnd_log.level_statement >= fnd_log.g_current_runtime_level THEN
801: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.add_coa_items.debug','first_itm_term_rec.item_term_amount IS NULL '||
802: 'and calling igf_aw_coa_gen.getBaseDetails');
803: END IF;
804:
797:
798: --if the amount is NULL Rate Order Setup is used
799: IF first_itm_term_rec.item_term_amount IS NULL THEN
800: IF fnd_log.level_statement >= fnd_log.g_current_runtime_level THEN
801: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.add_coa_items.debug','first_itm_term_rec.item_term_amount IS NULL '||
802: 'and calling igf_aw_coa_gen.getBaseDetails');
803: END IF;
804:
805: l_base_details := igf_aw_coa_gen.getBaseDetails(p_base_id,first_itm_term_rec.ld_cal_type,first_itm_term_rec.ld_sequence_number);
816: p_amount => ln_amount,
817: p_rate_order_num => ln_rate_order
818: ) THEN
819:
820: IF fnd_log.level_statement >= fnd_log.g_current_runtime_level THEN
821: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.add_coa_items.debug','is_attrib_matching found');
822: END IF;
823:
824: g_coa_updated := 'Y';
817: p_rate_order_num => ln_rate_order
818: ) THEN
819:
820: IF fnd_log.level_statement >= fnd_log.g_current_runtime_level THEN
821: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.add_coa_items.debug','is_attrib_matching found');
822: END IF;
823:
824: g_coa_updated := 'Y';
825: lv_terms_updated := 'Y';
849: END IF;
850:
851: --if the amount is NOT NULL COA Group Setup is used
852: ELSE
853: IF fnd_log.level_statement >= fnd_log.g_current_runtime_level THEN
854: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.add_coa_items.debug','first_itm_term_rec.item_term_amount IS NOT NULL');
855: END IF;
856:
857: g_coa_updated := 'Y';
850:
851: --if the amount is NOT NULL COA Group Setup is used
852: ELSE
853: IF fnd_log.level_statement >= fnd_log.g_current_runtime_level THEN
854: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.add_coa_items.debug','first_itm_term_rec.item_term_amount IS NOT NULL');
855: END IF;
856:
857: g_coa_updated := 'Y';
858: lv_terms_updated := 'Y';
890: RAISE E_SKIP_STD_NO_ITEMS;
891: END IF;
892:
893: ELSIF (exeorder='SECOND') THEN
894: IF fnd_log.level_statement >= fnd_log.g_current_runtime_level THEN
895: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.add_coa_items.debug','exeorder:'||exeorder);
896: END IF;
897: result := 'N';
898:
891: END IF;
892:
893: ELSIF (exeorder='SECOND') THEN
894: IF fnd_log.level_statement >= fnd_log.g_current_runtime_level THEN
895: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.add_coa_items.debug','exeorder:'||exeorder);
896: END IF;
897: result := 'N';
898:
899: IF g_update_coa = 'N' THEN
922: x_lock_flag => chk_item_match_rec.lock_award_flag
923: );
924:
925:
926: IF fnd_log.level_statement >= fnd_log.g_current_runtime_level THEN
927: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.add_coa_items.debug','added item '||chk_item_match_rec.new_item);
928: END IF;
929: FOR sec_itm_term_rec IN c_second_item_term( chk_item_match_rec.new_item,l_process_id) LOOP
930: l_rowid := NULL;
923: );
924:
925:
926: IF fnd_log.level_statement >= fnd_log.g_current_runtime_level THEN
927: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.add_coa_items.debug','added item '||chk_item_match_rec.new_item);
928: END IF;
929: FOR sec_itm_term_rec IN c_second_item_term( chk_item_match_rec.new_item,l_process_id) LOOP
930: l_rowid := NULL;
931:
930: l_rowid := NULL;
931:
932: --if the amount is NULL Rate Order Setup is used
933: IF sec_itm_term_rec.item_term_amount IS NULL THEN
934: IF fnd_log.level_statement >= fnd_log.g_current_runtime_level THEN
935: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.add_coa_items.debug','sec_itm_term_rec.item_term_amount IS NULL '||
936: 'and calling igf_aw_coa_gen.getBaseDetails');
937: END IF;
938:
931:
932: --if the amount is NULL Rate Order Setup is used
933: IF sec_itm_term_rec.item_term_amount IS NULL THEN
934: IF fnd_log.level_statement >= fnd_log.g_current_runtime_level THEN
935: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.add_coa_items.debug','sec_itm_term_rec.item_term_amount IS NULL '||
936: 'and calling igf_aw_coa_gen.getBaseDetails');
937: END IF;
938:
939: l_base_details := igf_aw_coa_gen.getBaseDetails(p_base_id,sec_itm_term_rec.ld_cal_type,sec_itm_term_rec.ld_sequence_number);
950: p_amount => ln_amount,
951: p_rate_order_num => ln_rate_order
952: ) THEN
953:
954: IF fnd_log.level_statement >= fnd_log.g_current_runtime_level THEN
955: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.add_coa_items.debug','is_attrib_matching found');
956: END IF;
957:
958: g_coa_updated := 'Y';
951: p_rate_order_num => ln_rate_order
952: ) THEN
953:
954: IF fnd_log.level_statement >= fnd_log.g_current_runtime_level THEN
955: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.add_coa_items.debug','is_attrib_matching found');
956: END IF;
957:
958: g_coa_updated := 'Y';
959: lv_terms_updated := 'Y';
983: END IF;
984:
985: --if the amount is NOT NULL COA Group Setup is used
986: ELSE
987: IF fnd_log.level_statement >= fnd_log.g_current_runtime_level THEN
988: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.add_coa_items.debug','sec_itm_term_rec.item_term_amount IS NOT NULL');
989: END IF;
990:
991: g_coa_updated := 'Y';
984:
985: --if the amount is NOT NULL COA Group Setup is used
986: ELSE
987: IF fnd_log.level_statement >= fnd_log.g_current_runtime_level THEN
988: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.add_coa_items.debug','sec_itm_term_rec.item_term_amount IS NOT NULL');
989: END IF;
990:
991: g_coa_updated := 'Y';
992: lv_terms_updated := 'Y';
1003: x_lock_flag => sec_itm_term_rec.lock_award_flag
1004: );
1005: END IF;
1006:
1007: IF fnd_log.level_statement >= fnd_log.g_current_runtime_level THEN
1008: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.add_coa_items.debug','ld_cal/ld_seq/amount->'||
1009: sec_itm_term_rec.ld_cal_type || ' / '||
1010: sec_itm_term_rec.ld_sequence_number || ' / ' ||
1011: sec_itm_term_rec.item_term_amount);
1004: );
1005: END IF;
1006:
1007: IF fnd_log.level_statement >= fnd_log.g_current_runtime_level THEN
1008: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.add_coa_items.debug','ld_cal/ld_seq/amount->'||
1009: sec_itm_term_rec.ld_cal_type || ' / '||
1010: sec_itm_term_rec.ld_sequence_number || ' / ' ||
1011: sec_itm_term_rec.item_term_amount);
1012: END IF;
1036: ELSIF g_update_coa = 'Y' THEN
1037: IF g_update_method = 'SKIP' THEN
1038: IF does_term_mismatch(p_base_id,l_process_id) THEN
1039: --log an error message
1040: IF fnd_log.level_statement >= fnd_log.g_current_runtime_level THEN
1041: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.add_coa_items.debug','g_override_inconsistent_terms = N!so erroring out');
1042: END IF;
1043: fnd_message.set_name('IGF','IGF_AW_COA_INCONSTENT_TERMS');
1044: fnd_file.put_line(fnd_file.log,RPAD(' ',10) || fnd_message.get);
1037: IF g_update_method = 'SKIP' THEN
1038: IF does_term_mismatch(p_base_id,l_process_id) THEN
1039: --log an error message
1040: IF fnd_log.level_statement >= fnd_log.g_current_runtime_level THEN
1041: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.add_coa_items.debug','g_override_inconsistent_terms = N!so erroring out');
1042: END IF;
1043: fnd_message.set_name('IGF','IGF_AW_COA_INCONSTENT_TERMS');
1044: fnd_file.put_line(fnd_file.log,RPAD(' ',10) || fnd_message.get);
1045: result := 'N';
1063: x_mode => 'R',
1064: x_lock_flag => chk_item_match_rec.lock_award_flag
1065: );
1066:
1067: IF fnd_log.level_statement >= fnd_log.g_current_runtime_level THEN
1068: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.add_coa_items.debug','added item '||chk_item_match_rec.new_item);
1069: END IF;
1070:
1071: -- start adding terms and term amounts
1064: x_lock_flag => chk_item_match_rec.lock_award_flag
1065: );
1066:
1067: IF fnd_log.level_statement >= fnd_log.g_current_runtime_level THEN
1068: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.add_coa_items.debug','added item '||chk_item_match_rec.new_item);
1069: END IF;
1070:
1071: -- start adding terms and term amounts
1072: FOR sec_itm_term_rec IN c_second_item_term(chk_item_match_rec.new_item,l_process_id) LOOP
1073: l_rowid := NULL;
1074:
1075: --if the amount is NULL Rate Order Setup is used
1076: IF sec_itm_term_rec.item_term_amount IS NULL THEN
1077: IF fnd_log.level_statement >= fnd_log.g_current_runtime_level THEN
1078: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.add_coa_items.debug','sec_itm_term_rec.item_term_amount IS NULL '||
1079: 'and calling igf_aw_coa_gen.getBaseDetails');
1080: END IF;
1081:
1074:
1075: --if the amount is NULL Rate Order Setup is used
1076: IF sec_itm_term_rec.item_term_amount IS NULL THEN
1077: IF fnd_log.level_statement >= fnd_log.g_current_runtime_level THEN
1078: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.add_coa_items.debug','sec_itm_term_rec.item_term_amount IS NULL '||
1079: 'and calling igf_aw_coa_gen.getBaseDetails');
1080: END IF;
1081:
1082: l_base_details := igf_aw_coa_gen.getBaseDetails(p_base_id,sec_itm_term_rec.ld_cal_type,sec_itm_term_rec.ld_sequence_number);
1093: p_amount => ln_amount,
1094: p_rate_order_num => ln_rate_order
1095: ) THEN
1096:
1097: IF fnd_log.level_statement >= fnd_log.g_current_runtime_level THEN
1098: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.add_coa_items.debug','is_attrib_matching found');
1099: END IF;
1100:
1101: g_coa_updated := 'Y';
1094: p_rate_order_num => ln_rate_order
1095: ) THEN
1096:
1097: IF fnd_log.level_statement >= fnd_log.g_current_runtime_level THEN
1098: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.add_coa_items.debug','is_attrib_matching found');
1099: END IF;
1100:
1101: g_coa_updated := 'Y';
1102: lv_terms_updated := 'Y';
1143: );
1144:
1145: END IF;
1146:
1147: IF fnd_log.level_statement >= fnd_log.g_current_runtime_level THEN
1148: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.add_coa_items.debug','ld_cal/ld_seq/amount->'||
1149: sec_itm_term_rec.ld_cal_type || ' / '||
1150: sec_itm_term_rec.ld_sequence_number || ' / ' ||
1151: sec_itm_term_rec.item_term_amount);
1144:
1145: END IF;
1146:
1147: IF fnd_log.level_statement >= fnd_log.g_current_runtime_level THEN
1148: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.add_coa_items.debug','ld_cal/ld_seq/amount->'||
1149: sec_itm_term_rec.ld_cal_type || ' / '||
1150: sec_itm_term_rec.ld_sequence_number || ' / ' ||
1151: sec_itm_term_rec.item_term_amount);
1152: END IF;
1170: ELSE
1171: --the student has the COA item assigned
1172: --so if it needs update, update it
1173: IF coa_needs_update(chk_item_match_rec.new_item,p_base_id,chk_item_match_rec.item_amount,chk_item_match_rec.pell_amt,chk_item_match_rec.pell_alt_amt,chk_item_match_rec.fixed_cost) THEN
1174: IF fnd_log.level_statement >= fnd_log.g_current_runtime_level THEN
1175: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.add_coa_items.debug','updating item '||chk_item_match_rec.new_item);
1176: END IF;
1177: igf_aw_coa_items_pkg.update_row(
1178: x_rowid => chk_item_match_rec.row_id,
1171: --the student has the COA item assigned
1172: --so if it needs update, update it
1173: IF coa_needs_update(chk_item_match_rec.new_item,p_base_id,chk_item_match_rec.item_amount,chk_item_match_rec.pell_amt,chk_item_match_rec.pell_alt_amt,chk_item_match_rec.fixed_cost) THEN
1174: IF fnd_log.level_statement >= fnd_log.g_current_runtime_level THEN
1175: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.add_coa_items.debug','updating item '||chk_item_match_rec.new_item);
1176: END IF;
1177: igf_aw_coa_items_pkg.update_row(
1178: x_rowid => chk_item_match_rec.row_id,
1179: x_base_id => p_base_id,
1206: fnd_file.put_line(fnd_file.log,RPAD(' ',10)||fnd_message.get);
1207: ELSE
1208: --if the amount is NULL Rate Order Setup is used
1209: IF sec_itm_term_rec.item_term_amount IS NULL THEN
1210: IF fnd_log.level_statement >= fnd_log.g_current_runtime_level THEN
1211: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.add_coa_items.debug','sec_itm_term_rec.item_term_amount IS NULL '||
1212: 'and calling igf_aw_coa_gen.getBaseDetails');
1213: END IF;
1214:
1207: ELSE
1208: --if the amount is NULL Rate Order Setup is used
1209: IF sec_itm_term_rec.item_term_amount IS NULL THEN
1210: IF fnd_log.level_statement >= fnd_log.g_current_runtime_level THEN
1211: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.add_coa_items.debug','sec_itm_term_rec.item_term_amount IS NULL '||
1212: 'and calling igf_aw_coa_gen.getBaseDetails');
1213: END IF;
1214:
1215: l_base_details := igf_aw_coa_gen.getBaseDetails(p_base_id,sec_itm_term_rec.ld_cal_type,sec_itm_term_rec.ld_sequence_number);
1226: p_amount => ln_amount,
1227: p_rate_order_num => ln_rate_order
1228: ) THEN
1229:
1230: IF fnd_log.level_statement >= fnd_log.g_current_runtime_level THEN
1231: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.add_coa_items.debug','is_attrib_matching found');
1232: END IF;
1233:
1234: g_coa_updated := 'Y';
1227: p_rate_order_num => ln_rate_order
1228: ) THEN
1229:
1230: IF fnd_log.level_statement >= fnd_log.g_current_runtime_level THEN
1231: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.add_coa_items.debug','is_attrib_matching found');
1232: END IF;
1233:
1234: g_coa_updated := 'Y';
1235: lv_terms_updated := 'Y';
1259: END IF;
1260:
1261: --if the amount is NOT NULL COA Group Setup is used
1262: ELSE
1263: IF fnd_log.level_statement >= fnd_log.g_current_runtime_level THEN
1264: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.add_coa_items.debug','sec_itm_term_rec.item_term_amount IS NOT NULL');
1265: END IF;
1266:
1267: igf_aw_coa_itm_terms_pkg.update_row(
1260:
1261: --if the amount is NOT NULL COA Group Setup is used
1262: ELSE
1263: IF fnd_log.level_statement >= fnd_log.g_current_runtime_level THEN
1264: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.add_coa_items.debug','sec_itm_term_rec.item_term_amount IS NOT NULL');
1265: END IF;
1266:
1267: igf_aw_coa_itm_terms_pkg.update_row(
1268: x_rowid => l_item_term.row_id,
1280: lv_terms_updated := 'Y';
1281: lv_item_assigned := 'Y';
1282: END IF;
1283:
1284: IF fnd_log.level_statement >= fnd_log.g_current_runtime_level THEN
1285: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.add_coa_items.debug','ld_cal/ld_seq/amount->'||
1286: sec_itm_term_rec.ld_cal_type || ' / '||
1287: sec_itm_term_rec.ld_sequence_number || ' / ' ||
1288: sec_itm_term_rec.item_term_amount);
1281: lv_item_assigned := 'Y';
1282: END IF;
1283:
1284: IF fnd_log.level_statement >= fnd_log.g_current_runtime_level THEN
1285: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.add_coa_items.debug','ld_cal/ld_seq/amount->'||
1286: sec_itm_term_rec.ld_cal_type || ' / '||
1287: sec_itm_term_rec.ld_sequence_number || ' / ' ||
1288: sec_itm_term_rec.item_term_amount);
1289: END IF;
1316: END IF;
1317: ELSIF g_update_method = 'OVERWRITE' THEN
1318: IF does_term_mismatch(p_base_id,l_process_id) THEN
1319: --delete and recreate COA
1320: IF fnd_log.level_statement >= fnd_log.g_current_runtime_level THEN
1321: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.add_coa_items.debug','calling delete_coa');
1322: END IF;
1323:
1324: --delete only if it is unlock
1317: ELSIF g_update_method = 'OVERWRITE' THEN
1318: IF does_term_mismatch(p_base_id,l_process_id) THEN
1319: --delete and recreate COA
1320: IF fnd_log.level_statement >= fnd_log.g_current_runtime_level THEN
1321: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.add_coa_items.debug','calling delete_coa');
1322: END IF;
1323:
1324: --delete only if it is unlock
1325: IF NOT iscoalocked(p_base_id) THEN
1327: END IF;
1328:
1329: delete_coa(p_base_id);
1330:
1331: IF fnd_log.level_statement >= fnd_log.g_current_runtime_level THEN
1332: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.add_coa_items.debug','calling add_coa_items with exeorder=FIRST');
1333: END IF;
1334:
1335: add_coa_items(
1328:
1329: delete_coa(p_base_id);
1330:
1331: IF fnd_log.level_statement >= fnd_log.g_current_runtime_level THEN
1332: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.add_coa_items.debug','calling add_coa_items with exeorder=FIRST');
1333: END IF;
1334:
1335: add_coa_items(
1336: p_base_id,
1360: x_lock_flag => chk_item_match_rec.lock_award_flag
1361: );
1362:
1363:
1364: IF fnd_log.level_statement >= fnd_log.g_current_runtime_level THEN
1365: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.add_coa_items.debug','added item '||chk_item_match_rec.new_item);
1366: END IF;
1367:
1368: -- start adding terms and term amounts
1361: );
1362:
1363:
1364: IF fnd_log.level_statement >= fnd_log.g_current_runtime_level THEN
1365: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.add_coa_items.debug','added item '||chk_item_match_rec.new_item);
1366: END IF;
1367:
1368: -- start adding terms and term amounts
1369: FOR sec_itm_term_rec IN c_second_item_term(chk_item_match_rec.new_item,l_process_id) LOOP
1370: l_rowid := NULL;
1371:
1372: --if the amount is NULL Rate Order Setup is used
1373: IF sec_itm_term_rec.item_term_amount IS NULL THEN
1374: IF fnd_log.level_statement >= fnd_log.g_current_runtime_level THEN
1375: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.add_coa_items.debug','sec_itm_term_rec.item_term_amount IS NULL '||
1376: 'and calling igf_aw_coa_gen.getBaseDetails');
1377: END IF;
1378:
1371:
1372: --if the amount is NULL Rate Order Setup is used
1373: IF sec_itm_term_rec.item_term_amount IS NULL THEN
1374: IF fnd_log.level_statement >= fnd_log.g_current_runtime_level THEN
1375: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.add_coa_items.debug','sec_itm_term_rec.item_term_amount IS NULL '||
1376: 'and calling igf_aw_coa_gen.getBaseDetails');
1377: END IF;
1378:
1379: l_base_details := igf_aw_coa_gen.getBaseDetails(p_base_id,sec_itm_term_rec.ld_cal_type,sec_itm_term_rec.ld_sequence_number);
1390: p_amount => ln_amount,
1391: p_rate_order_num => ln_rate_order
1392: ) THEN
1393:
1394: IF fnd_log.level_statement >= fnd_log.g_current_runtime_level THEN
1395: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.add_coa_items.debug','is_attrib_matching found');
1396: END IF;
1397:
1398: g_coa_updated := 'Y';
1391: p_rate_order_num => ln_rate_order
1392: ) THEN
1393:
1394: IF fnd_log.level_statement >= fnd_log.g_current_runtime_level THEN
1395: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.add_coa_items.debug','is_attrib_matching found');
1396: END IF;
1397:
1398: g_coa_updated := 'Y';
1399: lv_terms_updated := 'Y';
1439: x_lock_flag => sec_itm_term_rec.lock_award_flag
1440: );
1441: END IF;
1442:
1443: IF fnd_log.level_statement >= fnd_log.g_current_runtime_level THEN
1444: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.add_coa_items.debug','ld_cal/ld_seq/amount->'||
1445: sec_itm_term_rec.ld_cal_type || ' / '||
1446: sec_itm_term_rec.ld_sequence_number || ' / ' ||
1447: sec_itm_term_rec.item_term_amount);
1440: );
1441: END IF;
1442:
1443: IF fnd_log.level_statement >= fnd_log.g_current_runtime_level THEN
1444: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.add_coa_items.debug','ld_cal/ld_seq/amount->'||
1445: sec_itm_term_rec.ld_cal_type || ' / '||
1446: sec_itm_term_rec.ld_sequence_number || ' / ' ||
1447: sec_itm_term_rec.item_term_amount);
1448: END IF;
1480: g_coa_updated := 'Y' ;
1481: lv_item_assigned := 'N';
1482:
1483:
1484: IF fnd_log.level_statement >= fnd_log.g_current_runtime_level THEN
1485: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.add_coa_items.debug','changed item '||chk_item_match_rec.new_item);
1486: END IF;
1487:
1488: FOR sec_itm_term_rec IN c_second_item_term(chk_item_match_rec.new_item,l_process_id) LOOP
1481: lv_item_assigned := 'N';
1482:
1483:
1484: IF fnd_log.level_statement >= fnd_log.g_current_runtime_level THEN
1485: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.add_coa_items.debug','changed item '||chk_item_match_rec.new_item);
1486: END IF;
1487:
1488: FOR sec_itm_term_rec IN c_second_item_term(chk_item_match_rec.new_item,l_process_id) LOOP
1489: l_rowid := NULL;
1503: ELSE
1504:
1505: --if the amount is NULL Rate Order Setup is used
1506: IF sec_itm_term_rec.item_term_amount IS NULL THEN
1507: IF fnd_log.level_statement >= fnd_log.g_current_runtime_level THEN
1508: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.add_coa_items.debug','sec_itm_term_rec.item_term_amount IS NULL '||
1509: 'and calling igf_aw_coa_gen.getBaseDetails');
1510: END IF;
1511:
1504:
1505: --if the amount is NULL Rate Order Setup is used
1506: IF sec_itm_term_rec.item_term_amount IS NULL THEN
1507: IF fnd_log.level_statement >= fnd_log.g_current_runtime_level THEN
1508: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.add_coa_items.debug','sec_itm_term_rec.item_term_amount IS NULL '||
1509: 'and calling igf_aw_coa_gen.getBaseDetails');
1510: END IF;
1511:
1512: l_base_details := igf_aw_coa_gen.getBaseDetails(p_base_id,sec_itm_term_rec.ld_cal_type,sec_itm_term_rec.ld_sequence_number);
1523: p_amount => ln_amount,
1524: p_rate_order_num => ln_rate_order
1525: ) THEN
1526:
1527: IF fnd_log.level_statement >= fnd_log.g_current_runtime_level THEN
1528: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.add_coa_items.debug','is_attrib_matching found');
1529: END IF;
1530:
1531: g_coa_updated := 'Y';
1524: p_rate_order_num => ln_rate_order
1525: ) THEN
1526:
1527: IF fnd_log.level_statement >= fnd_log.g_current_runtime_level THEN
1528: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.add_coa_items.debug','is_attrib_matching found');
1529: END IF;
1530:
1531: g_coa_updated := 'Y';
1532: lv_terms_updated := 'Y';
1556: END IF;
1557:
1558: --if the amount is NOT NULL COA Group Setup is used
1559: ELSE
1560: IF fnd_log.level_statement >= fnd_log.g_current_runtime_level THEN
1561: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.add_coa_items.debug','sec_itm_term_rec.item_term_amount IS NOT NULL');
1562: END IF;
1563:
1564: igf_aw_coa_itm_terms_pkg.update_row(
1557:
1558: --if the amount is NOT NULL COA Group Setup is used
1559: ELSE
1560: IF fnd_log.level_statement >= fnd_log.g_current_runtime_level THEN
1561: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.add_coa_items.debug','sec_itm_term_rec.item_term_amount IS NOT NULL');
1562: END IF;
1563:
1564: igf_aw_coa_itm_terms_pkg.update_row(
1565: x_rowid => l_item_term.row_id,
1575: lv_terms_updated := 'Y';
1576: lv_item_assigned := 'Y';
1577: END IF;
1578:
1579: IF fnd_log.level_statement >= fnd_log.g_current_runtime_level THEN
1580: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.add_coa_items.debug','ld_cal/ld_seq/amount->'||
1581: sec_itm_term_rec.ld_cal_type || ' / '||
1582: sec_itm_term_rec.ld_sequence_number || ' / ' ||
1583: sec_itm_term_rec.item_term_amount);
1576: lv_item_assigned := 'Y';
1577: END IF;
1578:
1579: IF fnd_log.level_statement >= fnd_log.g_current_runtime_level THEN
1580: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.add_coa_items.debug','ld_cal/ld_seq/amount->'||
1581: sec_itm_term_rec.ld_cal_type || ' / '||
1582: sec_itm_term_rec.ld_sequence_number || ' / ' ||
1583: sec_itm_term_rec.item_term_amount);
1584: END IF;
1647: RAISE E_SKIP_STD_NO_TERMS;
1648: WHEN OTHERS THEN
1649: fnd_message.set_name('IGS','IGS_GE_UNHANDLED_EXP');
1650: fnd_message.set_token('NAME','IGF_AW_COA_CALC.ADD_COA_ITEMS' || ' '|| SQLERRM);
1651: IF fnd_log.level_exception >= fnd_log.g_current_runtime_level THEN
1652: fnd_log.string(fnd_log.level_exception,'igf.plsql.igf_aw_coa_calc.add_coa_items.exception','sql error message: '||SQLERRM);
1653: END IF;
1654:
1655: igs_ge_msg_stack.conc_exception_hndl;
1648: WHEN OTHERS THEN
1649: fnd_message.set_name('IGS','IGS_GE_UNHANDLED_EXP');
1650: fnd_message.set_token('NAME','IGF_AW_COA_CALC.ADD_COA_ITEMS' || ' '|| SQLERRM);
1651: IF fnd_log.level_exception >= fnd_log.g_current_runtime_level THEN
1652: fnd_log.string(fnd_log.level_exception,'igf.plsql.igf_aw_coa_calc.add_coa_items.exception','sql error message: '||SQLERRM);
1653: END IF;
1654:
1655: igs_ge_msg_stack.conc_exception_hndl;
1656: app_exception.raise_exception;
1725: EXCEPTION
1726: WHEN OTHERS THEN
1727: fnd_message.set_name('IGS','IGS_GE_UNHANDLED_EXP');
1728: fnd_message.set_token('NAME','IGF_AW_COA_CALC.PRINT_OUTPUT_FILE' || ' '|| SQLERRM);
1729: IF fnd_log.level_exception >= fnd_log.g_current_runtime_level THEN
1730: fnd_log.string(fnd_log.level_exception,'igf.plsql.igf_aw_coa_calc.print_output_file.exception','sql error message: '||SQLERRM);
1731: END IF;
1732: igs_ge_msg_stack.conc_exception_hndl;
1733: app_exception.raise_exception;
1726: WHEN OTHERS THEN
1727: fnd_message.set_name('IGS','IGS_GE_UNHANDLED_EXP');
1728: fnd_message.set_token('NAME','IGF_AW_COA_CALC.PRINT_OUTPUT_FILE' || ' '|| SQLERRM);
1729: IF fnd_log.level_exception >= fnd_log.g_current_runtime_level THEN
1730: fnd_log.string(fnd_log.level_exception,'igf.plsql.igf_aw_coa_calc.print_output_file.exception','sql error message: '||SQLERRM);
1731: END IF;
1732: igs_ge_msg_stack.conc_exception_hndl;
1733: app_exception.raise_exception;
1734: END print_output_file;
1817:
1818: SAVEPOINT start_coa_calc;
1819: g_coa_updated := 'N' ;
1820:
1821: IF fnd_log.level_statement >= fnd_log.g_current_runtime_level THEN
1822: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.process_student.debug','starting process_student with ' ||
1823: 'base_id/group->' ||
1824: p_base_id || ' / ' ||
1825: p_grp_code);
1818: SAVEPOINT start_coa_calc;
1819: g_coa_updated := 'N' ;
1820:
1821: IF fnd_log.level_statement >= fnd_log.g_current_runtime_level THEN
1822: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.process_student.debug','starting process_student with ' ||
1823: 'base_id/group->' ||
1824: p_base_id || ' / ' ||
1825: p_grp_code);
1826: END IF;
1841: OPEN cur_per_coa(p_base_id);
1842: FETCH cur_per_coa INTO l_cur_per_coa ;
1843:
1844: IF cur_per_coa%FOUND THEN
1845: IF fnd_log.level_statement >= fnd_log.g_current_runtime_level THEN
1846: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.process_student.debug','calling add_coa_items with exeorder SECOND');
1847: END IF;
1848: add_coa_items(
1849: p_base_id,
1842: FETCH cur_per_coa INTO l_cur_per_coa ;
1843:
1844: IF cur_per_coa%FOUND THEN
1845: IF fnd_log.level_statement >= fnd_log.g_current_runtime_level THEN
1846: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.process_student.debug','calling add_coa_items with exeorder SECOND');
1847: END IF;
1848: add_coa_items(
1849: p_base_id,
1850: p_grp_code,
1852: p_process_id,
1853: lv_result
1854: );
1855: ELSIF cur_per_coa%NOTFOUND THEN
1856: IF fnd_log.level_statement >= fnd_log.g_current_runtime_level THEN
1857: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.process_student.debug','calling add_coa_items with exeorder FIRST');
1858: END IF;
1859: add_coa_items(
1860: p_base_id,
1853: lv_result
1854: );
1855: ELSIF cur_per_coa%NOTFOUND THEN
1856: IF fnd_log.level_statement >= fnd_log.g_current_runtime_level THEN
1857: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.process_student.debug','calling add_coa_items with exeorder FIRST');
1858: END IF;
1859: add_coa_items(
1860: p_base_id,
1861: p_grp_code,
1865: );
1866: END IF;
1867: CLOSE cur_per_coa;
1868:
1869: IF fnd_log.level_statement >= fnd_log.g_current_runtime_level THEN
1870: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.process_student.debug','add_coa_items_returned lv_result:'||lv_result);
1871: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.process_student.debug','calling igf_aw_gen_003.updating_coa_in_fa_base');
1872: END IF;
1873: igf_aw_gen_003.updating_coa_in_fa_base(p_base_id);
1866: END IF;
1867: CLOSE cur_per_coa;
1868:
1869: IF fnd_log.level_statement >= fnd_log.g_current_runtime_level THEN
1870: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.process_student.debug','add_coa_items_returned lv_result:'||lv_result);
1871: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.process_student.debug','calling igf_aw_gen_003.updating_coa_in_fa_base');
1872: END IF;
1873: igf_aw_gen_003.updating_coa_in_fa_base(p_base_id);
1874:
1867: CLOSE cur_per_coa;
1868:
1869: IF fnd_log.level_statement >= fnd_log.g_current_runtime_level THEN
1870: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.process_student.debug','add_coa_items_returned lv_result:'||lv_result);
1871: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.process_student.debug','calling igf_aw_gen_003.updating_coa_in_fa_base');
1872: END IF;
1873: igf_aw_gen_003.updating_coa_in_fa_base(p_base_id);
1874:
1875: IF lv_result = 'Y' AND g_coa_updated = 'Y' THEN
1872: END IF;
1873: igf_aw_gen_003.updating_coa_in_fa_base(p_base_id);
1874:
1875: IF lv_result = 'Y' AND g_coa_updated = 'Y' THEN
1876: IF fnd_log.level_statement >= fnd_log.g_current_runtime_level THEN
1877: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.process_student.debug','calling print_output_file, and checking overaward');
1878: END IF;
1879:
1880: print_output_file(p_base_id);
1873: igf_aw_gen_003.updating_coa_in_fa_base(p_base_id);
1874:
1875: IF lv_result = 'Y' AND g_coa_updated = 'Y' THEN
1876: IF fnd_log.level_statement >= fnd_log.g_current_runtime_level THEN
1877: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.process_student.debug','calling print_output_file, and checking overaward');
1878: END IF;
1879:
1880: print_output_file(p_base_id);
1881:
1893: OPEN c_pell_coa(p_base_id);
1894: FETCH c_pell_coa INTO l_new_coa;
1895: CLOSE c_pell_coa;
1896:
1897: IF fnd_log.level_statement >= fnd_log.g_current_runtime_level THEN
1898: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.process_student.debug','l_old_coa.pell_coa:'||l_old_coa.pell_coa);
1899: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.process_student.debug','l_new_coa.pell_coa:'||l_new_coa.pell_coa);
1900: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.process_student.debug','l_old_coa.alt_pell_coa:'||l_old_coa.alt_pell_coa);
1901: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.process_student.debug','l_new_coa.alt_pell_coa:'||l_new_coa.alt_pell_coa);
1894: FETCH c_pell_coa INTO l_new_coa;
1895: CLOSE c_pell_coa;
1896:
1897: IF fnd_log.level_statement >= fnd_log.g_current_runtime_level THEN
1898: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.process_student.debug','l_old_coa.pell_coa:'||l_old_coa.pell_coa);
1899: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.process_student.debug','l_new_coa.pell_coa:'||l_new_coa.pell_coa);
1900: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.process_student.debug','l_old_coa.alt_pell_coa:'||l_old_coa.alt_pell_coa);
1901: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.process_student.debug','l_new_coa.alt_pell_coa:'||l_new_coa.alt_pell_coa);
1902: END IF;
1895: CLOSE c_pell_coa;
1896:
1897: IF fnd_log.level_statement >= fnd_log.g_current_runtime_level THEN
1898: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.process_student.debug','l_old_coa.pell_coa:'||l_old_coa.pell_coa);
1899: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.process_student.debug','l_new_coa.pell_coa:'||l_new_coa.pell_coa);
1900: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.process_student.debug','l_old_coa.alt_pell_coa:'||l_old_coa.alt_pell_coa);
1901: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.process_student.debug','l_new_coa.alt_pell_coa:'||l_new_coa.alt_pell_coa);
1902: END IF;
1903:
1896:
1897: IF fnd_log.level_statement >= fnd_log.g_current_runtime_level THEN
1898: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.process_student.debug','l_old_coa.pell_coa:'||l_old_coa.pell_coa);
1899: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.process_student.debug','l_new_coa.pell_coa:'||l_new_coa.pell_coa);
1900: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.process_student.debug','l_old_coa.alt_pell_coa:'||l_old_coa.alt_pell_coa);
1901: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.process_student.debug','l_new_coa.alt_pell_coa:'||l_new_coa.alt_pell_coa);
1902: END IF;
1903:
1904: IF l_old_coa.pell_coa <> l_new_coa.pell_coa OR l_old_coa.alt_pell_coa <> l_new_coa.alt_pell_coa THEN
1897: IF fnd_log.level_statement >= fnd_log.g_current_runtime_level THEN
1898: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.process_student.debug','l_old_coa.pell_coa:'||l_old_coa.pell_coa);
1899: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.process_student.debug','l_new_coa.pell_coa:'||l_new_coa.pell_coa);
1900: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.process_student.debug','l_old_coa.alt_pell_coa:'||l_old_coa.alt_pell_coa);
1901: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.process_student.debug','l_new_coa.alt_pell_coa:'||l_new_coa.alt_pell_coa);
1902: END IF;
1903:
1904: IF l_old_coa.pell_coa <> l_new_coa.pell_coa OR l_old_coa.alt_pell_coa <> l_new_coa.alt_pell_coa THEN
1905: fnd_message.set_name('IGF','IGF_AW_PELL_COA_CHNG');
1933:
1934: fnd_message.set_name('IGF','IGF_SL_SKIPPING');
1935: fnd_file.put_line(fnd_file.log,RPAD(' ',10,' ') || fnd_message.get());
1936:
1937: IF fnd_log.level_exception >= fnd_log.g_current_runtime_level THEN
1938: fnd_log.string(fnd_log.level_exception,'igf.plsql.igf_aw_coa_calc.process_student.exception','sql error message: '||SQLERRM);
1939: END IF;
1940:
1941: WHEN E_SKIP_STD_NO_ITEMS THEN
1934: fnd_message.set_name('IGF','IGF_SL_SKIPPING');
1935: fnd_file.put_line(fnd_file.log,RPAD(' ',10,' ') || fnd_message.get());
1936:
1937: IF fnd_log.level_exception >= fnd_log.g_current_runtime_level THEN
1938: fnd_log.string(fnd_log.level_exception,'igf.plsql.igf_aw_coa_calc.process_student.exception','sql error message: '||SQLERRM);
1939: END IF;
1940:
1941: WHEN E_SKIP_STD_NO_ITEMS THEN
1942: ROLLBACK TO start_coa_calc;
1942: ROLLBACK TO start_coa_calc;
1943: fnd_message.set_name('IGF','IGF_AW_STD_SKIP_ASSGN');
1944: fnd_file.put_line(fnd_file.log,RPAD(' ',10,' ') || fnd_message.get());
1945:
1946: IF fnd_log.level_exception >= fnd_log.g_current_runtime_level THEN
1947: fnd_log.string(fnd_log.level_exception,'igf.plsql.igf_aw_coa_calc.process_student.exception','sql error message: '||SQLERRM);
1948: END IF;
1949:
1950: WHEN E_SKIP_STD_NO_TERMS THEN
1943: fnd_message.set_name('IGF','IGF_AW_STD_SKIP_ASSGN');
1944: fnd_file.put_line(fnd_file.log,RPAD(' ',10,' ') || fnd_message.get());
1945:
1946: IF fnd_log.level_exception >= fnd_log.g_current_runtime_level THEN
1947: fnd_log.string(fnd_log.level_exception,'igf.plsql.igf_aw_coa_calc.process_student.exception','sql error message: '||SQLERRM);
1948: END IF;
1949:
1950: WHEN E_SKIP_STD_NO_TERMS THEN
1951: ROLLBACK TO start_coa_calc;
1954:
1955: fnd_message.set_name('IGF','IGF_AW_RATE_NOT_AVAIL');
1956: fnd_file.put_line(fnd_file.log,RPAD(' ',10,' ') || fnd_message.get());
1957:
1958: IF fnd_log.level_exception >= fnd_log.g_current_runtime_level THEN
1959: fnd_log.string(fnd_log.level_exception,'igf.plsql.igf_aw_coa_calc.process_student.exception','sql error message: '||SQLERRM);
1960: END IF;
1961:
1962: WHEN OTHERS THEN
1955: fnd_message.set_name('IGF','IGF_AW_RATE_NOT_AVAIL');
1956: fnd_file.put_line(fnd_file.log,RPAD(' ',10,' ') || fnd_message.get());
1957:
1958: IF fnd_log.level_exception >= fnd_log.g_current_runtime_level THEN
1959: fnd_log.string(fnd_log.level_exception,'igf.plsql.igf_aw_coa_calc.process_student.exception','sql error message: '||SQLERRM);
1960: END IF;
1961:
1962: WHEN OTHERS THEN
1963: ROLLBACK TO start_coa_calc;
1961:
1962: WHEN OTHERS THEN
1963: ROLLBACK TO start_coa_calc;
1964:
1965: IF fnd_log.level_exception >= fnd_log.g_current_runtime_level THEN
1966: fnd_log.string(fnd_log.level_exception,'igf.plsql.igf_aw_coa_calc.process_student.exception','sql error message: '||SQLERRM);
1967: END IF;
1968:
1969: fnd_message.set_name('IGS','IGS_GE_UNHANDLED_EXP');
1962: WHEN OTHERS THEN
1963: ROLLBACK TO start_coa_calc;
1964:
1965: IF fnd_log.level_exception >= fnd_log.g_current_runtime_level THEN
1966: fnd_log.string(fnd_log.level_exception,'igf.plsql.igf_aw_coa_calc.process_student.exception','sql error message: '||SQLERRM);
1967: END IF;
1968:
1969: fnd_message.set_name('IGS','IGS_GE_UNHANDLED_EXP');
1970: fnd_message.set_token('NAME','IGF_AW_COA_CALC.PROCESS_STUDENT' || ' '||SQLERRM);
2074: g_sequence_number := TO_NUMBER(SUBSTR(p_award_year,11));
2075: g_update_coa := p_update_coa;
2076: g_update_method := p_update_method;
2077:
2078: IF fnd_log.level_statement >= fnd_log.g_current_runtime_level THEN
2079: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.run.debug','p_award_year:'||p_award_year);
2080: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.run.debug','p_grp_code:'||p_grp_code);
2081: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.run.debug','l_run_type:'||l_run_type);
2082: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.run.debug','p_pergrp_id:'||p_pergrp_id);
2075: g_update_coa := p_update_coa;
2076: g_update_method := p_update_method;
2077:
2078: IF fnd_log.level_statement >= fnd_log.g_current_runtime_level THEN
2079: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.run.debug','p_award_year:'||p_award_year);
2080: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.run.debug','p_grp_code:'||p_grp_code);
2081: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.run.debug','l_run_type:'||l_run_type);
2082: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.run.debug','p_pergrp_id:'||p_pergrp_id);
2083: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.run.debug','p_base_id:'||p_base_id);
2076: g_update_method := p_update_method;
2077:
2078: IF fnd_log.level_statement >= fnd_log.g_current_runtime_level THEN
2079: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.run.debug','p_award_year:'||p_award_year);
2080: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.run.debug','p_grp_code:'||p_grp_code);
2081: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.run.debug','l_run_type:'||l_run_type);
2082: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.run.debug','p_pergrp_id:'||p_pergrp_id);
2083: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.run.debug','p_base_id:'||p_base_id);
2084: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.run.debug','p_update_coa:'||p_update_coa);
2077:
2078: IF fnd_log.level_statement >= fnd_log.g_current_runtime_level THEN
2079: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.run.debug','p_award_year:'||p_award_year);
2080: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.run.debug','p_grp_code:'||p_grp_code);
2081: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.run.debug','l_run_type:'||l_run_type);
2082: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.run.debug','p_pergrp_id:'||p_pergrp_id);
2083: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.run.debug','p_base_id:'||p_base_id);
2084: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.run.debug','p_update_coa:'||p_update_coa);
2085: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.run.debug','p_update_method:'||p_update_method);
2078: IF fnd_log.level_statement >= fnd_log.g_current_runtime_level THEN
2079: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.run.debug','p_award_year:'||p_award_year);
2080: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.run.debug','p_grp_code:'||p_grp_code);
2081: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.run.debug','l_run_type:'||l_run_type);
2082: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.run.debug','p_pergrp_id:'||p_pergrp_id);
2083: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.run.debug','p_base_id:'||p_base_id);
2084: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.run.debug','p_update_coa:'||p_update_coa);
2085: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.run.debug','p_update_method:'||p_update_method);
2086: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.run.debug','l_ci_cal_type:'||l_ci_cal_type);
2079: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.run.debug','p_award_year:'||p_award_year);
2080: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.run.debug','p_grp_code:'||p_grp_code);
2081: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.run.debug','l_run_type:'||l_run_type);
2082: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.run.debug','p_pergrp_id:'||p_pergrp_id);
2083: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.run.debug','p_base_id:'||p_base_id);
2084: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.run.debug','p_update_coa:'||p_update_coa);
2085: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.run.debug','p_update_method:'||p_update_method);
2086: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.run.debug','l_ci_cal_type:'||l_ci_cal_type);
2087: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.run.debug','l_ci_sequence_number:'||l_ci_sequence_number);
2080: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.run.debug','p_grp_code:'||p_grp_code);
2081: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.run.debug','l_run_type:'||l_run_type);
2082: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.run.debug','p_pergrp_id:'||p_pergrp_id);
2083: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.run.debug','p_base_id:'||p_base_id);
2084: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.run.debug','p_update_coa:'||p_update_coa);
2085: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.run.debug','p_update_method:'||p_update_method);
2086: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.run.debug','l_ci_cal_type:'||l_ci_cal_type);
2087: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.run.debug','l_ci_sequence_number:'||l_ci_sequence_number);
2088: END IF;
2081: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.run.debug','l_run_type:'||l_run_type);
2082: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.run.debug','p_pergrp_id:'||p_pergrp_id);
2083: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.run.debug','p_base_id:'||p_base_id);
2084: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.run.debug','p_update_coa:'||p_update_coa);
2085: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.run.debug','p_update_method:'||p_update_method);
2086: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.run.debug','l_ci_cal_type:'||l_ci_cal_type);
2087: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.run.debug','l_ci_sequence_number:'||l_ci_sequence_number);
2088: END IF;
2089:
2082: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.run.debug','p_pergrp_id:'||p_pergrp_id);
2083: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.run.debug','p_base_id:'||p_base_id);
2084: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.run.debug','p_update_coa:'||p_update_coa);
2085: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.run.debug','p_update_method:'||p_update_method);
2086: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.run.debug','l_ci_cal_type:'||l_ci_cal_type);
2087: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.run.debug','l_ci_sequence_number:'||l_ci_sequence_number);
2088: END IF;
2089:
2090: fnd_file.new_line(fnd_file.log,1);
2083: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.run.debug','p_base_id:'||p_base_id);
2084: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.run.debug','p_update_coa:'||p_update_coa);
2085: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.run.debug','p_update_method:'||p_update_method);
2086: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.run.debug','l_ci_cal_type:'||l_ci_cal_type);
2087: fnd_log.string(fnd_log.level_statement,'igf.plsql.igf_aw_coa_calc.run.debug','l_ci_sequence_number:'||l_ci_sequence_number);
2088: END IF;
2089:
2090: fnd_file.new_line(fnd_file.log,1);
2091: