The following lines contain the word 'select', 'insert', 'update' or 'delete':
| 12-MAR-2004 K.Boussema Changed to incorporate the select of lookups |
| from the extract objects |
| 22-MAR-2004 K.Boussema Added a parameter p_module to the TRACE calls |
| and the procedure. |
| 11-MAY-2004 K.Boussema Removed the call to XLA trace routine from |
| trace() procedure |
| 17-MAY-2004 W.Shen Accounting attribute enhancement project |
| change to GenerateAcctLineTypeProcs, |
| GetAccountingSources procedure |
| 20-Sep-2004 S.Singhania Made following changes for bulk processing: |
| - Added constatnt C_ALT_BODY |
| - Modified contants C_ALT_PROC and |
| C_SET_ACCT_SOURCES |
| - Modified routines GetAccountingSources, |
| GetALTBody and GenerateDefAcctLineType |
| 27-DEC-2004 K.Boussema Changed the VARCHAR2 type by CLOB to handle |
| the large ALT |
| 12-Feb-2004 W.Shen Modify C_ALT_PROC to add two parameters for |
| calculate amount, gain lost |
| Modify for ledger Currency Project |
| 28-MAR-2005 A.Wan Changed for business flow. Bug 4219869 |
| 11-Jul-2005 A.Wan Changed for MPA . Bug 4262811 |
| 22-Sep-2005 S.Singhania Bug 4544725. Implemented Business Flows and |
| Reversals for Non-Upgraded JEs. |
| 12-Oct-2005 A.Wan Bug 4645092 - MPA report changes |
| 18-Oct-2005 V. Kumar Removed code for Analytical Criteria |
| 05-Jan-2005 A. Govil Bug 4922099 - Added code for Federal |
| Non-upgraded entries. |
| 09-Jan-2006 A.Wan Bug 4669271 - do not copy bflow class for |
| Accrual reversal |
| 30-Jan-2006 A.Wan Bug 4655713 - |
| - in GenerateCallADR, process ALL segment 1st |
| - in GenerateADRCalls, if same entry, and ALL |
| segment is inherited, then set C_CHAR to |
| each segments. |
| 03-Feb-2006 A.Wan Bug 4655713b - |
| - if accrual reversal uses business flow, |
| set reversal_code to 'MPA_' + bflow method |
| 07-FEB-2006 A.Wan 4897417 error if MPA's GL periods not defined. |
| 13-FEB-2006 V.Kumar 4955764 Modified C_ALT_BODY , C_ACC_REV_MPA_BODY|
| 01-Mar-2006 A.Wan 5052518 Accrual reversal did not change SIGN |
| as defined in reversal method. |
| 15-Apr-2006 A.Wan 5132303 - applied to amt for Gain/Loss |
| 01-Jan-2009 VGOPISET 7109881 Changed MPA parent line Num. Added call |
| to InsertMPARecogLineInfo proedure |
| 25-AUG-2010 VGOPISET 9863643 BFLOWUPGENTRY call when actual_upg as Y |
| for balance type A or enc_upg as Y for |
| balance type E JLTs |
| 06-Sep-2010 VGOPISET 9954676 Added call to InsertMpaTrxAcctCopyInfo |
| for Trx Coa Secondary Ledger MPA |
| 28-Apr-2011 VGOPISET 12341466 Pass AccountedAmount to GetRecogEntries|
| only when AccountedAmount Source is available. |
+============================================================================*/
--
--+==========================================================================+
--| |
--| |
--| Global Constants |
--| |
--| |
--+==========================================================================+
G_ADRS CLOB;
XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
(p_hdr_idx => g_array_event(p_event_id).array_value_num(''acc_rev_header_index'')
,p_balance_type_code => l_balance_type_code);
XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus
(p_hdr_idx => g_array_event(p_event_id).array_value_num(''header_index'')
,p_balance_type_code => l_balance_type_code
);
XLA_AE_JOURNAL_ENTRY_PKG.UpdateJournalEntryStatus (p_hdr_idx => g_last_hdr_idx);
SELECT DISTINCT
xals.accounting_attribute_code
, xals.source_code
, xals.source_type_code
, xals.source_application_id
, xaa.datatype_code
FROM xla_jlt_acct_attrs xals
,xla_acct_attributes_b xaa
WHERE xals.application_id = p_application_id
AND xals.accounting_line_code = p_accounting_line_code
AND xals.accounting_line_type_code = p_accounting_line_type_code
AND xals.amb_context_code = p_amb_context_code
AND xals.event_class_code = p_event_class_code
AND xals.source_code IS NOT NULL -- 4219869 Business Flow
AND xals.accounting_attribute_code = xaa.accounting_attribute_code
union
SELECT DISTINCT
xals.accounting_attribute_code
, xals.source_code
, xals.source_type_code
, xals.source_application_id
, xaa.datatype_code
FROM xla_evt_class_acct_attrs xals
,xla_acct_attributes_b xaa
WHERE xals.application_id = p_application_id
AND xals.event_class_code = p_event_class_code
AND xaa.assignment_level_code = 'EVT_CLASS_ONLY'
AND xaa.accounting_attribute_code=xals.accounting_attribute_code
AND xals.default_flag = 'Y'
AND xaa.journal_entry_level_code in ('L', 'C')
UNION
SELECT DISTINCT -- 4482069 To populate the transaction currency. Needed in BusinessFlowPriorEntries.
xals.accounting_attribute_code
, xals.source_code
, xals.source_type_code
, xals.source_application_id
, xaa.datatype_code
FROM xla_evt_class_acct_attrs xals
,xla_acct_attributes_b xaa
,xla_jlt_acct_attrs xjaa
WHERE xals.application_id = p_application_id
AND xals.event_class_code = p_event_class_code
AND xaa.accounting_attribute_code=xals.accounting_attribute_code
AND xals.default_flag = 'Y'
AND xals.accounting_attribute_code = 'ENTERED_CURRENCY_CODE'
AND xjaa.application_id = p_application_id
AND xjaa.accounting_line_code = p_accounting_line_code
AND xjaa.accounting_line_type_code = p_accounting_line_type_code
AND xjaa.amb_context_code = p_amb_context_code
AND xjaa.event_class_code = p_event_class_code
AND xjaa.source_code IS NULL
AND xjaa.accounting_attribute_code = xaa.accounting_attribute_code
;
SELECT DISTINCT
NVL(xlda.segment_rule_appl_id,xlda.application_id)
, xlda.segment_rule_type_code
, xlda.segment_rule_code
, xlda.flexfield_segment_code
, xlda.side_code
, xlda.inherit_adr_flag -- 4219869 Business Flow
, xld.accounting_coa_id -- 4219869 Business Flow
, xld.transaction_coa_id -- 4219869 Business Flow
FROM xla_line_defn_adr_assgns xlda
, xla_line_defn_jlt_assgns xldj
, xla_line_definitions_b xld -- 4219869 Business Flow
WHERE xldj.application_id = p_application_id
AND xldj.amb_context_code = p_amb_context_code
AND xldj.line_definition_owner_code = p_line_definition_owner_code
AND xldj.line_definition_code = p_line_definition_code
AND xldj.event_class_code = p_event_class_code
AND ( xldj.event_type_code = p_event_type_code
OR
xldj.event_type_code = xldj.event_class_code || '_ALL'
)
AND xldj.accounting_line_type_code = p_accounting_line_type_code
AND xldj.accounting_line_code = p_accounting_line_code
--
AND xlda.application_id = xldj.application_id
AND xlda.amb_context_code = xldj.amb_context_code
AND xlda.event_class_code = xldj.event_class_code
AND xlda.event_type_code = xldj.event_type_code
AND xlda.line_definition_owner_code = xldj.line_definition_owner_code
AND xlda.line_definition_code = xldj.line_definition_code
AND xlda.accounting_line_type_code = xldj.accounting_line_type_code
AND xlda.accounting_line_code = xldj.accounting_line_code
AND xld.application_id = xldj.application_id -- 4219869 Business Flow
AND xld.amb_context_code = xldj.amb_context_code -- 4219869 Business Flow
AND xld.event_class_code = xldj.event_class_code -- 4219869 Business Flow
AND xld.event_type_code = xldj.event_type_code -- 4219869 Business Flow
AND xld.line_definition_owner_code = xldj.line_definition_owner_code -- 4219869 Business Flow
AND xld.line_definition_code = xldj.line_definition_code -- 4219869 Business Flow
--ORDER BY xlda.inherit_adr_flag, xlda.segment_rule_code -- 4219869 Business Flow, process non-inherited first
ORDER BY decode(xlda.FLEXFIELD_SEGMENT_CODE,'ALL',1,2), -- 4655713 process ALL segment first
xlda.inherit_adr_flag, xlda.segment_rule_code
;
SELECT mpa_accounting_line_type_code
, mpa_accounting_line_code
, description_type_code
, description_code
FROM xla_mpa_jlt_assgns
WHERE application_id = p_application_id
AND amb_context_code = p_amb_context_code
AND event_class_code = p_event_class
AND event_type_code = p_event_type
AND line_definition_owner_code = p_line_definition_owner_code
AND line_definition_code = p_line_definition_code
AND accounting_line_type_code = p_accounting_line_type_code
AND accounting_line_code = p_accounting_line_code;
l_mpa_jlt_body := l_mpa_jlt_body ||'XLA_AE_LINES_PKG.InsertMPARecogLineInfo( l_recog_line_'||to_char(i)||' );
l_mpa_jlt_body := l_mpa_jlt_body ||'XLA_AE_LINES_PKG.InsertMpaTrxAcctCopyInfo( XLA_AE_LINES_PKG.g_rec_lines.array_ae_header_id(XLA_AE_LINES_PKG.g_LineNumber) ,l_recog_line_'||to_char(i)||' );
SELECT DISTINCT
xldj.accounting_line_code
, xldj.accounting_line_type_code
--
, REPLACE(xaltt.name , '''','''''')
--
, xldj.description_type_code
, xldj.description_code
, xldj.inherit_desc_flag -- 4219869 Business Flow
--
, xaltb.accounting_entry_type_code
, xaltb.natural_side_code
, xaltb.gl_transfer_mode_code
, xaltb.switch_side_flag
, xaltb.merge_duplicate_code
--
, xaltb.accounting_class_code
, xaltb.rounding_class_code
, xaltb.gain_or_loss_flag
--
, xaltb.business_method_code -- 4219869 Business Flow
, xaltb.business_class_code -- 4219869 Business Flow
--
, xpah.entity_code
, xpah.event_class_code
, xpah.event_type_code
--
, xald.line_definition_code
, xald.line_definition_owner_code
--
, xldj.mpa_num_je_code -- 4262811
, xldj.mpa_gl_dates_code -- 4262811
, xldj.mpa_proration_code -- 4262811
, xldj.mpa_header_desc_type_code -- 4262811
, xldj.mpa_header_desc_code -- 4262811
--
, xldt.budgetary_control_flag -- 4458381 Public Sector Enh
, xaltb.encumbrance_type_id -- 4458381 Public Sector Enh
FROM xla_aad_line_defn_assgns xald
, xla_line_defn_jlt_assgns xldj
, xla_prod_acct_headers xpah
, xla_acct_line_types_b xaltb
, xla_acct_line_types_tl xaltt
, xla_line_definitions_b xldt
--
WHERE xpah.application_id = p_application_id
AND xpah.product_rule_type_code = p_product_rule_type_code
AND xpah.product_rule_code = p_product_rule_code
AND xpah.amb_context_code = p_amb_context_code
AND xpah.accounting_required_flag = 'Y'
AND xpah.validation_status_code = 'R'
--
AND xald.application_id = xpah.application_id
AND xald.amb_context_code = xpah.amb_context_code
AND xald.product_rule_type_code = xpah.product_rule_type_code
AND xald.product_rule_code = xpah.product_rule_code
AND xald.event_class_code = xpah.event_class_code
AND xald.event_type_code = xpah.event_type_code
--
AND xldj.application_id = xald.application_id
AND xldj.amb_context_code = xald.amb_context_code
AND xldj.event_class_code = xald.event_class_code
AND xldj.event_type_code = xald.event_type_code
AND xldj.line_definition_owner_code = xald.line_definition_owner_code
AND xldj.line_definition_code = xald.line_definition_code
AND xldj.active_flag = 'Y'
--
AND xldj.application_id = xaltb.application_id
AND xldj.amb_context_code = xaltb.amb_context_code
AND xldj.accounting_line_code = xaltb.accounting_line_code
AND xldj.accounting_line_type_code = xaltb.accounting_line_type_code
AND xldj.event_class_code = xaltb.event_class_code
AND xaltb.enabled_flag = 'Y'
--
AND xaltb.application_id = xaltt.application_id (+)
AND xaltb.amb_context_code = xaltt.amb_context_code (+)
AND xaltb.entity_code = xaltt.entity_code (+)
AND xaltb.event_class_code = xaltt.event_class_code (+)
AND xaltb.accounting_line_code = xaltt.accounting_line_code (+)
AND xaltb.accounting_line_type_code = xaltt.accounting_line_type_code(+)
AND xaltt.language (+) = USERENV('LANG')
--
AND xldt.application_id = xald.application_id
AND xldt.amb_context_code = xald.amb_context_code
AND xldt.event_class_code = xald.event_class_code
AND xldt.event_type_code = xald.event_type_code
AND xldt.line_definition_owner_code = xald.line_definition_owner_code
AND xldt.line_definition_code = xald.line_definition_code
AND xldt.budgetary_control_flag = XLA_CMP_PAD_PKG.g_bc_pkg_flag
--
ORDER BY xldj.accounting_line_type_code, xldj.accounting_line_code
;