DBA Data[Home] [Help]

APPS.XLA_AE_JOURNAL_ENTRY_PKG dependencies on XLA_AE_HEADERS

Line 33: | xla_ae_headers_gt |

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 |
37: | 20-MAI-2003 K.Boussema Added a Token to XLA_AP_CANNOT_INSERT_JE |

Line 119: | 27-Apr-2005 W. Shen Performance change. Insert into xla_ae_headers |

115: | Multiple changes. For details please see DLD |
116: | 14-Mar-2005 K.Boussema Changed for ADR-enhancements. |
117: | 20-Apr-2005 W. Shen replace column document_rounding_amount by |
118: | doc_rounding_acctd_amt |
119: | 27-Apr-2005 W. Shen Performance change. Insert into xla_ae_headers |
120: | with zero_amount_flag always = 'N'. will |
121: | update it to 'Y' later in validation package |
122: | 26-May-2005 W. Shen change for Unrounded_entered_amount |
123: | 26-May-2005 A. Wan 4262811 MPA project |

Line 1852: using xla_ae_headers_gt xah

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
1856: and xal.balance_type_code = xah.balance_type_code

Line 1919: update xla_ae_headers_gt h

1915: -- Populate the parent_ae_line_num by the real ae_line_num
1916: ----------------------------------------------------------
1917: /* PROBLEM: incorrectly sets parent_ae_line_num to NULL
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

Line 1932: UPDATE xla_ae_headers_gt h

1928: and l.rowid = l_array_rowid(i))
1929: where parent_ae_line_num IS NOT NULL;
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

Line 11041: FROM xla_ae_headers_gt

11037: ,parent_ae_line_num
11038: ,MIN(ae_header_id)
11039: ,MAX(ae_header_id)
11040: ,MAX(accounting_date) --added for bug#10242870
11041: FROM xla_ae_headers_gt
11042: WHERE parent_header_id IS NOT NULL
11043: AND parent_ae_line_num IS NOT NULL
11044: AND balance_type_code = 'A' -- added for bug:7377888
11045: AND NVL(accrual_reversal_flag,'N') = 'N'

Line 11145: FROM xla_ae_headers_gt xah

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)
11148: AND xah.accounting_date = l_array_max_act_date(i)
11149: AND xah.parent_header_id IS NOT NULL

Line 11158: FROM xla_ae_headers_gt xah

11154:
11155:
11156: WITH aeh AS
11157: ( SELECT xah.ae_header_id
11158: FROM xla_ae_headers_gt xah
11159: WHERE xah.parent_header_id = l_array_parent_hdr_idx(i)
11160: AND xah.parent_ae_line_num = l_array_parent_line_idx(i)
11161: AND xah.accounting_date = l_array_max_act_date(i)
11162: AND xah.parent_header_id IS NOT NULL

Line 11195: --,xla_ae_headers xeh

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
11199: AND xel2.ae_header_id <> l_array_max_hdr_idx(i)

Line 11196: ,xla_ae_headers_gt xeh -- added for bug#16446642

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
11199: AND xel2.ae_header_id <> l_array_max_hdr_idx(i)
11200: --AND xeh.application_id = p_application_id ---- bug#16446642

Line 11319: ,xla_ae_headers xeh

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
11323: AND xel2.ae_header_id <> l_array_max_hdr_idx(i)

Line 11457: --,xla_ae_headers xeh

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
11461: AND xel2.application_id = p_application_id -- 4585874

Line 11458: ,xla_ae_headers_gt xeh -- added for bug#16446642

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
11461: AND xel2.application_id = p_application_id -- 4585874
11462: AND xel2.ae_header_id <> l_array_max_hdr_idx(i)

Line 11540: ,xla_ae_headers xeh1

11536: ,xdl1.ae_header_id
11537: ,xdl1.ref_event_id
11538: ,xeh1.ledger_id
11539: FROM xla_distribution_links xdl1
11540: ,xla_ae_headers xeh1
11541: ,xla_ae_headers_gt xehg
11542: WHERE xdl1.application_id = p_application_id
11543: AND xeh1.application_id = p_application_id
11544: AND xdl1.ae_header_id = xehg.ae_header_id

Line 11541: ,xla_ae_headers_gt xehg

11537: ,xdl1.ref_event_id
11538: ,xeh1.ledger_id
11539: FROM xla_distribution_links xdl1
11540: ,xla_ae_headers xeh1
11541: ,xla_ae_headers_gt xehg
11542: WHERE xdl1.application_id = p_application_id
11543: AND xeh1.application_id = p_application_id
11544: AND xdl1.ae_header_id = xehg.ae_header_id
11545: AND xdl1.ae_header_id = xeh1.ae_header_id

Line 11548: FROM xla_ae_headers

11544: AND xdl1.ae_header_id = xehg.ae_header_id
11545: AND xdl1.ae_header_id = xeh1.ae_header_id
11546: AND xdl1.temp_line_num = xdl1.ref_temp_line_num*-1 -- is a reversal
11547: AND EXISTS (SELECT 1
11548: FROM xla_ae_headers
11549: WHERE application_id = p_application_id
11550: AND parent_ae_header_id = xdl1.ref_ae_header_id
11551: AND parent_ae_line_num IS NOT NULL) -- MPA only, not for Accrual Reversal
11552: GROUP BY xdl1.ref_ae_header_id, xdl1.ref_event_id, xdl1.application_id, xeh1.ledger_id, xdl1.ae_header_id

Line 11559: (SELECT COUNT(*) FROM xla_distribution_links xdl3,xla_ae_headers xeh -- count of original lines

11555: AND xdl2.ae_header_id = xdl1.ae_header_id
11556: AND xdl2.temp_line_num = xdl2.ref_temp_line_num*-1
11557: AND xdl2.ref_ae_header_id <> xdl1.ref_ae_header_id
11558: AND xdl2.ref_event_id = xdl1.ref_event_id ) =
11559: (SELECT COUNT(*) FROM xla_distribution_links xdl3,xla_ae_headers xeh -- count of original lines
11560: WHERE xdl3.application_id = p_application_id
11561: AND xeh.application_id = p_application_id
11562: AND xdl3.ae_header_id = xeh.ae_header_id
11563: AND xdl3.event_id = xdl1.ref_event_id

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 11683: ,xla_ae_headers xeh1

11679:
11680: SELECT MAX(xdl1.ref_ae_header_id) -- last recognition header
11681: INTO l_max_hdr_id
11682: FROM xla_distribution_links xdl1
11683: ,xla_ae_headers xeh1
11684: WHERE xdl1.application_id = p_application_id
11685: AND xdl1.ae_header_id = l_array_ae_header_id(i)
11686: AND xdl1.temp_line_num = xdl1.ref_temp_line_num*-1
11687: AND xdl1.ref_ae_header_id <> l_array_parent_hdr_idx(i)

Line 11727: ,xla_ae_headers xeh1

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
11730: AND xel2.ae_line_num = xdl1.ae_line_num
11731: AND xdl1.application_id = p_application_id

Line 12136: ,xla_ae_headers_gt h

12132: SELECT pr.name, ec.name, et.name
12133: FROM xla_product_rules_tl pr
12134: ,xla_event_classes_tl ec
12135: ,xla_event_types_tl et
12136: ,xla_ae_headers_gt h
12137: WHERE pr.amb_context_code(+) = h.amb_context_code
12138: AND pr.application_id(+) = p_application_id
12139: AND pr.product_rule_type_code(+) = h.product_rule_type_code
12140: AND pr.product_rule_code(+) = h.product_rule_code

Line 12171: (p_msg => 'SQL - Insert into xla_ae_headers'

12167:
12168: IF (C_LEVEL_STATEMENT >= g_log_level) THEN
12169:
12170: trace
12171: (p_msg => 'SQL - Insert into xla_ae_headers'
12172: ,p_level => C_LEVEL_STATEMENT
12173: ,p_module => l_log_module);
12174:
12175: END IF;

Line 12183: UPDATE /*+ index(XLA_AE_HEADERS_GT, XLA_AE_HEADERS_GT_N1) */ --4918497

