DBA Data[Home] [Help]

APPS.FUN_BAL_PKG dependencies on FUN_BAL_ERRORS_GT

Line 68: DELETE FROM fun_bal_errors_gt;

64: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE, 'fun.plsql.fun_bal_pkg.truncate_tables', 'begin');
65: END IF;
66:
67: DELETE FROM fun_bal_results_gt;
68: DELETE FROM fun_bal_errors_gt;
69: DELETE FROM fun_bal_le_bsv_map_gt;
70: DELETE FROM fun_bal_inter_int_gt;
71: DELETE FROM fun_bal_intra_int_gt;
72: /* Using delete rather than truncate as shown in the code below. The reason is that truncate (or any DDL operations)

Line 79: dbms_sql.parse(cur_hdl, 'TRUNCATE TABLE ' || g_fun_schema || '.FUN_BAL_ERRORS_GT', dbms_sql.native);

75: In addition, the truncate operation might not be able to delete the rows that the calling program has not commited yet,
76: which could result in that we think the rows got deleted but they still exist.
77: cur_hdl := dbms_sql.open_cursor;
78: dbms_sql.parse(cur_hdl, 'TRUNCATE TABLE ' || g_fun_schema || '.FUN_BAL_RESULTS_GT', dbms_sql.native);
79: dbms_sql.parse(cur_hdl, 'TRUNCATE TABLE ' || g_fun_schema || '.FUN_BAL_ERRORS_GT', dbms_sql.native);
80: dbms_sql.parse(cur_hdl, 'TRUNCATE TABLE ' || g_fun_schema || '.FUN_BAL_LE_BSV_MAP_GT', dbms_sql.native);
81: dbms_sql.parse(cur_hdl, 'TRUNCATE TABLE ' || g_fun_schema || '.FUN_BAL_INTER_INT_GT', dbms_sql.native);
82: dbms_sql.parse(cur_hdl, 'TRUNCATE TABLE ' || g_fun_schema || '.FUN_BAL_INTRA_INT_GT', dbms_sql.native);
83: dbms_sql.parse(cur_hdl, 'TRUNCATE TABLE ' || g_fun_schema || '.FUN_BAL_RESULTS_T', dbms_sql.native);

Line 513: SELECT * FROM fun_bal_errors_gt;

509: SELECT * FROM fun_bal_lines_gt;
510: INSERT INTO fun_bal_results_t
511: SELECT * FROM fun_bal_results_gt;
512: INSERT INTO fun_bal_errors_t
513: SELECT * FROM fun_bal_errors_gt;
514: */
515: COMMIT;
516: END ins_t_tables_final_auto;
517:

Line 667: SELECT * FROM fun_bal_errors_gt;

663: SELECT * FROM fun_bal_lines_gt;
664: CURSOR l_results_cursor IS
665: SELECT * FROM fun_bal_results_gt;
666: CURSOR l_errors_cursor IS
667: SELECT * FROM fun_bal_errors_gt;
668: BEGIN
669: l_return_val := FND_API.G_RET_STS_SUCCESS;
670:
671: IF (FND_LOG.LEVEL_PROCEDURE >= g_debug_level) THEN

Line 718: FROM fun_bal_errors_gt;

714: ins_t_tables_final_auto(l_headers_tab, l_lines_tab, l_results_tab, l_errors_tab,
715: l_headers_count, l_lines_count, l_results_count, l_errors_count);
716: ELSE
717: SELECT COUNT(*) INTO l_errors_count
718: FROM fun_bal_errors_gt;
719: END IF;
720:
721: IF l_errors_count > 0 THEN
722: l_return_val := FND_API.G_RET_STS_ERROR;

Line 774: INSERT INTO fun_bal_errors_gt(error_code, group_id, bal_seg_val)

