DBA Data[Home] [Help]

APPS.XLA_AE_JOURNAL_ENTRY_PKG dependencies on XLA_AE_LINES

Line 32: | xla_ae_lines_gt, xla_je_headers_gt by |

28: | 05-MAI-2003 K.Boussema Modified to fix bug 2926949 |
29: | Added sla_ledger_id in ledger cache |
30: | 07-MAI-2003 K.Boussema Changed the call to cache API, bug 2945359 |
31: | 13-MAI-2003 K.Boussema Renamed temporary tables xla_je_lines_gt by |
32: | xla_ae_lines_gt, xla_je_headers_gt by |
33: | xla_ae_headers_gt |
34: | Renamed in xla_distribution_links the column |
35: | base_amount by ledger_amount |
36: | 14-MAI-2003 K.Boussema Removed the SELECT of application_name |

Line 53: | 31-JUL-2003 K.Boussema Added in XLA_AE_LINES the two columns: |

49: | Reviewed GetAlternateCurrencyLedger |
50: | 24-JUL-2003 K.Boussema Updated the error messages |
51: | 28-JUL-2003 K.Boussema Reviewed GetAlternateCurrencyLedger Procedure |
52: | 29-JUL-2003 K.Boussema Reviewed the code to solve bug 3072881 |
53: | 31-JUL-2003 K.Boussema Added in XLA_AE_LINES the two columns: |
54: | DISPLAYED_LINE_NUMBER and GL_SL_LINK_TABLE |
55: | 05-Aug-2003 Shishir J Removed currency_code column from the |
56: | xla_distribution_links table |
57: | 13-Aug-2003 Shishir J Includes Neil's performance changes. |

Line 67: | 02-DEC-2003 K.Boussema Populated xla_ae_lines.gl_sl_link_table column|

63: | preference for Accounting Reversal from JLT |
64: | 14-NOV-2003 K.Boussema Reviewed the cache of the primary ledger coa |
65: | 26-NOV-2003 K.Boussema Called the accounting cache to get the coa |
66: | DYNAMIC_INSERTS_ALLOWED_FLAG, bug3256226 |
67: | 02-DEC-2003 K.Boussema Populated xla_ae_lines.gl_sl_link_table column|
68: | with 'XLAJEL' |
69: | 05-DEC-2003 K.Boussema Changed the cache of coa to fix bug3289875 |
70: | 12-DEC-2003 K.Boussema Added the validation of event accounting mode |
71: | 18-DEC-2003 K.Boussema Changed to fix bug 3042840,3307761,3268940 |

Line 103: | XLA_AE_LINES and XLA_DISTRIBUTION_LINKS. |

99: | 22-Sep-2004 S.Singhania Made changes for the bulk peroformance. It has |
100: | changed the code at number of places. |
101: | 05-Oct-2004 S.Singhania Bug 3931752: Removed the not required where |
102: | condition from the sqls that inserts into |
103: | XLA_AE_LINES and XLA_DISTRIBUTION_LINKS. |
104: | 05-OCT-2004 K.Boussema Changed for Extract Source Values Dump feature |
105: | added procedures : |
106: | - insert_extract_event() |
107: | - insert_extract_ledger() |

Line 150: | in xla_ae_lines table |

146: | 09-Jan-2006 A. Wan 4669308 - AdjustMpaRevLine |
147: | 11-Jan-2006 W. Shen 4943507 - modify GetLineNum to add more merge |
148: | columns when get linehashnum |
149: | 13-Feb-2006 V. Kumar 4955764 - Populating Ledger_id,Accounting_date |
150: | in xla_ae_lines table |
151: | 03-Mar-2006 V. Kumar 5041325 Populating GL_SL_LINK_ID in xla_ae_lines|
152: | 21-Jun-2006 A. Wan 5100860 Performance fix, see bug for detail |
153: | 23-Sep-2008 Vijaya.G 7377888 Changes in AdjustMPALine procedure for |
154: | MPA Accounting |

Line 151: | 03-Mar-2006 V. Kumar 5041325 Populating GL_SL_LINK_ID in xla_ae_lines|

147: | 11-Jan-2006 W. Shen 4943507 - modify GetLineNum to add more merge |
148: | columns when get linehashnum |
149: | 13-Feb-2006 V. Kumar 4955764 - Populating Ledger_id,Accounting_date |
150: | in xla_ae_lines table |
151: | 03-Mar-2006 V. Kumar 5041325 Populating GL_SL_LINK_ID in xla_ae_lines|
152: | 21-Jun-2006 A. Wan 5100860 Performance fix, see bug for detail |
153: | 23-Sep-2008 Vijaya.G 7377888 Changes in AdjustMPALine procedure for |
154: | MPA Accounting |
155: | 03-Oct-2008 KARAMAKR 7382288 insert analytical criteria for |

Line 175: | of AE_HEADER_ID in XLA_AE_LINES_GT |

