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.application_id = 101 --bug 11811413
141: AND gps.adjustment_period_flag = 'N'

Line 358: ( p_ac_balance_int_rec IN xla_ac_balances_int%ROWTYPE

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

Line 1556: p_balances_int_rec IN OUT NOCOPY xla_ac_balances_int%ROWTYPE,

1552: (p_location => 'xla_ac_balances_pkg.merge_balances_rec');
1553: END merge_balances_rec;
1554:
1555: FUNCTION validate_balances_rec(
1556: p_balances_int_rec IN OUT NOCOPY xla_ac_balances_int%ROWTYPE,
1557: p_message_codes OUT NOCOPY xla_ac_balances_int.message_codes%TYPE
1558: )
1559: RETURN BOOLEAN IS
1560: l_log_module VARCHAR2 (2000);

Line 1557: p_message_codes OUT NOCOPY xla_ac_balances_int.message_codes%TYPE

1553: END merge_balances_rec;
1554:
1555: FUNCTION validate_balances_rec(
1556: p_balances_int_rec IN OUT NOCOPY xla_ac_balances_int%ROWTYPE,
1557: p_message_codes OUT NOCOPY xla_ac_balances_int.message_codes%TYPE
1558: )
1559: RETURN BOOLEAN IS
1560: l_log_module VARCHAR2 (2000);
1561: l_result boolean :=true;

Line 1562: l_rec xla_ac_balances_int%ROWTYPE := p_balances_int_rec;

1558: )
1559: RETURN BOOLEAN IS
1560: l_log_module VARCHAR2 (2000);
1561: l_result boolean :=true;
1562: l_rec xla_ac_balances_int%ROWTYPE := p_balances_int_rec;
1563: l_test_value NUMBER;
1564: l_error_codes xla_ac_balances_int.message_codes%TYPE;
1565: l_ledger_category_code gl_ledgers.ledger_category_code%TYPE;
1566: l_code_comb_id xla_ac_balances_int.code_combination_id%TYPE;

Line 1564: l_error_codes xla_ac_balances_int.message_codes%TYPE;

1560: l_log_module VARCHAR2 (2000);
1561: l_result boolean :=true;
1562: l_rec xla_ac_balances_int%ROWTYPE := p_balances_int_rec;
1563: l_test_value NUMBER;
1564: l_error_codes xla_ac_balances_int.message_codes%TYPE;
1565: l_ledger_category_code gl_ledgers.ledger_category_code%TYPE;
1566: l_code_comb_id xla_ac_balances_int.code_combination_id%TYPE;
1567: l_coa_id gl_ledgers.chart_of_accounts_id%TYPE;
1568:

Line 1566: l_code_comb_id xla_ac_balances_int.code_combination_id%TYPE;

1562: l_rec xla_ac_balances_int%ROWTYPE := p_balances_int_rec;
1563: l_test_value NUMBER;
1564: l_error_codes xla_ac_balances_int.message_codes%TYPE;
1565: l_ledger_category_code gl_ledgers.ledger_category_code%TYPE;
1566: l_code_comb_id xla_ac_balances_int.code_combination_id%TYPE;
1567: l_coa_id gl_ledgers.chart_of_accounts_id%TYPE;
1568:
1569: x_err_msg VARCHAR2(1000);
1570: x_ccid NUMBER := 0;

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

1576: --
1577: -- Cursor to validate application_id
1578: --
1579: --=============================================================================
1580: CURSOR c_is_valid_application(p_app_id xla_ac_balances_int.application_id%TYPE) IS
1581: select 1
1582: from xla_subledgers
1583: where application_id = p_app_id;
1584:

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

1586: --
1587: -- Cursor to validate ledger
1588: --
1589: --=============================================================================
1590: CURSOR c_is_valid_ledger(p_ledger_id xla_ac_balances_int.ledger_id%TYPE) IS
1591: select ledger_category_code
1592: from gl_ledgers
1593: where ledger_id = p_ledger_id;
1594:

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

1596: --
1597: -- Cursor to validate secondary or ALC ledger
1598: --
1599: --=============================================================================
1600: CURSOR c_is_valid_sec_ledger(p_ledger_id xla_ac_balances_int.ledger_id%TYPE) IS
1601: select 1
1602: from gl_ledger_relationships
1603: where primary_ledger_id = p_ledger_id
1604: and relationship_type_code='SUBLEDGER';

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

1607: --
1608: -- Cursor to fetch chart_of_accounts id for a given ledger
1609: --
1610: --=============================================================================
1611: CURSOR c_fetch_coa_id(p_ledger_id xla_ac_balances_int.ledger_id%TYPE) IS
1612: select chart_of_accounts_id
1613: from gl_ledgers
1614: where ledger_id = p_ledger_id;
1615:

Line 1622: p_ledger_id xla_ac_balances_int.ledger_id%TYPE

1618: -- Cursor to validate code combination id
1619: --
1620: --=============================================================================
1621: CURSOR c_is_valid_code_comb_id(
1622: p_ledger_id xla_ac_balances_int.ledger_id%TYPE
1623: ,p_code_comb_id gl_code_combinations.code_combination_id%TYPE) IS
1624: select 1
1625: from gl_ledgers lg,
1626: gl_code_combinations cc

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