770:
771: */
772:
773: -- Bug 3310453
774: INSERT INTO fun_bal_errors_gt(error_code, group_id, bal_seg_val)
775: SELECT 'FUN_BSV_INVALID', main.group_id, main.bal_seg_val
776: FROM (SELECT DISTINCT hdrs.group_id, lines.bal_seg_val, hdrs.gl_date, hdrs.ledger_id
777: FROM fun_bal_headers_gt hdrs, fun_bal_lines_gt lines, gl_ledgers ledger
778: WHERE hdrs.group_id = lines.group_id

Line 792: FROM FUN_BAL_ERRORS_GT errors

788: UPDATE fun_bal_headers_gt headers
789: SET status = 'ERROR',
790: error_code = 'FUN_BSV_INVALID'
791: WHERE EXISTS (SELECT 'Invalid BSV Error'
792: FROM FUN_BAL_ERRORS_GT errors
793: WHERE headers.group_id = errors.group_id
794: AND error_code IN ('FUN_BSV_INVALID'))
795: AND headers.status = 'OK';
796:

Line 895: INSERT INTO fun_bal_errors_gt(error_code, group_id, clearing_bsv)

891: TRUNC(NVL(vals.start_date, hdrs.gl_date))
892: AND
893: TRUNC(NVL(vals.end_date, hdrs.gl_date))));
894:
895: INSERT INTO fun_bal_errors_gt(error_code, group_id, clearing_bsv)
896: SELECT 'FUN_INTRA_OVERRIDE_BSV_ERROR', hdrs.group_id, hdrs.clearing_bsv
897: FROM fun_bal_headers_gt hdrs
898: WHERE hdrs.error_code = 'FUN_INTRA_OVERRIDE_BSV_ERROR';
899:

Line 900: INSERT INTO fun_bal_errors_gt(error_code, group_id, bal_seg_val)

896: SELECT 'FUN_INTRA_OVERRIDE_BSV_ERROR', hdrs.group_id, hdrs.clearing_bsv
897: FROM fun_bal_headers_gt hdrs
898: WHERE hdrs.error_code = 'FUN_INTRA_OVERRIDE_BSV_ERROR';
899:
900: INSERT INTO fun_bal_errors_gt(error_code, group_id, bal_seg_val)
901: SELECT 'FUN_INTER_BSV_NOT_ASSIGNED', hdrs.group_id, le_bsv_map.bal_seg_val
902: FROM fun_bal_headers_gt hdrs, fun_bal_le_bsv_map_gt le_bsv_map
903: WHERE hdrs.group_id = le_bsv_map.group_id
904: AND hdrs.error_code = 'FUN_INTER_BSV_NOT_ASSIGNED'

Line 2404: -- Insert errors into FUN_BAL_ERRORS_GT

