DBA Data[Home] [Help]

APPS.XLA_AC_BALANCES_PKG dependencies on XLA_AC_BALANCES_INT

Line 137: xla_ac_balances_int bal

133: cp_period_name gl_period_statuses.period_name%TYPE
134: ) IS
135: SELECT gps.period_year
136: FROM gl_period_statuses gps,
137: xla_ac_balances_int bal
138: WHERE gps.ledger_id = bal.ledger_id
139: AND gps.application_id = bal.application_id
140: AND gps.adjustment_period_flag = 'N'
141: AND gps.period_name = cp_period_name;

Line 357: ( p_ac_balance_int_rec IN xla_ac_balances_int%ROWTYPE

353: (p_location => 'xla_ac_balances_pkg.delete_balances_rec');
354: END delete_balances_rec;
355:
356: PROCEDURE merge_balances_rec
357: ( p_ac_balance_int_rec IN xla_ac_balances_int%ROWTYPE
358: )
359: IS
360:
361: l_log_module VARCHAR2 (2000);

Line 1548: p_balances_int_rec IN OUT NOCOPY xla_ac_balances_int%ROWTYPE,

1544: (p_location => 'xla_ac_balances_pkg.merge_balances_rec');
1545: END merge_balances_rec;
1546:
1547: FUNCTION validate_balances_rec(
1548: p_balances_int_rec IN OUT NOCOPY xla_ac_balances_int%ROWTYPE,
1549: p_message_codes OUT NOCOPY xla_ac_balances_int.message_codes%TYPE
1550: )
1551: RETURN BOOLEAN IS
1552: l_log_module VARCHAR2 (2000);

Line 1549: p_message_codes OUT NOCOPY xla_ac_balances_int.message_codes%TYPE

1545: END merge_balances_rec;
1546:
1547: FUNCTION validate_balances_rec(
1548: p_balances_int_rec IN OUT NOCOPY xla_ac_balances_int%ROWTYPE,
1549: p_message_codes OUT NOCOPY xla_ac_balances_int.message_codes%TYPE
1550: )
1551: RETURN BOOLEAN IS
1552: l_log_module VARCHAR2 (2000);
1553: l_result boolean :=true;

Line 1554: l_rec xla_ac_balances_int%ROWTYPE := p_balances_int_rec;

1550: )
1551: RETURN BOOLEAN IS
1552: l_log_module VARCHAR2 (2000);
1553: l_result boolean :=true;
1554: l_rec xla_ac_balances_int%ROWTYPE := p_balances_int_rec;
1555: l_test_value NUMBER;
1556: l_error_codes xla_ac_balances_int.message_codes%TYPE;
1557: l_ledger_category_code gl_ledgers.ledger_category_code%TYPE;
1558: l_code_comb_id xla_ac_balances_int.code_combination_id%TYPE;

Line 1556: l_error_codes xla_ac_balances_int.message_codes%TYPE;

1552: l_log_module VARCHAR2 (2000);
1553: l_result boolean :=true;
1554: l_rec xla_ac_balances_int%ROWTYPE := p_balances_int_rec;
1555: l_test_value NUMBER;
1556: l_error_codes xla_ac_balances_int.message_codes%TYPE;
1557: l_ledger_category_code gl_ledgers.ledger_category_code%TYPE;
1558: l_code_comb_id xla_ac_balances_int.code_combination_id%TYPE;
1559: l_coa_id gl_ledgers.chart_of_accounts_id%TYPE;
1560:

Line 1558: l_code_comb_id xla_ac_balances_int.code_combination_id%TYPE;

1554: l_rec xla_ac_balances_int%ROWTYPE := p_balances_int_rec;
1555: l_test_value NUMBER;
1556: l_error_codes xla_ac_balances_int.message_codes%TYPE;
1557: l_ledger_category_code gl_ledgers.ledger_category_code%TYPE;
1558: l_code_comb_id xla_ac_balances_int.code_combination_id%TYPE;
1559: l_coa_id gl_ledgers.chart_of_accounts_id%TYPE;
1560:
1561: x_err_msg VARCHAR2(1000);
1562: x_ccid NUMBER := 0;