1632: --
1633: -- Cursor to validate populated code combination id
1634: --
1635: --=============================================================================
1636: CURSOR c_is_valid_pop_code_comb_id(p_rec xla_ac_balances_int%ROWTYPE) IS
1637: select gl.code_combination_id
1638: from gl_code_combinations gl
1639: where NVL(gl.segment1, 'X') = NVL(p_rec.segment1, 'X')
1640: and NVL(gl.segment2, 'X') = NVL(p_rec.segment2, 'X')

Line 1694: (p_app_id xla_ac_balances_int.application_id%TYPE

1690: -- Cursor to validate period
1691: --
1692: --=============================================================================
1693: CURSOR c_is_valid_period
1694: (p_app_id xla_ac_balances_int.application_id%TYPE
1695: ,p_ledger_id xla_ac_balances_int.ledger_id%TYPE
1696: ,p_period_name gl_period_statuses.period_name%TYPE) IS
1697: select 1
1698: from gl_period_statuses

Line 1695: ,p_ledger_id xla_ac_balances_int.ledger_id%TYPE

1691: --
1692: --=============================================================================
1693: CURSOR c_is_valid_period
1694: (p_app_id xla_ac_balances_int.application_id%TYPE
1695: ,p_ledger_id xla_ac_balances_int.ledger_id%TYPE
1696: ,p_period_name gl_period_statuses.period_name%TYPE) IS
1697: select 1
1698: from gl_period_statuses
1699: where application_id =101 --bug 11811413

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

1705: --
1706: -- Cursor to validate prior journal extries exits or not for the given period name
1707: --
1708: --=============================================================================
1709: CURSOR c_is_prior_je_exists(p_rec xla_ac_balances_int%ROWTYPE) IS
1710: select 1
1711: from xla_ac_balances
1712: where ledger_id = p_rec.ledger_id
1713: and code_combination_id = p_rec.code_combination_id

Line 1977: DELETE xla_ac_balances_int xib

1973: * If p_purge_mode = A, then delete all records for the p_batch_code passed
1974: * If p_purge_mode = S, then delete all records that were imported in this run
1975: * If p_purge_mode = N, then do not delete anything
1976: */
1977: DELETE xla_ac_balances_int xib
1978: WHERE ( ( p_batch_code IS NOT NULL
1979: AND p_batch_code = xib.batch_code)
1980: OR ( p_batch_code IS NULL
1981: AND 1 = 1))

Line 2047: l_message_codes xla_ac_balances_int.message_codes%TYPE;

2043:
2044: l_commit_flag VARCHAR2(1);
2045:
2046: l_log_module VARCHAR2 (2000);
2047: l_message_codes xla_ac_balances_int.message_codes%TYPE;
2048:
2049: -- Get interface records
2050: CURSOR c_balances_int(
2051: cp_batch_code VARCHAR2

Line 2054: FROM xla_ac_balances_int xib

2050: CURSOR c_balances_int(
2051: cp_batch_code VARCHAR2
2052: ) IS
2053: SELECT xib.*
2054: FROM xla_ac_balances_int xib
2055: WHERE ( xib.status IS NULL
2056: OR xib.status = 'ERROR')
2057: AND (xib.batch_code = NVL(cp_batch_code, xib.batch_code))
2058: ORDER BY batch_code DESC

Line 2061: l_balances_int_rec xla_ac_balances_int%ROWTYPE;

2057: AND (xib.batch_code = NVL(cp_batch_code, xib.batch_code))
2058: ORDER BY batch_code DESC
2059: FOR UPDATE OF status NOWAIT;
2060:
2061: l_balances_int_rec xla_ac_balances_int%ROWTYPE;
2062: l_sql_err VARCHAR2(1000);
2063:
2064: l_success_rec NUMBER := 0;
2065: l_error_rec NUMBER := 0;

Line 2108: UPDATE xla_ac_balances_int

2104: ,p_level => C_LEVEL_STATEMENT);
2105: END IF;
2106: fnd_file.put_line(fnd_file.log,'Import Failed with error codes: '||l_message_codes);
2107: fnd_file.new_line(fnd_file.log,2);
2108: UPDATE xla_ac_balances_int
2109: SET status = 'ERROR',
2110: message_codes = l_message_codes,
2111: last_updated_by = g_user_id,
2112: last_update_date = g_date,

Line 2133: UPDATE xla_ac_balances_int

2129: * Successfully merged the records. Update the status of the interface record
2130: */
2131: fnd_file.put_line(fnd_file.log,'Import Succeeded');
2132: fnd_file.new_line(fnd_file.log,2);
2133: UPDATE xla_ac_balances_int
2134: SET status = 'IMPORTED',
2135: message_codes = NULL,
2136: last_updated_by = g_user_id,
2137: last_update_date = g_date,

Line 2144: UPDATE xla_ac_balances_int

2140: l_success_rec := l_success_rec + 1;
2141: END IF;
2142: EXCEPTION
2143: WHEN CANT_DELETE_BALANCES THEN
2144: UPDATE xla_ac_balances_int
2145: SET status = 'ERROR',
2146: message_codes = 'IB018',
2147: last_updated_by = g_user_id,
2148: last_update_date = g_date,

Line 2154: UPDATE xla_ac_balances_int

2150: WHERE CURRENT OF c_balances_int;
2151: l_error_rec := l_error_rec + 1;
2152: WHEN OTHERS THEN
2153: l_sql_err := SQLERRM;
2154: UPDATE xla_ac_balances_int
2155: SET status = 'ERROR',
2156: message_codes = l_sql_err,
2157: last_updated_by = g_user_id,
2158: last_update_date = g_date,