DBA Data[Home] [Help]

APPS.XLA_AE_LINES_PKG dependencies on XLA_AE_LINES_GT

Line 27: | xla_ae_lines_gt, xla_je_headers_gt by |

23: | 03-APR-2003 K.Boussema Included Analytical criteria feature |
24: | 19-APR-2003 K.Boussema Included Error messages |
25: | 06-MAI-2003 K.Boussema Modified to fix bug 2936066(Unbalanced JE) |
26: | 13-MAI-2003 K.Boussema Renamed temporary tables xla_je_lines_gt by |
27: | xla_ae_lines_gt, xla_je_headers_gt by |
28: | xla_ae_headers_gt |
29: | Renamed in xla_distribution_links the column |
30: | base_amount by ledger_amount |
31: | 20-MAI-2003 K.Boussema Added a Token to XLA_AP_CANNOT_INSERT_JE |

Line 65: | 12-DEC-2003 K.Boussema Renamed target_coa_id in xla_ae_lines_gt |

61: | and LineReversal_2. |
62: | Merged procedures TransactionReversal and |
63: | TransactionReversal_2. |
64: | 05-DEC-2003 K.Boussema Changed the code to fix bug3289875 |
65: | 12-DEC-2003 K.Boussema Renamed target_coa_id in xla_ae_lines_gt |
66: | by ccid_coa_id |
67: | 18-DEC-2003 K.Boussema Changed to fix bug 3042840,3307761,3268940 |
68: | 3310291 and 3320689 |
69: | 07-JAN-2003 K.Boussema Changed to populate switch_side_flag column |

Line 180: | xla_ae_lines_gt |

176: | ae_lines_gt detail for bflow entries|
177: | for MPA and Accrual Reversal lines. |
178: | 10-Feb-2006 A.Wan 5019460 - could not reverse prior entries. |
179: | 13-Feb-2006 V.Kumar 4955764 Populating Accounting_date in |
180: | xla_ae_lines_gt |
181: | 14-Feb-2006 A.Wan 4967526 - copy following for Third Party info |
182: | in BusinessFlowPriorEntries: |
183: | - merge_code_combination_id |
184: | - merge_party_id |

Line 227: | 14-Dec-2007 V.Swapna 6648062 - Populate xla_ae_lines_gt with |

223: | if there are no MPA in this run. |
224: | 26-jan-2007 A.Wan 5845547 - upgrade fail for not upgraded bflow |
225: | and reversal transactions. Add |
226: | upgrade party attributes. |
227: | 14-Dec-2007 V.Swapna 6648062 - Populate xla_ae_lines_gt with |
228: | the values passed in override acctd |
229: | amts accounting attribute and use |
230: | it in business flow procedure |
231: | 31-Dec-2007 V. Swapna 5339999 - Changes to BusinessFlowPriorEntries |

Line 261: | XALG_U1 for update xla_ae_lines_gt |

257: | 02-Jun-2009 VGOPISET 8505463 - Changes in AccountingReversal for |
258: | MPA Cancellation. |
259: | 20-sep-2009 ssawhney 8773083 Modified CalculateGainLossAmounts |
260: | and 8452052 and 8920369 completely. Added hint to pick |
261: | XALG_U1 for update xla_ae_lines_gt |
262: | in SameEntry/PriorEntry |
263: | 18-Mar-2010 ssawhney 9483834 incorrect alias in the hints in CalculateGainLossAmounts |
264: | 26-Mar-2010 krsankar 8810416 Modified the currency conversion |
265: | details in FUNCTION InsertLines for |

Line 285: | lines are deleted from xla_ae_lines_gt |

281: | ii) Change SIGN considered for Transaction Revesal |
282: | in Draft Mode as well. |
283: | 02-Feb-2011 VGOPISET 11066172 Changes in BusinessFlowSameEntries to |
284: | mark all the Headers as INVALID after all dummy |
285: | lines are deleted from xla_ae_lines_gt |
286: | 18-Oct-2011 Narayanan M.S. Bug 12379106 Changes in business flow cursor|
287: | in procedure BusinessFlowPriorEntries to |
288: | include event_number when deciding the line |
289: | rank. |

Line 1663: -- insert headers into xla_ae_lines_gt table

1659: g_rec_lines := g_null_lines;
1660:
1661: ELSIF g_LineNumber = C_BULK_LIMIT THEN
1662: --
1663: -- insert headers into xla_ae_lines_gt table
1664: --
1665: l_result := xla_ae_lines_pkg.InsertLines;
1666: g_LineNumber := 0;
1667: g_rec_lines := g_null_lines;