171: | for changes via bug8277823 |
172: | 13-MAY-2010 VGOPISET 9630931 Perf Change for REF_AE_HEADER_ID update |
173: | introduced via bug 8619700 |
174: | 29-OCT-2010 VGOPISET 10247334 Perf Change of GetLineNumber SQL update|
175: | of AE_HEADER_ID in XLA_AE_LINES_GT |
176: | 11-Nov-2010 VGOPISET 10242870 Changes in AdjustMPALine to adjust the |
177: | difference in Last Period header with MAX Amount|
178: | to avoid sum getting added to ERV MPA Lines. |
179: | 26-NOV-2010 Narayanan M.S. Bug#10124492 Group_id will not be stamped |

Line 1542: XLA_AE_LINES_PKG.RefreshLines;

1538: g_cache_ledgers_info := l_null_ledgers_info;
1539: g_cache_event_tl := l_null_event_tl;
1540: --
1541: XLA_AE_HEADER_PKG.RefreshHeader;
1542: XLA_AE_LINES_PKG.RefreshLines;
1543: --
1544: -- free source value set cache
1545: --
1546: XLA_AE_SOURCES_PKG.g_array_meaning:= l_null_sc_value_set;

Line 1648: --FROM xla_ae_lines_gt xalg

1644: -- ,ae_header_id
1645: -- ,NVL(SUM(unrounded_entered_cr), 0)
1646: -- - NVL(SUM(unrounded_entered_dr), 0) unrounded_entered_amount
1647: -- ,entered_currency_mau
1648: --FROM xla_ae_lines_gt xalg
1649: --WHERE temp_line_num <> 0
1650: --GROUP BY ledger_id, event_id, ae_header_id,
1651: -- rounding_class_code, document_rounding_level, ae_line_num
1652: -- ,entered_currency_mau