2400: ins_t_tables_inter_2_auto(l_inter_int_tab, l_inter_int_count);
2401: END IF;
2402:
2403:
2404: -- Insert errors into FUN_BAL_ERRORS_GT
2405: INSERT INTO FUN_BAL_ERRORS_GT(error_code, group_id, from_le_id, to_le_id, ccid,
2406: acct_type, ccid_concat_display,
2407: dr_bsv, cr_bsv)
2408: SELECT DISTINCT DECODE(inter_int.rec_acct, NULL, 'FUN_INTER_REC_NOT_ASSIGNED',

Line 2405: INSERT INTO FUN_BAL_ERRORS_GT(error_code, group_id, from_le_id, to_le_id, ccid,

2401: END IF;
2402:
2403:
2404: -- Insert errors into FUN_BAL_ERRORS_GT
2405: INSERT INTO FUN_BAL_ERRORS_GT(error_code, group_id, from_le_id, to_le_id, ccid,
2406: acct_type, ccid_concat_display,
2407: dr_bsv, cr_bsv)
2408: SELECT DISTINCT DECODE(inter_int.rec_acct, NULL, 'FUN_INTER_REC_NOT_ASSIGNED',
2409: -1, 'FUN_INTER_REC_NO_DEFAULT',

Line 2453: -- Insert errors into FUN_BAL_ERRORS_GT

2449: AND cc.template_id IS NULL
2450: AND (TRUNC(inter_int.gl_date) BETWEEN TRUNC(NVL(cc.start_date_active, inter_int.gl_date))
2451: AND TRUNC(NVL(cc.end_date_active, inter_int.gl_date))))));
2452:
2453: -- Insert errors into FUN_BAL_ERRORS_GT
2454: INSERT INTO FUN_BAL_ERRORS_GT(error_code, group_id, from_le_id, to_le_id, ccid,
2455: acct_type, ccid_concat_display,
2456: dr_bsv, cr_bsv)
2457: SELECT DISTINCT DECODE(inter_int.pay_acct, NULL, 'FUN_INTER_PAY_NOT_ASSIGNED',

Line 2454: INSERT INTO FUN_BAL_ERRORS_GT(error_code, group_id, from_le_id, to_le_id, ccid,

2450: AND (TRUNC(inter_int.gl_date) BETWEEN TRUNC(NVL(cc.start_date_active, inter_int.gl_date))
2451: AND TRUNC(NVL(cc.end_date_active, inter_int.gl_date))))));
2452:
2453: -- Insert errors into FUN_BAL_ERRORS_GT
2454: INSERT INTO FUN_BAL_ERRORS_GT(error_code, group_id, from_le_id, to_le_id, ccid,
2455: acct_type, ccid_concat_display,
2456: dr_bsv, cr_bsv)
2457: SELECT DISTINCT DECODE(inter_int.pay_acct, NULL, 'FUN_INTER_PAY_NOT_ASSIGNED',
2458: -1, 'FUN_INTER_PAY_NO_DEFAULT',

Line 2506: FROM FUN_BAL_ERRORS_GT errors

2502:
2503: UPDATE fun_bal_headers_gt headers
2504: SET status = 'ERROR'
2505: WHERE EXISTS (SELECT 'Errors for Rec and Pay Accts'
2506: FROM FUN_BAL_ERRORS_GT errors
2507: WHERE headers.group_id = errors.group_id
2508: AND error_code IN ('FUN_INTER_PAY_NOT_ASSIGNED',
2509: 'FUN_INTER_REC_NOT_ASSIGNED',
2510: 'FUN_INTER_PAY_NO_DEFAULT',

Line 2603: -- Insert errors into FUN_BAL_ERRORS_GT

2599:
2600: -- Enhancement 7520196 End
2601:
2602: /* Changes for Bug # 8212023 Start */
2603: -- Insert errors into FUN_BAL_ERRORS_GT
2604: INSERT INTO FUN_BAL_ERRORS_GT(error_code, group_id, from_le_id, to_le_id, ccid,
2605: acct_type, ccid_concat_display,
2606: dr_bsv, cr_bsv)
2607: SELECT DISTINCT DECODE(inter_int.rec_acct, NULL, 'FUN_INTER_REC_NOT_ASSIGNED',

Line 2604: INSERT INTO FUN_BAL_ERRORS_GT(error_code, group_id, from_le_id, to_le_id, ccid,

2600: -- Enhancement 7520196 End
2601:
2602: /* Changes for Bug # 8212023 Start */
2603: -- Insert errors into FUN_BAL_ERRORS_GT
2604: INSERT INTO FUN_BAL_ERRORS_GT(error_code, group_id, from_le_id, to_le_id, ccid,
2605: acct_type, ccid_concat_display,
2606: dr_bsv, cr_bsv)
2607: SELECT DISTINCT DECODE(inter_int.rec_acct, NULL, 'FUN_INTER_REC_NOT_ASSIGNED',
2608: -1, 'FUN_INTER_REC_NO_DEFAULT',

Line 2652: -- Insert errors into FUN_BAL_ERRORS_GT

2648: AND cc.template_id IS NULL
2649: AND (TRUNC(inter_int.gl_date) BETWEEN TRUNC(NVL(cc.start_date_active, inter_int.gl_date))
2650: AND TRUNC(NVL(cc.end_date_active, inter_int.gl_date))))));
2651:
2652: -- Insert errors into FUN_BAL_ERRORS_GT
2653: INSERT INTO FUN_BAL_ERRORS_GT(error_code, group_id, from_le_id, to_le_id, ccid,
2654: acct_type, ccid_concat_display,
2655: dr_bsv, cr_bsv)
2656: SELECT DISTINCT DECODE(inter_int.pay_acct, NULL, 'FUN_INTER_PAY_NOT_ASSIGNED',

Line 2653: INSERT INTO FUN_BAL_ERRORS_GT(error_code, group_id, from_le_id, to_le_id, ccid,

2649: AND (TRUNC(inter_int.gl_date) BETWEEN TRUNC(NVL(cc.start_date_active, inter_int.gl_date))
2650: AND TRUNC(NVL(cc.end_date_active, inter_int.gl_date))))));
2651:
2652: -- Insert errors into FUN_BAL_ERRORS_GT
2653: INSERT INTO FUN_BAL_ERRORS_GT(error_code, group_id, from_le_id, to_le_id, ccid,
2654: acct_type, ccid_concat_display,
2655: dr_bsv, cr_bsv)
2656: SELECT DISTINCT DECODE(inter_int.pay_acct, NULL, 'FUN_INTER_PAY_NOT_ASSIGNED',
2657: -1, 'FUN_INTER_PAY_NO_DEFAULT',

Line 2705: FROM FUN_BAL_ERRORS_GT errors

2701:
2702: UPDATE fun_bal_headers_gt headers
2703: SET status = 'ERROR'
2704: WHERE EXISTS (SELECT 'Errors for Rec and Pay Accts'
2705: FROM FUN_BAL_ERRORS_GT errors
2706: WHERE headers.group_id = errors.group_id
2707: AND error_code IN ('FUN_INTER_PAY_NOT_ASSIGNED',
2708: 'FUN_INTER_REC_NOT_ASSIGNED',
2709: 'FUN_INTER_PAY_NO_DEFAULT',

Line 3087: INSERT INTO FUN_BAL_ERRORS_GT(error_code, group_id, template_id, le_id, dr_bsv, cr_bsv)

3083: AND opts.je_category_name = 'Other'
3084: AND opts.status_flag = 'Y')
3085: WHERE le_bsv_map.template_id IS NULL;
3086:
3087: INSERT INTO FUN_BAL_ERRORS_GT(error_code, group_id, template_id, le_id, dr_bsv, cr_bsv)
3088: SELECT 'FUN_INTRA_RULE_NOT_ASSIGNED',
3089: le_bsv_map.group_id, le_bsv_map.template_id,
3090: DECODE(le_bsv_map.le_id, -99, NULL, le_bsv_map.le_id),
3091: le_bsv_map.driving_dr_bsv, le_bsv_map.driving_cr_bsv

Line 3164: INSERT INTO FUN_BAL_ERRORS_GT(error_code, group_id, template_id, le_id, dr_bsv, cr_bsv)

3160: le_bsv_map.many_to_many_option IN ('2E', '1C')));
3161:
3162: --FND_STATS.GATHER_TABLE_STATS(g_fun_schema, 'FUN_BAL_LE_BSV_MAP_GT');
3163:
3164: INSERT INTO FUN_BAL_ERRORS_GT(error_code, group_id, template_id, le_id, dr_bsv, cr_bsv)
3165: SELECT 'FUN_INTRA_NO_CLEARING_BSV',
3166: le_bsv_map.group_id, le_bsv_map.template_id,
3167: DECODE(le_bsv_map.le_id, -99, NULL, le_bsv_map.le_id),
3168: le_bsv_map.driving_dr_bsv, le_bsv_map.driving_cr_bsv

Line 3179: INSERT INTO FUN_BAL_ERRORS_GT(error_code, group_id, template_id, le_id, clearing_bsv,

3175:
3176: -- Check if the clearing BSV is valid (Bug 3345457)
3177: -- Perform this validation only if the Ledger BSV mapping is set to
3178: -- 'Specific' ('I')
3179: INSERT INTO FUN_BAL_ERRORS_GT(error_code, group_id, template_id, le_id, clearing_bsv,
3180: dr_bsv, cr_bsv)
3181: SELECT 'FUN_INTRA_CLEAR_BSV_INVALID',
3182: le_bsv_map.group_id, le_bsv_map.template_id,
3183: DECODE(le_bsv_map.le_id, -99, NULL, le_bsv_map.le_id),

Line 3204: FROM FUN_BAL_ERRORS_GT errors

3200:
3201: UPDATE fun_bal_headers_gt headers
3202: SET STATUS = 'ERROR'
3203: WHERE EXISTS (SELECT 'Errors for no template or no clearing bsv or clearing bsv invalid'
3204: FROM FUN_BAL_ERRORS_GT errors
3205: WHERE headers.group_id = errors.group_id
3206: AND error_code IN ('FUN_INTRA_RULE_NOT_ASSIGNED',
3207: 'FUN_INTRA_NO_CLEARING_BSV',
3208: 'FUN_INTRA_CLEAR_BSV_INVALID'))

Line 3716: INSERT INTO fun_bal_errors_gt(error_code, group_id, template_id, le_id,

3712: IF (FND_LOG.LEVEL_PROCEDURE >= g_debug_level) THEN
3713: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE, 'fun.plsql.fun_bal_pkg.do_intra_bal.get_ccid_concat_disp.begin', 'begin');
3714: END IF;
3715:
3716: INSERT INTO fun_bal_errors_gt(error_code, group_id, template_id, le_id,
3717: dr_bsv, cr_bsv, acct_type, ccid_concat_display)
3718: SELECT DISTINCT DECODE(SIGN(NVL(results.ccid, 0)),
3719: -1, 'FUN_INTRA_CC_NOT_CREATED',
3720: 0, 'FUN_INTRA_CC_NOT_CREATED',

Line 3754: FROM FUN_BAL_ERRORS_GT errors

3750:
3751: UPDATE fun_bal_headers_gt headers
3752: SET STATUS = 'ERROR'
3753: WHERE EXISTS (SELECT 'Invalid CCID error'
3754: FROM FUN_BAL_ERRORS_GT errors
3755: WHERE headers.group_id = errors.group_id
3756: AND error_code IN ('FUN_INTRA_CC_NOT_VALID',
3757: 'FUN_INTRA_CC_NOT_CREATED',
3758: 'FUN_INTRA_CC_NOT_ACTIVE'));

Line 3778: INSERT INTO fun_bal_errors_gt(error_code, group_id, error_message)

3774: PROCEDURE unexpected_error
3775: ( ERR_MESSAGE IN VARCHAR2)
3776: IS
3777: BEGIN
3778: INSERT INTO fun_bal_errors_gt(error_code, group_id, error_message)
3779: select 'FUN_INTER_UNEXPECTED_ERROR', FH.group_id, ERR_MESSAGE FROM FUN_BAL_HEADERS_GT FH;
3780: END unexpected_error;
3781:
3782: PROCEDURE journal_balancing

Line 3858: FROM fun_bal_errors_gt;

3854: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE, 'fun.plsql.fun_bal_pkg.journal_balancing', 'End of custom balancing API');
3855: END IF;
3856:
3857: SELECT COUNT(*) INTO l_errors_count
3858: FROM fun_bal_errors_gt;
3859:
3860: IF (FND_LOG.LEVEL_PROCEDURE >= g_debug_level) THEN
3861: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE, 'fun.plsql.fun_bal_pkg.journal_balancing', 'l_errors_count : '|| l_errors_count);
3862: END IF;