Line 3093: (p_msg => '# temporary journal lines to insert into GT xla_ae_lines_gt = '||g_rec_lines.array_line_num.COUNT

3089: l_result :=TRUE;
3090:
3091: IF (C_LEVEL_STATEMENT >= g_log_level) THEN
3092: trace
3093: (p_msg => '# temporary journal lines to insert into GT xla_ae_lines_gt = '||g_rec_lines.array_line_num.COUNT
3094: ,p_level => C_LEVEL_STATEMENT
3095: ,p_module => l_log_module);
3096: END IF;
3097:

Line 3132: (p_msg => 'SQL - Insert into xla_ae_lines_gt'

3128: END IF;
3129:
3130: IF (C_LEVEL_STATEMENT >= g_log_level) THEN
3131: trace
3132: (p_msg => 'SQL - Insert into xla_ae_lines_gt'
3133: ,p_level => C_LEVEL_STATEMENT
3134: ,p_module => l_log_module);
3135: END IF;
3136:

Line 3140: INSERT INTO xla_ae_lines_gt

3136:
3137: ------------------------------------------------------------------------------------------------------
3138:
3139: FORALL Idx IN g_rec_lines.array_line_num.FIRST .. g_rec_lines.array_line_num.LAST SAVE EXCEPTIONS --7453943
3140: INSERT INTO xla_ae_lines_gt
3141: ( ae_header_id
3142: , temp_line_num
3143: , extract_line_num
3144: , event_id

Line 3823: (p_msg => '# temporary journal lines inserted into GT xla_ae_lines_gt = '||TO_CHAR(l_rowcount)

3819: l_result := ( l_rowcount> 0);
3820:
3821: IF (C_LEVEL_EVENT >= g_log_level) THEN
3822: trace
3823: (p_msg => '# temporary journal lines inserted into GT xla_ae_lines_gt = '||TO_CHAR(l_rowcount)
3824: ,p_level => C_LEVEL_EVENT
3825: ,p_module => l_log_module);
3826: END IF;
3827:

Line 4340: -- selecting all the dummy lines from xla_ae_lines_gt that are due to

4336: --***************************************************************************************************************
4337: --***************************************************************************************************************
4338:
4339: --
4340: -- selecting all the dummy lines from xla_ae_lines_gt that are due to
4341: -- line level reversal option
4342: --
4343: SELECT event_id
4344: ,ledger_id

Line 4406: FROM xla_ae_lines_gt

4402: ,l_array_gl_date -- 5189664
4403: ,l_array_tax_line_ref -- 7159711
4404: ,l_array_tax_summary_line_ref -- 7159711
4405: ,l_array_tax_rec_nrec_dist_ref -- 7159711
4406: FROM xla_ae_lines_gt
4407: WHERE reversal_code = 'DUMMY_LR'
4408: ORDER by entity_id, event_number;
4409:
4410: IF (C_LEVEL_STATEMENT >= g_log_level) THEN

Line 4422: -- 4669308 Delete the MPA/Accrual Line Reversal in xla_ae_lines_gt (not in distribution links yet)

4418: -- 4669308 Delete the MPA/Accrual Line Reversal (still in GT ables, not in distribution links yet)
4419: --=======================================================================================================
4420: --
4421: ---------------------------------------------------------------------------------------------------------
4422: -- 4669308 Delete the MPA/Accrual Line Reversal in xla_ae_lines_gt (not in distribution links yet)
4423: ---------------------------------------------------------------------------------------------------------
4424: --
4425: IF xla_accounting_pkg.g_mpa_accrual_exists = 'Y' THEN -- 5412560
4426: -- Modify for performance bug 5086984

Line 4428: SELECT /*+ Leading(HGT) cardinality(hgt 1) index(lgt XLA_AE_LINES_GT_U1) */

4424: --
4425: IF xla_accounting_pkg.g_mpa_accrual_exists = 'Y' THEN -- 5412560
4426: -- Modify for performance bug 5086984
4427: FOR i IN 1..l_array_entity_id.count LOOP
4428: SELECT /*+ Leading(HGT) cardinality(hgt 1) index(lgt XLA_AE_LINES_GT_U1) */
4429: lgt.ledger_id
4430: ,lgt.event_id
4431: ,lgt.ref_ae_header_id
4432: ,lgt.temp_line_num

Line 4444: FROM xla_ae_lines_gt lgt

4440: ,l_array_mpa_acc_temp_line_num
4441: ,l_array_mpa_acc_ae_header_id
4442: ,l_array_mpa_acc_header_num
4443: ,l_array_mpa_acc_balance_type
4444: FROM xla_ae_lines_gt lgt
4445: ,xla_ae_headers_gt hgt
4446: WHERE l_array_ledger_id(i) = lgt.ledger_id
4447: AND l_array_rev_dist_type(i) = lgt.source_distribution_type
4448: AND nvl(l_array_rev_dist_id_num_1(i),-99) = nvl(lgt.source_distribution_id_num_1,-99)

Line 4471: FROM xla_ae_lines_gt

4467: AND hgt.event_number < l_array_event_number(i);
4468: /* 5412560 replaced
4469: AND NOT EXISTS ( -- the lines already reversed are not reversed again
4470: SELECT 1
4471: FROM xla_ae_lines_gt
4472: WHERE ledger_id = lgt.ledger_id
4473: AND ref_ae_header_id = lgt.ref_ae_header_id
4474: AND temp_line_num = lgt.temp_line_num * -1)
4475: AND NVL(lgt.header_num,0) > 0

Line 4502: -- 4669308 Delete the MPA/Accrual Line Reversal in xla_ae_lines_gt (not in distribution links yet)

4498: end loop;
4499: END IF;
4500:
4501: ---------------------------------------------------------------------------------------------------------
4502: -- 4669308 Delete the MPA/Accrual Line Reversal in xla_ae_lines_gt (not in distribution links yet)
4503: ---------------------------------------------------------------------------------------------------------
4504: FORALL j IN 1..l_array_mpa_acc_ae_header_id.count
4505: DELETE xla_ae_lines_gt
4506: WHERE ledger_id = l_array_mpa_acc_ledger_id(j)

Line 4505: DELETE xla_ae_lines_gt

4501: ---------------------------------------------------------------------------------------------------------
4502: -- 4669308 Delete the MPA/Accrual Line Reversal in xla_ae_lines_gt (not in distribution links yet)
4503: ---------------------------------------------------------------------------------------------------------
4504: FORALL j IN 1..l_array_mpa_acc_ae_header_id.count
4505: DELETE xla_ae_lines_gt
4506: WHERE ledger_id = l_array_mpa_acc_ledger_id(j)
4507: AND ref_ae_header_id = l_array_mpa_acc_ref_ae_header(j)
4508: AND temp_line_num = l_array_mpa_acc_temp_line_num(j)
4509: AND ae_header_id = l_array_mpa_acc_ae_header_id(j)

Line 4538: -- reverse the lines in xla_ae_lines_gt table (not in distribution links yet)

4534: MPA/Accrual Reversal data is deleted from above when Original and cancellation Event
4535: are accounted in the same Run.
4536: */
4537: --
4538: -- reverse the lines in xla_ae_lines_gt table (not in distribution links yet)
4539: --
4540: INSERT INTO xla_ae_lines_gt
4541: (ae_header_id
4542: ,temp_line_num

Line 4540: INSERT INTO xla_ae_lines_gt

4536: */
4537: --
4538: -- reverse the lines in xla_ae_lines_gt table (not in distribution links yet)
4539: --
4540: INSERT INTO xla_ae_lines_gt
4541: (ae_header_id
4542: ,temp_line_num
4543: ,event_id
4544: ,ref_ae_header_id

Line 5532: xla_ae_lines_gt lgt1

5528: , lgt2.anc_id_98
5529: , lgt2.anc_id_99
5530: , lgt2.anc_id_100
5531: FROM
5532: xla_ae_lines_gt lgt1
5533: ,xla_ae_lines_gt lgt2
5534: ,xla_ae_headers_gt hgt
5535: WHERE lgt1.reversal_code = 'DUMMY_LR'
5536: AND lgt2.ledger_id = lgt1.ledger_id

Line 5533: ,xla_ae_lines_gt lgt2

5529: , lgt2.anc_id_99
5530: , lgt2.anc_id_100
5531: FROM
5532: xla_ae_lines_gt lgt1
5533: ,xla_ae_lines_gt lgt2
5534: ,xla_ae_headers_gt hgt
5535: WHERE lgt1.reversal_code = 'DUMMY_LR'
5536: AND lgt2.ledger_id = lgt1.ledger_id
5537: AND lgt2.source_distribution_type = lgt1.reverse_distribution_type

Line 5554: AND hgt.header_num = lgt2.header_num-- 4262811c Line Reversal (xla_ae_lines_gt_u1 error)

5550: AND hgt.balance_type_code = lgt2.balance_type_code
5551: AND hgt.entity_id = lgt1.entity_id
5552: -- lines for events with event number > current event number are not reversed.
5553: AND hgt.event_number < lgt1.event_number
5554: AND hgt.header_num = lgt2.header_num-- 4262811c Line Reversal (xla_ae_lines_gt_u1 error)
5555: AND hgt.ae_header_id = lgt2.ae_header_id
5556: )
5557: WHERE rn = 1
5558: );

Line 5563: (p_msg => 'Line Reversal - Reversal lines created from xla_ae_lines_gt = '||SQL%ROWCOUNT

5559:
5560:
5561: IF (C_LEVEL_STATEMENT >= g_log_level) THEN
5562: trace
5563: (p_msg => 'Line Reversal - Reversal lines created from xla_ae_lines_gt = '||SQL%ROWCOUNT
5564: ,p_level => C_LEVEL_STATEMENT
5565: ,p_module => l_log_module);
5566: END IF;
5567:

Line 5582: xla_ae_lines_gt lgt

5578: g_incomplete_mpa_acc_LR.l_array_ae_header_id
5579: ,g_incomplete_mpa_acc_LR.l_array_ae_line_num
5580: ,g_incomplete_mpa_acc_LR.l_array_parent_ae_header
5581: FROM
5582: xla_ae_lines_gt lgt
5583: ,xla_ae_lines ael
5584: ,xla_ae_headers aeh
5585: ,xla_distribution_links xdl
5586: WHERE xdl.application_id = l_application_id

Line 5636: INSERT INTO xla_ae_lines_gt

5632: -- Also, since the redundant lines will affect ROUNDING calculation.
5633: -- Need to create reversal in Draft mode also (so can be viewed).
5634: ---------------------------------------------------------------------------------------------------------
5635: --
5636: INSERT INTO xla_ae_lines_gt
5637: (ae_header_id
5638: ,temp_line_num
5639: ,event_id
5640: ,ref_ae_header_id

Line 6049: xla_ae_lines_gt lgt

6045: 'P','P',
6046: null) analytical_balance_flag -- Bug 7382288
6047: ,nvl2(ael.analytical_balance_flag, 'DUMMY_ANC_'||ael.ae_header_id||ael.ae_line_num,null) ANC_ID_1 --Bug 8691573
6048: FROM
6049: xla_ae_lines_gt lgt
6050: ,xla_distribution_links xdl
6051: ,xla_ae_lines ael
6052: ,xla_ae_headers aeh
6053: ,fnd_currencies fcu

Line 6177: FROM xla_ae_lines_gt gt1, xla_ae_headers

6173:
6174:
6175: SELECT min(xla_ae_headers.accounting_date)
6176: INTO l_min_ref_event_date
6177: FROM xla_ae_lines_gt gt1, xla_ae_headers
6178: WHERE gt1.reversal_code = 'REVERSAL'
6179: AND gt1.ref_event_id = xla_ae_headers.event_id;
6180:
6181:

Line 6211: FROM xla_ae_lines_gt gt1, gl_ledgers gll

6207:
6208:
6209: FOR c_not_reversed_entries IN
6210: (SELECT DISTINCT gt1.event_id, gt1.ledger_id
6211: FROM xla_ae_lines_gt gt1, gl_ledgers gll
6212: WHERE gt1.reversal_code = 'DUMMY_LR'
6213: AND gll.ledger_id = gt1.ledger_id
6214: AND gll.ledger_category_code <> 'PRIMARY'
6215: AND NOT EXISTS (SELECT 1

Line 6216: FROM xla_ae_lines_gt gt2

6212: WHERE gt1.reversal_code = 'DUMMY_LR'
6213: AND gll.ledger_id = gt1.ledger_id
6214: AND gll.ledger_category_code <> 'PRIMARY'
6215: AND NOT EXISTS (SELECT 1
6216: FROM xla_ae_lines_gt gt2
6217: WHERE gt2.reversal_code = 'REVERSAL'
6218: AND gt1.event_id = gt2.event_id
6219: AND gt1.ledger_id = gt2.ledger_id)
6220: AND EXISTS (SELECT 1

Line 6221: FROM xla_ae_lines_gt gt3

6217: WHERE gt2.reversal_code = 'REVERSAL'
6218: AND gt1.event_id = gt2.event_id
6219: AND gt1.ledger_id = gt2.ledger_id)
6220: AND EXISTS (SELECT 1
6221: FROM xla_ae_lines_gt gt3
6222: WHERE gt3.reversal_code = 'REVERSAL'
6223: AND gt1.event_id = gt3.event_id))
6224:
6225: LOOP

Line 6269: -- selecting all the dummy lines from xla_ae_lines_gt that are due to

6265: --***************************************************************************************************************
6266: --***************************************************************************************************************
6267:
6268: --
6269: -- selecting all the dummy lines from xla_ae_lines_gt that are due to
6270: -- transaction level reversal option
6271: --
6272: SELECT event_id
6273: ,ledger_id

Line 6313: FROM xla_ae_lines_gt

6309: ,l_array_gl_date -- 5189664
6310: ,l_array_tax_line_ref -- 7226263
6311: ,l_array_tax_summary_line_ref -- 7226263
6312: ,l_array_tax_rec_nrec_dist_ref -- 7226263
6313: FROM xla_ae_lines_gt
6314: WHERE reversal_code = 'DUMMY_TR'
6315: ORDER by entity_id, event_number;
6316:
6317: IF (C_LEVEL_STATEMENT >= g_log_level) THEN

Line 6329: -- 4669308 Delete the MPA/Accrual Transaction Reversal in xla_ae_lines_gt (not in distribution links yet)

6325: -- 4669308 Delete the MPA/Accrual Transaction Reversal (still in GT tables, not in distribution links yet)
6326: --=======================================================================================================
6327: --
6328: ---------------------------------------------------------------------------------------------------------
6329: -- 4669308 Delete the MPA/Accrual Transaction Reversal in xla_ae_lines_gt (not in distribution links yet)
6330: ---------------------------------------------------------------------------------------------------------
6331: --
6332: IF xla_accounting_pkg.g_mpa_accrual_exists = 'Y' THEN -- 5412560
6333: FORALL i IN 1..l_array_entity_id.count

Line 6334: DELETE xla_ae_lines_gt lgt

6330: ---------------------------------------------------------------------------------------------------------
6331: --
6332: IF xla_accounting_pkg.g_mpa_accrual_exists = 'Y' THEN -- 5412560
6333: FORALL i IN 1..l_array_entity_id.count
6334: DELETE xla_ae_lines_gt lgt
6335: WHERE l_array_ledger_id(i) = lgt.ledger_id
6336: AND lgt.reversal_code IS NULL -- the lines created from reversal are not reversed again
6337: AND NOT EXISTS ( -- the lines already reversed are not reversed again
6338: SELECT 1

Line 6339: FROM xla_ae_lines_gt

6335: WHERE l_array_ledger_id(i) = lgt.ledger_id
6336: AND lgt.reversal_code IS NULL -- the lines created from reversal are not reversed again
6337: AND NOT EXISTS ( -- the lines already reversed are not reversed again
6338: SELECT 1
6339: FROM xla_ae_lines_gt
6340: WHERE ledger_id = lgt.ledger_id
6341: AND ref_ae_header_id = lgt.ae_header_id -- 5499367 lgt.ref_ae_header_id
6342: AND temp_line_num = lgt.temp_line_num * -1
6343: )

Line 6373: -- reverse the lines in xla_ae_lines_gt table (not in distribution links yet)

6369: ---------------------------------------------------------------------------------------------------------
6370:
6371:
6372: --
6373: -- reverse the lines in xla_ae_lines_gt table (not in distribution links yet)
6374: --
6375: FORALL i IN 1..l_array_event_id.count
6376: INSERT INTO xla_ae_lines_gt
6377: (ae_header_id

Line 6376: INSERT INTO xla_ae_lines_gt

6372: --
6373: -- reverse the lines in xla_ae_lines_gt table (not in distribution links yet)
6374: --
6375: FORALL i IN 1..l_array_event_id.count
6376: INSERT INTO xla_ae_lines_gt
6377: (ae_header_id
6378: ,temp_line_num
6379: ,event_id
6380: ,ref_ae_header_id

Line 7107: FROM xla_ae_lines_gt lgt

7103: , lgt.anc_id_98
7104: , lgt.anc_id_99
7105: , lgt.anc_id_100
7106:
7107: FROM xla_ae_lines_gt lgt
7108: ,xla_ae_headers_gt hgt
7109: WHERE hgt.entity_id = l_array_entity_id(i)
7110: AND hgt.ledger_id = l_array_ledger_id(i)
7111: AND hgt.event_number < l_array_event_number(i)

Line 7120: FROM xla_ae_lines_gt

7116: AND lgt.reversal_code IS NULL
7117: -- lines that are reversed earlier are not reversed again
7118: AND NOT EXISTS (
7119: SELECT 1
7120: FROM xla_ae_lines_gt
7121: WHERE ledger_id = lgt.ledger_id
7122: AND ref_ae_header_id = lgt.ae_header_id -- 5499367 lgt.ref_ae_header_id
7123: AND temp_line_num = lgt.temp_line_num * -1
7124: )

Line 7130: (p_msg => 'Transaction Reversal - Reversal lines created from xla_ae_lines_gt = '||SQL%ROWCOUNT

7126: ;
7127:
7128: IF (C_LEVEL_STATEMENT >= g_log_level) THEN
7129: trace
7130: (p_msg => 'Transaction Reversal - Reversal lines created from xla_ae_lines_gt = '||SQL%ROWCOUNT
7131: ,p_level => C_LEVEL_STATEMENT
7132: ,p_module => l_log_module);
7133: END IF;
7134:

Line 7150: xla_ae_lines_gt lgt

7146: g_incomplete_mpa_acc_TR.l_array_ae_header_id
7147: ,g_incomplete_mpa_acc_TR.l_array_ae_line_num
7148: ,g_incomplete_mpa_acc_TR.l_array_parent_ae_header
7149: FROM
7150: xla_ae_lines_gt lgt
7151: ,xla_ae_lines ael
7152: ,xla_ae_headers aeh
7153: ,xla_events xet -- 5262950
7154: WHERE aeh.application_id = l_application_id

Line 7209: INSERT INTO xla_ae_lines_gt

7205: -- Need to create reversal in Draft mode also (so can be viewed).
7206: ---------------------------------------------------------------------------------------------------------
7207: --
7208: FORALL i IN 1..l_array_event_id.count
7209: INSERT INTO xla_ae_lines_gt
7210: (ae_header_id
7211: ,temp_line_num
7212: ,event_id
7213: ,ref_ae_header_id

Line 7543: FROM xla_ae_lines_gt

7539: AND application_id = xdl.application_id
7540: )
7541: AND NOT EXISTS (
7542: SELECT /*+ no_unnest */ 1
7543: FROM xla_ae_lines_gt
7544: WHERE ref_ae_header_id = xdl.ae_header_id
7545: AND temp_line_num = xdl.temp_line_num * -1
7546: AND ledger_id = l_array_ledger_id(i)
7547: )

Line 7673: -- 8919497 : update DUMMY value into anc_id_1 column in xla_ae_lines_gt to avoid merging of lines which has supporting reference details.

7669: ,p_level => C_LEVEL_STATEMENT
7670: ,p_module => l_log_module);
7671: END IF;
7672:
7673: -- 8919497 : update DUMMY value into anc_id_1 column in xla_ae_lines_gt to avoid merging of lines which has supporting reference details.
7674: update xla_ae_lines_gt gt
7675: set anc_id_1 = (select 'DUMMY_ANC_'||xac.ae_header_id||xac.ae_line_num
7676: from xla_ae_line_acs xac
7677: where gt.ref_ae_header_id= xac.ae_header_id

Line 7674: update xla_ae_lines_gt gt

7670: ,p_module => l_log_module);
7671: END IF;
7672:
7673: -- 8919497 : update DUMMY value into anc_id_1 column in xla_ae_lines_gt to avoid merging of lines which has supporting reference details.
7674: update xla_ae_lines_gt gt
7675: set anc_id_1 = (select 'DUMMY_ANC_'||xac.ae_header_id||xac.ae_line_num
7676: from xla_ae_line_acs xac
7677: where gt.ref_ae_header_id= xac.ae_header_id
7678: and gt.ref_ae_line_num=xac.ae_line_num

Line 7688: (p_msg => 'Supporting Reference - Lines updated in xla_ae_lines_gt = '||SQL%ROWCOUNT

7684: and anc_id_1 is null; --bug 9668528
7685:
7686: IF (C_LEVEL_STATEMENT >= g_log_level) THEN
7687: trace
7688: (p_msg => 'Supporting Reference - Lines updated in xla_ae_lines_gt = '||SQL%ROWCOUNT
7689: ,p_level => C_LEVEL_STATEMENT
7690: ,p_module => l_log_module);
7691: END IF;
7692:

Line 7699: FROM xla_ae_lines_gt gt1, xla_ae_headers

7695: IF l_upgrade_check = 1 THEN
7696:
7697: SELECT min(xla_ae_headers.accounting_date)
7698: INTO l_min_ref_event_date
7699: FROM xla_ae_lines_gt gt1, xla_ae_headers
7700: WHERE gt1.reversal_code = 'REVERSAL'
7701: AND gt1.ref_event_id = xla_ae_headers.event_id;
7702:
7703: l_error_count := 0;

Line 7716: FROM xla_ae_lines_gt gt1, gl_ledgers gll

7712:
7713:
7714: FOR c_not_reversed_entries IN
7715: (SELECT DISTINCT gt1.event_id, gt1.ledger_id
7716: FROM xla_ae_lines_gt gt1, gl_ledgers gll
7717: WHERE gt1.reversal_code = 'DUMMY_TR'
7718: AND gll.ledger_id = gt1.ledger_id
7719: AND gll.ledger_category_code <> 'PRIMARY'
7720: AND NOT EXISTS (SELECT 1

Line 7721: FROM xla_ae_lines_gt gt2

7717: WHERE gt1.reversal_code = 'DUMMY_TR'
7718: AND gll.ledger_id = gt1.ledger_id
7719: AND gll.ledger_category_code <> 'PRIMARY'
7720: AND NOT EXISTS (SELECT 1
7721: FROM xla_ae_lines_gt gt2
7722: WHERE gt2.reversal_code = 'REVERSAL'
7723: AND gt1.event_id = gt2.event_id
7724: AND gt1.ledger_id = gt2.ledger_id)
7725: AND EXISTS (SELECT 1

Line 7726: FROM xla_ae_lines_gt gt3

7722: WHERE gt2.reversal_code = 'REVERSAL'
7723: AND gt1.event_id = gt2.event_id
7724: AND gt1.ledger_id = gt2.ledger_id)
7725: AND EXISTS (SELECT 1
7726: FROM xla_ae_lines_gt gt3
7727: WHERE gt3.reversal_code = 'REVERSAL'
7728: AND gt1.event_id = gt3.event_id))
7729:
7730: LOOP

Line 7773: FROM xla_ae_lines_gt lgt

7769: ,l_array_balance_type_code
7770: ,l_array_entry_status_code
7771: ,l_array_header_num -- 4262811c missing mpa reversal lines
7772: ,l_array_accounting_date -- added for bug8505463
7773: FROM xla_ae_lines_gt lgt
7774: WHERE reversal_code = 'REVERSAL'
7775: AND NOT EXISTS
7776: (SELECT 1
7777: FROM xla_ae_headers_gt

Line 7893: FROM xla_ae_lines_gt gt1

7889:
7890:
7891: FOR c_not_reversed_entries IN
7892: (SELECT DISTINCT gt1.event_id, gt1.ledger_id
7893: FROM xla_ae_lines_gt gt1
7894: WHERE gt1.reversal_code IN ('DUMMY_LR', 'DUMMY_TR')
7895: AND NOT EXISTS (SELECT 1
7896: FROM xla_ae_lines_gt gt2
7897: WHERE gt2.reversal_code = 'REVERSAL'

Line 7896: FROM xla_ae_lines_gt gt2

7892: (SELECT DISTINCT gt1.event_id, gt1.ledger_id
7893: FROM xla_ae_lines_gt gt1
7894: WHERE gt1.reversal_code IN ('DUMMY_LR', 'DUMMY_TR')
7895: AND NOT EXISTS (SELECT 1
7896: FROM xla_ae_lines_gt gt2
7897: WHERE gt2.reversal_code = 'REVERSAL'
7898: AND gt1.event_id = gt2.event_id
7899: AND gt1.ledger_id = gt2.ledger_id))
7900:

Line 10101: FROM xla_ae_lines_gt xal

10097: trunc(fc1.derive_effective)), -1, 'OTHER', 'EMU'), 'OTHER' ) to_type
10098: ,decode( fc2.derive_type, 'EURO', 'EURO', 'EMU',
10099: decode( sign( trunc(nvl(xal.currency_conversion_date, xeg.transaction_date)) -
10100: trunc(fc2.derive_effective)), -1, 'OTHER', 'EMU'), 'OTHER' ) primary_type
10101: FROM xla_ae_lines_gt xal
10102: ,gl_ledgers gl
10103: ,fnd_currencies fc
10104: ,fnd_currencies fc1
10105: ,fnd_currencies fc2

Line 10448: UPDATE xla_ae_lines_gt xal

10444: */
10445:
10446: END IF;
10447: FORALL i in 1..l_array_conversion_type.COUNT
10448: UPDATE xla_ae_lines_gt xal
10449: SET currency_conversion_rate = l_array_new_rate(i)
10450: ,currency_conversion_type = l_array_new_type(i)
10451: ,currency_conversion_date = DECODE(xal.currency_code , 'STAT',xal.accounting_date,l_array_conversion_date(i)) -- added for bug13018249
10452: ,unrounded_accounted_cr = unrounded_entered_cr * l_array_new_rate(i)

Line 10499: UPDATE xla_ae_lines_gt xal

10495: END IF;
10496:
10497: /*
10498: FORALL i in 1..l_max_ledger_index
10499: UPDATE xla_ae_lines_gt xal
10500: SET (xal.unrounded_accounted_dr
10501: ,xal.unrounded_accounted_cr
10502: ,xal.currency_conversion_rate
10503: )

Line 11023: UPDATE xla_ae_lines_gt xal

11019: */
11020: /*
11021:
11022: FORALL i in 1..l_max_ledger_index
11023: UPDATE xla_ae_lines_gt xal
11024: SET (xal.unrounded_accounted_dr
11025: ,xal.unrounded_accounted_cr
11026: ,xal.currency_conversion_rate
11027: )

Line 11215: FROM xla_ae_lines_gt xal ,

11211: (SELECT
11212: /*+ NO_MERGE LEADING(gl) USE_HASH(xal) */
11213: xal.ae_header_id ,
11214: xal.ledger_id
11215: FROM xla_ae_lines_gt xal ,
11216: gl_ledgers gl
11217: WHERE xal.reversal_code IS NULL
11218: AND xal.balance_type_code <> 'X'
11219: AND xal.ledger_id = gl.ledger_id

Line 11237: XLA_AE_LINES_GT xal2

11233: THEN 1
11234: ELSE 0
11235: END) > 0 )
11236: ) iv,
11237: XLA_AE_LINES_GT xal2
11238: WHERE NVL(xal2.gain_or_loss_flag, 'N') = 'N'
11239: AND xal2.balance_type_code <> 'X'
11240: AND (xal2.reversal_code IS NULL
11241: OR xal2.reversal_code =C_DUMMY_SAME )

Line 11297: UPDATE /*+ index(xal XLA_AE_LINES_GT_N4)*/ xla_ae_lines_gt xal --9483834 incorrect alias in the hint.

11293: EXIT;
11294: END IF;
11295:
11296: FORALL Idx IN 1 .. l_array_ae_header_id.COUNT
11297: UPDATE /*+ index(xal XLA_AE_LINES_GT_N4)*/ xla_ae_lines_gt xal --9483834 incorrect alias in the hint.
11298: SET xal.unrounded_accounted_cr =
11299: CASE sign(l_res_array_accounted_amount(Idx))
11300: WHEN -1 THEN NULL
11301: ELSE l_res_array_accounted_amount(Idx)

Line 11345: UPDATE /*+ index(xal XLA_AE_LINES_GT_N3)*/ xla_ae_lines_gt xal --9483834 incorrect alias in the hint.

11341: END LOOP;
11342: CLOSE csr_gain_loss_amts;
11343:
11344: IF (g_num_bflow_prior_entries > 0) THEN
11345: UPDATE /*+ index(xal XLA_AE_LINES_GT_N3)*/ xla_ae_lines_gt xal --9483834 incorrect alias in the hint.
11346: SET xal.currency_code =
11347: (SELECT /*+ index(xal2 XLA_AE_LINES_GT_N4)*/ max(currency_code)
11348: FROM xla_ae_lines_gt xal2
11349: WHERE xal2.ae_header_id = xal.ae_header_id

Line 11347: (SELECT /*+ index(xal2 XLA_AE_LINES_GT_N4)*/ max(currency_code)

11343:
11344: IF (g_num_bflow_prior_entries > 0) THEN
11345: UPDATE /*+ index(xal XLA_AE_LINES_GT_N3)*/ xla_ae_lines_gt xal --9483834 incorrect alias in the hint.
11346: SET xal.currency_code =
11347: (SELECT /*+ index(xal2 XLA_AE_LINES_GT_N4)*/ max(currency_code)
11348: FROM xla_ae_lines_gt xal2
11349: WHERE xal2.ae_header_id = xal.ae_header_id
11350: AND xal2.balance_type_code <> 'X'
11351: AND xal2.currency_code <> 'STAT' -- added for 13018249

Line 11348: FROM xla_ae_lines_gt xal2

11344: IF (g_num_bflow_prior_entries > 0) THEN
11345: UPDATE /*+ index(xal XLA_AE_LINES_GT_N3)*/ xla_ae_lines_gt xal --9483834 incorrect alias in the hint.
11346: SET xal.currency_code =
11347: (SELECT /*+ index(xal2 XLA_AE_LINES_GT_N4)*/ max(currency_code)
11348: FROM xla_ae_lines_gt xal2
11349: WHERE xal2.ae_header_id = xal.ae_header_id
11350: AND xal2.balance_type_code <> 'X'
11351: AND xal2.currency_code <> 'STAT' -- added for 13018249
11352: AND xal2.gain_or_loss_ref = xal.gain_or_loss_ref

Line 11364: (select /*+ index(xal3 XLA_AE_LINES_GT_N4)*/ ae_header_id, balance_type_code, gain_or_loss_ref, ledger_id, event_id

11360: AND xal.currency_code <> 'STAT' -- added for 13018249
11361: AND xal.reversal_code is NULL
11362: and (xal.ae_header_id, balance_type_code, gain_or_loss_ref, ledger_id, event_id)
11363: in
11364: (select /*+ index(xal3 XLA_AE_LINES_GT_N4)*/ ae_header_id, balance_type_code, gain_or_loss_ref, ledger_id, event_id
11365: --9483834 incorrect alias in the hint.
11366: from xla_ae_lines_gt xal3
11367: where xal3.ae_header_id = xal.ae_header_id
11368: AND xal3.balance_type_code <> 'X'

Line 11366: from xla_ae_lines_gt xal3

11362: and (xal.ae_header_id, balance_type_code, gain_or_loss_ref, ledger_id, event_id)
11363: in
11364: (select /*+ index(xal3 XLA_AE_LINES_GT_N4)*/ ae_header_id, balance_type_code, gain_or_loss_ref, ledger_id, event_id
11365: --9483834 incorrect alias in the hint.
11366: from xla_ae_lines_gt xal3
11367: where xal3.ae_header_id = xal.ae_header_id
11368: AND xal3.balance_type_code <> 'X'
11369: AND xal3.currency_code <> 'STAT' -- added for 13018249
11370: AND xal3.gain_or_loss_ref = xal.gain_or_loss_ref

Line 11620: FROM xla_ae_lines_gt xalg

11616: ELSE xal.currency_conversion_rate END
11617: )
11618: )
11619: ) DERIVED_EXCH_RATE
11620: FROM xla_ae_lines_gt xalg
11621: ,xla_transaction_entities xte
11622: ,xla_ae_headers xah
11623: ,xla_distribution_links xdl
11624: ,xla_ae_lines xal

Line 11716: FROM xla_ae_lines_gt

11712: event_id,
11713: ledger_id,
11714: balance_type_code,
11715: temp_line_num
11716: FROM xla_ae_lines_gt
11717: WHERE reversal_code = C_DUMMY_PRIOR
11718: AND bflow_prior_entry_status_code IS NOT NULL AND bflow_prior_entry_status_code <> 'X'; -- 5132302 if applied to amt is null
11719: --AND (bflow_prior_entry_status_code IN ('F', DECODE(p_accounting_mode, 'D', 'D', 'F')));
11720:

Line 11739: FROM xla_ae_lines_gt xal

11735: ,gl.ledger_category_code
11736: ,glp.start_date
11737: ,xte.entity_id xte_entity_id
11738: ,xte.entity_code
11739: FROM xla_ae_lines_gt xal
11740: ,fnd_application_vl fav
11741: ,gl_ledgers gl
11742: ,gl_period_statuses glp
11743: ,xla_transaction_entities_upg xte

Line 11889: FOR l IN (SELECT * FROM xla_ae_lines_gt WHERE reversal_code = C_DUMMY_PRIOR) LOOP

11885: ,p_level => C_LEVEL_EVENT
11886: ,p_module => l_log_module);
11887: END LOOP;
11888:
11889: FOR l IN (SELECT * FROM xla_ae_lines_gt WHERE reversal_code = C_DUMMY_PRIOR) LOOP
11890: trace(p_msg => 'event_id='||l.event_id||
11891: ' ae_header_id='||l.ae_header_id
11892: ,p_level => C_LEVEL_STATEMENT
11893: ,p_module => l_log_module);

Line 11974: UPDATE xla_ae_lines_gt

11970: EXIT;
11971: END IF;
11972:
11973: FORALL i IN 1..l_array_row_id.LAST
11974: UPDATE xla_ae_lines_gt
11975: SET code_combination_id = l_array_ccid (i)
11976: ,description = l_array_description (i)
11977: ,temp_currency_code = l_array_currency_code (i) -- upstream currency code
11978: ,currency_conversion_rate = l_array_curr_conversion_rate (i)

Line 12003: UPDATE xla_ae_lines_gt xalg

11999: ----------------------------------------------------------------
12000:
12001: ----------------------------------------------------------------
12002: /* performance bug 5357406
12003: UPDATE xla_ae_lines_gt xalg
12004: SET (code_combination_id
12005: ,description
12006: ,temp_currency_code -- upstream currency code
12007: ,currency_conversion_rate

Line 12213: UPDATE /*+ index(xalg xla_ae_lines_gt_n2) */ xla_ae_lines_gt xalg -- 6990256

12209: END IF;
12210:
12211: IF (l_array_balance_type_code.COUNT > 0) THEN
12212: FORALL i IN 1..l_array_balance_type_code.COUNT
12213: UPDATE /*+ index(xalg xla_ae_lines_gt_n2) */ xla_ae_lines_gt xalg -- 6990256
12214: SET ref_ae_header_id = temp_ref_ae_header_id,
12215: currency_code = temp_currency_code,
12216: reversal_code = null, -- 5499367
12217: (unrounded_entered_cr -- 5132302

Line 12401: SELECT /*+ Leading (xal1,xah1,xal2) index(xah1 XLA_AE_HEADERS_GT_U1) index(xal2 XLA_AE_LINES_GT_N2) no_expand */ -- 5666366

12397: -------------------------------------------------------------------------------------------------------------------------
12398: -- 4655713b Update MPA and Accrual Reversal lines with Prior Entry
12399: -------------------------------------------------------------------------------------------------------------------------
12400: IF xla_accounting_pkg.g_mpa_accrual_exists = 'Y' THEN -- 5666366
12401: SELECT /*+ Leading (xal1,xah1,xal2) index(xah1 XLA_AE_HEADERS_GT_U1) index(xal2 XLA_AE_LINES_GT_N2) no_expand */ -- 5666366
12402: xal2.segment1, xal2.segment2, xal2.segment3, xal2.segment4, xal2.segment5
12403: ,xal2.segment6, xal2.segment7, xal2.segment8, xal2.segment9, xal2.segment10
12404: ,xal2.segment11, xal2.segment12, xal2.segment13, xal2.segment14, xal2.segment15
12405: ,xal2.segment16, xal2.segment17, xal2.segment18, xal2.segment19, xal2.segment20

Line 12472: FROM xla_ae_lines_gt xal2 -- original downstream line

12468: ,l_array_mpa_temp_line_num
12469: ,l_array_mpa_ae_header_id
12470: ,l_array_mpa_header_num
12471: ,l_array_acc_rev_flag
12472: FROM xla_ae_lines_gt xal2 -- original downstream line
12473: ,xla_ae_headers_gt xah1 -- original downstream header
12474: ,xla_ae_lines_gt xal1 -- recognition lines
12475: ,xla_ae_lines xal3 -- upstream line
12476: WHERE xal2.source_distribution_type = xal1.source_distribution_type

Line 12474: ,xla_ae_lines_gt xal1 -- recognition lines

12470: ,l_array_mpa_header_num
12471: ,l_array_acc_rev_flag
12472: FROM xla_ae_lines_gt xal2 -- original downstream line
12473: ,xla_ae_headers_gt xah1 -- original downstream header
12474: ,xla_ae_lines_gt xal1 -- recognition lines
12475: ,xla_ae_lines xal3 -- upstream line
12476: WHERE xal2.source_distribution_type = xal1.source_distribution_type
12477: AND NVL(xal2.source_distribution_id_num_1,C_NUM) = NVL(xal1.source_distribution_id_num_1,C_NUM)
12478: AND NVL(xal2.source_distribution_id_num_2,C_NUM) = NVL(xal1.source_distribution_id_num_2,C_NUM)

Line 12534: FOR i IN (select * from xla_ae_Lines_gt where reversal_code=C_MPA_PRIOR_ENTRY) LOOP

12530: ,p_level => C_LEVEL_STATEMENT
12531: ,p_module => l_log_module);
12532: END LOOP;
12533:
12534: FOR i IN (select * from xla_ae_Lines_gt where reversal_code=C_MPA_PRIOR_ENTRY) LOOP
12535: trace
12536: (p_msg => 'ae_lines_gt PE dist ledger='||i.ledger_id||' ref_ae_header='||i.ref_ae_header_id||
12537: ' temp_line='||i.temp_line_num||' ae_header='||i.ae_header_id||' header_num='||i.header_num||
12538: ' bflow='||i.business_method_code||

Line 12554: FOR i IN (select * from xla_ae_Lines_gt where reversal_code=C_MPA_PRIOR_ENTRY) LOOP

12550: ,p_level => C_LEVEL_STATEMENT
12551: ,p_module => l_log_module);
12552: END LOOP;
12553:
12554: FOR i IN (select * from xla_ae_Lines_gt where reversal_code=C_MPA_PRIOR_ENTRY) LOOP
12555: trace
12556: (p_msg => ' seg s1='||i.segment1||' s2='||i.segment2|| ' s3='||i.segment3||' s4='||i.segment4||
12557: ' s5='||i.segment5||' s6='||i.segment6|| ' s7='||i.segment7||' s8='||i.segment8||
12558: ' s9='||i.segment9||' s10='||i.segment10|| ' s11='||i.segment11||' s12='||i.segment12||

Line 12576: UPDATE /*+ INDEX(xal, XLA_AE_LINES_GT_U1)*/ xla_ae_lines_gt xal

12572: -- NOTE: for Accrual-Reversal, one line may be Prior Entry and the rest may not, so update only Prior Entry line.
12573: ---------------------------------------------------------------------------------------------------------------
12574: FORALL i in 1..l_array_mpa_ledger_id.COUNT
12575: -- added hint for 8920369
12576: UPDATE /*+ INDEX(xal, XLA_AE_LINES_GT_U1)*/ xla_ae_lines_gt xal
12577: SET segment1 = l_array_mpa_segment1(i)
12578: , segment2 = l_array_mpa_segment2(i)
12579: , segment3 = l_array_mpa_segment3(i)
12580: , segment4 = l_array_mpa_segment4(i)

Line 12651: UPDATE xla_ae_lines_gt xal

12647: --
12648: -- NOTE: some columns are set to NULL during Business_Flow_Validation
12649: ---------------------------------------------------------------------------------------------------------------
12650: FORALL i in 1..l_array_mpa_ledger_id.COUNT
12651: UPDATE xla_ae_lines_gt xal
12652: SET currency_code = DECODE(l_array_acc_rev_flag(i),'N',l_array_mpa_currency_code(i)
12653: ,currency_code)
12654: , currency_conversion_rate = DECODE(l_array_acc_rev_flag(i),'N',l_array_mpa_curr_conv_rate(i)
12655: ,currency_conversion_rate)

Line 12878: -- Bug 5339999 Delete the problematic lines from xla_ae_lines_gt.

12874:
12875:
12876:
12877: --
12878: -- Bug 5339999 Delete the problematic lines from xla_ae_lines_gt.
12879: --
12880: FORALL i IN 1..l_array_balance_type_code.COUNT
12881: DELETE FROM XLA_AE_LINES_GT
12882: WHERE ae_header_id = l_array_ae_header_id(i)

Line 12881: DELETE FROM XLA_AE_LINES_GT

12877: --
12878: -- Bug 5339999 Delete the problematic lines from xla_ae_lines_gt.
12879: --
12880: FORALL i IN 1..l_array_balance_type_code.COUNT
12881: DELETE FROM XLA_AE_LINES_GT
12882: WHERE ae_header_id = l_array_ae_header_id(i)
12883: AND event_id = l_array_event_id(i)
12884: AND ledger_id = l_array_ledger_id(i)
12885: AND 'Y' = l_array_bflow_historic (i);

Line 12922: UPDATE /*+ index(xalg xla_ae_lines_gt_n2) */ xla_ae_lines_gt xalg

12918: -- Update JE line for invalid entries
12919: -------------------------------------------------------------------------
12920:
12921: FORALL i IN 1..l_array_balance_type_code.COUNT
12922: UPDATE /*+ index(xalg xla_ae_lines_gt_n2) */ xla_ae_lines_gt xalg
12923: SET xalg.code_combination_status_code = C_INVALID
12924: , xalg.code_combination_id = -1
12925: WHERE xalg.balance_type_code = l_array_balance_type_code(i)
12926: AND xalg.ae_header_id = l_array_ae_header_id(i)

Line 12996: FROM xla_ae_lines_gt l

12992: ,'N')
12993: ,'N')
12994: ,'N')
12995: ,'N') -- 5443083
12996: FROM xla_ae_lines_gt l
12997: ,xla_ae_headers_gt h
12998: ,xla_gl_ledgers_v xlr
12999: WHERE (reversal_code = C_DUMMY_SAME
13000: OR reversal_code = C_MPA_SAME_ENTRY) -- 4655713b

Line 13015: FROM xla_ae_lines_gt l

13011: , l.event_id
13012: , l.ledger_id
13013: , l.balance_type_code
13014: , l.header_num
13015: FROM xla_ae_lines_gt l
13016: WHERE (reversal_code = C_DUMMY_SAME
13017: OR reversal_code = C_MPA_SAME_ENTRY)
13018: ORDER BY l.ae_header_id;
13019:

Line 13282: FROM xla_ae_lines_gt xal2

13278: , l_array_join_ref_ae_header_id
13279: , l_array_join_temp_line_num
13280: , l_array_join_ae_header_id
13281: , l_array_join_header_num
13282: FROM xla_ae_lines_gt xal2
13283: , xla_ae_lines_gt xal
13284: , gl_code_combinations gcc
13285: WHERE xal2.source_distribution_type = xal.source_distribution_type
13286: AND NVL(xal2.source_distribution_id_num_1,C_NUM) = NVL(xal.source_distribution_id_num_1,C_NUM)

Line 13283: , xla_ae_lines_gt xal

13279: , l_array_join_temp_line_num
13280: , l_array_join_ae_header_id
13281: , l_array_join_header_num
13282: FROM xla_ae_lines_gt xal2
13283: , xla_ae_lines_gt xal
13284: , gl_code_combinations gcc
13285: WHERE xal2.source_distribution_type = xal.source_distribution_type
13286: AND NVL(xal2.source_distribution_id_num_1,C_NUM) = NVL(xal.source_distribution_id_num_1,C_NUM)
13287: AND NVL(xal2.source_distribution_id_num_2,C_NUM) = NVL(xal.source_distribution_id_num_2,C_NUM)

Line 13345: FOR i IN (select * from xla_ae_Lines_gt where reversal_code=C_DUMMY_SAME) LOOP

13341: ,p_level => C_LEVEL_STATEMENT
13342: ,p_module => l_log_module);
13343: END LOOP;
13344:
13345: FOR i IN (select * from xla_ae_Lines_gt where reversal_code=C_DUMMY_SAME) LOOP
13346: trace
13347: (p_msg => 'ae_lines_gt SE dist ledger='||i.ledger_id||' ref_ae_header='||i.ref_ae_header_id||
13348: ' temp_line='||i.temp_line_num||' ae_header='||i.ae_header_id||' header_num='||i.header_num||
13349: ' bflow='||i.business_method_code||

Line 13362: FOR i IN (select * from xla_ae_Lines_gt where reversal_code=C_DUMMY_SAME) LOOP

13358: ,p_level => C_LEVEL_STATEMENT
13359: ,p_module => l_log_module);
13360: END LOOP;
13361:
13362: FOR i IN (select * from xla_ae_Lines_gt where reversal_code=C_DUMMY_SAME) LOOP
13363: trace
13364: (p_msg => ' seg s1='||i.segment1||' s2='||i.segment2|| ' s3='||i.segment3||' s4='||i.segment4||
13365: ' s5='||i.segment5||' s6='||i.segment6|| ' s7='||i.segment7||' s8='||i.segment8||
13366: ' s9='||i.segment9||' s10='||i.segment10|| ' s11='||i.segment11||' s12='||i.segment12||

Line 13379: UPDATE /*+ INDEX(xal, XLA_AE_LINES_GT_U1)*/ xla_ae_lines_gt xal

13375:
13376: END IF;
13377:
13378: FORALL i IN 1..l_array_join_ledger_id.COUNT
13379: UPDATE /*+ INDEX(xal, XLA_AE_LINES_GT_U1)*/ xla_ae_lines_gt xal
13380: -- added hint for 8920369
13381: SET segment1 = l_array_same_segment1(i)
13382: , segment2 = l_array_same_segment2(i)
13383: , segment3 = l_array_same_segment3(i)

Line 13433: SELECT /*+ Leading (xal1,xah1,xal2) index(xah1 XLA_AE_HEADERS_GT_U1) index(xal2 XLA_AE_LINES_GT_N2) no_expand */ -- 7128871

13429: -------------------------------------------------------------------------------------------------------------------------
13430: -- 4655713b Updates MPA-Accrual (not MPA-Recognition) and Accrual Reversal lines with Same Entry
13431: -------------------------------------------------------------------------------------------------------------------------
13432: IF xla_accounting_pkg.g_mpa_accrual_exists = 'Y' THEN -- 7128871
13433: SELECT /*+ Leading (xal1,xah1,xal2) index(xah1 XLA_AE_HEADERS_GT_U1) index(xal2 XLA_AE_LINES_GT_N2) no_expand */ -- 7128871
13434: xal2.segment1, xal2.segment2, xal2.segment3, xal2.segment4, xal2.segment5
13435: ,xal2.segment6, xal2.segment7, xal2.segment8, xal2.segment9, xal2.segment10
13436: ,xal2.segment11, xal2.segment12, xal2.segment13, xal2.segment14, xal2.segment15
13437: ,xal2.segment16, xal2.segment17, xal2.segment18, xal2.segment19, xal2.segment20

Line 13465: FROM xla_ae_lines_gt xal2 -- Original line

13461: ,l_array_mpa_ref_ae_header_id
13462: ,l_array_mpa_temp_line_num
13463: ,l_array_mpa_ae_header_id
13464: ,l_array_mpa_header_num
13465: FROM xla_ae_lines_gt xal2 -- Original line
13466: ,xla_ae_headers_gt xah1
13467: ,xla_ae_lines_gt xal1 -- MPA line
13468: WHERE xal2.source_distribution_type = xal1.source_distribution_type
13469: AND NVL(xal2.source_distribution_id_num_1,C_NUM) = NVL(xal1.source_distribution_id_num_1,C_NUM)

Line 13467: ,xla_ae_lines_gt xal1 -- MPA line

13463: ,l_array_mpa_ae_header_id
13464: ,l_array_mpa_header_num
13465: FROM xla_ae_lines_gt xal2 -- Original line
13466: ,xla_ae_headers_gt xah1
13467: ,xla_ae_lines_gt xal1 -- MPA line
13468: WHERE xal2.source_distribution_type = xal1.source_distribution_type
13469: AND NVL(xal2.source_distribution_id_num_1,C_NUM) = NVL(xal1.source_distribution_id_num_1,C_NUM)
13470: AND NVL(xal2.source_distribution_id_num_2,C_NUM) = NVL(xal1.source_distribution_id_num_2,C_NUM)
13471: AND NVL(xal2.source_distribution_id_num_3,C_NUM) = NVL(xal1.source_distribution_id_num_3,C_NUM)

Line 13521: UPDATE /*+ INDEX(xal, XLA_AE_LINES_GT_U1)*/ xla_ae_lines_gt xal

13517: END IF;
13518:
13519: FORALL i in 1..l_array_mpa_ledger_id.COUNT
13520: -- added hint for 8920369
13521: UPDATE /*+ INDEX(xal, XLA_AE_LINES_GT_U1)*/ xla_ae_lines_gt xal
13522: SET segment1 = l_array_mpa_segment1(i)
13523: , segment2 = l_array_mpa_segment2(i)
13524: , segment3 = l_array_mpa_segment3(i)
13525: , segment4 = l_array_mpa_segment4(i)

Line 13568: UPDATE xla_ae_lines_gt xal

13564:
13565: /*-------------------------------------------------------------------------------------------------------------------
13566: -- Replaced for performance fix above
13567: ---------------------------------------------------------------------------------------------------------------------
13568: UPDATE xla_ae_lines_gt xal
13569: SET (segment1, segment2, segment3, segment4, segment5, segment6, segment7, segment8, segment9, segment10
13570: ,segment11, segment12, segment13, segment14, segment15, segment16, segment17, segment18, segment19, segment20
13571: ,segment21, segment22, segment23, segment24, segment25, segment26, segment27, segment28, segment29, segment30
13572: ,code_combination_id

Line 13672: FROM xla_ae_lines_gt xal2

13668: , CASE WHEN count(*) = 1
13669: THEN MIN(DECODE(xal.inherit_desc_flag, 'Y', xal2.description, xal.description)) ELSE NULL END
13670: , CASE WHEN count(*) = 1
13671: THEN NULL ELSE xal.reversal_code END
13672: FROM xla_ae_lines_gt xal2
13673: , gl_code_combinations gcc -- bug4384869
13674: WHERE xal2.source_distribution_type = xal.source_distribution_type
13675: AND NVL(xal2.source_distribution_id_num_1,C_NUM) = NVL(xal.source_distribution_id_num_1,C_NUM)
13676: AND NVL(xal2.source_distribution_id_num_2,C_NUM) = NVL(xal.source_distribution_id_num_2,C_NUM)

Line 13761: DELETE xla_ae_lines_gt

13757: ,p_level => C_LEVEL_STATEMENT
13758: );
13759: END IF;
13760:
13761: DELETE xla_ae_lines_gt
13762: WHERE ledger_id = l_array_ledger_id(i)
13763: AND ref_ae_header_id = l_array_ref_ae_header_id(i)
13764: AND temp_line_num = l_array_temp_line_num(i)
13765: AND ae_header_id = l_array_ae_header_id(i)

Line 13781: AND NOT EXISTS (SELECT /*+ index(lgt XLA_AE_LINES_GT_N2) */ 1

13777: WHERE ledger_id = l_array_ledger_id(i)
13778: AND ae_header_id = l_array_ae_header_id(i)
13779: AND balance_type_code = l_array_balance_type_code(i)
13780: AND header_num = l_array_header_num(i)
13781: AND NOT EXISTS (SELECT /*+ index(lgt XLA_AE_LINES_GT_N2) */ 1
13782: FROM xla_ae_lines_gt lgt
13783: WHERE lgt.ledger_id = hgt.ledger_id
13784: AND lgt.ae_header_id = hgt.ae_header_id
13785: AND lgt.header_num = hgt.header_num

Line 13782: FROM xla_ae_lines_gt lgt

13778: AND ae_header_id = l_array_ae_header_id(i)
13779: AND balance_type_code = l_array_balance_type_code(i)
13780: AND header_num = l_array_header_num(i)
13781: AND NOT EXISTS (SELECT /*+ index(lgt XLA_AE_LINES_GT_N2) */ 1
13782: FROM xla_ae_lines_gt lgt
13783: WHERE lgt.ledger_id = hgt.ledger_id
13784: AND lgt.ae_header_id = hgt.ae_header_id
13785: AND lgt.header_num = hgt.header_num
13786: AND lgt.balance_type_code = hgt.balance_type_code);

Line 13811: UPDATE /*+ INDEX(xla_ae_lines_gt, XLA_AE_LINES_GT_U1)*/ xla_ae_lines_gt

13807: --
13808: -- Update JE lines for those that encountered error
13809: --
13810: FORALL i IN 1..l_array_balance_type_code.COUNT
13811: UPDATE /*+ INDEX(xla_ae_lines_gt, XLA_AE_LINES_GT_U1)*/ xla_ae_lines_gt
13812: SET description = DECODE(description, C_CHAR, NULL, description)
13813: , code_combination_id = DECODE(code_combination_id, C_NUM, -1, code_combination_id)
13814: , code_combination_status_code = C_INVALID -- 4655713
13815: , segment1 = DECODE(segment1, C_CHAR, NULL, segment1)

Line 13889: AND EXISTS (SELECT /*+ index(lgt XLA_AE_LINES_GT_N2) */ 1 - 5443083

13885: AND event_id = l_array_event_id(i)
13886: AND ledger_id = l_array_ledger_id(i)
13887: AND header_num = l_array_header_num(i) -- 5443083
13888: AND balance_type_code = l_array_balance_type_code(i)
13889: AND EXISTS (SELECT /*+ index(lgt XLA_AE_LINES_GT_N2) */ 1 - 5443083
13890: FROM xla_ae_lines_gt lgt
13891: WHERE lgt.ledger_id = hgt.ledger_id
13892: AND lgt.ae_header_id = hgt.ae_header_id
13893: AND lgt.header_num = hgt.header_num

Line 13890: FROM xla_ae_lines_gt lgt

13886: AND ledger_id = l_array_ledger_id(i)
13887: AND header_num = l_array_header_num(i) -- 5443083
13888: AND balance_type_code = l_array_balance_type_code(i)
13889: AND EXISTS (SELECT /*+ index(lgt XLA_AE_LINES_GT_N2) */ 1 - 5443083
13890: FROM xla_ae_lines_gt lgt
13891: WHERE lgt.ledger_id = hgt.ledger_id
13892: AND lgt.ae_header_id = hgt.ae_header_id
13893: AND lgt.header_num = hgt.header_num
13894: AND lgt.balance_type_code = hgt.balance_type_code