DBA Data[Home] [Help]

APPS.XLA_THIRD_PARTY_MERGE dependencies on XLA_AE_LINES

Line 27: | 03-Mar-05 V. Kumar Bug 5041325 Populating GL_SL_LINK_ID in xla_ae_lines|

23: | - these APIs are not supposed to raise any exception |
24: | |
25: | HISTORY |
26: | 08-Sep-05 L. Poon Created |
27: | 03-Mar-05 V. Kumar Bug 5041325 Populating GL_SL_LINK_ID in xla_ae_lines|
28: | 21-Jun-2006 A.Wan 5100860 Performance fix, see bug for detail |
29: +===========================================================================*/
30:
31: -------------------------------------------------------------------------------

Line 1100: from xla_ae_lines_gt;

1096:
1097: CURSOR csr_set_linenum is
1098: select rowid, dense_rank() over (partition by ae_header_id
1099: order by line_hash_num, merge_index) ae_line_num
1100: from xla_ae_lines_gt;
1101:
1102: CURSOR csr_rounding_lines is
1103: SELECT max(xalg.rowid)
1104: ,rounding_class_code

Line 1113: FROM xla_ae_lines_gt xalg

1109: ,ae_header_id
1110: ,NVL(SUM(unrounded_entered_cr), 0)
1111: - NVL(SUM(unrounded_entered_dr), 0) unrounded_entered_amount
1112: ,entered_currency_mau
1113: FROM xla_ae_lines_gt xalg
1114: WHERE temp_line_num <> 0
1115: GROUP BY ledger_id, event_id, ae_header_id,
1116: rounding_class_code, document_rounding_level, ae_line_num
1117: ,entered_currency_mau

Line 1143: UPDATE xla_ae_lines_gt ael

