Académique Documents
Professionnel Documents
Culture Documents
+================================================================================+
REM |
|
REM | File Name : sweep_transactions_Fix.txt
REM |
|
REM | Desc : Datafix finds all transactions accounted in a closed period for an
|
REM | application and sweeps them to next period as input provided by user.
|
REM | Related Subledger teams like AP/AR should first update their
tables ,then|
REM | only Xla tables can be modified.Else there would be serious
reconciliation issues
|
REM | CodeFix: |
REM | USAGE :
|
REM | Supply the following when prompted:
|
REM | 1) new_accounting_date
|
REM | 2) ledger_id
|
REM | 3) application_id
REM | |
REM
*================================================================================*/
--The script can be used when Transfer to GL fails because transactions are in
closed/permanently closed periods.
--After applying datafix when Transfer to GL is run again ,it should go fine.
--The script can be hardcoded for specific transaction also if subledgers like
AP/AR want to sweep a draft/final accounted
--transaction Or if they are having an issue sweeping a transaction.
--1)
Drop table xla_ae_headers_7234498;
--4) Update transactions event date in xla event which are in closed period
Update xla_events xe
set xe.event_date = to_date('&new_accounting_date','DD-MON-YYYY'),
xe.last_updated_by = -169
where exists
( select 1 from xla_ae_headers_7234498 xah1
where xah1.event_id = xe.event_id)
and xe.application_id=&application_id
and xe.event_status_code='P'
and xe.process_status_code ='P'
and xe.upg_batch_id is NULL;
--5) Update transactions gl date in xla ae lines which are in closed period