Line 1572: CURSOR c_is_valid_application(p_app_id xla_ac_balances_int.application_id%TYPE) IS

1568: --
1569: -- Cursor to validate application_id
1570: --
1571: --=============================================================================
1572: CURSOR c_is_valid_application(p_app_id xla_ac_balances_int.application_id%TYPE) IS
1573: select 1
1574: from xla_subledgers
1575: where application_id = p_app_id;
1576:

Line 1582: CURSOR c_is_valid_ledger(p_ledger_id xla_ac_balances_int.ledger_id%TYPE) IS

1578: --
1579: -- Cursor to validate ledger
1580: --
1581: --=============================================================================
1582: CURSOR c_is_valid_ledger(p_ledger_id xla_ac_balances_int.ledger_id%TYPE) IS
1583: select ledger_category_code
1584: from gl_ledgers
1585: where ledger_id = p_ledger_id;
1586:

Line 1592: CURSOR c_is_valid_sec_ledger(p_ledger_id xla_ac_balances_int.ledger_id%TYPE) IS

1588: --
1589: -- Cursor to validate secondary or ALC ledger
1590: --
1591: --=============================================================================
1592: CURSOR c_is_valid_sec_ledger(p_ledger_id xla_ac_balances_int.ledger_id%TYPE) IS
1593: select 1
1594: from gl_ledger_relationships
1595: where primary_ledger_id = p_ledger_id
1596: and relationship_type_code='SUBLEDGER';

Line 1603: CURSOR c_fetch_coa_id(p_ledger_id xla_ac_balances_int.ledger_id%TYPE) IS

1599: --
1600: -- Cursor to fetch chart_of_accounts id for a given ledger
1601: --
1602: --=============================================================================
1603: CURSOR c_fetch_coa_id(p_ledger_id xla_ac_balances_int.ledger_id%TYPE) IS
1604: select chart_of_accounts_id
1605: from gl_ledgers
1606: where ledger_id = p_ledger_id;
1607:

Line 1614: p_ledger_id xla_ac_balances_int.ledger_id%TYPE

1610: -- Cursor to validate code combination id
1611: --
1612: --=============================================================================
1613: CURSOR c_is_valid_code_comb_id(
1614: p_ledger_id xla_ac_balances_int.ledger_id%TYPE
1615: ,p_code_comb_id gl_code_combinations.code_combination_id%TYPE) IS
1616: select 1
1617: from gl_ledgers lg,
1618: gl_code_combinations cc

Line 1628: CURSOR c_is_valid_pop_code_comb_id(p_rec xla_ac_balances_int%ROWTYPE) IS

1624: --
1625: -- Cursor to validate populated code combination id
1626: --
1627: --=============================================================================
1628: CURSOR c_is_valid_pop_code_comb_id(p_rec xla_ac_balances_int%ROWTYPE) IS
1629: select gl.code_combination_id
1630: from gl_code_combinations gl
1631: where NVL(gl.segment1, 'X') = NVL(p_rec.segment1, 'X')
1632: and NVL(gl.segment2, 'X') = NVL(p_rec.segment2, 'X')

