DBA Data[Home] [Help]

APPS.XLA_JE_VALIDATION_PKG dependencies on XLA_AE_HEADERS

Line 694: UPDATE xla_ae_headers_gt h

690:
691: IF (p_ae_header_id IS NULL) THEN
692: -- g_caller := C_CALLER_ACCT_PROGRAM; -- 4262811
693:
694: UPDATE xla_ae_headers_gt h
695: SET (period_year,period_closing_status) =
696: (SELECT period_year,closing_status
697: FROM gl_period_statuses gl
698: WHERE gl.period_name = h.period_name

Line 1541: FROM xla_ae_headers_gt h

1537: ,NULL -- substituted_ccid
1538: ,h.accounting_entry_status_code
1539: ,h.period_name
1540: ,l.gain_or_loss_flag
1541: FROM xla_ae_headers_gt h
1542: ,xla_ae_lines l
1543: ,gl_code_combinations ccid
1544: ,fnd_currencies fcu
1545: WHERE ccid.code_combination_id(+) = l.code_combination_id

Line 1982: FROM xla_ae_headers_gt h

1978: NVL(gsa1.code_combination_id,
1979: NVL(gsa2.code_combination_id, gsa3.code_combination_id)))
1980: ,h.accounting_entry_status_code
1981: ,h.period_name
1982: FROM xla_ae_headers_gt h
1983: ,xla_ae_lines l
1984: ,gl_code_combinations ccid
1985: ,gl_code_combinations ccid1
1986: ,gl_suspense_accounts gsa

Line 2525: FROM xla_ae_headers_gt h

2521: ELSE NULL END
2522: ,h.accounting_entry_status_code
2523: ,h.period_name
2524: ,l.gain_or_loss_flag
2525: FROM xla_ae_headers_gt h
2526: ,xla_ae_lines l
2527: ,gl_code_combinations ccid
2528: ,gl_code_combinations ccid1
2529: ,fnd_currencies fcu

Line 2576: UPDATE xla_ae_headers