12179: -- 4262811
12180: --------------------------------------------------------
12181: IF xla_accounting_pkg.g_mpa_accrual_exists = 'Y' THEN --4752807
12182: FORALL i IN 1..g_array_ae_header_id.COUNT
12183: UPDATE /*+ index(XLA_AE_HEADERS_GT, XLA_AE_HEADERS_GT_N1) */ --4918497
12184: xla_ae_headers_gt
12185: SET parent_header_id = g_array_ae_header_id(i)
12186: WHERE parent_header_id = g_array_event_id(i) -- instead of ae_header_id
12187: AND ledger_id = g_array_ledger_id(i)

Line 12184: xla_ae_headers_gt

12180: --------------------------------------------------------
12181: IF xla_accounting_pkg.g_mpa_accrual_exists = 'Y' THEN --4752807
12182: FORALL i IN 1..g_array_ae_header_id.COUNT
12183: UPDATE /*+ index(XLA_AE_HEADERS_GT, XLA_AE_HEADERS_GT_N1) */ --4918497
12184: xla_ae_headers_gt
12185: SET parent_header_id = g_array_ae_header_id(i)
12186: WHERE parent_header_id = g_array_event_id(i) -- instead of ae_header_id
12187: AND ledger_id = g_array_ledger_id(i)
12188: AND balance_type_code = g_array_balance_type(i)