Line 1684: (p_msg => 'SQL - Update xla_ae_lines_gt'

1680:
1681: IF (C_LEVEL_STATEMENT >= g_log_level) THEN
1682:
1683: trace
1684: (p_msg => 'SQL - Update xla_ae_lines_gt'
1685: ,p_level => C_LEVEL_STATEMENT
1686: ,p_module => l_log_module);
1687:
1688: END IF;

Line 1695: --update /*+ index(ael,XLA_AE_LINES_GT_N4) */ xla_ae_lines_gt ael

1691: -- Commented FORALL Update for perf bug#10247334
1692: /* forall i in 1..g_array_event_id.count
1693: -- added the hint for bug:7560587
1694: */
1695: --update /*+ index(ael,XLA_AE_LINES_GT_N4) */ xla_ae_lines_gt ael
1696: /*set ae_header_id = g_array_ae_header_id(i)
1697: ,ref_ae_header_id = DECODE(ref_event_id,NULL,g_array_ae_header_id(i),ref_ae_header_id)
1698: */
1699: /* Calling get_hash_value for each row is expensive.

Line 1845: -- Also, this was causing XLA_AE_LINES_U1 error

1841: */--
1842: -- Bug 4719297 added NVL to the following.
1843: --
1844: -- 4669308 NVL(-1) creates a separate header for MPA reversal. NVL(0) combines original reversal and MPA reversal into 1 header
1845: -- Also, this was causing XLA_AE_LINES_U1 error
1846: --and nvl(header_num,-1) = nvl(g_array_header_num(i),-1)
1847: /* and header_num = nvl(g_array_header_num(i), 0); -- 5100860 instead of nvl(header_num, 0) */
1848: --and temp_line_num <> 0; -- 5100860 should never be zero
1849:

Line 1851: merge /*+ use_hash(xal) */ into xla_ae_lines_gt XAL

1847: /* and header_num = nvl(g_array_header_num(i), 0); -- 5100860 instead of nvl(header_num, 0) */
1848: --and temp_line_num <> 0; -- 5100860 should never be zero
1849:
1850: --added the below MERGE Update for bug#10247334
1851: merge /*+ use_hash(xal) */ into xla_ae_lines_gt XAL
1852: using xla_ae_headers_gt xah
1853: on (
1854: xal.event_id = xah.event_id
1855: and xal.ledger_id = xah.ledger_id

Line 1896: (p_msg => 'SQL - Update xla_ae_lines_gt 2: '||SQL%ROWCOUNT

1892:
1893: IF (C_LEVEL_STATEMENT >= g_log_level) THEN
1894:
1895: trace
1896: (p_msg => 'SQL - Update xla_ae_lines_gt 2: '||SQL%ROWCOUNT
1897: ,p_level => C_LEVEL_STATEMENT
1898: ,p_module => l_log_module);
1899:
1900: END IF;

Line 1908: (p_msg => 'SQL - Update xla_ae_lines_gt 3.5'

1904: -- 4262811 ------------------------------------------------------------------
1905: IF (C_LEVEL_STATEMENT >= g_log_level) THEN
1906:
1907: trace
1908: (p_msg => 'SQL - Update xla_ae_lines_gt 3.5'
1909: ,p_level => C_LEVEL_STATEMENT
1910: ,p_module => l_log_module);
1911:
1912: END IF;

Line 1922: from xla_ae_lines_gt l

1918: forall i in 1..l_array_rowid.count
1919: update xla_ae_headers_gt h
1920: set parent_ae_line_num =
1921: (select l_array_ae_line_num(i)
1922: from xla_ae_lines_gt l
1923: where h.parent_header_id = l.event_id -- awan l.ae_header_id no rows
1924: and h.ledger_id = l.ledger_id
1925: and h.balance_type_code = l.balance_type_code
1926: and h.event_id = l.event_id

Line 1934: (SELECT /*+ index(L XLA_AE_LINES_GT_U1) */ ae_line_num --Index added for bug 14246749

1930: */
1931: -- IF l_array_rowid.count > 0 THEN commented IF for 7230462
1932: UPDATE xla_ae_headers_gt h
1933: SET parent_ae_line_num =
1934: (SELECT /*+ index(L XLA_AE_LINES_GT_U1) */ ae_line_num --Index added for bug 14246749
1935: FROM xla_ae_lines_gt l
1936: WHERE h.parent_header_id = l.event_id -- awan l.ae_header_id no rows
1937: AND h.ledger_id = l.ledger_id
1938: AND h.balance_type_code = l.balance_type_code

Line 1935: FROM xla_ae_lines_gt l

1931: -- IF l_array_rowid.count > 0 THEN commented IF for 7230462
1932: UPDATE xla_ae_headers_gt h
1933: SET parent_ae_line_num =
1934: (SELECT /*+ index(L XLA_AE_LINES_GT_U1) */ ae_line_num --Index added for bug 14246749
1935: FROM xla_ae_lines_gt l
1936: WHERE h.parent_header_id = l.event_id -- awan l.ae_header_id no rows
1937: AND h.ledger_id = l.ledger_id
1938: AND h.balance_type_code = l.balance_type_code
1939: AND h.event_id = l.event_id

Line 1951: (p_msg => 'SQL - Update xla_ae_lines_gt 4'

1947:
1948: IF (C_LEVEL_STATEMENT >= g_log_level) THEN
1949:
1950: trace
1951: (p_msg => 'SQL - Update xla_ae_lines_gt 4'
1952: ,p_level => C_LEVEL_STATEMENT
1953: ,p_module => l_log_module);
1954:
1955: END IF;

Line 1957: UPDATE xla_ae_lines_gt ael

1953: ,p_module => l_log_module);
1954:
1955: END IF;
1956:
1957: UPDATE xla_ae_lines_gt ael
1958: SET (ref_ae_header_id, ref_temp_line_num) =
1959: (SELECT ae_header_id, temp_line_num
1960: FROM xla_ae_lines_gt
1961: WHERE event_id = ael.ref_event_id

Line 1960: FROM xla_ae_lines_gt

1956:
1957: UPDATE xla_ae_lines_gt ael
1958: SET (ref_ae_header_id, ref_temp_line_num) =
1959: (SELECT ae_header_id, temp_line_num
1960: FROM xla_ae_lines_gt
1961: WHERE event_id = ael.ref_event_id
1962: AND ledger_id = ael.ledger_id
1963: AND balance_type_code = ael.balance_type_code
1964: AND temp_line_num = ael.temp_line_num * -1)

Line 1970: (p_msg => 'SQL - Update xla_ae_lines_gt 5'

1966: AND ref_temp_line_num IS NULL;
1967:
1968: IF (C_LEVEL_STATEMENT >= g_log_level) THEN
1969: trace
1970: (p_msg => 'SQL - Update xla_ae_lines_gt 5'
1971: ,p_level => C_LEVEL_STATEMENT
1972: ,p_module => l_log_module);
1973: END IF;
1974:

Line 1979: UPDATE xla_ae_lines_gt ael

1975: -- added the follwing update to correct REF_AE_HEADER_ID when ORIGINAL AND REVERSAL EVENTS
1976: -- are accounted in the same batch for bug:8277823
1977: -- commented the following code for performance issues faced in bug: 8619700
1978: /*
1979: UPDATE xla_ae_lines_gt ael
1980: SET ael.ref_event_id = -1 * ael.ref_event_id
1981: , ael.ref_ae_header_id =
1982: ( SELECT lgt.ae_header_id
1983: FROM xla_ae_lines_gt lgt

Line 1983: FROM xla_ae_lines_gt lgt

1979: UPDATE xla_ae_lines_gt ael
1980: SET ael.ref_event_id = -1 * ael.ref_event_id
1981: , ael.ref_ae_header_id =
1982: ( SELECT lgt.ae_header_id
1983: FROM xla_ae_lines_gt lgt
1984: WHERE lgt.event_id = -1 * ael.ref_event_id
1985: AND lgt.ledger_id = ael.ledger_id
1986: AND lgt.balance_type_code = ael.balance_type_code
1987: AND lgt.temp_line_num = ael.temp_line_num * -1

Line 1996: UPDATE /*+ INDEX(ael XLA_AE_LINES_GT_U1) */ XLA_AE_LINES_GT AEL

1992: */
1993: -- added the following code for performance issues faced in bug:8619700
1994: -- added hint for perf bug9630931
1995: forall i in 1..g_array_event_id.count
1996: UPDATE /*+ INDEX(ael XLA_AE_LINES_GT_U1) */ XLA_AE_LINES_GT AEL
1997: SET AEL.REF_EVENT_ID = -1 * AEL.REF_EVENT_ID ,
1998: AEL.REF_AE_HEADER_ID = g_array_ae_header_id(i)
1999: WHERE AEL.REF_AE_HEADER_ID = g_array_event_id(i)
2000: AND AEL.REF_EVENT_ID = -1 * g_array_event_id(i)

Line 2009: (p_msg => 'SQL - Update xla_ae_lines_gt 5_1 for ReversalEvents '|| SQL%ROWCOUNT

2005: AND AEL.HEADER_NUM = NVL( g_array_header_num(i) , 0) ;
2006:
2007: IF (C_LEVEL_STATEMENT >= g_log_level) THEN
2008: trace
2009: (p_msg => 'SQL - Update xla_ae_lines_gt 5_1 for ReversalEvents '|| SQL%ROWCOUNT
2010: ,p_level => C_LEVEL_STATEMENT
2011: ,p_module => l_log_module);
2012: END IF;
2013:

Line 2035: ' FROM xla_ae_lines_gt xalg '||

2031: l_case_sql || ' bsv_value '||
2032: ' ,NVL(SUM(unrounded_entered_cr), 0) '||
2033: ' - NVL(SUM(unrounded_entered_dr), 0) unrounded_entered_amount '||
2034: ' ,entered_currency_mau '||
2035: ' FROM xla_ae_lines_gt xalg '||
2036: ' , gl_code_combinations gcc '||
2037: ' WHERE temp_line_num <> 0 '||
2038: ' and gcc.code_combination_id = xalg.code_combination_id '||
2039: ' GROUP BY ledger_id, event_id, ae_header_id, '||

Line 2110: (p_msg => 'SQL - Update xla_ae_lines_gt 6'

2106: EXIT;
2107: END IF;
2108: IF (C_LEVEL_STATEMENT >= g_log_level) THEN
2109: trace
2110: (p_msg => 'SQL - Update xla_ae_lines_gt 6'
2111: ,p_level => C_LEVEL_STATEMENT
2112: ,p_module => l_log_module);
2113: trace
2114: (p_msg => 'count:'||to_char(l_array_rounding_class_code.count)

Line 2195: update xla_ae_lines_gt

2191: l_array_rounding_entd_amt1(j) := l_curr_entd_rounding_amount;
2192: j:= j+1;
2193: IF (j> C_BULK_LIMIT) THEN
2194: FORALL i in 1..j-1
2195: update xla_ae_lines_gt
2196: set doc_rounding_acctd_amt = l_array_doc_rounding_amt1(i)
2197: ,doc_rounding_entered_amt = l_array_rounding_entd_amt1(i)
2198: where rowid = l_array_rowid1(i);
2199: j:=1;

Line 2278: (p_msg => 'SQL - Update xla_ae_lines_gt 7, j='||to_char(j)

2274: END IF;
2275:
2276: IF (C_LEVEL_STATEMENT >= g_log_level) THEN
2277: trace
2278: (p_msg => 'SQL - Update xla_ae_lines_gt 7, j='||to_char(j)
2279: ,p_level => C_LEVEL_STATEMENT
2280: ,p_module => l_log_module);
2281: END IF;
2282:

Line 2285: update xla_ae_lines_gt

2281: END IF;
2282:
2283: IF j>1 THEN
2284: FORALL i in 1..j-1
2285: update xla_ae_lines_gt
2286: set doc_rounding_acctd_amt = l_array_doc_rounding_amt1(i)
2287: ,doc_rounding_entered_amt = l_array_rounding_entd_amt1(i)
2288: where rowid = l_array_rowid1(i);
2289: END IF;

Line 2500: FROM xla_ae_lines_gt

2496: ae_line_num
2497: BULK COLLECT
2498: INTO l_array_rowid
2499: ,l_array_ae_line_num
2500: FROM xla_ae_lines_gt
2501: WHERE temp_line_num <> 0;
2502:
2503: IF (C_LEVEL_STATEMENT >= g_log_level) THEN
2504:

Line 2506: (p_msg => 'SQL - Update xla_ae_lines_gt 3'

2502:
2503: IF (C_LEVEL_STATEMENT >= g_log_level) THEN
2504:
2505: trace
2506: (p_msg => 'SQL - Update xla_ae_lines_gt 3'
2507: ,p_level => C_LEVEL_STATEMENT
2508: ,p_module => l_log_module);
2509:
2510: END IF;

Line 2513: UPDATE xla_ae_lines_gt

2509:
2510: END IF;
2511:
2512: FORALL i IN 1..l_array_rowid.COUNT
2513: UPDATE xla_ae_lines_gt
2514: SET ae_line_num = l_array_ae_line_num(i)
2515: WHERE rowid = l_array_rowid(i);
2516:
2517: IF (C_LEVEL_PROCEDURE >= g_log_level) THEN

Line 2752: FROM xla_ae_lines_gt

2748: ,entered_currency_mau)
2749:
2750: ae_line_num
2751: BULK COLLECT INTO l_array_rowid, l_array_ae_line_num
2752: FROM xla_ae_lines_gt
2753: WHERE temp_line_num <> 0;
2754:
2755: IF (C_LEVEL_STATEMENT >= g_log_level) THEN
2756:

Line 2758: (p_msg => 'SQL - Update xla_ae_lines_gt 3'

2754:
2755: IF (C_LEVEL_STATEMENT >= g_log_level) THEN
2756:
2757: trace
2758: (p_msg => 'SQL - Update xla_ae_lines_gt 3'
2759: ,p_level => C_LEVEL_STATEMENT
2760: ,p_module => l_log_module);
2761:
2762: END IF;

Line 2765: update xla_ae_lines_gt

2761:
2762: END IF;
2763:
2764: forall i in 1..l_array_rowid.count
2765: update xla_ae_lines_gt
2766: set ae_line_num = l_array_ae_line_num(i)
2767: where rowid = l_array_rowid(i);
2768:
2769:

Line 3006: FROM xla_ae_lines_gt

3002: ,entered_currency_mau)
3003:
3004: ae_line_num
3005: BULK COLLECT INTO l_array_rowid, l_array_ae_line_num
3006: FROM xla_ae_lines_gt
3007: WHERE temp_line_num <> 0;
3008:
3009: IF (C_LEVEL_STATEMENT >= g_log_level) THEN
3010:

Line 3012: (p_msg => 'SQL - Update xla_ae_lines_gt 3'

3008:
3009: IF (C_LEVEL_STATEMENT >= g_log_level) THEN
3010:
3011: trace
3012: (p_msg => 'SQL - Update xla_ae_lines_gt 3'
3013: ,p_level => C_LEVEL_STATEMENT
3014: ,p_module => l_log_module);
3015:
3016: END IF;

Line 3019: update xla_ae_lines_gt

3015:
3016: END IF;
3017:
3018: forall i in 1..l_array_rowid.count
3019: update xla_ae_lines_gt
3020: set ae_line_num = l_array_ae_line_num(i)
3021: where rowid = l_array_rowid(i);
3022:
3023:

Line 3259: FROM xla_ae_lines_gt

3255: ,entered_currency_mau)
3256:
3257: ae_line_num
3258: BULK COLLECT INTO l_array_rowid, l_array_ae_line_num
3259: FROM xla_ae_lines_gt
3260: WHERE temp_line_num <> 0;
3261:
3262: IF (C_LEVEL_STATEMENT >= g_log_level) THEN
3263:

Line 3265: (p_msg => 'SQL - Update xla_ae_lines_gt 3'

3261:
3262: IF (C_LEVEL_STATEMENT >= g_log_level) THEN
3263:
3264: trace
3265: (p_msg => 'SQL - Update xla_ae_lines_gt 3'
3266: ,p_level => C_LEVEL_STATEMENT
3267: ,p_module => l_log_module);
3268:
3269: END IF;

Line 3272: update xla_ae_lines_gt

3268:
3269: END IF;
3270:
3271: forall i in 1..l_array_rowid.count
3272: update xla_ae_lines_gt
3273: set ae_line_num = l_array_ae_line_num(i)
3274: where rowid = l_array_rowid(i);
3275:
3276:

Line 3339: (p_msg => 'SQL - Insert into xla_ae_lines'

3335: BEGIN
3336:
3337: IF (C_LEVEL_STATEMENT>= g_log_level) THEN
3338: trace
3339: (p_msg => 'SQL - Insert into xla_ae_lines'
3340: ,p_level => C_LEVEL_STATEMENT
3341: ,p_module => l_log_module);
3342: END IF;
3343: --

Line 3356: INSERT INTO xla_ae_lines

3352: END IF;
3353:
3354:
3355: FORALL i in 1..l_ledger_attrs.array_ledger_id.count
3356: INSERT INTO xla_ae_lines
3357: (
3358: ae_header_id
3359: , ae_line_num
3360: , displayed_line_number

Line 3757: FROM xla_ae_lines_gt lin

3753: , encumbrance_type_id -- 4458381 Public Sector Enh
3754: , ledger_id -- 4955764
3755: , accounting_date -- 4955764
3756: , gcc.reference3 control_balance_flag --4930177
3757: FROM xla_ae_lines_gt lin
3758: ,gl_code_combinations gcc
3759: WHERE ledger_id = l_ledger_attrs.array_ledger_id(i)
3760: AND ae_line_num is not NULL
3761: AND lin.code_combination_id = gcc.code_combination_id(+) --5261785

Line 3836: (p_msg => '# journal entry lines inserted into xla_ae_lines = '||to_char(l_count)

3832: --
3833: l_count := SQL%ROWCOUNT;
3834: IF (C_LEVEL_EVENT >= g_log_level) THEN
3835: trace
3836: (p_msg => '# journal entry lines inserted into xla_ae_lines = '||to_char(l_count)
3837: ,p_level => C_LEVEL_EVENT
3838: ,p_module => l_log_module);
3839: END IF;
3840:

Line 3926: (SELECT 1 FROM xla_ae_lines_gt WHERE reversal_code='REVERSAL');

3922: BEGIN
3923: SELECT 'Y' into l_reversal_flag
3924: FROM dual
3925: WHERE exists
3926: (SELECT 1 FROM xla_ae_lines_gt WHERE reversal_code='REVERSAL');
3927:
3928: IF l_reversal_flag='Y' THEN
3929: Insert_ANC_Inv_Canc;
3930: END IF;

Line 4454: FROM xla_ae_lines_gt

4450: , anc_id_7
4451: , anc_id_8
4452: , anc_id_9
4453: , anc_id_10
4454: FROM xla_ae_lines_gt
4455: WHERE ae_line_num is not null
4456: GROUP BY
4457: ae_line_num
4458: ,ae_header_id

Line 6615: FROM xla_ae_lines_gt

6611: , anc_id_47
6612: , anc_id_48
6613: , anc_id_49
6614: , anc_id_50
6615: FROM xla_ae_lines_gt
6616: WHERE ae_line_num is not null
6617: GROUP BY
6618: ae_line_num
6619: ,ae_header_id

Line 10865: FROM xla_ae_lines_gt

10861: , anc_id_97
10862: , anc_id_98
10863: , anc_id_99
10864: , anc_id_100
10865: FROM xla_ae_lines_gt
10866: WHERE ae_line_num is not null
10867: GROUP BY
10868: ae_line_num
10869: ,ae_header_id

Line 11108: -- FROM xla_ae_lines l,

11104: -- INTO l_array_entered_amt(i)
11105: -- ,l_array_accted_amt(i)
11106: -- ,l_array_unround_entered_amt(i)
11107: -- ,l_array_unround_accted_amt(i)
11108: -- FROM xla_ae_lines l,
11109: -- xla_distribution_links d -- added for bug 7377888
11110: -- /*WHERE ae_header_id = l_array_parent_hdr_idx(i)
11111: -- AND ae_line_num = l_array_parent_line_idx(i)
11112: -- AND application_id = p_application_id;*/ -- commented for bug 7377888

Line 11131: FROM xla_ae_lines l

11127: ,l_array_accted_amt(i)
11128: ,l_array_unround_entered_amt(i)
11129: ,l_array_unround_accted_amt(i)
11130: ,l_array_parent_line_side(i) -- added for bug 10394715
11131: FROM xla_ae_lines l
11132: WHERE l.ae_header_id = l_array_parent_hdr_idx(i)
11133: AND l.ae_line_num = l_array_parent_line_idx(i)
11134: AND l.application_id = p_application_id ;
11135:

Line 11143: FROM xla_ae_lines xal2

11139: BEGIN
11140:
11141: SELECT /*+ leading(aeh) */ MAX(ABS(NVL(xal2.entered_cr,xal2.entered_dr)))
11142: INTO l_max_amount
11143: FROM xla_ae_lines xal2
11144: , ( SELECT xah.ae_header_id
11145: FROM xla_ae_headers_gt xah
11146: WHERE xah.parent_header_id = l_array_parent_hdr_idx(i)
11147: AND xah.parent_ae_line_num = l_array_parent_line_idx(i)

Line 11167: FROM XLA_AE_LINES xal

11163: AND xah.parent_ae_line_num IS NOT NULL
11164: )
11165: SELECT MAX(xal.ae_header_id)
11166: INTO l_max_hdr_id
11167: FROM XLA_AE_LINES xal
11168: , aeh
11169: WHERE xal.ae_header_id = aeh.ae_header_id
11170: AND xal.application_id = p_application_id
11171: AND ABS(NVL(xal.entered_cr,xal.entered_dr)) = l_max_amount ;

Line 11194: FROM xla_ae_lines xel2

11190: ,xel2.ae_line_num
11191: BULK COLLECT INTO
11192: l_array_mpa_header_idx
11193: ,l_array_mpa_line_idx
11194: FROM xla_ae_lines xel2
11195: --,xla_ae_headers xeh
11196: ,xla_ae_headers_gt xeh -- added for bug#16446642
11197: WHERE xel2.ae_header_id = xeh.ae_header_id
11198: AND xel2.application_id = p_application_id

Line 11222: UPDATE xla_ae_lines xel

11218: END LOOP;
11219: END IF;
11220:
11221: FORALL j IN 1..l_array_mpa_header_idx.COUNT
11222: UPDATE xla_ae_lines xel
11223: SET unrounded_entered_cr = entered_cr
11224: ,unrounded_entered_dr = entered_dr
11225: ,unrounded_accounted_cr = accounted_cr
11226: ,unrounded_accounted_dr = accounted_dr

Line 11242: -- FROM xla_ae_lines xel2

11238: -- (SELECT unrounded_entered_cr
11239: -- ,unrounded_entered_dr
11240: -- ,unrounded_accounted_cr
11241: -- ,unrounded_accounted_dr
11242: -- FROM xla_ae_lines xel2
11243: -- WHERE xel2.ae_header_id = xdl.ae_header_id
11244: -- AND xel2.ae_line_num = xdl.ae_line_num)
11245: -- WHERE application_id = p_application_id -- 4585874
11246: -- AND ae_header_id = l_array_mpa_header_idx(j)

Line 11257: FROM xla_ae_lines xel2

11253: ,unrounded_accounted_cr
11254: ,unrounded_accounted_dr
11255: , ae_header_id, ae_line_num ,
11256: application_id
11257: FROM xla_ae_lines xel2
11258: WHERE xel2.application_id = p_application_id
11259: AND xel2.ae_header_id = l_array_mpa_header_idx(j)
11260: AND xel2.ae_line_num = l_array_mpa_line_idx(j) ) xel2
11261: on ( xel2.ae_header_id = xdl.ae_header_id

Line 11301: UPDATE xla_ae_lines xel

11297: -- Update the AMOUNTs for the last MPA line amount
11298: ------------------------------------------------------------
11299: /* commented for bug#10394715
11300: FORALL i IN 1..l_array_parent_hdr_idx.COUNT
11301: UPDATE xla_ae_lines xel
11302: SET (entered_cr
11303: ,entered_dr
11304: ,accounted_cr
11305: ,accounted_dr

Line 11318: FROM xla_ae_lines xel2

11314: ,DECODE(MIN(unrounded_entered_cr), NULL,NULL, l_array_unround_entered_amt(i) - SUM(unrounded_entered_cr))
11315: ,DECODE(MIN(unrounded_entered_dr), NULL,NULL, l_array_unround_entered_amt(i) - SUM(unrounded_entered_dr))
11316: ,DECODE(MIN(unrounded_accounted_cr), NULL,NULL, l_array_unround_accted_amt(i) - SUM(unrounded_accounted_cr))
11317: ,DECODE(MIN(unrounded_accounted_dr), NULL,NULL, l_array_unround_accted_amt(i) - SUM(unrounded_accounted_dr))
11318: FROM xla_ae_lines xel2
11319: ,xla_ae_headers xeh
11320: WHERE xel2.ae_header_id = xeh.ae_header_id
11321: AND xel2.ae_line_num = xel.ae_line_num
11322: AND xel2.application_id = p_application_id -- 4585874

Line 11332: UPDATE xla_ae_lines xel

11328: AND application_id = p_application_id;
11329: */
11330: -- added for bug#10394715
11331: FORALL i IN 1..l_array_parent_hdr_idx.COUNT
11332: UPDATE xla_ae_lines xel
11333: SET (xel.entered_cr
11334: ,xel.entered_dr
11335: ,xel.accounted_cr
11336: ,xel.accounted_dr

Line 11456: FROM xla_ae_lines xel2

11452: NULL
11453: ELSE l_array_unround_accted_amt(i) - SUM(NVL(xel2.unrounded_accounted_dr,0) - NVL(xel2.unrounded_accounted_cr,0) )
11454: END
11455: END UNROUNDED_ACCOUNTED_DR
11456: FROM xla_ae_lines xel2
11457: --,xla_ae_headers xeh
11458: ,xla_ae_headers_gt xeh -- added for bug#16446642
11459: WHERE xel2.ae_header_id = xeh.ae_header_id
11460: AND xel2.ae_line_num = xel.ae_line_num

Line 11493: FROM xla_ae_lines xel2

11489: ,unrounded_entered_cr
11490: ,unrounded_entered_dr
11491: ,unrounded_accounted_cr
11492: ,unrounded_accounted_dr
11493: FROM xla_ae_lines xel2
11494: WHERE xel2.ae_header_id = xdl.ae_header_id
11495: AND xel2.ae_line_num = xdl.ae_line_num)
11496: WHERE application_id = p_application_id -- 4585874
11497: AND ae_header_id = l_array_max_hdr_idx(i);

Line 11568: --(SELECT COUNT(*) FROM xla_ae_lines xel,xla_ae_headers xeh -- count of original lines

11564: AND xdl3.ref_temp_line_num IS NULL
11565: AND xeh.parent_ae_header_id = xdl1.ref_ae_header_id
11566: AND xeh.parent_ae_line_num IS NOT NULL)
11567: ORDER BY xeh1.ledger_id, xdl1.ref_event_id;
11568: --(SELECT COUNT(*) FROM xla_ae_lines xel,xla_ae_headers xeh -- count of original lines
11569: -- WHERE xeh.application_id = p_application_id
11570: -- AND xel.ae_header_id = xeh.ae_header_id
11571: -- AND xeh.parent_ae_header_id = xdl1.ref_ae_header_id
11572: -- AND xeh.parent_ae_line_num IS NOT NULL)

Line 11576: FROM xla_ae_lines xel ,

11572: -- AND xeh.parent_ae_line_num IS NOT NULL)
11573:
11574: CURSOR cur_last_mpa (l_ae_header NUMBER, l_max_ae_header NUMBER) is
11575: SELECT xel.rowid, xel.*
11576: FROM xla_ae_lines xel ,
11577: xla_distribution_links xdl2
11578: WHERE xel.application_id = p_application_id
11579: AND xel.ae_header_id = l_ae_header
11580: AND xdl2.application_id = p_application_id

Line 11653: FROM xla_ae_lines

11649: INTO l_array_entered_amt(i)
11650: ,l_array_accted_amt(i)
11651: ,l_array_unround_entered_amt(i)
11652: ,l_array_unround_accted_amt(i)
11653: FROM xla_ae_lines
11654: WHERE application_id = p_application_id
11655: AND ae_header_id = l_array_ae_header_id(i)
11656: AND ae_line_num = l_array_parent_max_line(i);
11657: END LOOP;

Line 11708: UPDATE xla_ae_lines xel

11704: OPEN cur_last_mpa(l_array_ae_header_id(i), l_max_hdr_id);
11705: FETCH cur_last_mpa INTO l_last_mpa;
11706: WHILE cur_last_mpa%FOUND LOOP
11707:
11708: UPDATE xla_ae_lines xel
11709: SET (entered_cr
11710: ,entered_dr
11711: ,accounted_cr
11712: ,accounted_dr

Line 11725: FROM xla_ae_lines xel2

11721: ,DECODE((l_last_mpa.unrounded_entered_cr), NULL,NULL, l_array_unround_entered_amt(i) - SUM(xel2.unrounded_entered_cr))
11722: ,DECODE((l_last_mpa.unrounded_entered_dr), NULL,NULL, l_array_unround_entered_amt(i) - SUM(xel2.unrounded_entered_dr))
11723: ,DECODE((l_last_mpa.unrounded_accounted_cr), NULL,NULL, l_array_unround_accted_amt(i) - SUM(xel2.unrounded_accounted_cr))
11724: ,DECODE((l_last_mpa.unrounded_accounted_dr), NULL,NULL, l_array_unround_accted_amt(i) - SUM(xel2.unrounded_accounted_dr))
11725: FROM xla_ae_lines xel2
11726: ,xla_distribution_links xdl1
11727: ,xla_ae_headers xeh1
11728: WHERE xel2.application_id = p_application_id
11729: AND xel2.ae_header_id = xdl1.ae_header_id

Line 11745: (p_msg => 'update xla_ae_lines count='||SQL%ROWCOUNT||

11741: WHERE rowid = l_last_mpa.rowid;
11742:
11743: IF (C_LEVEL_STATEMENT >= g_log_level) THEN
11744: trace
11745: (p_msg => 'update xla_ae_lines count='||SQL%ROWCOUNT||
11746: ' ae_header='||l_last_mpa.ae_header_id||
11747: ' ae_line='||l_last_mpa.ae_line_num
11748: ,p_level => C_LEVEL_STATEMENT
11749: ,p_module => l_log_module);

Line 11775: FROM xla_ae_lines xel

11771: ,xel.unrounded_entered_cr
11772: ,xel.unrounded_entered_dr
11773: ,xel.unrounded_accounted_cr
11774: ,xel.unrounded_accounted_dr
11775: FROM xla_ae_lines xel
11776: ,xla_distribution_links xdl1
11777: WHERE xel.application_id = p_application_id
11778: AND xel.ae_header_id = xdl1.ae_header_id
11779: AND xel.ae_line_num = xdl1.ae_line_num

Line 12052: FROM xla_ae_lines_gt

12048: , alloc_to_dist_id_num_2
12049: , alloc_to_dist_id_num_3
12050: , alloc_to_dist_id_num_4
12051: , alloc_to_dist_id_num_5
12052: FROM xla_ae_lines_gt
12053: WHERE ae_line_num IS NOT NULL;
12054:
12055: l_rowcount:= SQL%ROWCOUNT;
12056:

Line 19990: (select /*+ index(gt XLA_AE_LINES_GT_U1) */

19986: ac2,
19987: ac3,
19988: ac4,
19989: ac5)
19990: (select /*+ index(gt XLA_AE_LINES_GT_U1) */
19991: gt.ae_header_id,
19992: gt.ae_line_num,
19993: la.analytical_criterion_code,
19994: la.analytical_criterion_type_code,

Line 20003: xla_ae_lines_gt gt

19999: la.ac3,
20000: la.ac4,
20001: la.ac5
20002: from xla_ae_line_acs la,
20003: xla_ae_lines_gt gt
20004: where la.ae_header_id=gt.ref_ae_header_id
20005: and gt.ref_ae_header_id<> gt.ae_header_id
20006: and la.ae_line_num = gt.ref_ae_line_num
20007: and gt.ref_ae_line_num is not null