2572: p_level => C_LEVEL_STATEMENT);
2573: END IF;
2574: END IF;
2575:
2576: UPDATE xla_ae_headers
2577: SET zero_amount_flag = 'Y'
2578: WHERE application_id = g_application_id and
2579: ae_header_id in
2580: (select /*+ cardinality(XLA_VALIDATION_LINES_GT, 1) */ ae_header_id --bug9174950

Line 2868: FROM xla_ae_headers h

2864: or (g_ledger_coa_id <> ccid.chart_of_accounts_id)
2865: THEN 'Y'
2866: ELSE NULL
2867: END
2868: FROM xla_ae_headers h
2869: ,xla_ae_lines l
2870: ,gl_code_combinations ccid
2871: ,fnd_currencies fcu
2872: WHERE ccid.code_combination_id(+) = l.code_combination_id

Line 2927: FROM xla_ae_headers h

2923: ,CASE WHEN h.doc_sequence_id IS NOT NULL AND doc.doc_sequence_id IS NULL
2924: THEN 'N'
2925: ELSE 'Y'
2926: END doc_sequence_id_valid_flag
2927: FROM xla_ae_headers h
2928: LEFT OUTER JOIN fnd_doc_sequence_categories cat
2929: ON cat.code = h.doc_category_code
2930: LEFT OUTER JOIN fnd_document_sequences doc
2931: ON doc.doc_sequence_id = h.doc_sequence_id

Line 2951: FROM xla_ae_headers_gt h

2947: ,CASE WHEN h.doc_sequence_id IS NOT NULL AND doc.doc_sequence_id IS NULL
2948: THEN 'N'
2949: ELSE 'Y'
2950: END doc_sequence_id_valid_flag
2951: FROM xla_ae_headers_gt h
2952: LEFT OUTER JOIN fnd_doc_sequence_categories cat
2953: ON cat.code = h.doc_category_code
2954: LEFT OUTER JOIN fnd_document_sequences doc
2955: ON doc.doc_sequence_id = h.doc_sequence_id

Line 3236: FROM xla_ae_headers h

3232: ,CASE WHEN h.balance_type_code = 'B' AND
3233: gp.period_year > b.latest_opened_year
3234: THEN 'N'
3235: ELSE 'Y' END budget_period_valid_flag
3236: FROM xla_ae_headers h
3237: JOIN gl_period_statuses gp
3238: ON gp.period_name = h.period_name
3239: AND gp.ledger_id = g_ledger_id
3240: AND gp.application_id = C_GL_APPLICATION_ID

Line 3266: FROM xla_ae_headers_gt h

3262: ,CASE WHEN h.balance_type_code = 'B' AND
3263: h.period_year > b.latest_opened_year
3264: THEN 'N'
3265: ELSE 'Y' END budget_period_valid_flag
3266: FROM xla_ae_headers_gt h
3267: LEFT OUTER JOIN gl_budget_versions bv
3268: ON bv.budget_version_id = h.budget_version_id
3269: LEFT OUTER JOIN gl_budgets b
3270: ON b.budget_name = bv.budget_name

Line 3448: FROM xla_ae_headers xah

3444: SELECT xah.ae_header_id
3445: ,xah.event_id
3446: ,xah.entity_id
3447: ,xah.accounting_date
3448: FROM xla_ae_headers xah
3449: , gl_transaction_dates gtd
3450: WHERE xah.accounting_date = gtd.transaction_date
3451: AND gtd.transaction_calendar_id = g_transaction_calendar_id
3452: AND gtd.business_day_flag = 'N'

Line 3589: FROM xla_ae_headers h

3585: ,NULL header_num -- 4262811
3586: ,NULL period_closing_status -- 4262811
3587: ,h.period_name period_name -- 5136994
3588: ,h.gl_transfer_status_code
3589: FROM xla_ae_headers h
3590: JOIN gl_ledgers g
3591: ON g.ledger_id = h.ledger_id
3592: JOIN gl_period_statuses gp
3593: ON gp.period_name = h.period_name

Line 3634: FROM xla_ae_headers_gt h

3630: ,NVL(h.header_num,0) header_num -- 4262811
3631: ,h.period_closing_status period_closing_status -- 4262811
3632: ,h.period_name period_name -- 5136994
3633: ,h.gl_transfer_status_code
3634: FROM xla_ae_headers_gt h
3635: WHERE h.ledger_id = g_ledger_id
3636: AND (h.accounting_date <= g_end_date OR h.period_closing_status IN ('P','C') -- 4262811
3637: OR h.period_name IS NULL) -- 5136994
3638: AND ((h.balance_type_code = 'B' AND h.budget_version_id IS NULL) OR

Line 6186: ,xla_ae_headers h

6182: FROM xla_product_rules_tl pr
6183: ,xla_event_classes_tl ec
6184: ,xla_event_types_tl et
6185: ,xla_lookups lk
6186: ,xla_ae_headers h
6187: WHERE lk.lookup_code = h.product_rule_type_code
6188: AND lk.lookup_type = 'XLA_OWNER_TYPE'
6189: AND pr.amb_context_code = g_amb_context_code
6190: AND pr.application_id = g_application_id

Line 6890: , xla_ae_headers_gt hdr

6886: , hdr.event_id
6887: , hdr.ae_header_id
6888: , err.error_message --added for 10180336
6889: FROM fun_bal_errors_gt err
6890: , xla_ae_headers_gt hdr
6891: , gl_je_categories je
6892: , xle_entity_profiles le1
6893: , xle_entity_profiles le2
6894: , xle_entity_profiles le3

Line 6914: , xla_ae_headers hdr

6910: , hdr.event_id
6911: , hdr.ae_header_id
6912: , err.error_message --added for 10180336
6913: FROM fun_bal_errors_gt err
6914: , xla_ae_headers hdr
6915: , gl_je_categories je
6916: , xle_entity_profiles le1
6917: , xle_entity_profiles le2
6918: , xle_entity_profiles le3

Line 9679: WHERE ae_header_id in (SELECT /*+ UNNEST NO_SEMIJOIN cardinality(XLA_AE_HEADERS_GT,1)*/ ae_header_id -- 4752774 bug9174950

9675:
9676: -- 4262811. Added c_caller_mpa_program
9677: IF (g_caller in (C_CALLER_MPA_PROGRAM, C_CALLER_THIRD_PARTY_MERGE)) THEN
9678: DELETE FROM xla_ae_segment_values
9679: WHERE ae_header_id in (SELECT /*+ UNNEST NO_SEMIJOIN cardinality(XLA_AE_HEADERS_GT,1)*/ ae_header_id -- 4752774 bug9174950
9680: FROM xla_ae_headers_gt
9681: WHERE ledger_id = g_ledger_id
9682: AND accounting_date <= NVL(g_end_date, accounting_date)); -- 4262811
9683: ELSIF g_caller = C_CALLER_ACCT_PROGRAM THEN

Line 9680: FROM xla_ae_headers_gt

9676: -- 4262811. Added c_caller_mpa_program
9677: IF (g_caller in (C_CALLER_MPA_PROGRAM, C_CALLER_THIRD_PARTY_MERGE)) THEN
9678: DELETE FROM xla_ae_segment_values
9679: WHERE ae_header_id in (SELECT /*+ UNNEST NO_SEMIJOIN cardinality(XLA_AE_HEADERS_GT,1)*/ ae_header_id -- 4752774 bug9174950
9680: FROM xla_ae_headers_gt
9681: WHERE ledger_id = g_ledger_id
9682: AND accounting_date <= NVL(g_end_date, accounting_date)); -- 4262811
9683: ELSIF g_caller = C_CALLER_ACCT_PROGRAM THEN
9684: NULL; -- bug 4883830

Line 9927: -- Possible values returned to xla_ae_headers_gt.funds_status_codes are:

9923:
9924: ELSE
9925:
9926: --
9927: -- Possible values returned to xla_ae_headers_gt.funds_status_codes are:
9928: -- S - If all rows in the packet pass funds check (Success)
9929: -- A - If all rows in the packet pass funds check and some of the rows have advisory warnings (Advisory)
9930: -- F - If all rows in the packet fail funds check (Fail)
9931: -- P - If some rows in the packet pass while some fail (Partial)

Line 9943: FROM xla_ae_headers_gt

9939: l_array_ae_header_id
9940: , l_array_hdr_funds_status_code
9941: , l_array_event_id
9942: , l_array_entity_id
9943: FROM xla_ae_headers_gt
9944: WHERE ledger_id = g_ledger_id;
9945:
9946: IF (C_LEVEL_STATEMENT >= g_log_level) THEN
9947: FOR i IN 1 .. l_array_ae_header_id.count LOOP

Line 9957: UPDATE xla_ae_headers

9953: END IF;
9954:
9955: -- Update header level status
9956: FORALL i IN 1 .. l_array_ae_header_id.count
9957: UPDATE xla_ae_headers
9958: SET funds_status_code = l_array_hdr_funds_status_code(i)
9959: , accounting_entry_status_code = CASE WHEN l_array_hdr_funds_status_code(i) = 'F' THEN
9960: 'I'
9961: WHEN l_array_hdr_funds_status_code(i) = 'T' THEN

Line 9976: trace(p_msg => '# row updated in xla_ae_headers = '||SQL%ROWCOUNT,

9972: WHERE application_id = g_application_id
9973: AND ae_header_id = l_array_ae_header_id(i);
9974:
9975: IF (C_LEVEL_EVENT >= g_log_level) THEN
9976: trace(p_msg => '# row updated in xla_ae_headers = '||SQL%ROWCOUNT,
9977: p_module => l_log_module,
9978: p_level => C_LEVEL_EVENT);
9979: END IF;
9980:

Line 10065: , xla_ae_headers xah

10061: , l_array_unrounded_entered_dr
10062: , l_array_unrounded_accounted_cr
10063: , l_array_unrounded_accounted_dr
10064: FROM xla_validation_lines_gt xvl
10065: , xla_ae_headers xah
10066: , fnd_lookup_values flv
10067: WHERE xvl.ae_header_id = xah.ae_header_id
10068: AND xvl.accounting_class_code <> 'RFE'
10069: AND flv.lookup_type = 'FUNDS_CHECK_RESULT_CODE'

Line 10288: UPDATE xla_ae_headers

10284: --------------------------------------------------------------------------------
10285: -- 4262811a note: Do not modify. This sets the status correctly on each MPA rows
10286: --------------------------------------------------------------------------------
10287: FORALL i IN 1..g_err_count
10288: UPDATE xla_ae_headers
10289: SET accounting_entry_status_code = C_AE_STATUS_INVALID
10290: -- Bug 5056632. updates group_id back to Null if je is invalid
10291: ,group_id = NULL
10292: WHERE ae_header_id = g_err_hdr_ids(i)

Line 10296: trace(p_msg => '# xla_ae_headers updated to C_AE_STATUS_INVALID = '||SQL%ROWCOUNT,

10292: WHERE ae_header_id = g_err_hdr_ids(i)
10293: AND application_id = g_application_id;
10294:
10295: IF (C_LEVEL_EVENT >= g_log_level) THEN
10296: trace(p_msg => '# xla_ae_headers updated to C_AE_STATUS_INVALID = '||SQL%ROWCOUNT,
10297: p_module => l_log_module,
10298: p_level => C_LEVEL_EVENT);
10299: END IF;
10300:

Line 10305: UPDATE xla_ae_headers

10301: IF g_caller = C_CALLER_ACCT_PROGRAM THEN -- 4262811a
10302:
10303: /*
10304: FORALL i IN 1..g_err_count
10305: UPDATE xla_ae_headers
10306: SET accounting_entry_status_code = C_AE_STATUS_RELATED
10307: WHERE accounting_entry_status_code <> C_AE_STATUS_INVALID
10308: AND event_id = g_err_event_ids(i)
10309: AND application_id = g_application_id;

Line 10312: UPDATE xla_ae_headers xah1 -- 4262811a

10308: AND event_id = g_err_event_ids(i)
10309: AND application_id = g_application_id;
10310: */
10311: FORALL i IN 1..g_err_count
10312: UPDATE xla_ae_headers xah1 -- 4262811a
10313: SET accounting_entry_status_code = C_AE_STATUS_RELATED
10314: -- Bug 5056632. updates group_id back to Null if je is invalid
10315: ,group_id = NULL
10316: WHERE xah1.accounting_entry_status_code <> C_AE_STATUS_INVALID

Line 10321: FROM xla_ae_headers xah2

10317: AND xah1.event_id = g_err_event_ids(i)
10318: AND xah1.application_id = g_application_id
10319: AND xah1.parent_ae_line_num IS NULL -- 4262811a Existing logic, and this works for Accrual Reversal.
10320: AND NOT EXISTS (SELECT 1 -- 4262811a Do not update MPA's original entry, it is set correctly above.
10321: FROM xla_ae_headers xah2
10322: WHERE xah2.event_id = xah1.event_id -- 5231063 g_err_event_ids(i)
10323: AND xah2.application_id = xah1.application_id -- 5231063 g_application_id
10324: AND xah2.ae_header_id = g_err_hdr_ids(i)
10325: AND xah2.parent_ae_line_num IS NOT NULL);

Line 10328: trace(p_msg => '# xla_ae_headers updated to C_AE_STATUS_RELATED = '||SQL%ROWCOUNT,

10324: AND xah2.ae_header_id = g_err_hdr_ids(i)
10325: AND xah2.parent_ae_line_num IS NOT NULL);
10326:
10327: IF (C_LEVEL_EVENT >= g_log_level) THEN
10328: trace(p_msg => '# xla_ae_headers updated to C_AE_STATUS_RELATED = '||SQL%ROWCOUNT,
10329: p_module => l_log_module,
10330: p_level => C_LEVEL_EVENT);
10331: END IF;
10332: --------------------------------------------------------------------------------------

Line 10336: UPDATE xla_ae_headers xah1

10332: --------------------------------------------------------------------------------------
10333: -- 4262811a Update MPA rows ----------------------------------------------------------
10334: --------------------------------------------------------------------------------------
10335: FORALL i IN 1..g_err_count
10336: UPDATE xla_ae_headers xah1
10337: SET (accounting_entry_status_code, group_id) =
10338: (SELECT DECODE(xah2.accounting_entry_status_code
10339: ,'D',xah1.accounting_entry_status_code
10340: ,'F',xah1.accounting_entry_status_code

Line 10349: FROM xla_ae_headers xah2

10345: END )
10346: --
10347: -- Bug 5056632. updates group_id back to Null if je is invalid
10348: ,NULL
10349: FROM xla_ae_headers xah2
10350: WHERE xah2.event_id = g_err_event_ids(i)
10351: AND xah2.application_id = g_application_id
10352: AND xah2.ae_header_id = xah1.parent_ae_header_id
10353: AND xah2.parent_ae_line_num IS NULL)

Line 10371: FROM xla_ae_headers xah2

10367: UPDATE xla_events_gt evt -- 4262811a
10368: SET process_status_code =
10369: (SELECT DECODE(xah2.parent_ae_line_num,NULL,'I' -- 4262811a Status of MPA rows does not affect event status
10370: , evt.process_status_code)
10371: FROM xla_ae_headers xah2
10372: WHERE xah2.event_id = g_err_event_ids(i)
10373: AND xah2.application_id = g_application_id
10374: AND xah2.ae_header_id = g_err_hdr_ids(i))
10375: WHERE event_id = g_err_event_ids(i)

Line 10411: FROM xla_ae_headers xah

10407: PROCEDURE undo_funds_reserve
10408: IS
10409: CURSOR c_failed_je IS
10410: SELECT distinct xah.ledger_id, xah.event_id
10411: FROM xla_ae_headers xah
10412: , xla_events_gt xeg
10413: WHERE xeg.event_id = xah.event_id
10414: AND xah.application_id = g_application_id
10415: AND xeg.process_status_code = 'I';