Line 12207: INSERT INTO xla_ae_headers

12203: -- end if
12204: --------------------------------------------------------
12205:
12206: IF xla_accounting_pkg.g_array_group_id.COUNT = 0 THEN
12207: INSERT INTO xla_ae_headers
12208: (
12209: ae_header_id
12210: , application_id
12211: , ledger_id

Line 12310: FROM xla_ae_headers_gt hed

12306: , hed.parent_header_id -- 4262811
12307: , hed.parent_ae_line_num -- 4262811
12308: , hed.accrual_reversal_flag -- 4262811
12309: , NULL -- group_id
12310: FROM xla_ae_headers_gt hed
12311: where hed.balance_type_code <> 'X';
12312: ELSE -- xla_accounting_pkg.g_array_group_id.COUNT > 0
12313: FORALL i IN 1..xla_accounting_pkg.g_array_group_id.COUNT
12314: INSERT INTO xla_ae_headers

Line 12314: INSERT INTO xla_ae_headers

12310: FROM xla_ae_headers_gt hed
12311: where hed.balance_type_code <> 'X';
12312: ELSE -- xla_accounting_pkg.g_array_group_id.COUNT > 0
12313: FORALL i IN 1..xla_accounting_pkg.g_array_group_id.COUNT
12314: INSERT INTO xla_ae_headers
12315: (
12316: ae_header_id
12317: , application_id
12318: , ledger_id

Line 12424: FROM xla_ae_headers_gt hed

12420: --Added for 10124492
12421: ELSE NULL
12422: END
12423: ,NULL)
12424: FROM xla_ae_headers_gt hed
12425: where hed.balance_type_code <> 'X'
12426: and hed.ledger_id = xla_accounting_pkg.g_array_ledger_id(i);
12427: END IF;
12428:

Line 12433: (p_msg => '# journal entry headers inserted into xla_ae_headers = '||l_rowcount

12429: l_rowcount := SQL%ROWCOUNT;
12430:
12431: IF (C_LEVEL_EVENT >= g_log_level) THEN
12432: trace
12433: (p_msg => '# journal entry headers inserted into xla_ae_headers = '||l_rowcount
12434: ,p_level => C_LEVEL_EVENT
12435: ,p_module => l_log_module);
12436: END IF;
12437:

Line 13068: FROM xla_ae_headers_gt

13064: , anc_id_7
13065: , anc_id_8
13066: , anc_id_9
13067: , anc_id_10
13068: FROM xla_ae_headers_gt
13069: WHERE ae_header_id is not null;
13070:
13071: --
13072: IF (C_LEVEL_EVENT >= g_log_level) THEN

Line 15219: FROM xla_ae_headers_gt

15215: , anc_id_47
15216: , anc_id_48
15217: , anc_id_49
15218: , anc_id_50
15219: FROM xla_ae_headers_gt
15220: WHERE ae_header_id is not null;
15221:
15222: --
15223: IF (C_LEVEL_EVENT >= g_log_level) THEN

Line 19419: FROM xla_ae_headers_gt

19415: , anc_id_97
19416: , anc_id_98
19417: , anc_id_99
19418: , anc_id_100
19419: FROM xla_ae_headers_gt
19420: WHERE ae_header_id is not null;
19421:
19422: --
19423: IF (C_LEVEL_EVENT >= g_log_level) THEN