Line 1686: (p_app_id xla_ac_balances_int.application_id%TYPE

1682: -- Cursor to validate period
1683: --
1684: --=============================================================================
1685: CURSOR c_is_valid_period
1686: (p_app_id xla_ac_balances_int.application_id%TYPE
1687: ,p_ledger_id xla_ac_balances_int.ledger_id%TYPE
1688: ,p_period_name gl_period_statuses.period_name%TYPE) IS
1689: select 1
1690: from gl_period_statuses

Line 1687: ,p_ledger_id xla_ac_balances_int.ledger_id%TYPE

1683: --
1684: --=============================================================================
1685: CURSOR c_is_valid_period
1686: (p_app_id xla_ac_balances_int.application_id%TYPE
1687: ,p_ledger_id xla_ac_balances_int.ledger_id%TYPE
1688: ,p_period_name gl_period_statuses.period_name%TYPE) IS
1689: select 1
1690: from gl_period_statuses
1691: where application_id =p_app_id

Line 1701: CURSOR c_is_prior_je_exists(p_rec xla_ac_balances_int%ROWTYPE) IS

1697: --
1698: -- Cursor to validate prior journal extries exits or not for the given period name
1699: --
1700: --=============================================================================
1701: CURSOR c_is_prior_je_exists(p_rec xla_ac_balances_int%ROWTYPE) IS
1702: select 1
1703: from xla_ac_balances
1704: where ledger_id = p_rec.ledger_id
1705: and code_combination_id = p_rec.code_combination_id

Line 1969: DELETE xla_ac_balances_int xib

1965: * If p_purge_mode = A, then delete all records for the p_batch_code passed
1966: * If p_purge_mode = S, then delete all records that were imported in this run
1967: * If p_purge_mode = N, then do not delete anything
1968: */
1969: DELETE xla_ac_balances_int xib
1970: WHERE ( ( p_batch_code IS NOT NULL
1971: AND p_batch_code = xib.batch_code)
1972: OR ( p_batch_code IS NULL
1973: AND 1 = 1))

Line 2039: l_message_codes xla_ac_balances_int.message_codes%TYPE;

2035:
2036: l_commit_flag VARCHAR2(1);
2037:
2038: l_log_module VARCHAR2 (2000);
2039: l_message_codes xla_ac_balances_int.message_codes%TYPE;
2040:
2041: -- Get interface records
2042: CURSOR c_balances_int(
2043: cp_batch_code VARCHAR2

Line 2046: FROM xla_ac_balances_int xib

2042: CURSOR c_balances_int(
2043: cp_batch_code VARCHAR2
2044: ) IS
2045: SELECT xib.*
2046: FROM xla_ac_balances_int xib
2047: WHERE ( xib.status IS NULL
2048: OR xib.status = 'ERROR')
2049: AND (xib.batch_code = NVL(cp_batch_code, xib.batch_code))
2050: ORDER BY batch_code DESC

Line 2053: l_balances_int_rec xla_ac_balances_int%ROWTYPE;

2049: AND (xib.batch_code = NVL(cp_batch_code, xib.batch_code))
2050: ORDER BY batch_code DESC
2051: FOR UPDATE OF status NOWAIT;
2052:
2053: l_balances_int_rec xla_ac_balances_int%ROWTYPE;
2054: l_sql_err VARCHAR2(1000);
2055:
2056: l_success_rec NUMBER := 0;
2057: l_error_rec NUMBER := 0;

Line 2100: UPDATE xla_ac_balances_int

2096: ,p_level => C_LEVEL_STATEMENT);
2097: END IF;
2098: fnd_file.put_line(fnd_file.log,'Import Failed with error codes: '||l_message_codes);
2099: fnd_file.new_line(fnd_file.log,2);
2100: UPDATE xla_ac_balances_int
2101: SET status = 'ERROR',
2102: message_codes = l_message_codes,
2103: last_updated_by = g_user_id,
2104: last_update_date = g_date,

Line 2125: UPDATE xla_ac_balances_int

2121: * Successfully merged the records. Update the status of the interface record
2122: */
2123: fnd_file.put_line(fnd_file.log,'Import Succeeded');
2124: fnd_file.new_line(fnd_file.log,2);
2125: UPDATE xla_ac_balances_int
2126: SET status = 'IMPORTED',
2127: message_codes = NULL,
2128: last_updated_by = g_user_id,
2129: last_update_date = g_date,

Line 2136: UPDATE xla_ac_balances_int

2132: l_success_rec := l_success_rec + 1;
2133: END IF;
2134: EXCEPTION
2135: WHEN CANT_DELETE_BALANCES THEN
2136: UPDATE xla_ac_balances_int
2137: SET status = 'ERROR',
2138: message_codes = 'IB018',
2139: last_updated_by = g_user_id,
2140: last_update_date = g_date,

Line 2146: UPDATE xla_ac_balances_int

2142: WHERE CURRENT OF c_balances_int;
2143: l_error_rec := l_error_rec + 1;
2144: WHEN OTHERS THEN
2145: l_sql_err := SQLERRM;
2146: UPDATE xla_ac_balances_int
2147: SET status = 'ERROR',
2148: message_codes = l_sql_err,
2149: last_updated_by = g_user_id,
2150: last_update_date = g_date,