1139: END LOOP;
1140:
1141: BEGIN
1142:
1143: UPDATE xla_ae_lines_gt ael
1144: set line_hash_num =
1145: DBMS_UTILITY.GET_HASH_VALUE
1146: (ae_header_id
1147: ||accounting_class_code

Line 1194: UPDATE xla_ae_lines_gt

1190: EXIT;
1191: END IF;
1192:
1193: FORALL i IN 1..l_array_rowid.count
1194: UPDATE xla_ae_lines_gt
1195: SET ae_line_num = l_array_ae_line_num(i)
1196: WHERE rowid = l_array_rowid(i);
1197: END LOOP;
1198: Close csr_set_linenum;

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

1199:
1200: IF (C_LEVEL_STATEMENT >= g_log_level) THEN
1201:
1202: trace
1203: (p_msg => 'SQL - Update xla_ae_lines_gt 3'
1204: ,p_level => C_LEVEL_STATEMENT
1205: ,p_module => l_log_module);
1206:
1207: END IF;

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

1239: EXIT;
1240: END IF;
1241: IF (C_LEVEL_STATEMENT >= g_log_level) THEN
1242: trace
1243: (p_msg => 'SQL - Update xla_ae_lines_gt 6'
1244: ,p_level => C_LEVEL_STATEMENT
1245: ,p_module => l_log_module);
1246: trace
1247: (p_msg => 'count:'||to_char(l_array_rounding_class_code.count)

Line 1346: update xla_ae_lines_gt

1342: l_array_rounding_entd_amt1(j) := l_curr_entd_rounding_amount;
1343: j:= j+1;
1344: IF (j> C_BULK_LIMIT) THEN
1345: FORALL i in 1..j-1
1346: update xla_ae_lines_gt
1347: set doc_rounding_acctd_amt = l_array_doc_rounding_amt1(i)
1348: ,doc_rounding_entered_amt = l_array_rounding_entd_amt1(i)
1349: where rowid = l_array_rowid1(i);
1350: j:=1;

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

1441: END IF;
1442:
1443: IF (C_LEVEL_STATEMENT >= g_log_level) THEN
1444: trace
1445: (p_msg => 'SQL - Update xla_ae_lines_gt 7, j='||to_char(j)
1446: ,p_level => C_LEVEL_STATEMENT
1447: ,p_module => l_log_module);
1448: END IF;
1449:

Line 1452: update xla_ae_lines_gt

1448: END IF;
1449:
1450: IF j>1 THEN
1451: FORALL i in 1..j-1
1452: update xla_ae_lines_gt
1453: set doc_rounding_acctd_amt = l_array_doc_rounding_amt1(i)
1454: ,doc_rounding_entered_amt = l_array_rounding_entd_amt1(i)
1455: where rowid = l_array_rowid1(i);
1456: END IF;

Line 1701: FROM xla_ae_lines_gt;

1697: , rounding_class_code
1698: , document_rounding_level
1699: , doc_rounding_acctd_amt
1700: , doc_rounding_entered_amt
1701: FROM xla_ae_lines_gt;
1702:
1703: IF (C_LEVEL_PROCEDURE >= g_log_level)
1704: THEN
1705: trace( p_msg => 'END - ' || v_function

Line 1734: INSERT INTO xla_ae_lines

1730: , p_module => v_module);
1731: END IF; -- IF (C_LEVEL_PROCEDURE >= g_log_level)
1732:
1733: FORALL i in 1..p_array_ledger_id.count
1734: INSERT INTO xla_ae_lines
1735: (
1736: ae_header_id
1737: , ae_line_num
1738: , displayed_line_number

Line 2222: FROM xla_ae_lines_gt lin

2218: , accounting_date
2219: , ledger_id
2220: , alt_segment1
2221: , accounting_entry_status_code
2222: FROM xla_ae_lines_gt lin
2223: WHERE ledger_id = p_array_ledger_id(i)
2224: AND ae_line_num is not NULL
2225: GROUP BY lin.ae_header_id
2226: , ae_line_num

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

2264:
2265: l_count := SQL%ROWCOUNT;
2266: IF (C_LEVEL_EVENT >= g_log_level) THEN
2267: trace
2268: (p_msg => '# journal entry lines inserted into xla_ae_lines = '||to_char(l_count)
2269: ,p_level => C_LEVEL_EVENT
2270: ,p_module => v_module);
2271: END IF;
2272:

Line 2490: FROM xla_ae_lines ael

2486: AND 'TRANSFER' = p_array_merge_option(i)
2487: AND merge_event_id is null
2488: AND ae_header_id in
2489: (SELECT ael.ae_header_id
2490: FROM xla_ae_lines ael
2491: ,XLA_PARTIAL_MERGE_TXNS pmt
2492: WHERE nvl(ael.merge_party_id, ael.party_id) = p_old_party_id
2493: AND nvl(nvl(ael.merge_party_site_id, ael.party_site_id), -1)
2494: = nvl(p_old_site_id, -1)

Line 2533: FROM xla_ae_lines ael

2529: AND 'TRANSFER' = p_array_merge_option(i)
2530: AND merge_event_id is null
2531: AND ae_header_id in
2532: (SELECT ael.ae_header_id
2533: FROM xla_ae_lines ael
2534: ,XLA_PARTIAL_MERGE_TXNS pmt
2535: WHERE nvl(ael.merge_party_id, ael.party_id) = p_old_party_id
2536: AND nvl(nvl(ael.merge_party_site_id, ael.party_site_id), -1)
2537: = nvl(p_old_site_id, -1)

Line 2574: FROM xla_ae_lines ael

2570: AND 'TRANSFER' = p_array_merge_option(i)
2571: AND merge_event_id is null
2572: AND ae_header_id in
2573: (SELECT ael.ae_header_id
2574: FROM xla_ae_lines ael
2575: WHERE nvl(ael.merge_party_id, ael.party_id) = p_old_party_id
2576: AND nvl(nvl(ael.merge_party_site_id, ael.party_site_id), -1)
2577: = nvl(p_old_site_id, -1)
2578: and nvl(ael.party_type_code , p_party_type) = p_party_type

Line 2612: FROM xla_ae_lines ael

2608: AND 'TRANSFER' = p_array_merge_option(i)
2609: AND merge_event_id is null
2610: AND ae_header_id in
2611: (SELECT ael.ae_header_id
2612: FROM xla_ae_lines ael
2613: WHERE nvl(ael.merge_party_id, ael.party_id) = p_old_party_id
2614: AND nvl(nvl(ael.merge_party_site_id, ael.party_site_id), -1)
2615: = nvl(p_old_site_id, -1)
2616: and nvl(ael.party_type_code , p_party_type) = p_party_type

Line 2690: INSERT INTO xla_ae_lines_gt

2686: , p_module => v_module);
2687: END IF;
2688:
2689: FORALL i in 1..p_array_ledger_id.count
2690: INSERT INTO xla_ae_lines_gt
2691: (ae_header_id
2692: ,temp_line_num
2693: ,event_id
2694: ,ref_ae_header_id

Line 2795: xla_ae_lines ael

2791: ,0 -- 5100860 assign value to avoid using function index
2792: ,decode(ael.control_balance_flag, 'Y', 'P', 'P', 'P', null)
2793: ,ael.encumbrance_type_id
2794: FROM
2795: xla_ae_lines ael
2796: ,xla_ae_headers aeh
2797: ,xla_distribution_links xdl
2798: ,fnd_currencies fcu
2799: WHERE nvl(ael.merge_party_id, ael.party_id) = p_old_party_id

Line 2856: INSERT INTO xla_ae_lines_gt

2852: END IF;
2853:
2854:
2855: FORALL i in 1..p_array_ledger_id.count
2856: INSERT INTO xla_ae_lines_gt
2857: (ae_header_id
2858: ,temp_line_num
2859: ,event_id
2860: ,ref_ae_header_id

Line 2961: xla_ae_lines ael

2957: ,0 -- 5100860 assign value to avoid using function index
2958: ,decode(ael.control_balance_flag, 'Y', 'P', 'P', 'P', null)
2959: ,ael.encumbrance_type_id
2960: FROM
2961: xla_ae_lines ael
2962: ,xla_ae_headers aeh
2963: ,xla_distribution_links xdl
2964: ,fnd_currencies fcu
2965: WHERE nvl(ael.merge_party_id, ael.party_id) = p_old_party_id

Line 3081: (select ledger_id from xla_ae_lines_gt);

3077: ,'Other'
3078: from dual
3079: where p_array_merge_option(i) = 'TRANSFER'
3080: AND p_array_ledger_id(i) in
3081: (select ledger_id from xla_ae_lines_gt);
3082:
3083: IF (C_LEVEL_STATEMENT>= g_log_level)
3084: THEN
3085: trace( p_msg => 'Header inserted'

Line 3090: UPDATE xla_ae_lines_gt xal

3086: , p_level => C_LEVEL_STATEMENT
3087: , p_module => v_module);
3088: END IF;
3089:
3090: UPDATE xla_ae_lines_gt xal
3091: set (ae_header_id, accounting_date) =(
3092: select ae_header_id, accounting_date
3093: from xla_ae_headers_gt xah
3094: where xah.ledger_id = xal.ledger_id);

Line 3164: INSERT INTO xla_ae_lines_gt

3160: , p_module => v_module);
3161: END IF;
3162:
3163: FORALL i in 1..p_array_ledger_id.count
3164: INSERT INTO xla_ae_lines_gt
3165: (ae_header_id
3166: ,temp_line_num
3167: ,event_id
3168: ,ref_ae_header_id

Line 3289: xla_ae_lines ael

3285: ,0 -- 5100860 assign value to avoid using function index
3286: ,decode(ael.control_balance_flag, 'Y', 'P', 'P', 'P', null)
3287: ,ael.encumbrance_type_id
3288: FROM
3289: xla_ae_lines ael
3290: ,xla_ae_headers aeh
3291: ,xla_distribution_links xdl
3292: ,fnd_currencies fcu
3293: WHERE nvl(ael.merge_party_id, ael.party_id) = p_old_party_id

Line 3349: INSERT INTO xla_ae_lines_gt

3345: return 0;
3346: END IF;
3347:
3348: FORALL i in 1..p_array_ledger_id.count
3349: INSERT INTO xla_ae_lines_gt
3350: (ae_header_id
3351: ,temp_line_num
3352: ,event_id
3353: ,ref_ae_header_id

Line 3475: xla_ae_lines ael

3471: ,0 -- 5100860 assign value to avoid using function index
3472: ,decode(ael.control_balance_flag, 'Y', 'P', 'P', 'P', null)
3473: ,ael.encumbrance_type_id
3474: FROM
3475: xla_ae_lines ael
3476: ,xla_ae_headers aeh
3477: ,xla_distribution_links xdl
3478: ,fnd_currencies fcu
3479: WHERE nvl(ael.merge_party_id, ael.party_id) = p_old_party_id

Line 3721: UPDATE xla_ae_lines xal

3717: raise BalanceError;
3718: END IF;
3719:
3720: IF(p_accounting_mode <> 'D') THEN
3721: UPDATE xla_ae_lines xal
3722: SET (merge_party_id, merge_party_site_id, merge_code_combination_id)
3723: = (select party_id, party_site_id, code_combination_id
3724: from xla_ae_lines_gt xalg
3725: where xalg.ref_ae_header_id = xal.ae_header_id

Line 3724: from xla_ae_lines_gt xalg

3720: IF(p_accounting_mode <> 'D') THEN
3721: UPDATE xla_ae_lines xal
3722: SET (merge_party_id, merge_party_site_id, merge_code_combination_id)
3723: = (select party_id, party_site_id, code_combination_id
3724: from xla_ae_lines_gt xalg
3725: where xalg.ref_ae_header_id = xal.ae_header_id
3726: AND xalg.ref_ae_line_num = xal.ae_line_num
3727: AND xalg.reversal_code in ('REBOOKING', 'TRANSFER_BALANCE')
3728: and rownum = 1)

Line 3732: from xla_ae_lines_gt xlg

3728: and rownum = 1)
3729: WHERE xal.application_id = p_application_id
3730: AND (ae_header_id, ae_line_num) in
3731: (select xlg.ref_ae_header_id, xlg.ref_ae_line_num
3732: from xla_ae_lines_gt xlg
3733: ,xla_ae_headers xah
3734: where xlg.reversal_code in ('REBOOKING', 'TRANSFER_BALANCE')
3735: -- Bug 5103972 MPA / Reversal of incomplete JE
3736: -- should not be stamped with merge party informtion

Line 3903: FROM XLA_AE_LINES ael

3899: )
3900: )
3901: AND EXISTS
3902: (SELECT 'X'
3903: FROM XLA_AE_LINES ael
3904: WHERE ael.PARTY_ID = p_old_party_id
3905: AND ( p_old_site_id IS NULL
3906: OR ael.PARTY_SITE_ID = p_old_site_id)
3907: AND ael.PARTY_TYPE_CODE = p_party_type

Line 3949: FROM XLA_AE_LINES ael

3945: )
3946: )
3947: AND EXISTS
3948: (SELECT 'X'
3949: FROM XLA_AE_LINES ael
3950: WHERE ael.PARTY_ID = p_old_party_id
3951: AND ( p_old_site_id IS NULL
3952: OR ael.PARTY_SITE_ID = p_old_site_id)
3953: AND ael.PARTY_TYPE_CODE = p_party_type

Line 3995: UPDATE XLA_AE_LINES ael

3991: END IF;
3992:
3993: IF(p_merge_type = 'PARTIAL_MERGE') THEN
3994: FORALL i IN 1..p_array_ledger_id.count
3995: UPDATE XLA_AE_LINES ael
3996: SET PARTY_ID = p_new_party_id,
3997: PARTY_SITE_ID = NVL(p_new_site_id, PARTY_SITE_ID),
3998: DESCRIPTION
3999: = DECODE(DESCRIPTION

Line 4104: UPDATE XLA_AE_LINES ael

4100: END IF;
4101:
4102: ELSE
4103: FORALL i IN 1..p_array_ledger_id.count
4104: UPDATE XLA_AE_LINES ael
4105: SET PARTY_ID = p_new_party_id,
4106: PARTY_SITE_ID = NVL(p_new_site_id, PARTY_SITE_ID),
4107: DESCRIPTION
4108: = DECODE(DESCRIPTION

Line 4220: from xla_ae_lines_gt

4216: v_function VARCHAR2(240);
4217: v_module VARCHAR2(240);
4218: cursor c_null_ccid is
4219: select 1
4220: from xla_ae_lines_gt
4221: where code_combination_id is null;
4222: v_temp NUMBER;
4223: begin
4224: v_function := 'xla_third_party_merge.populate_ccid_to_gt';

Line 4235: update xla_ae_lines_gt xalg

4231: , p_level => C_LEVEL_PROCEDURE
4232: , p_module => v_module);
4233: END IF; -- IF (C_LEVEL_PROCEDURE >= g_log_level)
4234:
4235: update xla_ae_lines_gt xalg
4236: set code_combination_id =
4237: (select code_combination_id
4238: from gl_code_combinations gcc
4239: where gcc.chart_of_accounts_id = xalg.ccid_coa_id

Line 4280: update xla_ae_lines_gt temp

4276: , p_level => C_LEVEL_STATEMENT
4277: , p_module => v_module);
4278: END IF;
4279:
4280: update xla_ae_lines_gt temp
4281: SET code_combination_id =
4282: xla_ae_code_combination_pkg.GetCcid(
4283: temp.segment1
4284: ,temp.segment2

Line 4354: from xla_ae_lines_gt

4350: v_function VARCHAR2(240);
4351: v_module VARCHAR2(240);
4352: cursor c_null_ccid is
4353: select 1
4354: from xla_ae_lines_gt
4355: where code_combination_id is null;
4356: v_temp NUMBER;
4357: begin
4358: v_function := 'xla_third_party_merge.process_accounting_mapping';

Line 4369: update xla_ae_lines_gt xalg

4365: , p_level => C_LEVEL_PROCEDURE
4366: , p_module => v_module);
4367: END IF; -- IF (C_LEVEL_PROCEDURE >= g_log_level)
4368:
4369: update xla_ae_lines_gt xalg
4370: set ( code_combination_id
4371: ,ccid_coa_id
4372: ,segment1
4373: ,segment2

Line 4551: -- private procedure, populate xla_ae_lines_gt table

4547:
4548: END process_accounting_mapping;
4549:
4550:
4551: -- private procedure, populate xla_ae_lines_gt table
4552: -- for the purpose of account mapping
4553: FUNCTION populate_gt_for_mapping(
4554: p_application_id IN NUMBER
4555: ,p_event_id IN NUMBER

Line 4586: INSERT INTO xla_ae_lines_gt (

4582:
4583:
4584: IF(p_merge_type = 'PARTIAL_MERGE') THEN
4585: FORALL i IN 1..p_array_ledger_id.count
4586: INSERT INTO xla_ae_lines_gt (
4587: ae_header_id
4588: ,ae_line_num
4589: ,temp_line_num
4590: ,inherit_desc_flag

Line 4666: ,xla_ae_lines ael

4662: ,decode(segment_code, 'SEGMENT29', to_value, gcc.segment29)
4663: ,decode(segment_code, 'SEGMENT30', to_value, gcc.segment30)
4664: FROM xla_merge_seg_maps map
4665: ,gl_code_combinations gcc
4666: ,xla_ae_lines ael
4667: ,xla_ae_headers aeh
4668: ,XLA_PARTIAL_MERGE_TXNS xpmt
4669: ,XLA_LEDGER_RELATIONSHIPS_V rs
4670: ,gl_ledgers gld

Line 4736: INSERT INTO xla_ae_lines_gt (

4732: END IF;
4733: ELSE
4734:
4735: FORALL i IN 1..p_array_ledger_id.count
4736: INSERT INTO xla_ae_lines_gt (
4737: ae_header_id
4738: ,ae_line_num
4739: ,temp_line_num
4740: ,inherit_desc_flag

Line 4816: ,xla_ae_lines ael

4812: ,decode(segment_code, 'SEGMENT29', to_value, gcc.segment29)
4813: ,decode(segment_code, 'SEGMENT30', to_value, gcc.segment30)
4814: FROM xla_merge_seg_maps map
4815: ,gl_code_combinations gcc
4816: ,xla_ae_lines ael
4817: ,xla_ae_headers aeh
4818: ,XLA_LEDGER_RELATIONSHIPS_V rs
4819: ,gl_ledgers gld
4820: WHERE ael.PARTY_ID = p_old_party_id

Line 4907: from xla_ae_lines_gt

4903: v_function VARCHAR2(240);
4904: v_module VARCHAR2(240);
4905: cursor c_null_ccid is
4906: select 1
4907: from xla_ae_lines_gt
4908: where code_combination_id is null;
4909: v_row_count NUMBER;
4910: begin
4911: v_function := 'xla_third_party_merge.process_incomplete_acct_map';

Line 4962: FROM xla_ae_lines_gt xalg

4958:
4959: UPDATE
4960: (SELECT xalg.code_combination_id
4961: , xal.code_combination_id code_combination_id1
4962: FROM xla_ae_lines_gt xalg
4963: , xla_ae_lines xal
4964: WHERE xalg.ae_header_id = xal.ae_header_id
4965: AND xalg.ae_line_num = xal.ae_line_num
4966: AND xal.application_id = p_application_id

Line 4963: , xla_ae_lines xal

4959: UPDATE
4960: (SELECT xalg.code_combination_id
4961: , xal.code_combination_id code_combination_id1
4962: FROM xla_ae_lines_gt xalg
4963: , xla_ae_lines xal
4964: WHERE xalg.ae_header_id = xal.ae_header_id
4965: AND xalg.ae_line_num = xal.ae_line_num
4966: AND xal.application_id = p_application_id
4967: AND xalg.temp_line_num = xal.ae_line_num

Line 5031: -- to be stamped on xla_ae_lines_gt

5027: , amb_context_code
5028: , budget_version_id
5029: -- 5103972
5030: -- Used at the end of this procedure to find ae header ids
5031: -- to be stamped on xla_ae_lines_gt
5032: , parent_header_id
5033: )
5034: (select xla_ae_headers_s.nextval
5035: ,p_accounting_mode

Line 5063: ,xla_ae_lines_gt xal

5059: , xah.balance_type_code
5060: , xal.ae_header_id
5061: , xal.ref_ae_header_id -- 5103972
5062: from xla_ae_headers xah
5063: ,xla_ae_lines_gt xal
5064: where xah.application_id = p_application_id
5065: and xah.ae_header_id =xal.ref_ae_header_id
5066: and xal.reversal_code = 'REBOOKING'));
5067:

Line 5106: UPDATE xla_ae_lines_gt xal

5102: , p_level => C_LEVEL_STATEMENT
5103: , p_module => v_module);
5104: END IF;
5105:
5106: UPDATE xla_ae_lines_gt xal
5107: SET (ae_header_id, accounting_date) =
5108: (SELECT ae_header_id, accounting_date
5109: FROM xla_ae_headers_gt xah
5110: WHERE xal.event_id = xah.event_id

Line 5956: DELETE FROM xla_ae_lines

5952: ,p_level => C_LEVEL_STATEMENT
5953: ,p_module => l_log_module);
5954: END IF;
5955:
5956: DELETE FROM xla_ae_lines
5957: WHERE application_id = p_application_id
5958: AND ae_header_id IN
5959: (SELECT ae_header_id FROM xla_ae_headers
5960: WHERE application_id = p_application_id