48: IS
49: ln_amount NUMBER;
50: BEGIN
51: BEGIN
52: fnd_file.put_line(fnd_file.log,'Begin Original Amount::');
53:
54: SELECT NVL(fdd.cost,0)
55: INTO ln_amount
56: FROM fa_deprn_detail fdd
95: EXCEPTION
96: WHEN NO_DATA_FOUND THEN
97: ln_amount := 0;
98: WHEN OTHERS THEN
99: FND_FILE.PUT_LINE(FND_FILE.LOG,'In CURRENT_AMOUNT');
100: --RAISE;
101: END;
102: RETURN ln_amount;
103: END CURRENT_AMOUNT;
157: EXCEPTION
158: WHEN NO_DATA_FOUND THEN
159: ln_amount := 0;
160: WHEN OTHERS THEN
161: FND_FILE.PUT_LINE(FND_FILE.LOG,'In ADDITIONS_AMOUNT');
162: --raise; /* why is this missed out? */ /* This is missed out as the program completes in error when run with few Null parameters*/
163: END;
164: /* IF ln_amount IS NULL THEN is this condition needed if we add nvls to the above SUM statement?
165: ln_amount := 0;
211: EXCEPTION
212: WHEN NO_DATA_FOUND THEN
213: ln_amount := 0;
214: WHEN OTHERS THEN
215: FND_FILE.PUT_LINE(FND_FILE.LOG,'In RETIREMENT_AMOUNT');
216: END;
217: /* IF ln_amount IS NULL THEN is this condition needed if we add nvls to the above SUM statement?
218: ln_amount := 0;
219: END IF; */
400: EXCEPTION
401: WHEN NO_DATA_FOUND THEN
402: ln_amount := 0;
403: WHEN OTHERS THEN
404: FND_FILE.PUT_LINE(FND_FILE.LOG,'In CHANGES_OF_ACCOUNTS');
405: -- RAISE;
406: END;
407: RETURN ln_amount;
408: END CHANGES_OF_ACCOUNTS;
447: EXCEPTION
448: WHEN NO_DATA_FOUND THEN
449: ln_amount := 0;
450: WHEN OTHERS THEN
451: FND_FILE.PUT_LINE(FND_FILE.LOG,'In ADJUSTMENT_AMOUNT');
452: -- RAISE;
453: END;
454: /* IF ln_amount IS NULL THEN
455: ln_amount := 0;
501: EXCEPTION
502: WHEN NO_DATA_FOUND THEN
503: ln_amount := 0;
504: WHEN OTHERS THEN
505: FND_FILE.PUT_LINE(FND_FILE.LOG,'In ADJUSTMENT_AMOUNT');
506: -- RAISE;
507: END;
508: /* IF ln_amount IS NULL THEN
509: ln_amount := 0;
598: EXCEPTION
599: WHEN NO_DATA_FOUND THEN
600: ln_amount := 0;
601: WHEN OTHERS THEN
602: FND_FILE.PUT_LINE(FND_FILE.LOG,'In ACCM_DEPRN_AMT (Inner)');
603: END;
604: WHEN TOO_MANY_ROWS THEN
605: SELECT NVL(MAX(fdd.deprn_reserve),0)
606: INTO ln_amount
636: AND fdh1.location_id = p_location_id_in
637: AND fds1.period_counter BETWEEN gn_lex_begin_period_counter AND gn_lex_end_period_counter
638: );
639: WHEN OTHERS THEN
640: FND_FILE.PUT_LINE(FND_FILE.LOG,'In ACCM_DEPRN_AMT');
641: --RAISE;
642: END;
643: /* IF ln_amount IS NULL THEN
644: ln_amount := 0;
678: EXCEPTION
679: WHEN NO_DATA_FOUND THEN
680: ln_amount := 0;
681: WHEN OTHERS THEN
682: FND_FILE.PUT_LINE(FND_FILE.LOG,'In ACCM_DEPRN_AMT');
683: --RAISE;
684: END;
685: /* IF ln_amount IS NULL THEN
686: ln_amount := 0;
724: EXCEPTION
725: WHEN NO_DATA_FOUND THEN
726: ln_amount := 0;
727: WHEN OTHERS THEN
728: FND_FILE.PUT_LINE(FND_FILE.LOG,'In NBV_VALUE');
729: --RAISE;
730: END;
731: RETURN ln_amount;
732: END ACCM_DEPRN_AMT_PR_YEAR;
775: EXCEPTION
776: WHEN NO_DATA_FOUND THEN
777: ln_amount := 0;
778: WHEN OTHERS THEN
779: FND_FILE.PUT_LINE(FND_FILE.LOG,'In DEPRN_EXPENSE');
780: --RAISE;
781: END;
782: /* IF ln_amount IS NULL THEN
783: ln_amount := 0;
829: EXCEPTION
830: WHEN NO_DATA_FOUND THEN
831: ln_amount := 0;
832: WHEN OTHERS THEN
833: FND_FILE.PUT_LINE(FND_FILE.LOG,'In RETIREMENT_AMOUNT');
834: --RAISE;
835: END;
836: /* IF ln_amount IS NULL THEN
837: ln_amount := 0;
858: --*************************************************
859: SELECT FSC.category_flex_structure
860: INTO gc_cat_flex_struc
861: FROM fa_system_controls FSC;
862: fnd_file.put_line(fnd_file.log,'gc_cat_flex_struc::'||gc_cat_flex_struc);
863:
864: --*************************************************
865: --Used to obtain the Category Flexfield Columns
866: --dynamically
914: ELSE
915: gc_from_maj_seg := 'A';
916: gc_from_min_seg := 'A';
917: END IF;
918: fnd_file.put_line(fnd_file.log, 'gc_from_maj_seg::'||gc_from_maj_seg);
919: fnd_file.put_line(fnd_file.log, 'gc_from_min_seg::'||gc_from_min_seg);
920:
921: IF P_TO_CATEGORY IS NOT NULL AND TRIM(P_TO_CATEGORY) <> lc_separator THEN
922: if lc_maj_segnum > 1 then
915: gc_from_maj_seg := 'A';
916: gc_from_min_seg := 'A';
917: END IF;
918: fnd_file.put_line(fnd_file.log, 'gc_from_maj_seg::'||gc_from_maj_seg);
919: fnd_file.put_line(fnd_file.log, 'gc_from_min_seg::'||gc_from_min_seg);
920:
921: IF P_TO_CATEGORY IS NOT NULL AND TRIM(P_TO_CATEGORY) <> lc_separator THEN
922: if lc_maj_segnum > 1 then
923: gc_to_maj_seg := LTRIM(SUBSTR(P_TO_CATEGORY,INSTR(P_TO_CATEGORY,lc_separator,1,lc_maj_segnum-1)),lc_separator);
939: gc_to_maj_seg := 'Z';
940: gc_to_min_seg := 'Z';
941: END IF;
942: /*End: Code added to get segment value based on segment number for bug13861637*/
943: fnd_file.put_line(fnd_file.log, 'gc_to_maj_seg::'||gc_to_maj_seg);
944: fnd_file.put_line(fnd_file.log, 'gc_to_min_seg::'||gc_to_min_seg);
945:
946: IF P_ASSET_DETAILS IS NULL THEN
947: gc_asset_details := 'N';
940: gc_to_min_seg := 'Z';
941: END IF;
942: /*End: Code added to get segment value based on segment number for bug13861637*/
943: fnd_file.put_line(fnd_file.log, 'gc_to_maj_seg::'||gc_to_maj_seg);
944: fnd_file.put_line(fnd_file.log, 'gc_to_min_seg::'||gc_to_min_seg);
945:
946: IF P_ASSET_DETAILS IS NULL THEN
947: gc_asset_details := 'N';
948: ELSE
982: gc_category_where := ' ((fc.'||lc_maj_seg||' = '''||gc_from_maj_seg||''' AND fc.'||lc_min_seg||' BETWEEN '''||gc_from_min_seg||''' AND '''||gc_to_min_seg||'''))';
983: END IF;
984: END IF;
985:
986: fnd_file.put_line(fnd_file.log,'gc_asset_details::'||gc_asset_details);
987: fnd_file.put_line(fnd_file.log,'gc_category_where::'||gc_category_where);
988:
989: --*************************************************
990: --Used to obtain the Begin period data
983: END IF;
984: END IF;
985:
986: fnd_file.put_line(fnd_file.log,'gc_asset_details::'||gc_asset_details);
987: fnd_file.put_line(fnd_file.log,'gc_category_where::'||gc_category_where);
988:
989: --*************************************************
990: --Used to obtain the Begin period data
991: --*************************************************
998: FROM fa_deprn_periods FDP
999: WHERE FDP.book_type_code = P_BOOK_NAME
1000: AND FDP.period_name = P_BEGIN_PERIOD;
1001:
1002: fnd_file.put_line(fnd_file.log,'gn_lex_begin_period_counter::'||gn_lex_begin_period_counter);
1003: fnd_file.put_line(fnd_file.log,'gd_period_open_date::'||gd_period_open_date);
1004: fnd_file.put_line(fnd_file.log,'P_BEGIN_PERIOD::'||P_BEGIN_PERIOD);
1005:
1006: --*************************************************
999: WHERE FDP.book_type_code = P_BOOK_NAME
1000: AND FDP.period_name = P_BEGIN_PERIOD;
1001:
1002: fnd_file.put_line(fnd_file.log,'gn_lex_begin_period_counter::'||gn_lex_begin_period_counter);
1003: fnd_file.put_line(fnd_file.log,'gd_period_open_date::'||gd_period_open_date);
1004: fnd_file.put_line(fnd_file.log,'P_BEGIN_PERIOD::'||P_BEGIN_PERIOD);
1005:
1006: --*************************************************
1007: --Used to obtain the End period data
1000: AND FDP.period_name = P_BEGIN_PERIOD;
1001:
1002: fnd_file.put_line(fnd_file.log,'gn_lex_begin_period_counter::'||gn_lex_begin_period_counter);
1003: fnd_file.put_line(fnd_file.log,'gd_period_open_date::'||gd_period_open_date);
1004: fnd_file.put_line(fnd_file.log,'P_BEGIN_PERIOD::'||P_BEGIN_PERIOD);
1005:
1006: --*************************************************
1007: --Used to obtain the End period data
1008: --*************************************************
1015: FROM fa_deprn_periods FDP
1016: WHERE FDP.book_type_code = P_BOOK_NAME
1017: AND FDP.period_name = P_END_PERIOD;
1018:
1019: fnd_file.put_line(fnd_file.log,'gn_lex_end_period_counter::'||gn_lex_end_period_counter);
1020: fnd_file.put_line(fnd_file.log,'gd_period_close_date::'||gd_period_close_date);
1021: fnd_file.put_line(fnd_file.log,'gd_per_close_date::'||to_char(gd_per_close_date,'dd/mm/yyyy hh24:mi:ss'));
1022: fnd_file.put_line(fnd_file.log,'P_END_PERIOD::'||P_END_PERIOD);
1023:
1016: WHERE FDP.book_type_code = P_BOOK_NAME
1017: AND FDP.period_name = P_END_PERIOD;
1018:
1019: fnd_file.put_line(fnd_file.log,'gn_lex_end_period_counter::'||gn_lex_end_period_counter);
1020: fnd_file.put_line(fnd_file.log,'gd_period_close_date::'||gd_period_close_date);
1021: fnd_file.put_line(fnd_file.log,'gd_per_close_date::'||to_char(gd_per_close_date,'dd/mm/yyyy hh24:mi:ss'));
1022: fnd_file.put_line(fnd_file.log,'P_END_PERIOD::'||P_END_PERIOD);
1023:
1024: --*************************************************
1017: AND FDP.period_name = P_END_PERIOD;
1018:
1019: fnd_file.put_line(fnd_file.log,'gn_lex_end_period_counter::'||gn_lex_end_period_counter);
1020: fnd_file.put_line(fnd_file.log,'gd_period_close_date::'||gd_period_close_date);
1021: fnd_file.put_line(fnd_file.log,'gd_per_close_date::'||to_char(gd_per_close_date,'dd/mm/yyyy hh24:mi:ss'));
1022: fnd_file.put_line(fnd_file.log,'P_END_PERIOD::'||P_END_PERIOD);
1023:
1024: --*************************************************
1025: --Used to obtain the Book Controls data
1018:
1019: fnd_file.put_line(fnd_file.log,'gn_lex_end_period_counter::'||gn_lex_end_period_counter);
1020: fnd_file.put_line(fnd_file.log,'gd_period_close_date::'||gd_period_close_date);
1021: fnd_file.put_line(fnd_file.log,'gd_per_close_date::'||to_char(gd_per_close_date,'dd/mm/yyyy hh24:mi:ss'));
1022: fnd_file.put_line(fnd_file.log,'P_END_PERIOD::'||P_END_PERIOD);
1023:
1024: --*************************************************
1025: --Used to obtain the Book Controls data
1026: --*************************************************
1033: ,lc_ledger_id
1034: ,P_DIST_SOURCE_BOOK
1035: FROM fa_book_controls FBC
1036: WHERE FBC.book_type_code = P_BOOK_NAME;
1037: fnd_file.put_line(fnd_file.log,'gc_book_class::'||gc_book_class);
1038:
1039: --*************************************************
1040: --Used to obtain the Ledger Name AND Currency
1041: --*************************************************
1044: INTO gc_ledger_name
1045: ,gc_currency_code
1046: FROM gl_ledgers GLED
1047: WHERE GLED.ledger_id = lc_ledger_id;
1048: fnd_file.put_line(fnd_file.log,'gc_ledger_name::'||gc_ledger_name);
1049:
1050: RETURN (TRUE);
1051: END beforeReport;
1052: